using AIMSBLL; using AxNsoOfficeLib; using DrawGraph; using HelperDB; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Data; using System.Windows.Forms; namespace AIMS.OperationAanesthesia { public class DrawAnasReordBill { public static void IniDrawAnasReordBill3(OperationRecord _record, ZedGraphControl Zgc, ref TemplateManage templateManage) { try { string jsonStr = DBHelper.ExecuteScalar("SELECT [JsonDate] FROM [dbo].[OperationRecordTemplate] where id=10").ToString(); if (jsonStr != null && jsonStr != "") { templateManage = JsonConvert.DeserializeObject(jsonStr); templateManage.ZedControl = Zgc; templateManage.Id = 10; templateManage.OpeRecord = BOperationRecord.getRecord(_record, -1, 2); bool reVal = templateManage.Load(); 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); #region 设置界面自适应 //在此处可随时设置板子的属性 templateManage.ZedControl.Width = templateManage.ZedControl.Parent.Width - 54; templateManage.ZedControl.Height = (templateManage.ZedControl.Parent.Width - 54) / 8 * 11; TextPackObj janCePack = templateManage.GetPackObjectOTag("BaseInfoTopManage_TextPackObj_2"); int LocationY = Convert.ToInt32(templateManage.ZedControl.Height * janCePack.RealY); templateManage.LocationY = LocationY; templateManage.SetPYL(); templateManage.ZedControl.AxisChange(); templateManage.ZedControl.Refresh(); //最后还要调整图表进行自适应 PackObjBase pack = templateManage.GetPackObjectOTag("PhysioDataManage_ChartPackObj_6"); if (pack != null) pack.Draw(); #endregion } else { MessageBox.Show(templateManage.MsgStr); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } } public static void IniDrawAnasReordBill4(OperationRecord _record, ZedGraphControl Zgc, ref TemplateManage templateManage) { try { string jsonStr = DBHelper.ExecuteScalar("SELECT [JsonDate] FROM [dbo].[OperationRecordTemplate] where id=20").ToString(); if (jsonStr != null && jsonStr != "") { templateManage = JsonConvert.DeserializeObject(jsonStr); templateManage.ZedControl = Zgc; templateManage.Id = 20; templateManage.OpeRecord = BOperationRecord.getRecord(_record, -1, 2); bool reVal = templateManage.Load(); if (reVal) { templateManage.DrawArea(); templateManage.ZedControl.Width = templateManage.ZedControl.Parent.Width - 54; templateManage.ZedControl.Height = (templateManage.ZedControl.Parent.Width - 54) / 8 * 11; TextPackObj janCePack = templateManage.GetPackObjectOTag("BaseInfoTopManage_TextPackObj_912"); int LocationY = Convert.ToInt32(templateManage.ZedControl.Height * (janCePack == null ? 0 : janCePack.RealEndY)); templateManage.LocationY = LocationY; templateManage.SetPYL(); templateManage.ZedControl.AxisChange(); templateManage.ZedControl.Refresh(); } else { MessageBox.Show(templateManage.MsgStr); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } } public static void IniDrawAnasReordBill5(OperationRecord _record, ZedGraphControl Zgc, ZedGraphControl Zgc2, ref TemplateManage templateManage, ref TemplateManage templateManage2) { try { string jsonStr = DBHelper.ExecuteScalar("SELECT [JsonDate] FROM [dbo].[OperationRecordTemplate] where id=40").ToString(); if (jsonStr != null && jsonStr != "") { templateManage = JsonConvert.DeserializeObject(jsonStr); templateManage.OpeRecord = BOperationRecord.getRecord(_record, -1, 1); templateManage.ZedControl = Zgc; templateManage.Id = 40; bool reVal = templateManage.Load(); 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); #region 设置界面自适应 //在此处可随时设置板子的属性 templateManage.ZedControl.Width = templateManage.ZedControl.Parent.Width - 54; templateManage.ZedControl.Height = (templateManage.ZedControl.Parent.Width - 54) / 8 * 11; int LocationY = Convert.ToInt32(templateManage.ZedControl.Height * 0.04); templateManage.LocationY = LocationY; templateManage.SetPYL(); templateManage.ZedControl.AxisChange(); templateManage.ZedControl.Refresh(); //最后还要调整图表进行自适应 PackObjBase pack = templateManage.GetPackObjectOTag("PhysioDataManage_ChartPackObj_6"); if (pack != null) pack.Draw(); #endregion } else { MessageBox.Show(templateManage.MsgStr); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } try { string jsonStr = DBHelper.ExecuteScalar("SELECT [JsonDate] FROM [dbo].[OperationRecordTemplate] where id=50").ToString(); if (jsonStr != null && jsonStr != "") { templateManage2 = JsonConvert.DeserializeObject(jsonStr); templateManage2.ZedControl = Zgc2; templateManage2.Id = 50; templateManage2.OpeRecord = BOperationRecord.getRecord(_record, -1, 2); bool reVal = templateManage2.Load(); 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); templateManage2.ZedControl.Width = templateManage.ZedControl.Width; templateManage2.ZedControl.Height = templateManage.ZedControl.Height; int LocationY = Convert.ToInt32(templateManage2.ZedControl.Height * 0.065); templateManage2.LocationY = LocationY; templateManage2.SetPYL(); templateManage2.ZedControl.AxisChange(); templateManage2.ZedControl.Refresh(); } else { MessageBox.Show(templateManage2.MsgStr); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } } public static void IniDrawAnasReordBill6(OperationRecord _record, ZedGraphControl Zgc ,ref TemplateManage templateManage ) { try { string jsonStr = DBHelper.ExecuteScalar("SELECT [JsonDate] FROM [dbo].[OperationRecordTemplate] where id=60").ToString(); if (jsonStr != null && jsonStr != "") { templateManage = JsonConvert.DeserializeObject(jsonStr); templateManage.OpeRecord = BOperationRecord.getRecord(_record, -1, 1); templateManage.ZedControl = Zgc; templateManage.Id = 60; bool reVal = templateManage.Load(); 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); #region 设置界面自适应 //在此处可随时设置板子的属性 templateManage.ZedControl.Width = templateManage.ZedControl.Parent.Width - 54; templateManage.ZedControl.Height = (templateManage.ZedControl.Parent.Width - 54) / 8 * 11; int LocationY = Convert.ToInt32(templateManage.ZedControl.Height * 0.08); templateManage.LocationY = LocationY; templateManage.SetPYL(); templateManage.ZedControl.AxisChange(); templateManage.ZedControl.Refresh(); //最后还要调整图表进行自适应 PackObjBase pack = templateManage.GetPackObjectOTag("PhysioDataManage_ChartPackObj_6"); if (pack != null) pack.Draw(); #endregion } else { MessageBox.Show(templateManage.MsgStr); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } } public static DataTable SelectPhysioDataUpdate(int Id) { string sql = string.Format("SELECT PhysioDataUpdate.Id,pr.Name ,PatientId,PhysioDataConfigId,RecordTime,[OldParamValue],[ParamValue],[PhysioDataUpdate].[OperatorName],[OperatorTime] FROM[dbo].[PhysioDataUpdate] left join PhysioDataConfig pr on pr.id =PhysioDataConfigId where PatientId ={0}", Id); DataTable dt = DBHelper.GetDataTable(sql); return dt; } } }