大连上线问题修改 镇痛记录单 麻醉数据
This commit is contained in:
parent
200d218622
commit
7f5c93896e
@ -421,8 +421,8 @@ namespace AIMS.OperationAfter.UI
|
||||
doc.CloseP += new ucDocument.CloseParent(CloseTab);
|
||||
doc.Parent = c;
|
||||
doc.Dock = DockStyle.Fill;
|
||||
doc.Show();
|
||||
doc.tsbSaveAndPrint_Click(null, null);
|
||||
doc.Show();
|
||||
doc.myEditControl.ExecuteCommand("FilePrint", false, null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -160,6 +160,8 @@ namespace AIMS
|
||||
sideNavItem.Symbol = "\uf15b";
|
||||
if (menuSec.Name == "恢复记录")
|
||||
sideNavItem.Symbol = "\uf15c";
|
||||
if (menuSec.Name == "ÓÕµ¼¼Ç¼")
|
||||
sideNavItem.Symbol = "\uf044";
|
||||
if (menuSec.Name == "镇痛记录")
|
||||
sideNavItem.Symbol = "\uf044";
|
||||
if (menuSec.Name == "复苏记录")
|
||||
|
||||
@ -27,8 +27,8 @@ namespace AIMS.OperationAanesthesia
|
||||
if (reVal)
|
||||
{
|
||||
templateManage.DrawArea();
|
||||
DrawGraph.ZUtil.DrawText(AIMSExtension.PublicMethod.HospitalName, 0.355, 0.053, Zgc, DrawGraph.ZUtil.Font18);
|
||||
DrawGraph.ZUtil.DrawText("麻醉复苏室记录单", 0.39, 0.08, Zgc, DrawGraph.ZUtil.Font18);
|
||||
//DrawGraph.ZUtil.DrawText(AIMSExtension.PublicMethod.HospitalName, 0.355, 0.053, Zgc, DrawGraph.ZUtil.Font18);
|
||||
//DrawGraph.ZUtil.DrawText("麻醉复苏室记录单", 0.39, 0.08, Zgc, DrawGraph.ZUtil.Font18);
|
||||
|
||||
#region 设置界面自适应
|
||||
//在此处可随时设置板子的属性
|
||||
@ -115,8 +115,8 @@ namespace AIMS.OperationAanesthesia
|
||||
if (reVal)
|
||||
{
|
||||
templateManage.DrawArea();
|
||||
DrawGraph.ZUtil.DrawText(AIMSExtension.PublicMethod.HospitalName, 0.385, 0.018, Zgc, DrawGraph.ZUtil.Font16);
|
||||
DrawGraph.ZUtil.DrawText(" 麻 醉 记 录", 0.42, 0.04, Zgc, DrawGraph.ZUtil.Font14);
|
||||
//DrawGraph.ZUtil.DrawText(AIMSExtension.PublicMethod.HospitalName, 0.385, 0.018, Zgc, DrawGraph.ZUtil.Font16);
|
||||
//DrawGraph.ZUtil.DrawText(" 麻 醉 记 录", 0.42, 0.04, Zgc, DrawGraph.ZUtil.Font14);
|
||||
|
||||
#region 设置界面自适应
|
||||
//在此处可随时设置板子的属性
|
||||
@ -162,8 +162,8 @@ namespace AIMS.OperationAanesthesia
|
||||
if (reVal)
|
||||
{
|
||||
templateManage2.DrawArea();
|
||||
DrawGraph.ZUtil.DrawText(AIMSExtension.PublicMethod.HospitalName, 0.385, 0.038, Zgc2, DrawGraph.ZUtil.Font16);
|
||||
DrawGraph.ZUtil.DrawText(" 麻 醉 记 录", 0.42, 0.065, Zgc2, DrawGraph.ZUtil.Font14);
|
||||
//DrawGraph.ZUtil.DrawText(AIMSExtension.PublicMethod.HospitalName, 0.385, 0.038, Zgc2, DrawGraph.ZUtil.Font16);
|
||||
//DrawGraph.ZUtil.DrawText(" 麻 醉 记 录", 0.42, 0.065, Zgc2, DrawGraph.ZUtil.Font14);
|
||||
templateManage2.ZedControl.Width = templateManage.ZedControl.Width;
|
||||
templateManage2.ZedControl.Height = templateManage.ZedControl.Height;
|
||||
int LocationY = Convert.ToInt32(templateManage2.ZedControl.Height * 0.065);
|
||||
@ -199,8 +199,8 @@ namespace AIMS.OperationAanesthesia
|
||||
if (reVal)
|
||||
{
|
||||
templateManage.DrawArea();
|
||||
DrawGraph.ZUtil.DrawText(AIMSExtension.PublicMethod.HospitalName, 0.385, 0.028, Zgc, DrawGraph.ZUtil.Font16);
|
||||
DrawGraph.ZUtil.DrawText("镇静镇痛评估、记录单", 0.36, 0.055, Zgc, DrawGraph.ZUtil.Font14);
|
||||
//DrawGraph.ZUtil.DrawText(AIMSExtension.PublicMethod.HospitalName, 0.385, 0.028, Zgc, DrawGraph.ZUtil.Font16);
|
||||
//DrawGraph.ZUtil.DrawText("镇静镇痛评估、记录单", 0.36, 0.055, Zgc, DrawGraph.ZUtil.Font14);
|
||||
|
||||
#region 设置界面自适应
|
||||
//在此处可随时设置板子的属性
|
||||
|
||||
@ -1444,6 +1444,26 @@ namespace AIMS.OperationAanesthesia
|
||||
}
|
||||
}
|
||||
|
||||
foreach (PhysioDataConfig addPP in _record.PhysioAnesConfigList)
|
||||
{
|
||||
string key = addPP.Name;
|
||||
string value = addPP.Enname;
|
||||
if (addPP.IsValid == false) continue;
|
||||
if (value == null || value == "") continue;
|
||||
|
||||
int minMinutes = -5;
|
||||
DataTable dtPhysioData = BOperationRecord.getPhysioDataByTimeName(NowRoom.Ip, value, InsertTime.AddMinutes(minMinutes), InsertTime.AddSeconds(1));
|
||||
if (dtPhysioData != null && dtPhysioData.Rows.Count > 0)
|
||||
{
|
||||
foreach (DataRow dr in dtPhysioData.Rows)
|
||||
{
|
||||
PhysioData pdTemp = PhysioDataConfig.newPhysioData(addPP, _record.Id.Value, dtTime, dr["ParamValue"].ToString());
|
||||
physioDatas.Add(pdTemp);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//有有创清空无创
|
||||
foreach (var pdTemp in physioDatas)
|
||||
{
|
||||
@ -1472,9 +1492,16 @@ namespace AIMS.OperationAanesthesia
|
||||
foreach (var pdTemp in physioDatas)
|
||||
{
|
||||
if (pdTemp.Value < 0) continue;
|
||||
PhysioDataConfig addPP = _record.PhysioConfigList.Where(a => pdTemp.PhysioDataConfigId == a.Id).ToList()[0];
|
||||
addPP.AddPointItem(pdTemp);
|
||||
date++;
|
||||
List<PhysioDataConfig> addPP = _record.PhysioConfigList.Where(a => pdTemp.PhysioDataConfigId == a.Id).ToList();
|
||||
if (addPP == null || addPP.Count == 0)
|
||||
{
|
||||
addPP = _record.PhysioAnesConfigList.Where(a => pdTemp.PhysioDataConfigId == a.Id).ToList();
|
||||
}
|
||||
if (addPP != null && addPP.Count > 0)
|
||||
{
|
||||
addPP[0].AddPointItem(pdTemp);
|
||||
date++;
|
||||
}
|
||||
}
|
||||
|
||||
if (dtTime > _record.lastPageBegin && ((TimeSpan)(dtTime - _record.lastPageBegin)).TotalHours < 24 && date > 0)
|
||||
@ -1824,19 +1851,19 @@ namespace AIMS.OperationAanesthesia
|
||||
}
|
||||
}
|
||||
}
|
||||
//foreach (var addPP in _record.PhysioAnesConfigList)
|
||||
//{
|
||||
// if (addPP.IsValid == false) continue;
|
||||
// foreach (DataRow dr in dtPhysioData.Rows)
|
||||
// {
|
||||
// if (dr["ParameterName"] != null && dr["ParameterName"].ToString() != "" && dr["ParameterName"].ToString().Equals(addPP.Id.ToString()))
|
||||
// {
|
||||
// DateTime RecordTime = DateTime.Parse(dr["InsertTime"].ToString());
|
||||
// PhysioData pdTemp = PhysioDataConfig.newPhysioData(addPP, _record.Id.Value, RecordTime, dr["ParamValue"].ToString());
|
||||
// addPP.AddPointItem(pdTemp);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
foreach (var addPP in _record.PhysioAnesConfigList)
|
||||
{
|
||||
if (addPP.IsValid == false) continue;
|
||||
foreach (DataRow dr in dtPhysioData.Rows)
|
||||
{
|
||||
if (dr["ParameterName"] != null && dr["ParameterName"].ToString() != "" && dr["ParameterName"].ToString().Equals(addPP.Id.ToString()))
|
||||
{
|
||||
DateTime RecordTime = DateTime.Parse(dr["InsertTime"].ToString());
|
||||
PhysioData pdTemp = PhysioDataConfig.newPhysioData(addPP, _record.Id.Value, RecordTime, dr["ParamValue"].ToString());
|
||||
addPP.AddPointItem(pdTemp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private void UpdatePhysioDataResp()
|
||||
|
||||
1985
AIMS/OperationAanesthesia/frmFactDrugNew.Designer.cs
generated
1985
AIMS/OperationAanesthesia/frmFactDrugNew.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -17,7 +17,7 @@ namespace AIMS.PublicUI.UI
|
||||
public partial class frmFactDrugNew : OfficeForm
|
||||
{
|
||||
public static object valueTime;
|
||||
public int currentTabIndex = 1;
|
||||
public int currentTabIndex = 2;
|
||||
public bool isCVhageAllSapDose = false;
|
||||
public int DrugTypeId;
|
||||
|
||||
@ -38,7 +38,7 @@ namespace AIMS.PublicUI.UI
|
||||
/// <summary>
|
||||
/// 图表控件
|
||||
/// </summary>
|
||||
public ZedGraphControl zgcAnaesRecord;
|
||||
public ZedGraphControl zgcAnaesRecord;
|
||||
/// <summary>
|
||||
/// 选择项编号
|
||||
/// </summary>
|
||||
@ -73,6 +73,10 @@ namespace AIMS.PublicUI.UI
|
||||
|
||||
private void SetDGVNotSort()
|
||||
{
|
||||
for (int i = 0; i < this.dgvDrugsYD.Columns.Count; i++)
|
||||
{
|
||||
dgvDrugsYD.Columns[i].SortMode = DataGridViewColumnSortMode.NotSortable;
|
||||
}
|
||||
for (int i = 0; i < this.dgvDrugsSQ.Columns.Count; i++)
|
||||
{
|
||||
dgvDrugsSQ.Columns[i].SortMode = DataGridViewColumnSortMode.NotSortable;
|
||||
@ -420,10 +424,10 @@ namespace AIMS.PublicUI.UI
|
||||
{
|
||||
_dataGridView.Rows.Clear();
|
||||
}
|
||||
for (int i = 0; i < dgvDrugsSQ.Columns.Count; i++)
|
||||
{
|
||||
dgvDrugsSQ.Columns[i].SortMode = DataGridViewColumnSortMode.NotSortable;
|
||||
}
|
||||
//for (int i = 0; i < dgvDrugsSQ.Columns.Count; i++)
|
||||
//{
|
||||
// dgvDrugsSQ.Columns[i].SortMode = DataGridViewColumnSortMode.NotSortable;
|
||||
//}
|
||||
}
|
||||
}
|
||||
public int zhuid = 0;
|
||||
@ -919,6 +923,9 @@ namespace AIMS.PublicUI.UI
|
||||
case 2:
|
||||
drugEffect = "术后镇痛药";
|
||||
break;
|
||||
case 3:
|
||||
drugEffect = "麻醉诱导用药";
|
||||
break;
|
||||
}
|
||||
int second = 0;
|
||||
foreach (DataGridViewRow dr in _dataGridView.Rows)
|
||||
@ -1073,6 +1080,8 @@ namespace AIMS.PublicUI.UI
|
||||
else return;
|
||||
if (SaveValid(dgvDrugsSH, 2)) Save(dgvDrugsSH, 2);
|
||||
else return;
|
||||
if (SaveValid(dgvDrugsYD, 3)) Save(dgvDrugsYD, 3);
|
||||
else return;
|
||||
|
||||
new frmMessageBox().Show();
|
||||
if (DrugsParam != null) DrugsParam();
|
||||
@ -1165,7 +1174,15 @@ namespace AIMS.PublicUI.UI
|
||||
_record.FactDrugList.Sort(new FactDrugComparer());
|
||||
foreach (BasicDictionary bd in ControlExtension._drugEffectList)
|
||||
{
|
||||
if (bd.Name == "麻醉前用药")
|
||||
if (bd.Name == "麻醉诱导用药")
|
||||
{
|
||||
List<FactDrug> sList = _record.FactDrugList.Where(p => p.GiveDrugType == bd.Name).ToList();
|
||||
_dataGridView = dgvDrugsYD;
|
||||
SetDGVEvent(_dataGridView);
|
||||
//dgvDrugs_RowsAdded(null, null);
|
||||
FullDrugsData(sList);
|
||||
}
|
||||
else if (bd.Name == "麻醉前用药")
|
||||
{
|
||||
List<FactDrug> sList = _record.FactDrugList.Where(p => p.GiveDrugType == bd.Name).ToList();
|
||||
_dataGridView = dgvDrugsSQ;
|
||||
@ -1173,7 +1190,7 @@ namespace AIMS.PublicUI.UI
|
||||
//dgvDrugs_RowsAdded(null, null);
|
||||
FullDrugsData(sList);
|
||||
}
|
||||
if (bd.Name == "术中加药")
|
||||
else if (bd.Name == "术中加药")
|
||||
{
|
||||
List<FactDrug> sList = _record.FactDrugList.Where(p => p.GiveDrugType == bd.Name).ToList();
|
||||
_dataGridView = dgvDrugsSZ;
|
||||
@ -1181,7 +1198,7 @@ namespace AIMS.PublicUI.UI
|
||||
//dgvDrugs_RowsAdded(null, null);
|
||||
FullDrugsData(sList);
|
||||
}
|
||||
if (bd.Name == "术后镇痛药")
|
||||
else if (bd.Name == "术后镇痛药")
|
||||
{
|
||||
List<FactDrug> sList = _record.FactDrugList.Where(p => p.GiveDrugType == bd.Name).ToList();
|
||||
_dataGridView = dgvDrugsSH;
|
||||
@ -1216,6 +1233,10 @@ namespace AIMS.PublicUI.UI
|
||||
{
|
||||
_dataGridView = dgvDrugsSH;
|
||||
}
|
||||
else if (tabDrugs.SelectedTab.Name == "P0")
|
||||
{
|
||||
_dataGridView = dgvDrugsYD;
|
||||
}
|
||||
_dataGridView.Columns[1].ReadOnly = true;
|
||||
_dataGridView.Columns[2].ReadOnly = true;
|
||||
|
||||
|
||||
@ -136,42 +136,42 @@
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAs
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAAXABBgFwAQYBFAEAARQBAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFQ
|
||||
AwABFAMAAQEBAAEgBgABGS4AA1UBrwKAAX0B/gMrAfwDKwH8AZkBiwFAAf0BoQGSAQAB/wGTAYIBAAH/
|
||||
AZYBhwFAAf0BowGUAQAB/wGjAZQBAAH/AaMBlAEAAf8DKwH8A2AB6P8ADQABkwGCAQAB/wNiAfYDbQH3
|
||||
A20B9wNcAfgDgAH+AZcBhgEAAf8DbQH3AewB5wHkAf8B7AHnAeQB/wHsAecB5AH/A20B9wGTAYIBAAH/
|
||||
/wANAAGTAYIBAAH/A2cB8gH/Av0C/wL9Av8C/QL/Av0B/wGbAYsBAAH/AysB/AH/Av0C/wL9Av8C/QL/
|
||||
Av4B/wGTAYIBAAH//wANAAGTAYIBAAH/AysB/AGmAZUBgwH/AaYBlQGDA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||||
AQTwAAFCAU0BPgcAAT4DAAEoAwABUAMAARQDAAEBAQABAQUAAfAXAAP/AQAB/gEAAQ8C/wcAAf4BAAEP
|
||||
Av8HAAH+AQABDwL/BwAB/gEAAQ8C/wcAAf4BAAEPAv8HAAH+AQABDwL/BwAB/gEAAQ8C/wcAAYABAAEP
|
||||
Av8JAAEPAv8IAAEBAc8C/wgAAQEBzwL/CAABAQHPAv8JAAEPAv8JAAEPAv8HAAH+AQABDwL/BwAB/gEA
|
||||
AQ8C/wcAAf4BAAEPAv8HAAH8AQABDwL/BwAB/AEAAQ8C/wcAAf4BAAEPAv8HAAs=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
|
||||
2
AIMS/OremrUserControl/ucDocument.Designer.cs
generated
2
AIMS/OremrUserControl/ucDocument.Designer.cs
generated
@ -329,7 +329,6 @@
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
private System.Windows.Forms.ToolStripButton tsbExit;
|
||||
private System.Windows.Forms.ToolStripButton tsbCheckout;
|
||||
private DCSoft.Writer.Controls.WriterControl myEditControl;
|
||||
private DCSoft.Writer.Commands.WriterCommandControler writerCommandControler1;
|
||||
private System.Windows.Forms.ContextMenuStrip cmEdit;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmRedo;
|
||||
@ -349,5 +348,6 @@
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButton1;
|
||||
public System.Windows.Forms.ToolStrip toolStrip1;
|
||||
public DCSoft.Writer.Controls.WriterControl myEditControl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -197,11 +197,16 @@ namespace AIMS.OremrUserControl
|
||||
{
|
||||
toolStripButton1.Visible = true;
|
||||
}
|
||||
if (XmlFileName == "自费项目治疗同意书" || XmlFileName == "自费项目治疗同意书2" || XmlFileName == "特需医疗服务项目医患协议书")
|
||||
else if (XmlFileName == "自费项目治疗同意书" || XmlFileName == "自费项目治疗同意书2" || XmlFileName == "特需医疗服务项目医患协议书")
|
||||
{
|
||||
toolStripButton1.Text = "选择药品";
|
||||
toolStripButton1.Visible = true;
|
||||
}
|
||||
else if (XmlFileName == "医保患者自费项目知情同意书")
|
||||
{
|
||||
toolStripButton1.Text = "选择自费项目";
|
||||
toolStripButton1.Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
void myEditControl_AfterExecuteCommand(object eventSender, DCSoft.Writer.Commands.WriterCommandEventArgs args)
|
||||
@ -337,8 +342,8 @@ namespace AIMS.OremrUserControl
|
||||
ClearT();
|
||||
}
|
||||
myEditControl.Document.Modified = false;
|
||||
DocumentExtension.SaveCocumentValue(DModel.XmlFileName, myEditControl.Document,Patient);
|
||||
|
||||
DocumentExtension.SaveCocumentValue(DModel.XmlFileName, myEditControl.Document, Patient);
|
||||
|
||||
new frmMessageBox().Show();
|
||||
}
|
||||
catch
|
||||
@ -413,7 +418,35 @@ namespace AIMS.OremrUserControl
|
||||
num++;
|
||||
}
|
||||
}
|
||||
if (DModel.XmlFileName == "特需医疗服务项目医患协议书")
|
||||
else if (DModel.XmlFileName == "医保患者自费项目知情同意书")
|
||||
{
|
||||
frmDrugSel drugSel = new frmDrugSel();
|
||||
drugSel.IsLoad = true;
|
||||
drugSel.loadString = "自费用药,自费耗材";
|
||||
drugSel.ShowDialog();
|
||||
int num = 1;
|
||||
int a = 71;
|
||||
int j = 42;
|
||||
for (int i = 13; i < 42; i++)
|
||||
{
|
||||
if (num > drugSel.FactDrugList.Count)
|
||||
return;
|
||||
var item = drugSel.FactDrugList[num - 1];
|
||||
var field12 = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement
|
||||
&& (x as XTextInputFieldElement).ID == "field" + i).FirstOrDefault();
|
||||
if (field12 != null) field12.Text = num + "." + item.DrugName + " " + item.Dosage + "元"; ;
|
||||
var field13 = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement
|
||||
&& (x as XTextInputFieldElement).ID == "field" + j).FirstOrDefault();
|
||||
if (field13 != null) field13.Text = " " + item.DrugKind + item.DosageUnit;
|
||||
var field14 = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement
|
||||
&& (x as XTextInputFieldElement).ID == "field" + a).FirstOrDefault();
|
||||
if (field14 != null) field14.Text = " " + item.DensityUnit;
|
||||
j++;
|
||||
a++;
|
||||
num++;
|
||||
}
|
||||
}
|
||||
else if (DModel.XmlFileName == "特需医疗服务项目医患协议书")
|
||||
{
|
||||
string Result = "";
|
||||
string Result2 = "";
|
||||
@ -443,7 +476,7 @@ namespace AIMS.OremrUserControl
|
||||
if (Result2 != "") field13.Text = Result2.ToString();
|
||||
|
||||
}
|
||||
if (DModel.XmlFileName == "自费项目治疗同意书2")
|
||||
else if (DModel.XmlFileName == "自费项目治疗同意书2")
|
||||
{
|
||||
string Result = "";
|
||||
string Result2 = "";
|
||||
|
||||
@ -60,6 +60,8 @@ namespace AIMS.OremrUserControl
|
||||
panelExMain.Style.BackColor1.Color = Color.WhiteSmoke;
|
||||
buttonX1.Text = "转入术间";
|
||||
buttonX2.Visible = false;
|
||||
//buttonX1.Text = "开始诱导";
|
||||
//buttonX2.Text = "转入术间";
|
||||
label2.ForeColor = Color.DarkRed;
|
||||
}
|
||||
else if (dr["State"].ToString() == "已审核" || dr["State"].ToString() == "预排程")
|
||||
@ -67,6 +69,8 @@ namespace AIMS.OremrUserControl
|
||||
panelExMain.Style.BackColor1.Color = Color.WhiteSmoke;
|
||||
buttonX1.Text = "转入术间";
|
||||
buttonX2.Visible = false;
|
||||
//buttonX1.Text = "开始诱导";
|
||||
//buttonX2.Text = "转入术间";
|
||||
label2.Text = "未排程";
|
||||
label2.ForeColor = Color.DarkRed;
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ namespace DrawGraph
|
||||
public class AnalgesiaDataBottonManage : AreaManageBase
|
||||
{
|
||||
|
||||
private OperationRecord myOpeRecord = null;
|
||||
private OperationRecord myOpeRecord = null;
|
||||
public AnalgesiaDataBottonManage() { }
|
||||
public AnalgesiaDataBottonManage(object _operationRecor, DrawGraph.ZedGraphControl _zedControl, TemplateManage _template, string _name) : base(_operationRecor, _zedControl, _template, _name)
|
||||
{ }
|
||||
@ -25,7 +25,7 @@ namespace DrawGraph
|
||||
public void init()
|
||||
{
|
||||
//自己要用的手术对象
|
||||
myOpeRecord = OpeRecord as OperationRecord;
|
||||
myOpeRecord = OpeRecord as OperationRecord;
|
||||
}
|
||||
#region 重写的事件
|
||||
/// <summary>
|
||||
@ -52,23 +52,176 @@ namespace DrawGraph
|
||||
public override void editAr_Click(object sender, EventArgs e)
|
||||
{
|
||||
SelectDictText.Hidden();
|
||||
//传过来的数据是不是可编辑的
|
||||
AbleEditPackObj editPack = sender as AbleEditPackObj;
|
||||
if (editPack == null) return;
|
||||
//找到这个组件
|
||||
AbleEditPackObj aEdit1 = PackManage.ListPob.FirstOrDefault<PackObjBase>(s => s is AbleEditPackObj && s.PackTag == editPack.PackTag) as AbleEditPackObj;
|
||||
if (aEdit1 == null) return;
|
||||
////传过来的数据是不是可编辑的
|
||||
//AbleEditPackObj aEdit1S = sender as AbleEditPackObj;
|
||||
//if (aEdit1S == null) return;
|
||||
////找到这个组件
|
||||
//AbleEditPackObj aEdit1 = PackManage.ListPob.FirstOrDefault<PackObjBase>(s => s is AbleEditPackObj && s.PackTag == aEdit1S.PackTag) as AbleEditPackObj;
|
||||
//if (aEdit1 == null) return;
|
||||
|
||||
txt_DoubleClick(aEdit1.CControl, null);
|
||||
//if (aEdit1.ControlTitleText == "手术" || aEdit1.ControlTitleText == "诊断" || aEdit1.ControlTitleText == "人员")
|
||||
//{
|
||||
// Control conl = aEdit1.CControl;
|
||||
// aEdit1.IsVisible = !aEdit1.IsVisible;
|
||||
// conl.Leave -= new EventHandler(txt_Leave);
|
||||
// aEdit1S.CControl.MouseDown -= new MouseEventHandler(CControl_MouseDown);
|
||||
// aEdit1S.CControl.KeyUp -= new KeyEventHandler(CControl_KeyUp2);
|
||||
// aEdit1S.CControl.TextChanged -= new EventHandler(CControl_TextChanged);
|
||||
// aEdit1S.CControl.KeyPress -= new KeyPressEventHandler(CControl_KeyPress); ;
|
||||
// //根据数据源名称进行不同的事件处理
|
||||
// switch (aEdit1.ClassDataSourceName)
|
||||
// {
|
||||
// case "OperationRecord.Applydiagnose": //手术诊断
|
||||
// opeDisease_Click(aEdit1, e);
|
||||
// break;
|
||||
// case "OperationRecord.Applyoperation": //手术诊断
|
||||
// ope_Click(aEdit1, e);
|
||||
// break;
|
||||
// }
|
||||
//}
|
||||
////txt_DoubleClick(aEdit1.CControl, null);
|
||||
}
|
||||
|
||||
//得到当前页数
|
||||
private void GetcurrentPage()
|
||||
{
|
||||
DateTime EndTime = OperationRecord.getOpeMaxTime(myOpeRecord);
|
||||
EndTime = DateTime.Parse(EndTime.ToString("yyyy-MM-dd HH:mm"));
|
||||
TimeSpan tsp = (TimeSpan)(EndTime - myOpeRecord.sharpBegin);
|
||||
double db = tsp.TotalHours / 4;
|
||||
if (db == ((int)tsp.TotalHours / 4))
|
||||
myOpeRecord.currentPage = (int)db;
|
||||
else
|
||||
myOpeRecord.currentPage = (int)db + 1;
|
||||
if (myOpeRecord.currentPage == 0) myOpeRecord.currentPage = 1;
|
||||
}
|
||||
#region 初始化时间轴
|
||||
/// <summary>
|
||||
/// 设置页面的开始时间和结束时间
|
||||
/// </summary>
|
||||
/// <param name="_operationRecord">手术信息对象</param>
|
||||
private void setPageTime(DateTime begin)
|
||||
{
|
||||
if (myOpeRecord.pageCount == 0)
|
||||
{
|
||||
myOpeRecord.pageCount = 1;
|
||||
myOpeRecord.sharpBegin = getSharpTime(begin);
|
||||
myOpeRecord.PageBegin = getPageBegin(begin, collectInterval, 120);
|
||||
myOpeRecord.lastPageBegin = myOpeRecord.PageBegin.AddHours(120 / 60);
|
||||
|
||||
if (myOpeRecord.phListPack != null)
|
||||
{
|
||||
Panel pan3 = myOpeRecord.phListPack.CControl as Panel;
|
||||
if (pan3 != null)
|
||||
{
|
||||
pan3.Controls.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据采集间隔,确定页面时间跨度和页面开始时间
|
||||
/// </summary>
|
||||
/// <param name="curTime">给定时间(文本)</param>
|
||||
/// <param name="collectInterval">采集间隔(分钟)</param>
|
||||
/// <param name="timeSpan">页面时间跨度</param>
|
||||
/// <returns>页面显示的开始时间</returns>
|
||||
private DateTime getPageBegin(DateTime dt, double collectInterval, double timeSpan)
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime pageBegin = dt.Date.AddHours(dt.Hour);
|
||||
int ci = (int)(collectInterval * 60);
|
||||
if (ci <= 30)
|
||||
{
|
||||
if (dt.Minute >= 30)
|
||||
{
|
||||
pageBegin = pageBegin.AddMinutes(30);
|
||||
}
|
||||
timeSpan = 30;
|
||||
}
|
||||
else if (ci <= 60)
|
||||
{
|
||||
timeSpan = 60;
|
||||
}
|
||||
else
|
||||
{
|
||||
timeSpan = 120;
|
||||
TimeSpan ts = pageBegin - myOpeRecord.sharpBegin;
|
||||
int h = ts.Hours;
|
||||
h /= 2;
|
||||
pageBegin = myOpeRecord.sharpBegin.AddHours(h * 2);
|
||||
}
|
||||
return pageBegin;
|
||||
}
|
||||
catch (Exception exp)
|
||||
{
|
||||
throw exp;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取系统的整点时刻
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private DateTime getSharpTime(DateTime dt)
|
||||
{
|
||||
int ci = (int)dt.Minute;
|
||||
|
||||
if (ci >= 50)
|
||||
{
|
||||
dt = DateTime.Parse(dt.ToString("yyyy-MM-dd HH:50:00"));
|
||||
}
|
||||
else if (ci >= 40)
|
||||
{
|
||||
dt = DateTime.Parse(dt.ToString("yyyy-MM-dd HH:40:00"));
|
||||
}
|
||||
else if (ci >= 30)
|
||||
{
|
||||
dt = DateTime.Parse(dt.ToString("yyyy-MM-dd HH:30:00"));
|
||||
}
|
||||
else if (ci >= 20)
|
||||
{
|
||||
dt = DateTime.Parse(dt.ToString("yyyy-MM-dd HH:20:00"));
|
||||
}
|
||||
else if (ci >= 10)
|
||||
{
|
||||
dt = DateTime.Parse(dt.ToString("yyyy-MM-dd HH:10:00"));
|
||||
}
|
||||
else if (ci < 10)
|
||||
{
|
||||
dt = DateTime.Parse(dt.ToString("yyyy-MM-dd HH:00:00"));
|
||||
}
|
||||
//if (ci >= 30)
|
||||
//{
|
||||
// dt = DateTime.Parse(dt.ToString("yyyy-MM-dd HH:30:00"));
|
||||
//}
|
||||
//else if (ci < 30)
|
||||
//{
|
||||
// dt = DateTime.Parse(dt.ToString("yyyy-MM-dd HH:00:00"));
|
||||
//}
|
||||
return dt;
|
||||
}
|
||||
private void setXAxisTime(GraphPane myPane, DateTime begin, double pageSpan)
|
||||
{
|
||||
myPane.XAxis.Scale.Min = new XDate(begin);
|
||||
myPane.X2Axis.Scale.Min = myPane.XAxis.Scale.Min;
|
||||
myPane.XAxis.Scale.Max = new XDate(begin.AddMinutes(pageSpan));
|
||||
myPane.X2Axis.Scale.Max = myPane.XAxis.Scale.Max;
|
||||
}
|
||||
#endregion
|
||||
|
||||
public SelectDictText aSyncSelectDict = null;
|
||||
public override void Bind()
|
||||
{
|
||||
aSyncSelectDict = SelectDictText.CreateInstance();
|
||||
SelectDictText.SetValue += ASyncSelectDict_SetValue;
|
||||
base.Bind();
|
||||
init();
|
||||
init();
|
||||
aSyncSelectDict = SelectDictText.CreateInstance();
|
||||
myOpeRecord.clearAddObj(ZedControl);
|
||||
setPageTime(myOpeRecord.InRoomTime.Value);
|
||||
setXAxisTime(ZedControl.GraphPane, myOpeRecord.PageBegin, 120);
|
||||
GetcurrentPage();
|
||||
//SelectDictText.SetValue += ASyncSelectDict_SetValue;
|
||||
|
||||
List<PackObjBase> ables = PackManage.ListPob.Where<PackObjBase>(s => s is AbleEditPackObj).ToList<PackObjBase>();
|
||||
foreach (PackObjBase pack in ables)
|
||||
{
|
||||
@ -86,10 +239,25 @@ namespace DrawGraph
|
||||
}
|
||||
else if (ableEdit.ControlType == EControlType.Directory)
|
||||
{
|
||||
ableEdit.CControl.DoubleClick -= new EventHandler(txt_DoubleClick);
|
||||
ableEdit.CControl.DoubleClick += new EventHandler(txt_DoubleClick);
|
||||
ableEdit.CControl.Leave -= new EventHandler(txt_Leave);
|
||||
ableEdit.CControl.Leave += new EventHandler(txt_Leave);
|
||||
|
||||
if (ableEdit.ControlTitleText == "手术" || ableEdit.ControlTitleText == "诊断" || ableEdit.ControlTitleText == "人员")
|
||||
{
|
||||
ableEdit.CControl.DoubleClick -= new EventHandler(txt_DoubleClick1);
|
||||
ableEdit.CControl.DoubleClick += new EventHandler(txt_DoubleClick1);
|
||||
ableEdit.CControl.MouseDown -= new MouseEventHandler(CControl_MouseDown);
|
||||
ableEdit.CControl.MouseDown += new MouseEventHandler(CControl_MouseDown);
|
||||
ableEdit.CControl.KeyUp -= new KeyEventHandler(CControl_KeyUp2);
|
||||
ableEdit.CControl.KeyUp += new KeyEventHandler(CControl_KeyUp2);
|
||||
ableEdit.CControl.KeyPress -= new KeyPressEventHandler(CControl_KeyPress);
|
||||
ableEdit.CControl.KeyPress += new KeyPressEventHandler(CControl_KeyPress);
|
||||
}
|
||||
else
|
||||
{
|
||||
ableEdit.CControl.DoubleClick -= new EventHandler(txt_DoubleClick);
|
||||
ableEdit.CControl.DoubleClick += new EventHandler(txt_DoubleClick);
|
||||
ableEdit.CControl.Leave -= new EventHandler(txt_Leave);
|
||||
ableEdit.CControl.Leave += new EventHandler(txt_Leave);
|
||||
}
|
||||
}
|
||||
else if (ableEdit.ControlType == EControlType.CheckBox)
|
||||
{
|
||||
@ -123,10 +291,10 @@ namespace DrawGraph
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ableEdit.ControlType == EControlType.TextBox)
|
||||
else if (ableEdit.ControlType == EControlType.TextBox)
|
||||
{
|
||||
ableEdit.CControl.KeyDown -= new KeyEventHandler(text_keyDown);
|
||||
ableEdit.CControl.KeyDown += new KeyEventHandler(text_keyDown);
|
||||
ableEdit.CControl.KeyDown += new KeyEventHandler(text_keyDown);
|
||||
ableEdit.CControl.GotFocus -= new EventHandler(txt_Focus);
|
||||
ableEdit.CControl.GotFocus += new EventHandler(txt_Focus);
|
||||
((TextBox)ableEdit.CControl).BorderStyle = BorderStyle.Fixed3D;
|
||||
@ -145,7 +313,7 @@ namespace DrawGraph
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
////取消滚轮事件
|
||||
//void numericUpDown1_MouseWheel(object sender, MouseEventArgs e)
|
||||
@ -161,7 +329,7 @@ namespace DrawGraph
|
||||
if (ableEdit == null) return;
|
||||
if (control.Focused == true && (ableEdit.PackValue == ableEdit.DefaultValue || ableEdit.PackValue == ""))
|
||||
control.Clear();
|
||||
}
|
||||
}
|
||||
private void text_keyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
((TextBox)sender).Enabled = true;
|
||||
@ -188,7 +356,7 @@ namespace DrawGraph
|
||||
}
|
||||
|
||||
public override void BindTempData()
|
||||
{
|
||||
{
|
||||
List<PackObjBase> ables = PackManage.ListPob.Where<PackObjBase>(s => s is AbleEditPackObj).ToList<PackObjBase>();
|
||||
foreach (PackObjBase pack in ables)
|
||||
{
|
||||
@ -316,7 +484,14 @@ namespace DrawGraph
|
||||
break;
|
||||
case EControlType.Directory:
|
||||
value = ableEdit.PackValue;
|
||||
text = DBManage.GetDictionaryValuesById(ableEdit.PackValue, ableEdit.ControlTitleText);
|
||||
if (ableEdit.ControlTitleText == "手术" || ableEdit.ControlTitleText == "诊断" || ableEdit.ControlTitleText == "人员")
|
||||
{
|
||||
text = DBManage.GetDictionaryValuesById(ableEdit.PackValue, ableEdit.ControlTitleText);
|
||||
}
|
||||
else
|
||||
{
|
||||
text = ableEdit.PackValue;
|
||||
}
|
||||
//设置属性的值
|
||||
template.SetObjValue(OpeRecord, ableEdit.ClassDataSourceName, text, value);
|
||||
break;
|
||||
@ -369,6 +544,146 @@ namespace DrawGraph
|
||||
}
|
||||
}
|
||||
|
||||
private void txt_DoubleClick1(object sender, EventArgs e)
|
||||
{
|
||||
Control control = (Control)sender;
|
||||
if (control == null) return;
|
||||
AbleEditPackObj aEdit1S = control.Tag as AbleEditPackObj;
|
||||
if (aEdit1S == null) return;
|
||||
//这句话很重要,只操作自己管理器里的组件
|
||||
AbleEditPackObj aEdit1 = PackManage.ListPob.FirstOrDefault<PackObjBase>(s => s.PackTag == aEdit1S.PackTag) as AbleEditPackObj;
|
||||
//指定的组件显示
|
||||
if (aEdit1 != null)
|
||||
{
|
||||
Control conl = aEdit1.CControl;
|
||||
conl.Leave -= new EventHandler(txt_Leave);
|
||||
aEdit1S.CControl.MouseDown -= new MouseEventHandler(CControl_MouseDown);
|
||||
aEdit1S.CControl.KeyUp -= new KeyEventHandler(CControl_KeyUp2);
|
||||
aEdit1S.CControl.TextChanged -= new EventHandler(CControl_TextChanged);
|
||||
aEdit1S.CControl.KeyPress -= new KeyPressEventHandler(CControl_KeyPress); ;
|
||||
//根据数据源名称进行不同的事件处理
|
||||
switch (aEdit1.ClassDataSourceName)
|
||||
{
|
||||
case "OperationRecord.AnesthesiaDoctor": //麻醉医生
|
||||
Worker_Click(aEdit1, e, 2);
|
||||
break;
|
||||
case "OperationRecord.OperationDoctor":
|
||||
Worker_Click(aEdit1, e, 0);
|
||||
break;
|
||||
case "OperationRecord.InstrumentNurse":
|
||||
Worker_Click(aEdit1, e, 3);
|
||||
break;
|
||||
case "OperationRecord.Assistant1":
|
||||
Worker_Click(aEdit1, e, 0);
|
||||
break;
|
||||
case "OperationRecord.TourNurse":
|
||||
Worker_Click(aEdit1, e, 3);
|
||||
break;
|
||||
case "OperationRecord.Operation": //手术名称
|
||||
ope_Click(aEdit1, e);
|
||||
break;
|
||||
case "OperationRecord.OrtherDoctorId":
|
||||
Worker_Click(aEdit1, e, 4);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
private void Worker_Click(AbleEditPackObj sender, EventArgs e, int _workersType)
|
||||
{
|
||||
AbleEditPackObj ableEdit = sender;
|
||||
if (ableEdit == null) return;
|
||||
|
||||
ableEdit.CControl.MouseDown -= new MouseEventHandler(CControl_MouseDown);
|
||||
ableEdit.CControl.MouseDown += new MouseEventHandler(CControl_MouseDown);
|
||||
ableEdit.CControl.KeyUp -= new KeyEventHandler(CControl_KeyUp);
|
||||
ableEdit.CControl.KeyUp += new KeyEventHandler(CControl_KeyUp);
|
||||
ableEdit.CControl.KeyPress -= new KeyPressEventHandler(CControl_KeyPress);
|
||||
ableEdit.CControl.KeyPress += new KeyPressEventHandler(CControl_KeyPress);
|
||||
SelectWorkerValue.ChageText = "";
|
||||
if (myOpeRecord != null)
|
||||
{
|
||||
Control conl = sender.CControl;
|
||||
if (conl is TextBox)
|
||||
{
|
||||
((TextBox)conl).BorderStyle = BorderStyle.Fixed3D;
|
||||
((TextBox)conl).Focus();
|
||||
if (sender.PackValue != null && sender.PackValue.Trim() != "")
|
||||
{
|
||||
if (((TextBox)conl).Text.LastIndexOf(',') != sender.PackText.Length && ((TextBox)conl).Text != "")
|
||||
((TextBox)conl).Text = ((TextBox)conl).Text + ",";
|
||||
((TextBox)conl).Select(((TextBox)conl).Text.Length, 1);
|
||||
}
|
||||
}
|
||||
ableEdit.CControl.TextChanged -= new EventHandler(CControl_TextChanged);
|
||||
ableEdit.CControl.TextChanged += new EventHandler(CControl_TextChanged);
|
||||
|
||||
aSyncSelectDict.Show(template, OpeRecord, sender, _workersType.ToString(), false);
|
||||
}
|
||||
}
|
||||
|
||||
private void CControl_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (myOpeRecord != null)
|
||||
{
|
||||
TextBox conl = sender as TextBox;
|
||||
string leftStr = conl.Text.Substring(0, conl.SelectionStart);
|
||||
string rightStr = conl.Text.Substring(conl.SelectionStart, conl.Text.Length - conl.SelectionStart);
|
||||
int startIndex = 0;
|
||||
int endLength = conl.Text.Length;
|
||||
|
||||
if (leftStr.Contains(","))
|
||||
{
|
||||
int beginindex = leftStr.LastIndexOf(',');
|
||||
startIndex = beginindex + 1;
|
||||
if (rightStr.Contains(","))
|
||||
{
|
||||
endLength = rightStr.IndexOf(",") + (leftStr.Length - beginindex);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rightStr.Contains(","))
|
||||
{
|
||||
endLength = rightStr.IndexOf(",") + leftStr.Length + 1;
|
||||
}
|
||||
}
|
||||
conl.Select(startIndex, endLength);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void ope_Click(AbleEditPackObj sender, EventArgs e)
|
||||
{
|
||||
AbleEditPackObj ableEdit = sender;
|
||||
if (ableEdit == null) return;
|
||||
try
|
||||
{
|
||||
if (myOpeRecord != null)
|
||||
{
|
||||
SelDict2(sender, e, ableEdit.ControlTitleText);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AIMSExtension.PublicMethod.WriteLog(ex);
|
||||
}
|
||||
}
|
||||
private void opeDisease_Click(AbleEditPackObj sender, EventArgs e)
|
||||
{
|
||||
AbleEditPackObj ableEdit = sender;
|
||||
if (ableEdit == null) return;
|
||||
try
|
||||
{
|
||||
if (myOpeRecord != null)
|
||||
{
|
||||
SelDict2(sender, e, ableEdit.ControlTitleText);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AIMSExtension.PublicMethod.WriteLog(ex);
|
||||
}
|
||||
}
|
||||
private void txt_Click(object sender, EventArgs e)
|
||||
{
|
||||
Control control = (Control)sender;
|
||||
@ -482,14 +797,23 @@ namespace DrawGraph
|
||||
ableEdit.CControl.Leave += new EventHandler(txt_Leave);
|
||||
}
|
||||
}
|
||||
private void ASyncSelectDict_SetValue(string Text, AbleEditPackObj aEdit)
|
||||
{
|
||||
aEdit.PackValue = Text;
|
||||
aEdit.PackText = Text;
|
||||
template.SetObjValue(OpeRecord, aEdit.ClassDataSourceName, Text, Text, true);
|
||||
aEdit.CControl.Leave -= new EventHandler(txt_Leave);
|
||||
aEdit.CControl.Leave += new EventHandler(txt_Leave);
|
||||
}
|
||||
//private void ASyncSelectDict_SetValue(string Text, string Key, AbleEditPackObj aEdit)
|
||||
//{
|
||||
// if (aEdit.ControlTitleText == "手术" || aEdit.ControlTitleText == "诊断" || aEdit.ControlTitleText == "人员")
|
||||
// {
|
||||
// aEdit.PackValue = Key;
|
||||
// aEdit.PackText = Text;
|
||||
// template.SetObjValue(OpeRecord, aEdit.ClassDataSourceName, Text, Key, true);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// aEdit.PackValue = Text;
|
||||
// aEdit.PackText = Text;
|
||||
// template.SetObjValue(OpeRecord, aEdit.ClassDataSourceName, Text, Text, true);
|
||||
// }
|
||||
// aEdit.CControl.Leave -= new EventHandler(txt_Leave);
|
||||
// aEdit.CControl.Leave += new EventHandler(txt_Leave);
|
||||
//}
|
||||
private void CControl_KeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (myOpeRecord != null)
|
||||
@ -521,5 +845,78 @@ namespace DrawGraph
|
||||
}
|
||||
}
|
||||
}
|
||||
private void CControl_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (myOpeRecord != null)
|
||||
{
|
||||
Control conl = sender as Control;
|
||||
AbleEditPackObj aEdit1S = conl.Tag as AbleEditPackObj;
|
||||
if (aEdit1S == null) return;
|
||||
aSyncSelectDict.ShowSel(template, conl, OpeRecord,aEdit1S);
|
||||
//conl.KeyUp -= new KeyEventHandler(CControl_KeyUp2);
|
||||
}
|
||||
}
|
||||
private void CControl_KeyUp2(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (myOpeRecord != null)
|
||||
{
|
||||
Control conl = sender as Control;
|
||||
if (e.KeyCode == Keys.Delete || e.KeyCode == Keys.Back)
|
||||
{
|
||||
if (conl.Text != SelectDictText.Value && SelectDictText.ChageText == "")
|
||||
{
|
||||
AbleEditPackObj aEdit1S = conl.Tag as AbleEditPackObj;
|
||||
if (aEdit1S == null) return;
|
||||
aSyncSelectDict.DelSel(template, conl, OpeRecord,aEdit1S);
|
||||
SelectDictText.ChageText = "";
|
||||
}
|
||||
}
|
||||
else if (e.KeyCode == Keys.Down)
|
||||
{
|
||||
if (SelectDictText.dgvZd.CurrentRow.Index + 1 != SelectDictText.dgvZd.Rows.Count - 1)
|
||||
{
|
||||
SelectDictText.dgvZd.CurrentCell = SelectDictText.dgvZd.Rows[SelectDictText.dgvZd.CurrentRow.Index + 1].Cells[1];
|
||||
}
|
||||
}
|
||||
else if (e.KeyCode == Keys.Up)
|
||||
{
|
||||
if (SelectDictText.dgvZd.CurrentRow.Index != 0)
|
||||
{
|
||||
SelectDictText.dgvZd.CurrentCell = SelectDictText.dgvZd.Rows[SelectDictText.dgvZd.CurrentRow.Index - 1].Cells[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private void SelDict2(AbleEditPackObj sender, EventArgs e, string _DictType, bool isRadio = false)
|
||||
{
|
||||
AbleEditPackObj ableEdit = sender;
|
||||
if (ableEdit == null) return;
|
||||
|
||||
ableEdit.CControl.MouseDown -= new MouseEventHandler(CControl_MouseDown);
|
||||
ableEdit.CControl.MouseDown += new MouseEventHandler(CControl_MouseDown);
|
||||
ableEdit.CControl.KeyUp -= new KeyEventHandler(CControl_KeyUp2);
|
||||
ableEdit.CControl.KeyUp += new KeyEventHandler(CControl_KeyUp2);
|
||||
ableEdit.CControl.KeyPress -= new KeyPressEventHandler(CControl_KeyPress);
|
||||
ableEdit.CControl.KeyPress += new KeyPressEventHandler(CControl_KeyPress);
|
||||
SelectDictText.ChageText = "";
|
||||
if (myOpeRecord != null)
|
||||
{
|
||||
Control conl = sender.CControl;
|
||||
if (conl is TextBox)
|
||||
{
|
||||
((TextBox)conl).BorderStyle = BorderStyle.Fixed3D;
|
||||
((TextBox)conl).Focus();
|
||||
if (sender.PackValue != null && sender.PackValue.Trim() != "" && isRadio == false)
|
||||
{
|
||||
if (((TextBox)conl).Text.LastIndexOf(',') != sender.PackText.Length && ((TextBox)conl).Text != "")
|
||||
((TextBox)conl).Text = ((TextBox)conl).Text + ",";
|
||||
}
|
||||
((TextBox)conl).Select(((TextBox)conl).Text.Length, 1);
|
||||
}
|
||||
ableEdit.CControl.TextChanged -= new EventHandler(CControl_TextChanged);
|
||||
ableEdit.CControl.TextChanged += new EventHandler(CControl_TextChanged);
|
||||
aSyncSelectDict.Show(template, OpeRecord, sender, _DictType, isRadio);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ namespace DrawGraph
|
||||
public class AnalgesiaDataManage : AreaManageBase
|
||||
{
|
||||
|
||||
private OperationRecord myOpeRecord = null;
|
||||
private OperationRecord myOpeRecord = null;
|
||||
public AnalgesiaDataManage() { }
|
||||
public AnalgesiaDataManage(object _operationRecor, DrawGraph.ZedGraphControl _zedControl, TemplateManage _template, string _name) : base(_operationRecor, _zedControl, _template, _name)
|
||||
{ }
|
||||
@ -25,7 +25,7 @@ namespace DrawGraph
|
||||
public void init()
|
||||
{
|
||||
//自己要用的手术对象
|
||||
myOpeRecord = OpeRecord as OperationRecord;
|
||||
myOpeRecord = OpeRecord as OperationRecord;
|
||||
}
|
||||
#region 重写的事件
|
||||
/// <summary>
|
||||
@ -51,15 +51,35 @@ namespace DrawGraph
|
||||
|
||||
public override void editAr_Click(object sender, EventArgs e)
|
||||
{
|
||||
SelectDictText.Hidden();
|
||||
//传过来的数据是不是可编辑的
|
||||
AbleEditPackObj editPack = sender as AbleEditPackObj;
|
||||
if (editPack == null) return;
|
||||
//找到这个组件
|
||||
AbleEditPackObj aEdit1 = PackManage.ListPob.FirstOrDefault<PackObjBase>(s => s is AbleEditPackObj && s.PackTag == editPack.PackTag) as AbleEditPackObj;
|
||||
if (aEdit1 == null) return;
|
||||
SelectDictText.Hidden();
|
||||
////传过来的数据是不是可编辑的
|
||||
//AbleEditPackObj aEdit1S = sender as AbleEditPackObj;
|
||||
//if (aEdit1S == null) return;
|
||||
////找到这个组件
|
||||
//AbleEditPackObj aEdit1 = PackManage.ListPob.FirstOrDefault<PackObjBase>(s => s is AbleEditPackObj && s.PackTag == aEdit1S.PackTag) as AbleEditPackObj;
|
||||
//if (aEdit1 == null) return;
|
||||
|
||||
txt_DoubleClick(aEdit1.CControl, null);
|
||||
//if (aEdit1.ControlTitleText == "手术" || aEdit1.ControlTitleText == "诊断" || aEdit1.ControlTitleText == "人员")
|
||||
//{
|
||||
// Control conl = aEdit1.CControl;
|
||||
// aEdit1.IsVisible = !aEdit1.IsVisible;
|
||||
// conl.Leave -= new EventHandler(txt_Leave);
|
||||
// aEdit1S.CControl.MouseDown -= new MouseEventHandler(CControl_MouseDown);
|
||||
// aEdit1S.CControl.KeyUp -= new KeyEventHandler(CControl_KeyUp2);
|
||||
// aEdit1S.CControl.TextChanged -= new EventHandler(CControl_TextChanged);
|
||||
// aEdit1S.CControl.KeyPress -= new KeyPressEventHandler(CControl_KeyPress); ;
|
||||
// //根据数据源名称进行不同的事件处理
|
||||
// switch (aEdit1.ClassDataSourceName)
|
||||
// {
|
||||
// case "OperationRecord.Applydiagnose": //手术诊断
|
||||
// opeDisease_Click(aEdit1, e);
|
||||
// break;
|
||||
// case "OperationRecord.Applyoperation": //手术诊断
|
||||
// ope_Click(aEdit1, e);
|
||||
// break;
|
||||
// }
|
||||
//}
|
||||
////txt_DoubleClick(aEdit1.CControl, null);
|
||||
}
|
||||
|
||||
//得到当前页数
|
||||
@ -106,7 +126,7 @@ namespace DrawGraph
|
||||
/// <param name="collectInterval">采集间隔(分钟)</param>
|
||||
/// <param name="timeSpan">页面时间跨度</param>
|
||||
/// <returns>页面显示的开始时间</returns>
|
||||
private DateTime getPageBegin(DateTime dt, double collectInterval,double timeSpan)
|
||||
private DateTime getPageBegin(DateTime dt, double collectInterval, double timeSpan)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -200,7 +220,7 @@ namespace DrawGraph
|
||||
setPageTime(myOpeRecord.InRoomTime.Value);
|
||||
setXAxisTime(ZedControl.GraphPane, myOpeRecord.PageBegin, 120);
|
||||
GetcurrentPage();
|
||||
SelectDictText.SetValue += ASyncSelectDict_SetValue;
|
||||
//SelectDictText.SetValue += ASyncSelectDict_SetValue;
|
||||
|
||||
List<PackObjBase> ables = PackManage.ListPob.Where<PackObjBase>(s => s is AbleEditPackObj).ToList<PackObjBase>();
|
||||
foreach (PackObjBase pack in ables)
|
||||
@ -219,10 +239,24 @@ namespace DrawGraph
|
||||
}
|
||||
else if (ableEdit.ControlType == EControlType.Directory)
|
||||
{
|
||||
ableEdit.CControl.DoubleClick -= new EventHandler(txt_DoubleClick);
|
||||
ableEdit.CControl.DoubleClick += new EventHandler(txt_DoubleClick);
|
||||
ableEdit.CControl.Leave -= new EventHandler(txt_Leave);
|
||||
ableEdit.CControl.Leave += new EventHandler(txt_Leave);
|
||||
if (ableEdit.ControlTitleText == "手术" || ableEdit.ControlTitleText == "诊断" || ableEdit.ControlTitleText == "人员")
|
||||
{
|
||||
ableEdit.CControl.DoubleClick -= new EventHandler(txt_DoubleClick1);
|
||||
ableEdit.CControl.DoubleClick += new EventHandler(txt_DoubleClick1);
|
||||
ableEdit.CControl.MouseDown -= new MouseEventHandler(CControl_MouseDown);
|
||||
ableEdit.CControl.MouseDown += new MouseEventHandler(CControl_MouseDown);
|
||||
ableEdit.CControl.KeyUp -= new KeyEventHandler(CControl_KeyUp2);
|
||||
ableEdit.CControl.KeyUp += new KeyEventHandler(CControl_KeyUp2);
|
||||
ableEdit.CControl.KeyPress -= new KeyPressEventHandler(CControl_KeyPress);
|
||||
ableEdit.CControl.KeyPress += new KeyPressEventHandler(CControl_KeyPress);
|
||||
}
|
||||
else
|
||||
{
|
||||
ableEdit.CControl.DoubleClick -= new EventHandler(txt_DoubleClick);
|
||||
ableEdit.CControl.DoubleClick += new EventHandler(txt_DoubleClick);
|
||||
ableEdit.CControl.Leave -= new EventHandler(txt_Leave);
|
||||
ableEdit.CControl.Leave += new EventHandler(txt_Leave);
|
||||
}
|
||||
}
|
||||
else if (ableEdit.ControlType == EControlType.CheckBox)
|
||||
{
|
||||
@ -256,10 +290,10 @@ namespace DrawGraph
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ableEdit.ControlType == EControlType.TextBox)
|
||||
else if (ableEdit.ControlType == EControlType.TextBox)
|
||||
{
|
||||
ableEdit.CControl.KeyDown -= new KeyEventHandler(text_keyDown);
|
||||
ableEdit.CControl.KeyDown += new KeyEventHandler(text_keyDown);
|
||||
ableEdit.CControl.KeyDown += new KeyEventHandler(text_keyDown);
|
||||
ableEdit.CControl.GotFocus -= new EventHandler(txt_Focus);
|
||||
ableEdit.CControl.GotFocus += new EventHandler(txt_Focus);
|
||||
((TextBox)ableEdit.CControl).BorderStyle = BorderStyle.Fixed3D;
|
||||
@ -278,7 +312,7 @@ namespace DrawGraph
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
////取消滚轮事件
|
||||
//void numericUpDown1_MouseWheel(object sender, MouseEventArgs e)
|
||||
@ -294,7 +328,7 @@ namespace DrawGraph
|
||||
if (ableEdit == null) return;
|
||||
if (control.Focused == true && (ableEdit.PackValue == ableEdit.DefaultValue || ableEdit.PackValue == ""))
|
||||
control.Clear();
|
||||
}
|
||||
}
|
||||
private void text_keyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
((TextBox)sender).Enabled = true;
|
||||
@ -321,7 +355,7 @@ namespace DrawGraph
|
||||
}
|
||||
|
||||
public override void BindTempData()
|
||||
{
|
||||
{
|
||||
List<PackObjBase> ables = PackManage.ListPob.Where<PackObjBase>(s => s is AbleEditPackObj).ToList<PackObjBase>();
|
||||
foreach (PackObjBase pack in ables)
|
||||
{
|
||||
@ -449,7 +483,14 @@ namespace DrawGraph
|
||||
break;
|
||||
case EControlType.Directory:
|
||||
value = ableEdit.PackValue;
|
||||
text = DBManage.GetDictionaryValuesById(ableEdit.PackValue, ableEdit.ControlTitleText);
|
||||
if (ableEdit.ControlTitleText == "手术" || ableEdit.ControlTitleText == "诊断" || ableEdit.ControlTitleText == "人员")
|
||||
{
|
||||
text = DBManage.GetDictionaryValuesById(ableEdit.PackValue, ableEdit.ControlTitleText);
|
||||
}
|
||||
else
|
||||
{
|
||||
text = ableEdit.PackValue;
|
||||
}
|
||||
//设置属性的值
|
||||
template.SetObjValue(OpeRecord, ableEdit.ClassDataSourceName, text, value);
|
||||
break;
|
||||
@ -485,7 +526,7 @@ namespace DrawGraph
|
||||
break;
|
||||
case EControlType.Directory:
|
||||
TYZD_Click(ableEdit, e, true);
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
text = ableEdit.CControl.Text;
|
||||
value = ableEdit.CControl.Text;
|
||||
@ -502,6 +543,98 @@ namespace DrawGraph
|
||||
}
|
||||
}
|
||||
|
||||
private void txt_DoubleClick1(object sender, EventArgs e)
|
||||
{
|
||||
Control control = (Control)sender;
|
||||
if (control == null) return;
|
||||
AbleEditPackObj aEdit1S = control.Tag as AbleEditPackObj;
|
||||
if (aEdit1S == null) return;
|
||||
//这句话很重要,只操作自己管理器里的组件
|
||||
AbleEditPackObj aEdit1 = PackManage.ListPob.FirstOrDefault<PackObjBase>(s => s.PackTag == aEdit1S.PackTag) as AbleEditPackObj;
|
||||
//指定的组件显示
|
||||
if (aEdit1 != null)
|
||||
{
|
||||
Control conl = aEdit1.CControl;
|
||||
conl.Leave -= new EventHandler(txt_Leave);
|
||||
aEdit1S.CControl.MouseDown -= new MouseEventHandler(CControl_MouseDown);
|
||||
aEdit1S.CControl.KeyUp -= new KeyEventHandler(CControl_KeyUp2);
|
||||
aEdit1S.CControl.TextChanged -= new EventHandler(CControl_TextChanged);
|
||||
aEdit1S.CControl.KeyPress -= new KeyPressEventHandler(CControl_KeyPress); ;
|
||||
//根据数据源名称进行不同的事件处理
|
||||
switch (aEdit1.ClassDataSourceName)
|
||||
{
|
||||
case "OperationRecord.Applydiagnose": //手术诊断
|
||||
opeDisease_Click(aEdit1, e);
|
||||
break;
|
||||
case "OperationRecord.Applyoperation": //手术诊断
|
||||
ope_Click(aEdit1, e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
private void CControl_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (myOpeRecord != null)
|
||||
{
|
||||
TextBox conl = sender as TextBox;
|
||||
string leftStr = conl.Text.Substring(0, conl.SelectionStart);
|
||||
string rightStr = conl.Text.Substring(conl.SelectionStart, conl.Text.Length - conl.SelectionStart);
|
||||
int startIndex = 0;
|
||||
int endLength = conl.Text.Length;
|
||||
|
||||
if (leftStr.Contains(","))
|
||||
{
|
||||
int beginindex = leftStr.LastIndexOf(',');
|
||||
startIndex = beginindex + 1;
|
||||
if (rightStr.Contains(","))
|
||||
{
|
||||
endLength = rightStr.IndexOf(",") + (leftStr.Length - beginindex);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rightStr.Contains(","))
|
||||
{
|
||||
endLength = rightStr.IndexOf(",") + leftStr.Length + 1;
|
||||
}
|
||||
}
|
||||
conl.Select(startIndex, endLength);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void ope_Click(AbleEditPackObj sender, EventArgs e)
|
||||
{
|
||||
AbleEditPackObj ableEdit = sender;
|
||||
if (ableEdit == null) return;
|
||||
try
|
||||
{
|
||||
if (myOpeRecord != null)
|
||||
{
|
||||
SelDict2(sender, e, ableEdit.ControlTitleText);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AIMSExtension.PublicMethod.WriteLog(ex);
|
||||
}
|
||||
}
|
||||
private void opeDisease_Click(AbleEditPackObj sender, EventArgs e)
|
||||
{
|
||||
AbleEditPackObj ableEdit = sender;
|
||||
if (ableEdit == null) return;
|
||||
try
|
||||
{
|
||||
if (myOpeRecord != null)
|
||||
{
|
||||
SelDict2(sender, e, ableEdit.ControlTitleText);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AIMSExtension.PublicMethod.WriteLog(ex);
|
||||
}
|
||||
}
|
||||
private void txt_Click(object sender, EventArgs e)
|
||||
{
|
||||
Control control = (Control)sender;
|
||||
@ -615,14 +748,23 @@ namespace DrawGraph
|
||||
ableEdit.CControl.Leave += new EventHandler(txt_Leave);
|
||||
}
|
||||
}
|
||||
private void ASyncSelectDict_SetValue(string Text, AbleEditPackObj aEdit)
|
||||
{
|
||||
aEdit.PackValue = Text;
|
||||
aEdit.PackText = Text;
|
||||
template.SetObjValue(OpeRecord, aEdit.ClassDataSourceName, Text, Text, true);
|
||||
aEdit.CControl.Leave -= new EventHandler(txt_Leave);
|
||||
aEdit.CControl.Leave += new EventHandler(txt_Leave);
|
||||
}
|
||||
//private void ASyncSelectDict_SetValue(string Text, string Key, AbleEditPackObj aEdit)
|
||||
//{
|
||||
// if (aEdit.ControlTitleText == "手术" || aEdit.ControlTitleText == "诊断" || aEdit.ControlTitleText == "人员")
|
||||
// {
|
||||
// aEdit.PackValue = Key;
|
||||
// aEdit.PackText = Text;
|
||||
// template.SetObjValue(OpeRecord, aEdit.ClassDataSourceName, Text, Key, true);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// aEdit.PackValue = Text;
|
||||
// aEdit.PackText = Text;
|
||||
// template.SetObjValue(OpeRecord, aEdit.ClassDataSourceName, Text, Text, true);
|
||||
// }
|
||||
// aEdit.CControl.Leave -= new EventHandler(txt_Leave);
|
||||
// aEdit.CControl.Leave += new EventHandler(txt_Leave);
|
||||
//}
|
||||
private void CControl_KeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (myOpeRecord != null)
|
||||
@ -654,5 +796,78 @@ namespace DrawGraph
|
||||
}
|
||||
}
|
||||
}
|
||||
private void CControl_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (myOpeRecord != null)
|
||||
{
|
||||
Control conl = sender as Control;
|
||||
AbleEditPackObj aEdit1S = conl.Tag as AbleEditPackObj;
|
||||
if (aEdit1S == null) return;
|
||||
aSyncSelectDict.ShowSel(template, conl, OpeRecord, aEdit1S);
|
||||
//conl.KeyUp -= new KeyEventHandler(CControl_KeyUp2);
|
||||
}
|
||||
}
|
||||
private void CControl_KeyUp2(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (myOpeRecord != null)
|
||||
{
|
||||
Control conl = sender as Control;
|
||||
if (e.KeyCode == Keys.Delete || e.KeyCode == Keys.Back)
|
||||
{
|
||||
if (conl.Text != SelectDictText.Value && SelectDictText.ChageText == "")
|
||||
{
|
||||
AbleEditPackObj aEdit1S = conl.Tag as AbleEditPackObj;
|
||||
if (aEdit1S == null) return;
|
||||
aSyncSelectDict.DelSel(template, conl, OpeRecord, aEdit1S);
|
||||
SelectDictText.ChageText = "";
|
||||
}
|
||||
}
|
||||
else if (e.KeyCode == Keys.Down)
|
||||
{
|
||||
if (SelectDictText.dgvZd.CurrentRow.Index + 1 != SelectDictText.dgvZd.Rows.Count - 1)
|
||||
{
|
||||
SelectDictText.dgvZd.CurrentCell = SelectDictText.dgvZd.Rows[SelectDictText.dgvZd.CurrentRow.Index + 1].Cells[1];
|
||||
}
|
||||
}
|
||||
else if (e.KeyCode == Keys.Up)
|
||||
{
|
||||
if (SelectDictText.dgvZd.CurrentRow.Index != 0)
|
||||
{
|
||||
SelectDictText.dgvZd.CurrentCell = SelectDictText.dgvZd.Rows[SelectDictText.dgvZd.CurrentRow.Index - 1].Cells[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private void SelDict2(AbleEditPackObj sender, EventArgs e, string _DictType, bool isRadio = false)
|
||||
{
|
||||
AbleEditPackObj ableEdit = sender;
|
||||
if (ableEdit == null) return;
|
||||
|
||||
ableEdit.CControl.MouseDown -= new MouseEventHandler(CControl_MouseDown);
|
||||
ableEdit.CControl.MouseDown += new MouseEventHandler(CControl_MouseDown);
|
||||
ableEdit.CControl.KeyUp -= new KeyEventHandler(CControl_KeyUp2);
|
||||
ableEdit.CControl.KeyUp += new KeyEventHandler(CControl_KeyUp2);
|
||||
ableEdit.CControl.KeyPress -= new KeyPressEventHandler(CControl_KeyPress);
|
||||
ableEdit.CControl.KeyPress += new KeyPressEventHandler(CControl_KeyPress);
|
||||
SelectDictText.ChageText = "";
|
||||
if (myOpeRecord != null)
|
||||
{
|
||||
Control conl = sender.CControl;
|
||||
if (conl is TextBox)
|
||||
{
|
||||
((TextBox)conl).BorderStyle = BorderStyle.Fixed3D;
|
||||
((TextBox)conl).Focus();
|
||||
if (sender.PackValue != null && sender.PackValue.Trim() != "" && isRadio == false)
|
||||
{
|
||||
if (((TextBox)conl).Text.LastIndexOf(',') != sender.PackText.Length && ((TextBox)conl).Text != "")
|
||||
((TextBox)conl).Text = ((TextBox)conl).Text + ",";
|
||||
}
|
||||
((TextBox)conl).Select(((TextBox)conl).Text.Length, 1);
|
||||
}
|
||||
ableEdit.CControl.TextChanged -= new EventHandler(CControl_TextChanged);
|
||||
ableEdit.CControl.TextChanged += new EventHandler(CControl_TextChanged);
|
||||
aSyncSelectDict.Show(template, OpeRecord, sender, _DictType, isRadio);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -294,7 +294,7 @@ namespace DrawGraph
|
||||
}
|
||||
//if (ci >= 30)
|
||||
//{
|
||||
// dt = DateTime.Parse(dt.ToString("yyyy-MM-dd HH:30:00"));
|
||||
// dt = DateTime.Parse(dt.ToString("yyyy-MM-dd HH:30:00"));
|
||||
//}
|
||||
//else if (ci < 30)
|
||||
//{
|
||||
|
||||
@ -86,7 +86,7 @@ namespace DrawGraph
|
||||
{
|
||||
if (dsr.isEqualRow(y, BeginTime, addDragRowHeight))
|
||||
{
|
||||
record.Add(dsr);
|
||||
record.Add(dsr);
|
||||
}
|
||||
}
|
||||
if (record.Count > 0)
|
||||
@ -179,7 +179,9 @@ namespace DrawGraph
|
||||
DrugListstr.Add("【手术用药】");
|
||||
myOpeRecord.AfterDrugsListstr = new List<string>();
|
||||
myOpeRecord.AfterDrugsListstr.Add("【术后镇痛药】");
|
||||
myOpeRecord.BeforeDrugs = "";
|
||||
myOpeRecord.AnesBeforListstr = new List<string>();
|
||||
myOpeRecord.AnesBeforListstr.Add("【麻醉诱导用药】");
|
||||
myOpeRecord.BeforeDrugs = "";
|
||||
int x = 0;
|
||||
foreach (var item in myOpeRecord.FactDrugList)
|
||||
{
|
||||
@ -194,7 +196,12 @@ namespace DrawGraph
|
||||
{
|
||||
myOpeRecord.BeforeDrugs += string.Format("{0}{1} ", item.DrugName.Trim(), dose);
|
||||
}
|
||||
if (item.GiveDrugType == "术后镇痛药")
|
||||
else if (item.GiveDrugType == "麻醉诱导用药")
|
||||
{
|
||||
myOpeRecord.AnesBeforListstr.Add(string.Format("{0}{1} {2} {3}{4}{5}", "", item.DrugName.Trim(),"(诱导)", dose, "", item.DrugChannel == null ? "" : " " + item.DrugChannel.ToString()));
|
||||
x++;
|
||||
}
|
||||
else if (item.GiveDrugType == "术后镇痛药")
|
||||
{
|
||||
myOpeRecord.AfterDrugsListstr.Add(string.Format("({0}){1} {2} {3}{4}{5}", x + 1, "", item.DrugName.Trim(), dose, "", item.DrugChannel == null ? "" : " " + item.DrugChannel.ToString()));
|
||||
myOpeRecord.AnalgesiaDrug += string.Format("{0}{1} ", item.DrugName.Trim(), dose);
|
||||
@ -209,7 +216,7 @@ namespace DrawGraph
|
||||
});
|
||||
List<FactDrug> _FactDrugList = myOpeRecord.FactDrugList.Where(s => IfInTimeExist(s.DrugBeginTime, s.End) == true).ToList();
|
||||
//存在氧气从第二行开始画
|
||||
if (_FactDrugList.Where(s => s.DrugName == "氧气" && s.GiveDrugType != "麻醉前用药" && s.GiveDrugType != "术后镇痛药").ToList().Count > 0) rowDrugsIndex = 1;
|
||||
if (_FactDrugList.Where(s => s.DrugName == "氧气" && s.GiveDrugType != "麻醉前用药" && s.GiveDrugType != "术后镇痛药" && s.GiveDrugType != "麻醉诱导用药").ToList().Count > 0) rowDrugsIndex = 1;
|
||||
//加药按加药时间排序
|
||||
_FactDrugList.Sort(new FactDrugComparer());
|
||||
|
||||
@ -217,7 +224,7 @@ namespace DrawGraph
|
||||
for (int i = 0; i < _FactDrugList.Count; i++)
|
||||
{
|
||||
FactDrug temp = _FactDrugList[i];
|
||||
if (temp.GiveDrugType == "麻醉前用药" || temp.GiveDrugType == "术后镇痛药" || temp.DrugChannel == "备用") continue;//|| temp.GiveDrugType == "麻醉诱导用药"
|
||||
if (temp.GiveDrugType == "麻醉前用药" || temp.GiveDrugType == "术后镇痛药" || temp.DrugChannel == "备用"|| temp.GiveDrugType == "麻醉诱导用药") continue;
|
||||
//子药不画
|
||||
if (temp.ParentId > 0) continue;
|
||||
bool isEqual = false;
|
||||
@ -236,7 +243,7 @@ namespace DrawGraph
|
||||
for (int j = 0; j < i; j++)
|
||||
{
|
||||
FactDrug addDrug1 = _FactDrugList[j];
|
||||
if (addDrug1.GiveDrugType == "麻醉前用药" || addDrug1.GiveDrugType == "术后镇痛药" || addDrug1.DrugChannel == "备用") continue;//|| temp.GiveDrugType == "麻醉诱导用药"
|
||||
if (addDrug1.GiveDrugType == "麻醉前用药" || addDrug1.GiveDrugType == "术后镇痛药" || addDrug1.GiveDrugType == "麻醉诱导用药" || addDrug1.DrugChannel == "备用") continue;
|
||||
if (addDrug1.ChildFactDrugList == null) addDrug1.ChildFactDrugList = new List<FactDrug>();
|
||||
//如果加药品ID相同并且加加药ID不同,则认为加了同一种加药
|
||||
if (addDrug1.Equal(temp) && temp.ParentId == 0 && addDrug1.ParentId == 0 && addDrug1.ChildFactDrugList.Count == 0 && temp.ChildFactDrugList.Count == 0)
|
||||
@ -311,7 +318,7 @@ namespace DrawGraph
|
||||
myOpeRecord.DrugsListstr = DrugListstr;
|
||||
|
||||
if (myOpeRecord.BeforeDrugs == null || myOpeRecord.BeforeDrugs == "") myOpeRecord.BeforeDrugs = "无";
|
||||
template.SetObjValue(myOpeRecord, "OperationRecord.BeforeDrugs", myOpeRecord.BeforeDrugs, myOpeRecord.BeforeDrugs);
|
||||
template.SetObjValue(myOpeRecord, "OperationRecord.BeforeDrugs", myOpeRecord.BeforeDrugs, myOpeRecord.BeforeDrugs);
|
||||
template.SetObjValue(myOpeRecord, "OperationRecord.AnalgesiaDrug", myOpeRecord.AnalgesiaDrug, myOpeRecord.AnalgesiaDrug);
|
||||
DrawDrugSapDose();
|
||||
}
|
||||
@ -348,8 +355,7 @@ namespace DrawGraph
|
||||
}
|
||||
private void DrawZuDragsLine(double x, double y, double zhuy, FactDrug temp)
|
||||
{
|
||||
double height = getYPositionByListIndex(1, lines.RealY, lines.RealEndY, RowsCount) / 2;
|
||||
//double x = H3pack.RealX + 0.003f;
|
||||
double height = getYPositionByListIndex(1, lines.RealY, lines.RealEndY, RowsCount) / 2;
|
||||
ZUtil.DrawLine2(x, zhuy + height, x, y + height, ZedControl, "zhuyDrugs" + temp.Id, Color.Red);
|
||||
ZUtil.DrawLine2(x, zhuy + height, x + 0.0055f, zhuy + height, ZedControl, "zhuyDrugstop" + temp.Id, Color.Red);
|
||||
ZUtil.DrawLine2(x, y + height, x + 0.0055f, y + height, ZedControl, "zhuyDrugsend" + temp.Id, Color.Red);
|
||||
|
||||
@ -108,7 +108,7 @@ namespace DrawGraph
|
||||
}
|
||||
else if (myOpeRecord.ComputerRect.Width >= 1600)
|
||||
{
|
||||
font = new System.Drawing.Font("宋体", 6f);
|
||||
font = new System.Drawing.Font("宋体", 7f);
|
||||
}
|
||||
else if (myOpeRecord.ComputerRect.Width >= 1024)
|
||||
{
|
||||
|
||||
@ -398,7 +398,7 @@ namespace DrawGraph
|
||||
private string operationDate;
|
||||
private string opeSpecialCondition;
|
||||
private string bMI;
|
||||
private string beforeDrugs;
|
||||
private string beforeDrugs;
|
||||
private string anaesthesiaMethodName;
|
||||
private string anaesthesiaTechnology;
|
||||
private string anaesthesiaComplication;
|
||||
@ -608,7 +608,7 @@ namespace DrawGraph
|
||||
/// <summary>
|
||||
/// 麻醉前用药
|
||||
/// </summary>
|
||||
[ClassAttributs(Description = "麻醉前用药")]
|
||||
[ClassAttributs(Description = "麻醉前用药")]
|
||||
public string BeforeDrugs
|
||||
{
|
||||
get { return beforeDrugs; }
|
||||
@ -1198,6 +1198,7 @@ namespace DrawGraph
|
||||
public List<string> SapsListstr = new List<string>();
|
||||
public List<string> OutsListstr = new List<string>();
|
||||
public List<string> AfterDrugsListstr = new List<string>();
|
||||
public List<string> AnesBeforListstr = new List<string>();
|
||||
public List<string> FluidListstr = new List<string>();
|
||||
public List<string> PunctureAndIntubatio;
|
||||
public List<PhysioDataConfig> PhysioConfigList;
|
||||
|
||||
@ -392,7 +392,8 @@ namespace DrawGraph
|
||||
}
|
||||
this.APhysioParams.Add(pd);
|
||||
Sort();
|
||||
curve.Points = APhysioParams;
|
||||
if (curve != null)
|
||||
curve.Points = APhysioParams;
|
||||
if (isInsertDB == true)
|
||||
PhysioDataService.AddPhysioData(pd);
|
||||
if (ShowText == true)
|
||||
@ -655,7 +656,7 @@ namespace DrawGraph
|
||||
{
|
||||
if (pd.Value != Double.MaxValue && pd.Value > 0)
|
||||
{
|
||||
viewValue = ((int)pd.Value).ToString();
|
||||
viewValue = ((double)pd.Value).ToString();
|
||||
if (Enname == "Temp")
|
||||
viewValue = Math.Round(pd.Y, 1).ToString();
|
||||
}
|
||||
@ -910,6 +911,7 @@ namespace DrawGraph
|
||||
}
|
||||
public void EditAddItem(PhysioData pd)
|
||||
{
|
||||
this.APhysioParams.Add(pd);
|
||||
PhysioDataService.AddPhysioData(pd);
|
||||
DrawTextPhysioData(pd);
|
||||
}
|
||||
@ -922,11 +924,14 @@ namespace DrawGraph
|
||||
|
||||
delAddObj(oldPd);
|
||||
DrawTextPhysioData(newPd);
|
||||
this.APhysioParams.Remove(oldPd);
|
||||
this.APhysioParams.Add(newPd);
|
||||
}
|
||||
public void EditDelItem(PhysioData pd)
|
||||
{
|
||||
delAddObj(pd);
|
||||
SetPositionText(pd, "-1");
|
||||
this.APhysioParams.Remove(pd);
|
||||
PhysioDataService.DelPhysioByValueData(pd);
|
||||
}
|
||||
public void SetPositionText(PhysioData pdTemp, string viewValue)
|
||||
|
||||
@ -398,8 +398,9 @@ namespace DrawGraph
|
||||
else
|
||||
{
|
||||
if (AnesOpeStatue == DoAnesOpeStatus.SelectArea)
|
||||
{
|
||||
{
|
||||
AnesOpeStatue = DoAnesOpeStatus.VIEW;
|
||||
DeletePhysios();
|
||||
}
|
||||
}
|
||||
|
||||
@ -438,74 +439,78 @@ namespace DrawGraph
|
||||
{
|
||||
if (AnesOpeStatue == DoAnesOpeStatus.VIEW)
|
||||
{
|
||||
if (myOpeRecord.SAreaObj.Selected)
|
||||
{
|
||||
double startValue = myOpeRecord.SAreaObj.EndPds[0].Value;
|
||||
double endValue = myOpeRecord.SAreaObj.StartPDs[0].Value;
|
||||
double startValue2 = myOpeRecord.SAreaObj.EndPds[1].Value;
|
||||
double endValue2 = myOpeRecord.SAreaObj.StartPDs[1].Value;
|
||||
|
||||
List<int> pdTemps = SelectPhysioDataByID(myOpeRecord.Id.Value,
|
||||
myOpeRecord.SAreaObj.StartPD.RecordTime,
|
||||
myOpeRecord.SAreaObj.EndPd.RecordTime,
|
||||
startValue, endValue);
|
||||
List<int> pdTemps2 = SelectPhysioDataByID(myOpeRecord.Id.Value,
|
||||
myOpeRecord.SAreaObj.StartPD.RecordTime,
|
||||
myOpeRecord.SAreaObj.EndPd.RecordTime,
|
||||
startValue2, endValue2);
|
||||
|
||||
List<PhysioDataConfig> selparameters = new List<PhysioDataConfig>();
|
||||
foreach (PhysioDataConfig addPP in myOpeRecord.PhysioConfigList)
|
||||
{
|
||||
bool istrue = false;
|
||||
foreach (int item in pdTemps)
|
||||
{
|
||||
if (item == addPP.Id && addPP.YAisx == 0)
|
||||
{
|
||||
istrue = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
foreach (int item in pdTemps2)
|
||||
{
|
||||
if (item == addPP.Id && addPP.YAisx == 1)
|
||||
{
|
||||
istrue = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (istrue == true)
|
||||
selparameters.Add(addPP);
|
||||
}
|
||||
if (selparameters.Count <= 0) return;
|
||||
|
||||
DeletePhysios frm = new DeletePhysios(myOpeRecord.Id.Value,
|
||||
myOpeRecord.SAreaObj.StartPD.RecordTime,
|
||||
myOpeRecord.SAreaObj.EndPd.RecordTime,
|
||||
startValue, endValue,
|
||||
startValue2, endValue2);
|
||||
frm.selparameters = selparameters;
|
||||
frm.FormClosed += (a, b) =>
|
||||
{
|
||||
if (frm.isDelete == true)
|
||||
{
|
||||
myOpeRecord.SAreaObj.Clear();
|
||||
|
||||
template.Bind("MonitorManage");
|
||||
ZedControl.Refresh();
|
||||
}
|
||||
else
|
||||
{
|
||||
myOpeRecord.SAreaObj.Clear();
|
||||
}
|
||||
};
|
||||
frm.ShowDialog();
|
||||
|
||||
}
|
||||
DeletePhysios();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void DeletePhysios()
|
||||
{
|
||||
if (myOpeRecord.SAreaObj.Selected)
|
||||
{
|
||||
double startValue = myOpeRecord.SAreaObj.EndPds[0].Value;
|
||||
double endValue = myOpeRecord.SAreaObj.StartPDs[0].Value;
|
||||
double startValue2 = myOpeRecord.SAreaObj.EndPds[1].Value;
|
||||
double endValue2 = myOpeRecord.SAreaObj.StartPDs[1].Value;
|
||||
|
||||
List<int> pdTemps = SelectPhysioDataByID(myOpeRecord.Id.Value,
|
||||
myOpeRecord.SAreaObj.StartPD.RecordTime,
|
||||
myOpeRecord.SAreaObj.EndPd.RecordTime,
|
||||
startValue, endValue);
|
||||
List<int> pdTemps2 = SelectPhysioDataByID(myOpeRecord.Id.Value,
|
||||
myOpeRecord.SAreaObj.StartPD.RecordTime,
|
||||
myOpeRecord.SAreaObj.EndPd.RecordTime,
|
||||
startValue2, endValue2);
|
||||
|
||||
List<PhysioDataConfig> selparameters = new List<PhysioDataConfig>();
|
||||
foreach (PhysioDataConfig addPP in myOpeRecord.PhysioConfigList)
|
||||
{
|
||||
bool istrue = false;
|
||||
foreach (int item in pdTemps)
|
||||
{
|
||||
if (item == addPP.Id && addPP.YAisx == 0)
|
||||
{
|
||||
istrue = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
foreach (int item in pdTemps2)
|
||||
{
|
||||
if (item == addPP.Id && addPP.YAisx == 1)
|
||||
{
|
||||
istrue = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (istrue == true)
|
||||
selparameters.Add(addPP);
|
||||
}
|
||||
if (selparameters.Count <= 0) return;
|
||||
|
||||
DeletePhysios frm = new DeletePhysios(myOpeRecord.Id.Value,
|
||||
myOpeRecord.SAreaObj.StartPD.RecordTime,
|
||||
myOpeRecord.SAreaObj.EndPd.RecordTime,
|
||||
startValue, endValue,
|
||||
startValue2, endValue2);
|
||||
frm.selparameters = selparameters;
|
||||
frm.FormClosed += (a, b) =>
|
||||
{
|
||||
if (frm.isDelete == true)
|
||||
{
|
||||
myOpeRecord.SAreaObj.Clear();
|
||||
|
||||
template.Bind("MonitorManage");
|
||||
ZedControl.Refresh();
|
||||
}
|
||||
else
|
||||
{
|
||||
myOpeRecord.SAreaObj.Clear();
|
||||
}
|
||||
};
|
||||
frm.ShowDialog();
|
||||
|
||||
}
|
||||
}
|
||||
#endregion 重写的事件结束
|
||||
|
||||
#region 绑定区域数据
|
||||
|
||||
@ -162,6 +162,8 @@ namespace DrawGraph
|
||||
{
|
||||
PublicMethod.WriteLog(ex);
|
||||
}
|
||||
//麻醉诱导用药
|
||||
SetRemarkInfo(myOpeRecord.AnesBeforListstr, remarkRowscount, ref x, ref remarkRow, ref AllRemarkRow, fontsize, ref fontlength);
|
||||
//事件备注
|
||||
SetRemarkInfo(myOpeRecord.EventListstr, remarkRowscount, ref x, ref remarkRow, ref AllRemarkRow, fontsize, ref fontlength);
|
||||
//用药备注
|
||||
|
||||
@ -100,7 +100,7 @@ namespace DrawGraph
|
||||
{
|
||||
if (dsr.isEqualRow(y, BeginTime, addDragRowHeight))
|
||||
{
|
||||
record.Add(dsr);
|
||||
record.Add(dsr);
|
||||
}
|
||||
}
|
||||
if (record.Count > 0)
|
||||
@ -227,8 +227,8 @@ namespace DrawGraph
|
||||
for (int i = 0; i < _FactDrugList.Count; i++)
|
||||
{
|
||||
FactDrug temp = _FactDrugList[i];
|
||||
if (temp.GiveDrugType == "麻醉前用药" || temp.GiveDrugType == "术后镇痛药" || temp.DrugChannel == "备用") continue;//|| temp.GiveDrugType == "麻醉诱导用药"
|
||||
//子药不画
|
||||
if (temp.GiveDrugType == "麻醉前用药" || temp.GiveDrugType == "术后镇痛药" || temp.DrugChannel == "备用" || temp.GiveDrugType == "麻醉诱导用药") continue;
|
||||
//子药不画
|
||||
if (temp.ParentId > 0) continue;
|
||||
bool isEqual = false;
|
||||
bool isChildEqual = false;
|
||||
@ -352,8 +352,7 @@ namespace DrawGraph
|
||||
}
|
||||
private void DrawZuDragsLine(double x, double y, double zhuy, FactDrug temp)
|
||||
{
|
||||
double height = getYPositionByListIndex(1, sapPpack.RealY, sapPpack.RealEndY, RowsCount) / 2;
|
||||
//double x = H3pack.RealX + 0.003f;
|
||||
double height = getYPositionByListIndex(1, sapPpack.RealY, sapPpack.RealEndY, RowsCount) / 2;
|
||||
ZUtil.DrawLine2(x, zhuy + height, x, y + height, ZedControl, "zhuyDrugs" + temp.Id, Color.Red);
|
||||
ZUtil.DrawLine2(x, zhuy + height, x + 0.0055f, zhuy + height, ZedControl, "zhuyDrugstop" + temp.Id, Color.Red);
|
||||
ZUtil.DrawLine2(x, y + height, x + 0.0055f, y + height, ZedControl, "zhuyDrugsend" + temp.Id, Color.Red);
|
||||
|
||||
@ -14,8 +14,8 @@ namespace DrawGraph
|
||||
private volatile static SelectDictText _instance = null;
|
||||
private static readonly object lockHelper = new object();
|
||||
|
||||
public delegate void SetValueHandler(string Value, AbleEditPackObj aEdit);
|
||||
public static event SetValueHandler SetValue;
|
||||
//public delegate void SetValueHandler(string Value, string key, AbleEditPackObj aEdit);
|
||||
//public static event SetValueHandler SetValue;
|
||||
|
||||
private SelectDictText() { }
|
||||
public static SelectDictText CreateInstance()
|
||||
@ -94,8 +94,10 @@ namespace DrawGraph
|
||||
static string type;
|
||||
public static TemplateManage template;
|
||||
public static object OpeRecord;
|
||||
public static string Key;
|
||||
public static string Value;
|
||||
public static bool isRadio;
|
||||
public static string ChageText = "";
|
||||
|
||||
public void Show(TemplateManage _template, object _OpeRecord, AbleEditPackObj _aEdit, string _type, bool _isRadio)
|
||||
{
|
||||
@ -106,7 +108,15 @@ namespace DrawGraph
|
||||
OpeRecord = _OpeRecord;
|
||||
if (aEdit == null) return;
|
||||
Value = aEdit.PackText;
|
||||
DataTable dt = DBManage.GetDictDataTable((OpeRecord as OperationRecord), "", aEdit.ControlTitleText, type.ToString(), "");
|
||||
if (aEdit.ControlTitleText == "手术" || aEdit.ControlTitleText == "诊断" || aEdit.ControlTitleText == "人员")
|
||||
{
|
||||
Key = aEdit.PackValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
Key = "";
|
||||
}
|
||||
DataTable dt = DBManage.GetDictDataTable((OpeRecord as OperationRecord), "", aEdit.ControlTitleText, type.ToString(), Key);
|
||||
dgvZd.DataSource = dt;
|
||||
|
||||
dgvZd.Columns[1].HeaderText = aEdit.ControlTitleText + "";
|
||||
@ -126,26 +136,36 @@ namespace DrawGraph
|
||||
dgvZd.Visible = true;
|
||||
dgvZd.BringToFront();
|
||||
}
|
||||
public void ShowSel(Control CControl, object _OpeRecord)
|
||||
public void ShowSel(TemplateManage _template, Control CControl, object _OpeRecord, AbleEditPackObj _aEdit)
|
||||
{
|
||||
template = _template;
|
||||
OpeRecord = _OpeRecord;
|
||||
aEdit = _aEdit;
|
||||
if (aEdit == null) return;
|
||||
if (dgvZd.Visible == false) return;
|
||||
Key = aEdit.PackValue;
|
||||
Value = aEdit.PackText;
|
||||
string text = CControl.Text;
|
||||
text = text.Replace(Value + ",", "");
|
||||
DataTable dt = DBManage.GetDictDataTable((OpeRecord as OperationRecord), text, aEdit.ControlTitleText, type.ToString(), "");
|
||||
if (Value == null || Value == "")
|
||||
ChageText = CControl.Text;
|
||||
else if (CControl.Text.Contains(","))
|
||||
ChageText = CControl.Text.Substring(CControl.Text.LastIndexOf(",") + 1, CControl.Text.Length - CControl.Text.LastIndexOf(",") - 1);
|
||||
DataTable dt = DBManage.GetDictDataTable((OpeRecord as OperationRecord), ChageText, aEdit.ControlTitleText, type.ToString(), Key);
|
||||
dgvZd.DataSource = dt;
|
||||
dgvZd.BringToFront();
|
||||
}
|
||||
public void DelSel(Control CControl, object _OpeRecord)
|
||||
public void DelSel(TemplateManage _template, Control CControl, object _OpeRecord, AbleEditPackObj _aEdit)
|
||||
{
|
||||
template = _template;
|
||||
OpeRecord = _OpeRecord;
|
||||
aEdit = _aEdit;
|
||||
if (aEdit == null) return;
|
||||
Key = aEdit.PackValue;
|
||||
Value = aEdit.PackText;
|
||||
if (CControl.Text.Trim() != "" && CControl.Text != Value)
|
||||
{
|
||||
string[] strs = CControl.Text.Split(',');
|
||||
string[] names = Value.Split(',');
|
||||
string[] ids = Key.Split(',');
|
||||
List<string> namevalue = new List<string>();
|
||||
List<string> idvalue = new List<string>();
|
||||
|
||||
@ -157,30 +177,36 @@ namespace DrawGraph
|
||||
if (strs[i] == names[j] && !namevalue.Contains(names[j]))
|
||||
{
|
||||
namevalue.Add(names[j]);
|
||||
idvalue.Add(ids[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (idvalue.Count > 0)
|
||||
{
|
||||
Value = string.Join(",", namevalue);
|
||||
Key = string.Join(",", idvalue);
|
||||
}
|
||||
else
|
||||
{
|
||||
Value = "";
|
||||
Key = "";
|
||||
}
|
||||
|
||||
dgvZd.Visible = false;
|
||||
//aEdit.IsVisible = !aEdit.IsVisible;
|
||||
aEdit.CControl.Text = Value;
|
||||
//设置属性的值
|
||||
template.SetObjValue(OpeRecord, aEdit.ClassDataSourceName, Value, Value, true);
|
||||
template.SetObjValue(OpeRecord, aEdit.ClassDataSourceName, Value, Key, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
Value = "";
|
||||
Key = "";
|
||||
dgvZd.Visible = false;
|
||||
aEdit.CControl.Text = Value;
|
||||
//aEdit.IsVisible = !aEdit.IsVisible;
|
||||
//设置属性的值
|
||||
template.SetObjValue(OpeRecord, aEdit.ClassDataSourceName, Value, Value, true);
|
||||
template.SetObjValue(OpeRecord, aEdit.ClassDataSourceName, Value, Key, true);
|
||||
}
|
||||
}
|
||||
public static void Hidden(bool isShow = false)
|
||||
@ -218,11 +244,21 @@ namespace DrawGraph
|
||||
|
||||
if (isRadio == true)
|
||||
{
|
||||
Key = id.ToString();
|
||||
Value = name;
|
||||
}
|
||||
else
|
||||
{
|
||||
Value = Value + "," + name;
|
||||
if (Key != null && Key.Trim() != "")
|
||||
{
|
||||
Key = Key + "," + id;
|
||||
Value = Value + "," + name;
|
||||
}
|
||||
else
|
||||
{
|
||||
Key = id.ToString();
|
||||
Value = name;
|
||||
}
|
||||
}
|
||||
|
||||
index = 0;
|
||||
@ -236,14 +272,20 @@ namespace DrawGraph
|
||||
{
|
||||
aEdit.PackValue += (aEdit.PackValue == "" ? "" : "+") + Value;
|
||||
aEdit.PackText += (aEdit.PackText == "" ? "" : "+") + Value;
|
||||
SetValue(aEdit.PackValue, aEdit);
|
||||
template.SetObjValue(OpeRecord, aEdit.ClassDataSourceName, aEdit.PackText, aEdit.PackValue, true);
|
||||
}
|
||||
}
|
||||
else if (aEdit.ControlTitleText == "手术" || aEdit.ControlTitleText == "诊断" || aEdit.ControlTitleText == "人员")
|
||||
{
|
||||
aEdit.PackValue = Key;
|
||||
aEdit.PackText = Value;
|
||||
template.SetObjValue(OpeRecord, aEdit.ClassDataSourceName, Value, Key, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
aEdit.PackValue = Value;
|
||||
aEdit.PackText = Value;
|
||||
SetValue(aEdit.PackValue, aEdit);
|
||||
template.SetObjValue(OpeRecord, aEdit.ClassDataSourceName, Value, Value, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ namespace DrawGraph
|
||||
public override void Bind()
|
||||
{
|
||||
aSyncSelectDict = SelectDictText.CreateInstance();
|
||||
SelectDictText.SetValue += ASyncSelectDict_SetValue;
|
||||
//SelectDictText.SetValue += ASyncSelectDict_SetValue;
|
||||
base.Bind();
|
||||
init();
|
||||
if (ableEdit2 != null)
|
||||
@ -538,7 +538,7 @@ namespace DrawGraph
|
||||
ableEdit.CControl.Leave += new EventHandler(txt_Leave);
|
||||
}
|
||||
}
|
||||
private void ASyncSelectDict_SetValue(string Text, AbleEditPackObj aEdit)
|
||||
private void ASyncSelectDict_SetValue(string Text, string Key, AbleEditPackObj aEdit)
|
||||
{
|
||||
aEdit.PackValue = Text;
|
||||
aEdit.PackText = Text;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user