CA签名部署
This commit is contained in:
parent
f68917ae00
commit
6d5eb01d4a
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<AtuoUpdate>
|
<AtuoUpdate>
|
||||||
<ConnectionString>Data Source=.;Initial Catalog=AIMSDB_QHDSGRYY;User ID=sa;Password=Test2020;</ConnectionString>
|
<ConnectionString>Data Source=.;Initial Catalog=AIMSDB_FJZPTFYY;User ID=sa;Password=Test2020;</ConnectionString>
|
||||||
<DataConnectionString>Data Source=.;Initial Catalog=AIMSDB_DATA;User ID=sa;Password=Test2020;</DataConnectionString>
|
<DataConnectionString>Data Source=.;Initial Catalog=AIMSDB_DATA;User ID=sa;Password=Test2020;</DataConnectionString>
|
||||||
<HisConnectionStringOracel>Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.10.7)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl2))));Persist Security Info=True;User ID=smview;Password=i39;</HisConnectionStringOracel>
|
<HisConnectionStringOracel>Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.10.7)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl2))));Persist Security Info=True;User ID=smview;Password=i39;</HisConnectionStringOracel>
|
||||||
<LastLoginNo></LastLoginNo>
|
<LastLoginNo></LastLoginNo>
|
||||||
|
|||||||
28
AIMS/FormLogin.designer.cs
generated
28
AIMS/FormLogin.designer.cs
generated
@ -45,8 +45,8 @@
|
|||||||
this.label2.AutoSize = true;
|
this.label2.AutoSize = true;
|
||||||
this.label2.BackColor = System.Drawing.Color.White;
|
this.label2.BackColor = System.Drawing.Color.White;
|
||||||
this.label2.Font = new System.Drawing.Font("微软雅黑", 9F);
|
this.label2.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||||
this.label2.ForeColor = System.Drawing.Color.SteelBlue;
|
this.label2.ForeColor = System.Drawing.Color.LightSlateGray;
|
||||||
this.label2.Location = new System.Drawing.Point(448, 349);
|
this.label2.Location = new System.Drawing.Point(478, 382);
|
||||||
this.label2.Name = "label2";
|
this.label2.Name = "label2";
|
||||||
this.label2.Size = new System.Drawing.Size(43, 17);
|
this.label2.Size = new System.Drawing.Size(43, 17);
|
||||||
this.label2.TabIndex = 5;
|
this.label2.TabIndex = 5;
|
||||||
@ -58,7 +58,7 @@
|
|||||||
this.btnOk.ColorTable = DevComponents.DotNetBar.eButtonColor.BlueOrb;
|
this.btnOk.ColorTable = DevComponents.DotNetBar.eButtonColor.BlueOrb;
|
||||||
this.btnOk.FocusCuesEnabled = false;
|
this.btnOk.FocusCuesEnabled = false;
|
||||||
this.btnOk.Font = new System.Drawing.Font("微软雅黑", 11.5F);
|
this.btnOk.Font = new System.Drawing.Font("微软雅黑", 11.5F);
|
||||||
this.btnOk.Location = new System.Drawing.Point(435, 270);
|
this.btnOk.Location = new System.Drawing.Point(457, 316);
|
||||||
this.btnOk.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
this.btnOk.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.btnOk.Name = "btnOk";
|
this.btnOk.Name = "btnOk";
|
||||||
this.btnOk.Size = new System.Drawing.Size(76, 43);
|
this.btnOk.Size = new System.Drawing.Size(76, 43);
|
||||||
@ -73,7 +73,7 @@
|
|||||||
this.btnExit.ColorTable = DevComponents.DotNetBar.eButtonColor.BlueOrb;
|
this.btnExit.ColorTable = DevComponents.DotNetBar.eButtonColor.BlueOrb;
|
||||||
this.btnExit.FocusCuesEnabled = false;
|
this.btnExit.FocusCuesEnabled = false;
|
||||||
this.btnExit.Font = new System.Drawing.Font("微软雅黑", 11.5F);
|
this.btnExit.Font = new System.Drawing.Font("微软雅黑", 11.5F);
|
||||||
this.btnExit.Location = new System.Drawing.Point(530, 270);
|
this.btnExit.Location = new System.Drawing.Point(552, 316);
|
||||||
this.btnExit.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
this.btnExit.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.btnExit.Name = "btnExit";
|
this.btnExit.Name = "btnExit";
|
||||||
this.btnExit.Size = new System.Drawing.Size(76, 43);
|
this.btnExit.Size = new System.Drawing.Size(76, 43);
|
||||||
@ -88,8 +88,9 @@
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||||
|
this.labelX1.Font = new System.Drawing.Font("微软雅黑", 11F);
|
||||||
this.labelX1.ForeColor = System.Drawing.SystemColors.ButtonShadow;
|
this.labelX1.ForeColor = System.Drawing.SystemColors.ButtonShadow;
|
||||||
this.labelX1.Location = new System.Drawing.Point(385, 187);
|
this.labelX1.Location = new System.Drawing.Point(413, 217);
|
||||||
this.labelX1.Name = "labelX1";
|
this.labelX1.Name = "labelX1";
|
||||||
this.labelX1.SingleLineColor = System.Drawing.Color.Transparent;
|
this.labelX1.SingleLineColor = System.Drawing.Color.Transparent;
|
||||||
this.labelX1.Size = new System.Drawing.Size(56, 23);
|
this.labelX1.Size = new System.Drawing.Size(56, 23);
|
||||||
@ -103,8 +104,9 @@
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||||
|
this.labelX2.Font = new System.Drawing.Font("微软雅黑", 11F);
|
||||||
this.labelX2.ForeColor = System.Drawing.SystemColors.ButtonShadow;
|
this.labelX2.ForeColor = System.Drawing.SystemColors.ButtonShadow;
|
||||||
this.labelX2.Location = new System.Drawing.Point(392, 225);
|
this.labelX2.Location = new System.Drawing.Point(420, 262);
|
||||||
this.labelX2.Name = "labelX2";
|
this.labelX2.Name = "labelX2";
|
||||||
this.labelX2.SingleLineColor = System.Drawing.Color.Transparent;
|
this.labelX2.SingleLineColor = System.Drawing.Color.Transparent;
|
||||||
this.labelX2.Size = new System.Drawing.Size(42, 23);
|
this.labelX2.Size = new System.Drawing.Size(42, 23);
|
||||||
@ -120,11 +122,12 @@
|
|||||||
this.txtNo.Border.Class = "TextBoxBorder";
|
this.txtNo.Border.Class = "TextBoxBorder";
|
||||||
this.txtNo.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
this.txtNo.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||||
this.txtNo.DisabledBackColor = System.Drawing.Color.White;
|
this.txtNo.DisabledBackColor = System.Drawing.Color.White;
|
||||||
|
this.txtNo.Font = new System.Drawing.Font("微软雅黑", 11F);
|
||||||
this.txtNo.ForeColor = System.Drawing.Color.Black;
|
this.txtNo.ForeColor = System.Drawing.Color.Black;
|
||||||
this.txtNo.Location = new System.Drawing.Point(446, 184);
|
this.txtNo.Location = new System.Drawing.Point(474, 214);
|
||||||
this.txtNo.Name = "txtNo";
|
this.txtNo.Name = "txtNo";
|
||||||
this.txtNo.PreventEnterBeep = true;
|
this.txtNo.PreventEnterBeep = true;
|
||||||
this.txtNo.Size = new System.Drawing.Size(145, 26);
|
this.txtNo.Size = new System.Drawing.Size(145, 27);
|
||||||
this.txtNo.TabIndex = 1;
|
this.txtNo.TabIndex = 1;
|
||||||
this.txtNo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtNo_KeyDown);
|
this.txtNo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtNo_KeyDown);
|
||||||
//
|
//
|
||||||
@ -137,12 +140,13 @@
|
|||||||
this.txtPassWord.Border.Class = "TextBoxBorder";
|
this.txtPassWord.Border.Class = "TextBoxBorder";
|
||||||
this.txtPassWord.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
this.txtPassWord.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||||
this.txtPassWord.DisabledBackColor = System.Drawing.Color.White;
|
this.txtPassWord.DisabledBackColor = System.Drawing.Color.White;
|
||||||
|
this.txtPassWord.Font = new System.Drawing.Font("微软雅黑", 11F);
|
||||||
this.txtPassWord.ForeColor = System.Drawing.Color.Black;
|
this.txtPassWord.ForeColor = System.Drawing.Color.Black;
|
||||||
this.txtPassWord.Location = new System.Drawing.Point(446, 225);
|
this.txtPassWord.Location = new System.Drawing.Point(474, 262);
|
||||||
this.txtPassWord.Name = "txtPassWord";
|
this.txtPassWord.Name = "txtPassWord";
|
||||||
this.txtPassWord.PasswordChar = '*';
|
this.txtPassWord.PasswordChar = '*';
|
||||||
this.txtPassWord.PreventEnterBeep = true;
|
this.txtPassWord.PreventEnterBeep = true;
|
||||||
this.txtPassWord.Size = new System.Drawing.Size(144, 26);
|
this.txtPassWord.Size = new System.Drawing.Size(145, 27);
|
||||||
this.txtPassWord.TabIndex = 2;
|
this.txtPassWord.TabIndex = 2;
|
||||||
this.txtPassWord.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtPassWord_KeyDown);
|
this.txtPassWord.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtPassWord_KeyDown);
|
||||||
//
|
//
|
||||||
@ -151,7 +155,7 @@
|
|||||||
this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
|
this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
|
||||||
this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage")));
|
this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage")));
|
||||||
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||||
this.pictureBox1.Location = new System.Drawing.Point(561, 227);
|
this.pictureBox1.Location = new System.Drawing.Point(624, 257);
|
||||||
this.pictureBox1.Name = "pictureBox1";
|
this.pictureBox1.Name = "pictureBox1";
|
||||||
this.pictureBox1.Size = new System.Drawing.Size(29, 22);
|
this.pictureBox1.Size = new System.Drawing.Size(29, 22);
|
||||||
this.pictureBox1.TabIndex = 17;
|
this.pictureBox1.TabIndex = 17;
|
||||||
@ -165,7 +169,7 @@
|
|||||||
this.BackColor = System.Drawing.SystemColors.Control;
|
this.BackColor = System.Drawing.SystemColors.Control;
|
||||||
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
|
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
|
||||||
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||||
this.ClientSize = new System.Drawing.Size(712, 398);
|
this.ClientSize = new System.Drawing.Size(734, 441);
|
||||||
this.Controls.Add(this.pictureBox1);
|
this.Controls.Add(this.pictureBox1);
|
||||||
this.Controls.Add(this.txtPassWord);
|
this.Controls.Add(this.txtPassWord);
|
||||||
this.Controls.Add(this.txtNo);
|
this.Controls.Add(this.txtNo);
|
||||||
|
|||||||
18924
AIMS/FormLogin.resx
18924
AIMS/FormLogin.resx
File diff suppressed because it is too large
Load Diff
@ -18,6 +18,9 @@ using DCSoftDotfuscate;
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using DocumentManagement;
|
using DocumentManagement;
|
||||||
using AIMSModel;
|
using AIMSModel;
|
||||||
|
using AIMS.Infrastructure.CA;
|
||||||
|
using System.Data;
|
||||||
|
using HelperDB;
|
||||||
|
|
||||||
namespace AIMS
|
namespace AIMS
|
||||||
{
|
{
|
||||||
@ -112,18 +115,43 @@ namespace AIMS
|
|||||||
else if (eventSender is XTextImageElement && IsLoad == true)
|
else if (eventSender is XTextImageElement && IsLoad == true)
|
||||||
{
|
{
|
||||||
frmSelectPersonDoc personDoc = new frmSelectPersonDoc();
|
frmSelectPersonDoc personDoc = new frmSelectPersonDoc();
|
||||||
personDoc.PersonType = (eventSender as XTextImageElement).Alt == "" ? "麻醉医生" : (eventSender as XTextImageElement).Alt;
|
personDoc.PersonType = (eventSender as XTextImageElement).Alt == null ? "麻醉医生" : (eventSender as XTextImageElement).Alt;
|
||||||
personDoc.ShowDialog();
|
DialogResult dialogResult = personDoc.ShowDialog();
|
||||||
|
if (dialogResult == DialogResult.OK)
|
||||||
if (personDoc.SelectPersonData > 0)
|
if (personDoc.SelectPersonData > 0)
|
||||||
{
|
{
|
||||||
Person per = BPerson.SelectSingle(personDoc.SelectPersonData);
|
int PersonId = personDoc.SelectPersonData;
|
||||||
|
DataTable Person = GetPerson(PersonId);
|
||||||
|
if (Person != null && Person.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
string Id = Person.Rows[0][3].ToString();
|
||||||
|
string Name = Person.Rows[0][0].ToString();
|
||||||
|
string Contact = Person.Rows[0][1].ToString();
|
||||||
|
string SignatureStr = Person.Rows[0][2].ToString();
|
||||||
|
|
||||||
|
|
||||||
|
if (SignatureStr == null || SignatureStr == "")
|
||||||
|
SignatureStr = new SignManage().GetSignStr(args.WriterControl.SaveDocumentToString("txt"), args.WriterControl.Document.FileName, Id, Name, Contact);
|
||||||
|
|
||||||
|
if (SignatureStr != null && SignatureStr != "")
|
||||||
|
{
|
||||||
DCSoft.Drawing.XImageValue img = new DCSoft.Drawing.XImageValue();
|
DCSoft.Drawing.XImageValue img = new DCSoft.Drawing.XImageValue();
|
||||||
img.ImageDataBase64String = per.SignatureStr;
|
img.ImageDataBase64String = SignatureStr;
|
||||||
(eventSender as XTextImageElement).Image = img;
|
(eventSender as XTextImageElement).Image = img;
|
||||||
(eventSender as XTextImageElement).Alt = "麻醉医生";
|
//(eventSender as XTextImageElement).Alt = "麻醉医生";
|
||||||
(eventSender as XTextImageElement).Title = per.Id.ToString();
|
(eventSender as XTextImageElement).Title = PersonId.ToString();
|
||||||
(eventSender as XTextImageElement).EditorRefreshView();
|
(eventSender as XTextImageElement).EditorRefreshView();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//清空图片
|
||||||
|
(eventSender as XTextImageElement).Image = null;
|
||||||
|
(eventSender as XTextImageElement).Alt = "麻醉医生";
|
||||||
|
(eventSender as XTextImageElement).Title = "";
|
||||||
|
(eventSender as XTextImageElement).EditorRefreshView();
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//清空图片
|
//清空图片
|
||||||
@ -132,12 +160,6 @@ namespace AIMS
|
|||||||
(eventSender as XTextImageElement).Title = "";
|
(eventSender as XTextImageElement).Title = "";
|
||||||
(eventSender as XTextImageElement).EditorRefreshView();
|
(eventSender as XTextImageElement).EditorRefreshView();
|
||||||
}
|
}
|
||||||
|
|
||||||
//属性赋值判断
|
|
||||||
// (eventSender as XTextImageElement).Image.Value==null 判断是否有图片 是否签名
|
|
||||||
// (eventSender as XTextImageElement).Alt =="签名" 改为已签名或签名ID
|
|
||||||
// (eventSender as XTextImageElement).Title =="标题" 存储对应ca人员介质
|
|
||||||
// (eventSender as XTextImageElement).ID =="image3" 标识Id用于定位赋值图片
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -292,5 +314,12 @@ namespace AIMS
|
|||||||
SelElement.Text = OpeStr;
|
SelElement.Text = OpeStr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public DataTable GetPerson(int SelectPersonData)
|
||||||
|
{
|
||||||
|
DataTable Person = new DataTable();
|
||||||
|
string sql = "select Name,SignatureIndex,SignatureStr,id from Person where id=" + SelectPersonData;
|
||||||
|
Person = DBHelper.GetDataTable(sql);
|
||||||
|
return Person;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,9 +3,9 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Reflection.Emit;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -658,5 +658,46 @@ namespace AIMSExtension
|
|||||||
PublicMethod.WriteLog(ex);
|
PublicMethod.WriteLog(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Byte[]转Image
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="buffer"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static Image BytesToImage(byte[] buffer)
|
||||||
|
{
|
||||||
|
MemoryStream ms = new MemoryStream(buffer);
|
||||||
|
Image image = Image.FromStream(ms);
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 图片转base64
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="img"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string ImgToBase64Str(Image img)
|
||||||
|
{
|
||||||
|
string strbaser64 = "";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Bitmap bmp = new Bitmap(img);
|
||||||
|
using (MemoryStream ms = new MemoryStream())
|
||||||
|
{
|
||||||
|
bmp.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
|
||||||
|
byte[] arr = new byte[ms.Length];
|
||||||
|
ms.Position = 0;
|
||||||
|
ms.Read(arr, 0, (int)ms.Length);
|
||||||
|
ms.Close();
|
||||||
|
|
||||||
|
strbaser64 = Convert.ToBase64String(arr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
strbaser64 = "";
|
||||||
|
}
|
||||||
|
return strbaser64;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,8 @@ namespace AIMS.Infrastructure.CA
|
|||||||
public string GetSignStr(string docstr, string FileName, string Pid, string PName, string PContact)
|
public string GetSignStr(string docstr, string FileName, string Pid, string PName, string PContact)
|
||||||
{
|
{
|
||||||
string SignatureStr = "";
|
string SignatureStr = "";
|
||||||
|
try
|
||||||
|
{
|
||||||
if (PublicMethod.HospitalName == "漳浦天福医院")
|
if (PublicMethod.HospitalName == "漳浦天福医院")
|
||||||
{
|
{
|
||||||
var sdk = new DataSignClient(new SignConfig
|
var sdk = new DataSignClient(new SignConfig
|
||||||
@ -40,9 +42,13 @@ namespace AIMS.Infrastructure.CA
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (System.Exception ex)
|
||||||
|
{
|
||||||
|
PublicMethod.WriteLog(ex);
|
||||||
|
}
|
||||||
return SignatureStr;
|
return SignatureStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateSignatureStr(string Id, string SignatureStr)
|
public void UpdateSignatureStr(string Id, string SignatureStr)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
@ -155,7 +155,8 @@ namespace DocumentManagement
|
|||||||
{
|
{
|
||||||
frmSelectPersonDoc personDoc = new frmSelectPersonDoc();
|
frmSelectPersonDoc personDoc = new frmSelectPersonDoc();
|
||||||
personDoc.PersonType = (eventSender as XTextImageElement).Alt == null ? "麻醉医生" : (eventSender as XTextImageElement).Alt;
|
personDoc.PersonType = (eventSender as XTextImageElement).Alt == null ? "麻醉医生" : (eventSender as XTextImageElement).Alt;
|
||||||
personDoc.ShowDialog();
|
DialogResult dialogResult = personDoc.ShowDialog();
|
||||||
|
if (dialogResult == DialogResult.OK)
|
||||||
if (personDoc.SelectPersonData > 0)
|
if (personDoc.SelectPersonData > 0)
|
||||||
{
|
{
|
||||||
int PersonId = personDoc.SelectPersonData;
|
int PersonId = personDoc.SelectPersonData;
|
||||||
@ -169,7 +170,7 @@ namespace DocumentManagement
|
|||||||
|
|
||||||
|
|
||||||
if (SignatureStr == null || SignatureStr == "")
|
if (SignatureStr == null || SignatureStr == "")
|
||||||
SignatureStr = new SignManage().GetSignStr(args.WriterControl.SaveDocumentToString("txt"), args.WriterControl.Document.FileName,Id, Name, Contact);
|
SignatureStr = new SignManage().GetSignStr(args.WriterControl.SaveDocumentToString("txt"), args.WriterControl.Document.FileName, Id, Name, Contact);
|
||||||
|
|
||||||
if (SignatureStr != null && SignatureStr != "")
|
if (SignatureStr != null && SignatureStr != "")
|
||||||
{
|
{
|
||||||
@ -190,6 +191,14 @@ namespace DocumentManagement
|
|||||||
(eventSender as XTextImageElement).EditorRefreshView();
|
(eventSender as XTextImageElement).EditorRefreshView();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//清空图片
|
||||||
|
(eventSender as XTextImageElement).Image = null;
|
||||||
|
(eventSender as XTextImageElement).Alt = "麻醉医生";
|
||||||
|
(eventSender as XTextImageElement).Title = "";
|
||||||
|
(eventSender as XTextImageElement).EditorRefreshView();
|
||||||
|
}
|
||||||
|
|
||||||
//属性赋值判断
|
//属性赋值判断
|
||||||
// (eventSender as XTextImageElement).Image.Value==null 判断是否有图片 是否签名
|
// (eventSender as XTextImageElement).Image.Value==null 判断是否有图片 是否签名
|
||||||
|
|||||||
@ -163,12 +163,11 @@
|
|||||||
// txtHelpCode
|
// txtHelpCode
|
||||||
//
|
//
|
||||||
this.txtHelpCode.Font = new System.Drawing.Font("宋体", 12F);
|
this.txtHelpCode.Font = new System.Drawing.Font("宋体", 12F);
|
||||||
this.txtHelpCode.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
this.txtHelpCode.ForeColor = System.Drawing.Color.Black;
|
||||||
this.txtHelpCode.Location = new System.Drawing.Point(86, 14);
|
this.txtHelpCode.Location = new System.Drawing.Point(86, 14);
|
||||||
this.txtHelpCode.Name = "txtHelpCode";
|
this.txtHelpCode.Name = "txtHelpCode";
|
||||||
this.txtHelpCode.Size = new System.Drawing.Size(192, 26);
|
this.txtHelpCode.Size = new System.Drawing.Size(192, 26);
|
||||||
this.txtHelpCode.TabIndex = 4;
|
this.txtHelpCode.TabIndex = 4;
|
||||||
this.txtHelpCode.Click += new System.EventHandler(this.txtHelpCode_Click);
|
|
||||||
this.txtHelpCode.TextChanged += new System.EventHandler(this.txtHelpCode_TextChanged);
|
this.txtHelpCode.TextChanged += new System.EventHandler(this.txtHelpCode_TextChanged);
|
||||||
//
|
//
|
||||||
// frmSelectPersonDoc
|
// frmSelectPersonDoc
|
||||||
|
|||||||
@ -24,7 +24,6 @@ namespace DocumentManagement
|
|||||||
SetDgvAttribute(dgvSelectPerson);
|
SetDgvAttribute(dgvSelectPerson);
|
||||||
|
|
||||||
dgvSelectPerson.Select();
|
dgvSelectPerson.Select();
|
||||||
this.txtHelpCode.Text = "简拼/汉字/ICD码";
|
|
||||||
|
|
||||||
for (int i = 0; i < dgvSelectPerson.Rows.Count; i++)
|
for (int i = 0; i < dgvSelectPerson.Rows.Count; i++)
|
||||||
{
|
{
|
||||||
@ -33,17 +32,12 @@ namespace DocumentManagement
|
|||||||
dgvSelectPerson.Rows[i].Cells["CheckBoxColumn"].Value = true;
|
dgvSelectPerson.Rows[i].Cells["CheckBoxColumn"].Value = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
txtHelpCode_TextChanged(null, null);
|
||||||
|
|
||||||
private void txtHelpCode_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
this.txtHelpCode.Text = "";
|
|
||||||
this.txtHelpCode.ForeColor = Color.Black;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnOk_Click(object sender, EventArgs e)
|
private void btnOk_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Close();
|
this.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void txtHelpCode_TextChanged(object sender, EventArgs e)
|
private void txtHelpCode_TextChanged(object sender, EventArgs e)
|
||||||
@ -88,7 +82,7 @@ namespace DocumentManagement
|
|||||||
}
|
}
|
||||||
else if (PersonType == "麻醉医生")
|
else if (PersonType == "麻醉医生")
|
||||||
{
|
{
|
||||||
strSql = "SELECT p.Id,p.Name,p.[No] FROM Person p WHERE p.IsValid=1 AND p.PersonType ='麻醉医生' AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%')";
|
strSql = "SELECT p.Id,p.Name,p.[No] FROM Person p WHERE p.IsValid=1 AND p.PersonType in ('麻醉医生','麻醉护士') AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%') order by PersonOrder asc";
|
||||||
}
|
}
|
||||||
else if (PersonType == "麻醉护士")
|
else if (PersonType == "麻醉护士")
|
||||||
{
|
{
|
||||||
@ -97,7 +91,7 @@ namespace DocumentManagement
|
|||||||
}
|
}
|
||||||
else if (PersonType == "手术室护士")
|
else if (PersonType == "手术室护士")
|
||||||
{
|
{
|
||||||
strSql = "SELECT p.Id,p.Name,p.[No] FROM Person p WHERE p.IsValid=1 AND p.PersonType ='手术室护士' AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%')";
|
strSql = "SELECT p.Id,p.Name,p.[No] FROM Person p WHERE p.IsValid=1 AND p.PersonType ='手术室护士' AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%') order by PersonOrder asc";
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (PersonType == "护士")
|
else if (PersonType == "护士")
|
||||||
|
|||||||
@ -6,6 +6,10 @@ using System.Linq;
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using DevComponents.DotNetBar.Controls;
|
using DevComponents.DotNetBar.Controls;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
using System.Drawing;
|
||||||
|
using AIMS.Infrastructure.CA;
|
||||||
|
using System.Data;
|
||||||
|
using DevComponents.WinForms.Drawing;
|
||||||
|
|
||||||
namespace DrawGraph
|
namespace DrawGraph
|
||||||
{
|
{
|
||||||
@ -81,6 +85,13 @@ namespace DrawGraph
|
|||||||
case EControlType.Directory:
|
case EControlType.Directory:
|
||||||
value = ableEdit.PackValue;
|
value = ableEdit.PackValue;
|
||||||
text = DBManage.GetDictionaryValuesById(ableEdit.PackValue, ableEdit.ControlTitleText);
|
text = DBManage.GetDictionaryValuesById(ableEdit.PackValue, ableEdit.ControlTitleText);
|
||||||
|
if (ableEdit.ControlTitleText.Contains("CA") || ableEdit.ControlTitleText.Contains("签名"))
|
||||||
|
{
|
||||||
|
if (ableEdit.PackValue != null && ableEdit.PackValue != "")
|
||||||
|
{
|
||||||
|
SetCAAbleEditPackObj(ableEdit);
|
||||||
|
}
|
||||||
|
}
|
||||||
//设置属性的值
|
//设置属性的值
|
||||||
template.SetObjValue(OpeRecord, ableEdit.ClassDataSourceName, text, value);
|
template.SetObjValue(OpeRecord, ableEdit.ClassDataSourceName, text, value);
|
||||||
break;
|
break;
|
||||||
@ -104,7 +115,7 @@ namespace DrawGraph
|
|||||||
text = "无";
|
text = "无";
|
||||||
}
|
}
|
||||||
|
|
||||||
TokenEditorManage.SetAutoSizeRowSpan(template,ableEdit, text);
|
TokenEditorManage.SetAutoSizeRowSpan(template, ableEdit, text);
|
||||||
//设置属性的值
|
//设置属性的值
|
||||||
template.SetObjValue(OpeRecord, ableEdit.ClassDataSourceName, text, value);
|
template.SetObjValue(OpeRecord, ableEdit.ClassDataSourceName, text, value);
|
||||||
break;
|
break;
|
||||||
@ -156,6 +167,9 @@ namespace DrawGraph
|
|||||||
case "OperationRecord.AnesthesiaDoctor": //麻醉医生
|
case "OperationRecord.AnesthesiaDoctor": //麻醉医生
|
||||||
Worker_Click(aEdit1, e, 2);
|
Worker_Click(aEdit1, e, 2);
|
||||||
break;
|
break;
|
||||||
|
case "OperationRecord.SignName": //麻醉医生签名
|
||||||
|
Workerqm_Click(aEdit1, e, 2);
|
||||||
|
break;
|
||||||
case "OperationRecord.OperationDoctor":
|
case "OperationRecord.OperationDoctor":
|
||||||
Worker_Click(aEdit1, e, 0);
|
Worker_Click(aEdit1, e, 0);
|
||||||
break;
|
break;
|
||||||
@ -265,6 +279,12 @@ namespace DrawGraph
|
|||||||
if (ableEdit == null) return;
|
if (ableEdit == null) return;
|
||||||
if (myOpeRecord == null) return;
|
if (myOpeRecord == null) return;
|
||||||
if (ableEdit.ControlType == EControlType.Directory)
|
if (ableEdit.ControlType == EControlType.Directory)
|
||||||
|
{
|
||||||
|
if (ableEdit.ControlTitleText.Contains("CA") || ableEdit.ControlTitleText.Contains("签名"))
|
||||||
|
{
|
||||||
|
Workerqm_Click(ableEdit, e, _workersType);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
ableEdit.CControl.MouseDown -= new MouseEventHandler(CControl_MouseDown);
|
ableEdit.CControl.MouseDown -= new MouseEventHandler(CControl_MouseDown);
|
||||||
ableEdit.CControl.MouseDown += new MouseEventHandler(CControl_MouseDown);
|
ableEdit.CControl.MouseDown += new MouseEventHandler(CControl_MouseDown);
|
||||||
@ -293,6 +313,7 @@ namespace DrawGraph
|
|||||||
aSyncSelectDict.Show(template, OpeRecord, sender, _workersType.ToString());
|
aSyncSelectDict.Show(template, OpeRecord, sender, _workersType.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (ableEdit.ControlType == EControlType.Directorys)
|
else if (ableEdit.ControlType == EControlType.Directorys)
|
||||||
{
|
{
|
||||||
SetDirectorysMethod(ableEdit);
|
SetDirectorysMethod(ableEdit);
|
||||||
@ -641,5 +662,90 @@ namespace DrawGraph
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Workerqm_Click(AbleEditPackObj sender, EventArgs e, int _workersType)
|
||||||
|
{
|
||||||
|
AbleEditPackObj ableEdit = sender;
|
||||||
|
if (ableEdit == null) return;
|
||||||
|
if (myOpeRecord != null)
|
||||||
|
{
|
||||||
|
KeyValuePair<string, string> _controlName = new KeyValuePair<string, string>(ableEdit.PackValue, ableEdit.PackText);
|
||||||
|
KeyValuePair<string, string> keyValuePairs = SelectWorker(ableEdit.PackTag, _controlName, _workersType, PublicMethod.DepId, true);
|
||||||
|
|
||||||
|
if (keyValuePairs.Key != null)
|
||||||
|
{
|
||||||
|
string value = keyValuePairs.Key.ToString();
|
||||||
|
string text = keyValuePairs.Value.ToString();
|
||||||
|
ableEdit.PackValue = value;
|
||||||
|
ableEdit.PackText = text;
|
||||||
|
SetCAAbleEditPackObj(ableEdit);
|
||||||
|
//设置属性的值
|
||||||
|
ableEdit.IsVisible = !ableEdit.IsVisible;
|
||||||
|
template.SetObjValue(OpeRecord, ableEdit.ClassDataSourceName, text, value, true);
|
||||||
|
ZedControl.Refresh();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ableEdit.IsVisible = !ableEdit.IsVisible;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void SetCAAbleEditPackObj(AbleEditPackObj ableEdit)
|
||||||
|
{
|
||||||
|
DataTable Person = null;
|
||||||
|
if (!string.IsNullOrWhiteSpace(ableEdit.PackValue))
|
||||||
|
Person = DBManage.GetPerson(int.Parse(ableEdit.PackValue));
|
||||||
|
if (Person != null && Person.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
string Id = Person.Rows[0][3].ToString();
|
||||||
|
string Name = Person.Rows[0][0].ToString();
|
||||||
|
string Contact = Person.Rows[0][1].ToString();
|
||||||
|
string SignatureStr = Person.Rows[0][2].ToString();
|
||||||
|
string SignDataStr = PublicMethod.ImgToBase64Str(ZedControl.GetImage());
|
||||||
|
if (SignatureStr == null || SignatureStr == "")
|
||||||
|
SignatureStr = new SignManage().GetSignStr(SignDataStr, "麻醉记录单", Id, Name, Contact);
|
||||||
|
|
||||||
|
if (SignatureStr != null && SignatureStr != "")
|
||||||
|
{
|
||||||
|
Image img = PublicMethod.BytesToImage(Convert.FromBase64String(SignatureStr));
|
||||||
|
if (img != null)
|
||||||
|
ableEdit.PickImage = img;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (ableEdit != null && string.IsNullOrWhiteSpace(ableEdit.PackValue))
|
||||||
|
{
|
||||||
|
ableEdit.PickImage = null;
|
||||||
|
ableEdit.PackText = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 选择人员
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender">传递取值控件</param>
|
||||||
|
/// <param name="_workersType">人员类型(0医生,1护士,2麻醉医生,3,麻醉护士,9其他)</param>
|
||||||
|
/// <param name="_deptId">科室Id</param>
|
||||||
|
/// <param name="isRadio">是否单选</param>
|
||||||
|
/// <param name="CAHelper">CA签名数据信息</param>
|
||||||
|
public KeyValuePair<string, string> SelectWorker(string Tag, KeyValuePair<string, string> sender, int _workersType, int _deptId, bool isRadio = false)
|
||||||
|
{
|
||||||
|
KeyValuePair<string, string> _controlName = new KeyValuePair<string, string>();
|
||||||
|
SelectPerson personDoc = new SelectPerson();
|
||||||
|
personDoc.PersonType = _workersType == 2 ? "麻醉医生" : _workersType == 4 ? "麻醉护士" : "手术室护士";
|
||||||
|
DialogResult dialogResult = personDoc.ShowDialog();
|
||||||
|
if (dialogResult == DialogResult.OK)
|
||||||
|
{
|
||||||
|
if (personDoc.SelectPersonData != null && personDoc.SelectPersonData != "")
|
||||||
|
{
|
||||||
|
string PersonId = personDoc.SelectPersonData.ToString();
|
||||||
|
_controlName = new KeyValuePair<string, string>(PersonId, personDoc.SelectPersonName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_controlName = new KeyValuePair<string, string>("", "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return _controlName;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -676,7 +676,10 @@ namespace DrawGraph
|
|||||||
case "手术":
|
case "手术":
|
||||||
sql = "select dbo.GetOperation('" + Ids + "') value";
|
sql = "select dbo.GetOperation('" + Ids + "') value";
|
||||||
break;
|
break;
|
||||||
case "CA人员":
|
case "CA":
|
||||||
|
sql = "select dbo.GetPersons('" + Ids + "') value";
|
||||||
|
break;
|
||||||
|
case "签名":
|
||||||
sql = "select dbo.GetPersons('" + Ids + "') value";
|
sql = "select dbo.GetPersons('" + Ids + "') value";
|
||||||
break;
|
break;
|
||||||
case "人员":
|
case "人员":
|
||||||
@ -772,5 +775,12 @@ namespace DrawGraph
|
|||||||
}
|
}
|
||||||
return Explain;
|
return Explain;
|
||||||
}
|
}
|
||||||
|
public static DataTable GetPerson(int SelectPersonData)
|
||||||
|
{
|
||||||
|
DataTable Person = new DataTable();
|
||||||
|
string sql = "select Name,SignatureIndex,SignatureStr,id from Person where id=" + SelectPersonData;
|
||||||
|
Person = DBHelper.GetDataTable(sql);
|
||||||
|
return Person;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -130,7 +130,7 @@ namespace DrawGraph
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!isDrug)
|
if (!isDrug && aSyncTip!=null)
|
||||||
{
|
{
|
||||||
viewStr = BeginTime.ToString("HH:mm");
|
viewStr = BeginTime.ToString("HH:mm");
|
||||||
aSyncTip.ViewStr = viewStr;
|
aSyncTip.ViewStr = viewStr;
|
||||||
|
|||||||
@ -141,6 +141,8 @@ namespace DrawGraph
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!isDrug)
|
if (!isDrug)
|
||||||
|
{
|
||||||
|
if (aSyncTip != null)
|
||||||
{
|
{
|
||||||
viewStr = BeginTime.ToString("HH:mm");
|
viewStr = BeginTime.ToString("HH:mm");
|
||||||
aSyncTip.ViewStr = viewStr;
|
aSyncTip.ViewStr = viewStr;
|
||||||
@ -148,6 +150,7 @@ namespace DrawGraph
|
|||||||
ZedControl.Refresh();
|
ZedControl.Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
public override void MouseUp(ZedGraphControl sender, MouseEventArgs e)
|
public override void MouseUp(ZedGraphControl sender, MouseEventArgs e)
|
||||||
@ -240,7 +243,7 @@ namespace DrawGraph
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (records.Count > 0)
|
if (records.Count > 0)
|
||||||
myOpeRecord.SpeedyDrugsMethod(records,BeginTime);
|
myOpeRecord.SpeedyDrugsMethod(records, BeginTime);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
myOpeRecord.SpeedyDrugsMethod(null, BeginTime);
|
myOpeRecord.SpeedyDrugsMethod(null, BeginTime);
|
||||||
|
|||||||
209
DrawGraph/AreaManage/SelectPerson.Designer.cs
generated
Normal file
209
DrawGraph/AreaManage/SelectPerson.Designer.cs
generated
Normal file
@ -0,0 +1,209 @@
|
|||||||
|
namespace DrawGraph
|
||||||
|
{
|
||||||
|
partial class SelectPerson
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.panel1 = new System.Windows.Forms.Panel();
|
||||||
|
this.panel2 = new System.Windows.Forms.Panel();
|
||||||
|
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.dgvSelectPerson = new System.Windows.Forms.DataGridView();
|
||||||
|
this.IdColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.CheckBoxColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||||
|
this.NameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.workno = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.btnOk = new System.Windows.Forms.Button();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.txtHelpCode = new System.Windows.Forms.TextBox();
|
||||||
|
this.panel1.SuspendLayout();
|
||||||
|
this.panel2.SuspendLayout();
|
||||||
|
this.groupBox2.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dgvSelectPerson)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// panel1
|
||||||
|
//
|
||||||
|
this.panel1.Controls.Add(this.panel2);
|
||||||
|
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.panel1.Name = "panel1";
|
||||||
|
this.panel1.Size = new System.Drawing.Size(398, 482);
|
||||||
|
this.panel1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// panel2
|
||||||
|
//
|
||||||
|
this.panel2.BackColor = System.Drawing.Color.AliceBlue;
|
||||||
|
this.panel2.Controls.Add(this.groupBox2);
|
||||||
|
this.panel2.Controls.Add(this.label2);
|
||||||
|
this.panel2.Controls.Add(this.btnOk);
|
||||||
|
this.panel2.Controls.Add(this.label1);
|
||||||
|
this.panel2.Controls.Add(this.txtHelpCode);
|
||||||
|
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.panel2.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.panel2.Name = "panel2";
|
||||||
|
this.panel2.Size = new System.Drawing.Size(398, 482);
|
||||||
|
this.panel2.TabIndex = 2;
|
||||||
|
//
|
||||||
|
// groupBox2
|
||||||
|
//
|
||||||
|
this.groupBox2.Controls.Add(this.dgvSelectPerson);
|
||||||
|
this.groupBox2.Font = new System.Drawing.Font("宋体", 9.5F);
|
||||||
|
this.groupBox2.Location = new System.Drawing.Point(3, 48);
|
||||||
|
this.groupBox2.Name = "groupBox2";
|
||||||
|
this.groupBox2.Size = new System.Drawing.Size(395, 431);
|
||||||
|
this.groupBox2.TabIndex = 15;
|
||||||
|
this.groupBox2.TabStop = false;
|
||||||
|
//
|
||||||
|
// dgvSelectPerson
|
||||||
|
//
|
||||||
|
this.dgvSelectPerson.AllowUserToAddRows = false;
|
||||||
|
this.dgvSelectPerson.BackgroundColor = System.Drawing.Color.White;
|
||||||
|
this.dgvSelectPerson.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
this.dgvSelectPerson.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||||
|
this.IdColumn,
|
||||||
|
this.CheckBoxColumn,
|
||||||
|
this.NameColumn,
|
||||||
|
this.workno});
|
||||||
|
this.dgvSelectPerson.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.dgvSelectPerson.Location = new System.Drawing.Point(3, 18);
|
||||||
|
this.dgvSelectPerson.Name = "dgvSelectPerson";
|
||||||
|
this.dgvSelectPerson.RowHeadersVisible = false;
|
||||||
|
this.dgvSelectPerson.RowTemplate.Height = 23;
|
||||||
|
this.dgvSelectPerson.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||||
|
this.dgvSelectPerson.Size = new System.Drawing.Size(389, 410);
|
||||||
|
this.dgvSelectPerson.TabIndex = 3;
|
||||||
|
this.dgvSelectPerson.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectPerson_CellClick);
|
||||||
|
//
|
||||||
|
// IdColumn
|
||||||
|
//
|
||||||
|
this.IdColumn.DataPropertyName = "Id";
|
||||||
|
this.IdColumn.Frozen = true;
|
||||||
|
this.IdColumn.HeaderText = "Id";
|
||||||
|
this.IdColumn.Name = "IdColumn";
|
||||||
|
this.IdColumn.ReadOnly = true;
|
||||||
|
this.IdColumn.Visible = false;
|
||||||
|
//
|
||||||
|
// CheckBoxColumn
|
||||||
|
//
|
||||||
|
this.CheckBoxColumn.HeaderText = "选择";
|
||||||
|
this.CheckBoxColumn.Name = "CheckBoxColumn";
|
||||||
|
this.CheckBoxColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||||
|
this.CheckBoxColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||||
|
this.CheckBoxColumn.Width = 70;
|
||||||
|
//
|
||||||
|
// NameColumn
|
||||||
|
//
|
||||||
|
this.NameColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
this.NameColumn.DataPropertyName = "Name";
|
||||||
|
this.NameColumn.HeaderText = "名称";
|
||||||
|
this.NameColumn.Name = "NameColumn";
|
||||||
|
this.NameColumn.ReadOnly = true;
|
||||||
|
//
|
||||||
|
// workno
|
||||||
|
//
|
||||||
|
this.workno.DataPropertyName = "No";
|
||||||
|
this.workno.HeaderText = "工号";
|
||||||
|
this.workno.Name = "workno";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Font = new System.Drawing.Font("宋体", 12F);
|
||||||
|
this.label2.Location = new System.Drawing.Point(40, 18);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(39, 16);
|
||||||
|
this.label2.TabIndex = 7;
|
||||||
|
this.label2.Text = "查询";
|
||||||
|
//
|
||||||
|
// btnOk
|
||||||
|
//
|
||||||
|
this.btnOk.Font = new System.Drawing.Font("宋体", 9.5F);
|
||||||
|
this.btnOk.Location = new System.Drawing.Point(290, 12);
|
||||||
|
this.btnOk.Name = "btnOk";
|
||||||
|
this.btnOk.Size = new System.Drawing.Size(80, 30);
|
||||||
|
this.btnOk.TabIndex = 6;
|
||||||
|
this.btnOk.Text = "确定";
|
||||||
|
this.btnOk.UseVisualStyleBackColor = true;
|
||||||
|
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(-75, 127);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(53, 12);
|
||||||
|
this.label1.TabIndex = 5;
|
||||||
|
this.label1.Text = "诊断查询";
|
||||||
|
//
|
||||||
|
// txtHelpCode
|
||||||
|
//
|
||||||
|
this.txtHelpCode.Font = new System.Drawing.Font("宋体", 12F);
|
||||||
|
this.txtHelpCode.ForeColor = System.Drawing.Color.Black;
|
||||||
|
this.txtHelpCode.Location = new System.Drawing.Point(86, 14);
|
||||||
|
this.txtHelpCode.Name = "txtHelpCode";
|
||||||
|
this.txtHelpCode.Size = new System.Drawing.Size(192, 26);
|
||||||
|
this.txtHelpCode.TabIndex = 4;
|
||||||
|
this.txtHelpCode.TextChanged += new System.EventHandler(this.txtHelpCode_TextChanged);
|
||||||
|
//
|
||||||
|
// SelectPerson
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(398, 482);
|
||||||
|
this.Controls.Add(this.panel1);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "SelectPerson";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Load += new System.EventHandler(this.SelectPerson_Load);
|
||||||
|
this.panel1.ResumeLayout(false);
|
||||||
|
this.panel2.ResumeLayout(false);
|
||||||
|
this.panel2.PerformLayout();
|
||||||
|
this.groupBox2.ResumeLayout(false);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dgvSelectPerson)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Panel panel1;
|
||||||
|
private System.Windows.Forms.Panel panel2;
|
||||||
|
private System.Windows.Forms.GroupBox groupBox2;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.Button btnOk;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.TextBox txtHelpCode;
|
||||||
|
private System.Windows.Forms.DataGridView dgvSelectPerson;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn IdColumn;
|
||||||
|
private System.Windows.Forms.DataGridViewCheckBoxColumn CheckBoxColumn;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn NameColumn;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn workno;
|
||||||
|
}
|
||||||
|
}
|
||||||
112
DrawGraph/AreaManage/SelectPerson.cs
Normal file
112
DrawGraph/AreaManage/SelectPerson.cs
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace DrawGraph
|
||||||
|
{
|
||||||
|
public partial class SelectPerson : Form
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 医生 麻醉医生 麻醉护士
|
||||||
|
/// </summary>
|
||||||
|
public string PersonType = "";
|
||||||
|
public string SelectPersonData;
|
||||||
|
public string SelectPersonName;
|
||||||
|
|
||||||
|
public SelectPerson()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SelectPerson_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
SetDgvAttribute(dgvSelectPerson);
|
||||||
|
|
||||||
|
dgvSelectPerson.Select();
|
||||||
|
|
||||||
|
for (int i = 0; i < dgvSelectPerson.Rows.Count; i++)
|
||||||
|
{
|
||||||
|
if (SelectPersonData == dgvSelectPerson.Rows[i].Cells["IdColumn"].Value.ToString())
|
||||||
|
{
|
||||||
|
dgvSelectPerson.Rows[i].Cells["CheckBoxColumn"].Value = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
txtHelpCode_TextChanged(null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnOk_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void txtHelpCode_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
dgvSelectPerson.DataSource = GetPersonDataTableByDepId(txtHelpCode.Text.Trim(), txtHelpCode.Text == "" ? PersonType : "");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void dgvSelectPerson_CellClick(object sender, DataGridViewCellEventArgs e)
|
||||||
|
{
|
||||||
|
if (Convert.ToBoolean(dgvSelectPerson.CurrentRow.Cells["CheckBoxColumn"].EditedFormattedValue) == false)
|
||||||
|
{
|
||||||
|
SelectPersonData = dgvSelectPerson.CurrentRow.Cells["IdColumn"].Value.ToString();
|
||||||
|
SelectPersonName = dgvSelectPerson.CurrentRow.Cells["NameColumn"].Value.ToString() ;
|
||||||
|
dgvSelectPerson.CurrentRow.Cells["CheckBoxColumn"].Value = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SelectPersonData = "";
|
||||||
|
SelectPersonName = "";
|
||||||
|
dgvSelectPerson.CurrentRow.Cells["CheckBoxColumn"].Value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void SetDgvAttribute(System.Windows.Forms.DataGridView dgv)
|
||||||
|
{
|
||||||
|
dgv.AllowUserToResizeColumns = false;
|
||||||
|
dgv.AllowUserToResizeRows = false;
|
||||||
|
dgv.AllowUserToAddRows = false;
|
||||||
|
dgv.AllowUserToDeleteRows = false;
|
||||||
|
dgv.ReadOnly = true;
|
||||||
|
dgv.BackgroundColor = System.Drawing.Color.Snow;
|
||||||
|
|
||||||
|
}
|
||||||
|
public static DataTable GetPersonDataTableByDepId(string HelpCode, string PersonType)
|
||||||
|
{
|
||||||
|
string strSql = "";
|
||||||
|
|
||||||
|
if (HelpCode == "简拼/汉字/ICD码")
|
||||||
|
{
|
||||||
|
HelpCode = "";
|
||||||
|
}
|
||||||
|
if (PersonType == "医生")
|
||||||
|
{
|
||||||
|
strSql = "SELECT p.Id,p.Name,p.[No] FROM Person p WHERE p.IsValid=1 AND p.PersonType ='医生' AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%')";
|
||||||
|
}
|
||||||
|
else if (PersonType == "麻醉医生")
|
||||||
|
{
|
||||||
|
strSql = "SELECT p.Id,p.Name,p.[No] FROM Person p WHERE p.IsValid=1 AND p.PersonType in ('麻醉医生','麻醉护士') AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%') order by PersonOrder asc";
|
||||||
|
}
|
||||||
|
else if (PersonType == "麻醉护士")
|
||||||
|
{
|
||||||
|
strSql = "SELECT p.Id,p.Name,p.[No] FROM Person p WHERE p.IsValid=1 AND p.PersonType ='麻醉护士' AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%')";
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (PersonType == "手术室护士")
|
||||||
|
{
|
||||||
|
strSql = "SELECT p.Id,p.Name,p.[No] FROM Person p WHERE p.IsValid=1 AND p.PersonType ='手术室护士' AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%') order by PersonOrder asc";
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (PersonType == "护士")
|
||||||
|
{
|
||||||
|
strSql = "SELECT p.Id,p.Name,p.[No] FROM Person p WHERE p.IsValid=1 AND p.PersonType like '%护士%' AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%')";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
strSql = "SELECT p.Id,p.Name,p.[No] FROM Person p WHERE p.IsValid=1 AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%')";
|
||||||
|
}
|
||||||
|
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
132
DrawGraph/AreaManage/SelectPerson.resx
Normal file
132
DrawGraph/AreaManage/SelectPerson.resx
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<metadata name="IdColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="CheckBoxColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="NameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="workno.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
||||||
@ -1,14 +1,14 @@
|
|||||||
using AIMSExtension;
|
using AIMS.Infrastructure.CA;
|
||||||
|
using AIMSExtension;
|
||||||
using DevComponents.DotNetBar.Controls;
|
using DevComponents.DotNetBar.Controls;
|
||||||
using DevComponents.Editors.DateTimeAdv;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using static System.Net.Mime.MediaTypeNames;
|
|
||||||
|
|
||||||
namespace DrawGraph
|
namespace DrawGraph
|
||||||
{
|
{
|
||||||
@ -387,8 +387,23 @@ namespace DrawGraph
|
|||||||
value = value.TrimEnd(',');
|
value = value.TrimEnd(',');
|
||||||
break;
|
break;
|
||||||
case EControlType.Directory:
|
case EControlType.Directory:
|
||||||
|
if (ableEdit.ControlTitleText == "CA" || ableEdit.ControlTitleText == "签名")
|
||||||
|
{
|
||||||
|
value = ableEdit.PackValue;
|
||||||
|
text = DBManage.GetDictionaryValuesById(ableEdit.PackValue, ableEdit.ControlTitleText);
|
||||||
|
if (ableEdit.ControlTitleText.Contains("CA") || ableEdit.ControlTitleText.Contains("签名"))
|
||||||
|
{
|
||||||
|
if (ableEdit.PackValue != null && ableEdit.PackValue != "")
|
||||||
|
{
|
||||||
|
SetCAAbleEditPackObj(ableEdit);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
text = ableEdit.CControl.Text;
|
text = ableEdit.CControl.Text;
|
||||||
value = ableEdit.CControl.Text;
|
value = ableEdit.CControl.Text;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case EControlType.Directorys:
|
case EControlType.Directorys:
|
||||||
text = ableEdit.CControl.Text;
|
text = ableEdit.CControl.Text;
|
||||||
@ -425,6 +440,9 @@ namespace DrawGraph
|
|||||||
control.Text = text;
|
control.Text = text;
|
||||||
break;
|
break;
|
||||||
case EControlType.Directory:
|
case EControlType.Directory:
|
||||||
|
if (ableEdit.ControlTitleText == "CA" || ableEdit.ControlTitleText == "签名")
|
||||||
|
Workerqm_Click(ableEdit, e, 2);
|
||||||
|
else
|
||||||
TYZD_Click(ableEdit, e, true);
|
TYZD_Click(ableEdit, e, true);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -620,12 +638,12 @@ namespace DrawGraph
|
|||||||
private void EditTextBox_DoubleClick(object sender, EventArgs e)
|
private void EditTextBox_DoubleClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
TextBox txt = sender as TextBox;
|
TextBox txt = sender as TextBox;
|
||||||
TokenEditorManage.SelectDictList(OpeRecord as OperationRecord, txt,false);
|
TokenEditorManage.SelectDictList(OpeRecord as OperationRecord, txt, false);
|
||||||
}
|
}
|
||||||
private void EditTextBox_TextChanged(object sender, EventArgs e)
|
private void EditTextBox_TextChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
TextBox txt = sender as TextBox;
|
TextBox txt = sender as TextBox;
|
||||||
TokenEditorManage.SelectDictList(OpeRecord as OperationRecord, txt,false);
|
TokenEditorManage.SelectDictList(OpeRecord as OperationRecord, txt, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void tokenEditor_ValidateToken(object sender, DevComponents.DotNetBar.Controls.ValidateTokenEventArgs ea)
|
private void tokenEditor_ValidateToken(object sender, DevComponents.DotNetBar.Controls.ValidateTokenEventArgs ea)
|
||||||
@ -635,7 +653,7 @@ namespace DrawGraph
|
|||||||
if (ea.IsNewToken)
|
if (ea.IsNewToken)
|
||||||
{
|
{
|
||||||
tokenEditor.EditTextBox.TextChanged -= EditTextBox_TextChanged;
|
tokenEditor.EditTextBox.TextChanged -= EditTextBox_TextChanged;
|
||||||
tokenEditor.SelectedTokens.Add(new EditToken( ea.Token.Value, ea.Token.Value));
|
tokenEditor.SelectedTokens.Add(new EditToken(ea.Token.Value, ea.Token.Value));
|
||||||
ea.Token = null;
|
ea.Token = null;
|
||||||
tokenEditor.EditTextBox.Text = "";
|
tokenEditor.EditTextBox.Text = "";
|
||||||
tokenEditor.IsPopupOpen = false;
|
tokenEditor.IsPopupOpen = false;
|
||||||
@ -649,5 +667,98 @@ namespace DrawGraph
|
|||||||
AbleEditPackObj aEdit = tokenEditor.Tag as AbleEditPackObj;
|
AbleEditPackObj aEdit = tokenEditor.Tag as AbleEditPackObj;
|
||||||
TokenEditorManage.SaveDictItemText(template, OpeRecord as OperationRecord, tokenEditor, aEdit);
|
TokenEditorManage.SaveDictItemText(template, OpeRecord as OperationRecord, tokenEditor, aEdit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Workerqm_Click(AbleEditPackObj sender, EventArgs e, int _workersType)
|
||||||
|
{
|
||||||
|
AbleEditPackObj ableEdit = sender;
|
||||||
|
if (ableEdit == null) return;
|
||||||
|
if (myOpeRecord != null)
|
||||||
|
{
|
||||||
|
KeyValuePair<string, string> _controlName = new KeyValuePair<string, string>(ableEdit.PackValue, ableEdit.PackText);
|
||||||
|
KeyValuePair<string, string> keyValuePairs = SelectWorker(ableEdit.PackTag, _controlName, _workersType, PublicMethod.DepId, true);
|
||||||
|
|
||||||
|
if (keyValuePairs.Key != null)
|
||||||
|
{
|
||||||
|
string value = keyValuePairs.Key.ToString();
|
||||||
|
string text = keyValuePairs.Value.ToString();
|
||||||
|
ableEdit.PackValue = value;
|
||||||
|
ableEdit.PackText = text;
|
||||||
|
SetCAAbleEditPackObj(ableEdit);
|
||||||
|
//设置属性的值
|
||||||
|
ableEdit.IsVisible = false;// !ableEdit.IsVisible;
|
||||||
|
template.SetObjValue(OpeRecord, ableEdit.ClassDataSourceName, text, value, true);
|
||||||
|
ZedControl.Refresh();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ableEdit.IsVisible = !ableEdit.IsVisible;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void SetCAAbleEditPackObj(AbleEditPackObj ableEdit)
|
||||||
|
{
|
||||||
|
DataTable Person = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrWhiteSpace(ableEdit.PackValue))
|
||||||
|
Person = DBManage.GetPerson(int.Parse(ableEdit.PackValue));
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
Person = null;
|
||||||
|
}
|
||||||
|
if (Person != null && Person.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
string Id = Person.Rows[0][3].ToString();
|
||||||
|
string Name = Person.Rows[0][0].ToString();
|
||||||
|
string Contact = Person.Rows[0][1].ToString();
|
||||||
|
string SignatureStr = Person.Rows[0][2].ToString();
|
||||||
|
string SignDataStr = PublicMethod.ImgToBase64Str(ZedControl.GetImage());
|
||||||
|
if (SignatureStr == null || SignatureStr == "")
|
||||||
|
SignatureStr = new SignManage().GetSignStr(SignDataStr, "麻醉记录单", Id, Name, Contact);
|
||||||
|
|
||||||
|
if (SignatureStr != null && SignatureStr != "")
|
||||||
|
{
|
||||||
|
ableEdit.PackText = Name;
|
||||||
|
Image img = PublicMethod.BytesToImage(Convert.FromBase64String(SignatureStr));
|
||||||
|
if (img != null)
|
||||||
|
ableEdit.PickImage = img;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (ableEdit != null && string.IsNullOrWhiteSpace(ableEdit.PackValue))
|
||||||
|
{
|
||||||
|
ableEdit.PickImage = null;
|
||||||
|
ableEdit.PackText = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 选择人员
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender">传递取值控件</param>
|
||||||
|
/// <param name="_workersType">人员类型(0医生,1护士,2麻醉医生,3,麻醉护士,9其他)</param>
|
||||||
|
/// <param name="_deptId">科室Id</param>
|
||||||
|
/// <param name="isRadio">是否单选</param>
|
||||||
|
/// <param name="CAHelper">CA签名数据信息</param>
|
||||||
|
public KeyValuePair<string, string> SelectWorker(string Tag, KeyValuePair<string, string> sender, int _workersType, int _deptId, bool isRadio = false)
|
||||||
|
{
|
||||||
|
KeyValuePair<string, string> _controlName = new KeyValuePair<string, string>();
|
||||||
|
SelectPerson personDoc = new SelectPerson();
|
||||||
|
personDoc.PersonType = _workersType == 2 ? "麻醉医生" : "护士";
|
||||||
|
DialogResult dialogResult = personDoc.ShowDialog();
|
||||||
|
if (dialogResult == DialogResult.OK)
|
||||||
|
{
|
||||||
|
if (personDoc.SelectPersonData != null && personDoc.SelectPersonData != "")
|
||||||
|
{
|
||||||
|
string PersonId = personDoc.SelectPersonData.ToString();
|
||||||
|
_controlName = new KeyValuePair<string, string>(PersonId, personDoc.SelectPersonName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_controlName = new KeyValuePair<string, string>("", "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return _controlName;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
using AIMSExtension;
|
||||||
using DevComponents.DotNetBar;
|
using DevComponents.DotNetBar;
|
||||||
using DevComponents.DotNetBar.Controls;
|
using DevComponents.DotNetBar.Controls;
|
||||||
using DevComponents.Editors;
|
using DevComponents.Editors;
|
||||||
@ -46,6 +47,8 @@ namespace DrawGraph
|
|||||||
|
|
||||||
private EIsBool isDateNull = EIsBool.False;
|
private EIsBool isDateNull = EIsBool.False;
|
||||||
|
|
||||||
|
private Image pickImage = null;
|
||||||
|
|
||||||
[method: CompilerGenerated]
|
[method: CompilerGenerated]
|
||||||
//[DebuggerBrowsable(DebuggerBrowsableState.Never), CompilerGenerated]
|
//[DebuggerBrowsable(DebuggerBrowsableState.Never), CompilerGenerated]
|
||||||
public event AbleEditPackObj.ClickEventHandler Click;
|
public event AbleEditPackObj.ClickEventHandler Click;
|
||||||
@ -214,6 +217,19 @@ namespace DrawGraph
|
|||||||
this.isDateNull = value;
|
this.isDateNull = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
[NoCreatControlAttributs, JsonIgnore]
|
||||||
|
public Image PickImage
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.pickImage;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this.pickImage = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private float GetFontSize()
|
private float GetFontSize()
|
||||||
{
|
{
|
||||||
@ -430,48 +446,86 @@ namespace DrawGraph
|
|||||||
if (!flag17)
|
if (!flag17)
|
||||||
{
|
{
|
||||||
this.SetPackContent();
|
this.SetPackContent();
|
||||||
bool flag18 = this.controlType == EControlType.Directory && base.ControlTitleText.Contains("CA人员");
|
bool flag18 = this.controlType == EControlType.Directory ;//&& base.ControlTitleText.Contains("CA人员")
|
||||||
if (flag18)
|
if (flag18)
|
||||||
{
|
|
||||||
string text = Application.StartupPath;
|
|
||||||
text += "\\PrintWorkerImage\\";
|
|
||||||
text = text + base.PackValue + ".png";
|
|
||||||
bool flag19 = File.Exists(text);
|
|
||||||
if (flag19)
|
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
FileStream fileStream = new FileStream(text, FileMode.Open, FileAccess.Read);
|
bool flag20 = this.PickImage != null;
|
||||||
Image image = Image.FromStream(fileStream);
|
if (flag20)
|
||||||
fileStream.Close();
|
|
||||||
ZUtil.DrawImage(new ImageObj(image, (double)base.RealX, (double)base.RealY, (double)(base.RealEndX - base.RealX), (double)(base.RealEndY - base.RealY))
|
|
||||||
{
|
{
|
||||||
IsVisible = true,
|
try
|
||||||
ZOrder = ZOrder.A_InFront,
|
|
||||||
Tag = base.PackTag,
|
|
||||||
Location =
|
|
||||||
{
|
{
|
||||||
CoordinateFrame = CoordType.PaneFraction,
|
ImageObj imageObj = new ImageObj(this.PickImage, (double)base.RealX, (double)base.RealY, (double)(base.RealEndX - base.RealX), (double)(base.RealEndY - base.RealY));
|
||||||
AlignH = AlignH.Left,
|
imageObj.IsVisible = true;
|
||||||
AlignV = AlignV.Top
|
imageObj.ZOrder = ZOrder.A_InFront;
|
||||||
},
|
imageObj.Tag = base.PackTag;
|
||||||
//IsVisible = true,
|
imageObj.Location.CoordinateFrame = CoordType.PaneFraction;
|
||||||
//ZOrder = ZOrder.A_InFront
|
imageObj.Location.AlignH = 0;
|
||||||
}, this.baseZed);
|
imageObj.Location.AlignV = 0;
|
||||||
|
ZUtil.DrawImage(imageObj, this.baseZed);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
PublicMethod.WriteLog(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bool flag20 = base.PackValue != "";
|
bool flag21 = base.PackValue != "";
|
||||||
if (flag20)
|
if (flag21)
|
||||||
{
|
{
|
||||||
base.Draw();
|
base.Draw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception var_37_48B)
|
||||||
|
{
|
||||||
|
bool flag22 = base.PackValue != "";
|
||||||
|
if (flag22)
|
||||||
|
{
|
||||||
|
base.Draw();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//string text = Application.StartupPath;
|
||||||
|
//text += "\\PrintWorkerImage\\";
|
||||||
|
//text = text + base.PackValue + ".png";
|
||||||
|
//bool flag19 = File.Exists(text);
|
||||||
|
//if (flag19)
|
||||||
|
//{
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// FileStream fileStream = new FileStream(text, FileMode.Open, FileAccess.Read);
|
||||||
|
// Image image = Image.FromStream(fileStream);
|
||||||
|
// fileStream.Close();
|
||||||
|
// ZUtil.DrawImage(new ImageObj(image, (double)base.RealX, (double)base.RealY, (double)(base.RealEndX - base.RealX), (double)(base.RealEndY - base.RealY))
|
||||||
|
// {
|
||||||
|
// IsVisible = true,
|
||||||
|
// ZOrder = ZOrder.A_InFront,
|
||||||
|
// Tag = base.PackTag,
|
||||||
|
// Location =
|
||||||
|
// {
|
||||||
|
// CoordinateFrame = CoordType.PaneFraction,
|
||||||
|
// AlignH = AlignH.Left,
|
||||||
|
// AlignV = AlignV.Top
|
||||||
|
// },
|
||||||
|
// //IsVisible = true,
|
||||||
|
// //ZOrder = ZOrder.A_InFront
|
||||||
|
// }, this.baseZed);
|
||||||
|
// }
|
||||||
|
// catch (Exception)
|
||||||
|
// {
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// bool flag20 = base.PackValue != "";
|
||||||
|
// if (flag20)
|
||||||
|
// {
|
||||||
|
// base.Draw();
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
base.Draw();
|
base.Draw();
|
||||||
|
|||||||
@ -68,6 +68,12 @@
|
|||||||
<Compile Include="AreaManage\DeletePhysios.cs">
|
<Compile Include="AreaManage\DeletePhysios.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="AreaManage\SelectPerson.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="AreaManage\SelectPerson.Designer.cs">
|
||||||
|
<DependentUpon>SelectPerson.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="AreaManage\OperationRecordAnalgesia.cs" />
|
<Compile Include="AreaManage\OperationRecordAnalgesia.cs" />
|
||||||
<Compile Include="AreaManage\OutputManage.cs" />
|
<Compile Include="AreaManage\OutputManage.cs" />
|
||||||
<Compile Include="AreaManage\SelectDictText.cs" />
|
<Compile Include="AreaManage\SelectDictText.cs" />
|
||||||
@ -251,6 +257,9 @@
|
|||||||
<EmbeddedResource Include="AreaManage\DeletePhysios.resx">
|
<EmbeddedResource Include="AreaManage\DeletePhysios.resx">
|
||||||
<DependentUpon>DeletePhysios.cs</DependentUpon>
|
<DependentUpon>DeletePhysios.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="AreaManage\SelectPerson.resx">
|
||||||
|
<DependentUpon>SelectPerson.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="frmMessageBox.resx">
|
<EmbeddedResource Include="frmMessageBox.resx">
|
||||||
<DependentUpon>frmMessageBox.cs</DependentUpon>
|
<DependentUpon>frmMessageBox.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user