diff --git a/AIMS/AIMS.csproj b/AIMS/AIMS.csproj index 14e1e49..c90163f 100644 --- a/AIMS/AIMS.csproj +++ b/AIMS/AIMS.csproj @@ -1270,20 +1270,14 @@ Settings.settings True - - PreserveNewest - + - - PreserveNewest - - - PreserveNewest - + + diff --git a/AIMS/OperationAanesthesia/frmAanesthesiaRecord.cs b/AIMS/OperationAanesthesia/frmAanesthesiaRecord.cs index e93b7e6..745e748 100644 --- a/AIMS/OperationAanesthesia/frmAanesthesiaRecord.cs +++ b/AIMS/OperationAanesthesia/frmAanesthesiaRecord.cs @@ -2285,6 +2285,12 @@ namespace AIMS.OperationAanesthesia isTrue = false; } + if (_record.OperationType == null || _record.OperationType.Trim() == "") + { + message = "请选择择期急诊!"; + isTrue = false; + } + if (PublicMethod.RoleName.Contains("术中填写手术等级切口等级")) { if (_record.OpeRecordInfo.OperationLevel == null || _record.OpeRecordInfo.OperationLevel.ToString().Trim() == "") diff --git a/AIMS/OperationAanesthesia/frmFactDrugNew.cs b/AIMS/OperationAanesthesia/frmFactDrugNew.cs index 0fc7503..27988a5 100644 --- a/AIMS/OperationAanesthesia/frmFactDrugNew.cs +++ b/AIMS/OperationAanesthesia/frmFactDrugNew.cs @@ -481,8 +481,8 @@ namespace AIMS.PublicUI.UI _dataGridView.Rows[index].Cells[6].Value = (double)item.Density;//浓度 if (item.DensityUnit != null && item.DensityUnit != "") _dataGridView.Rows[index].Cells[7].Value = item.DensityUnit;//浓度单位 - if (item.Velocity != 0) - _dataGridView.Rows[index].Cells[8].Value = (double)item.Velocity;//速度 + if (item.Velocity != "") + _dataGridView.Rows[index].Cells[8].Value = item.Velocity;//速度 if (item.VelocityUnit != null && item.VelocityUnit != "") _dataGridView.Rows[index].Cells[9].Value = item.VelocityUnit;//速度单位 if (Convert.ToDateTime(item.DrugBeginTime).ToString().Length > 0) @@ -700,7 +700,7 @@ namespace AIMS.PublicUI.UI } } //点击结束时间时判断是否持续事件,并显示时间 - if (_dataGridView.CurrentCell.ColumnIndex == 16) + else if (_dataGridView.CurrentCell.ColumnIndex == 16) { if (_dataGridView.CurrentRow.Cells[15].EditedFormattedValue.ToString() != "" && _dataGridView.CurrentCell.EditedFormattedValue.ToString() == "")//持续 { @@ -724,6 +724,19 @@ namespace AIMS.PublicUI.UI btnSave.Focus(); } } + else if (_dataGridView.CurrentCell.ColumnIndex == 18) + { + if (_dataGridView.CurrentRow.Cells[18].FormattedValue.ToString() == "") + { + _dataGridView.CurrentRow.Cells[18].Value = "下"; + btnSave.Focus(); + } + else + { + _dataGridView.CurrentRow.Cells[18].Value = ""; + btnSave.Focus(); + } + } } } private void dgvDrugs_CellValueChanged(object sender, DataGridViewCellEventArgs e) @@ -733,7 +746,10 @@ namespace AIMS.PublicUI.UI if (e.ColumnIndex == 8) { if (_dataGridView.CurrentCell == null || _dataGridView.CurrentRow.Cells[8].EditedFormattedValue.ToString() == "") return; - if (_dataGridView.CurrentRow.Cells[9].EditedFormattedValue.ToString() == "") _dataGridView.CurrentRow.Cells[9].Value = "ml/h"; + if (_dataGridView.CurrentRow.Cells[9].EditedFormattedValue.ToString() == "") + if (_dataGridView.CurrentRow.Cells[3].EditedFormattedValue.ToString() == "氧气") + _dataGridView.CurrentRow.Cells[9].Value = "L/min"; + else _dataGridView.CurrentRow.Cells[9].Value = "ml/h"; //_dataGridView.CurrentRow.Cells[11].Value = null; } else if (e.ColumnIndex == 6) @@ -962,11 +978,11 @@ namespace AIMS.PublicUI.UI drugsR.DensityUnit = dr.Cells[7].EditedFormattedValue.ToString();//浓度单位 if (dr.Cells[8].EditedFormattedValue.ToString() != "") { - drugsR.Velocity = Convert.ToDecimal(dr.Cells[8].EditedFormattedValue.ToString());//速度 + drugsR.Velocity = dr.Cells[8].EditedFormattedValue.ToString();//速度 } else { - drugsR.Velocity = 0; + drugsR.Velocity = ""; } drugsR.VelocityUnit = dr.Cells[9].EditedFormattedValue.ToString();//速度单位 drugsR.BloodType = dr.Cells[12].EditedFormattedValue.ToString();//血型 @@ -1088,7 +1104,7 @@ namespace AIMS.PublicUI.UI public DataGridViewTextBoxEditingControl dgvTxt = null; // 声明 一个文本 CellEdit public DataGridViewTextBoxEditingControl dgvTxtName = null; // 声明 一个文本 CellEdit public DataGridViewTextBoxEditingControl dgvVensity = null; // 声明 一个文本 CellEdit - public DataGridViewTextBoxEditingControl dgvDensity = null; // 声明 一个文本 CellEdit + //public DataGridViewTextBoxEditingControl dgvDensity = null; // 声明 一个文本 CellEdit public DataGridViewTextBoxEditingControl dgvTextYP = null; // 声明 一个文本 CellEdit private void dgvDrugs_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e) { @@ -1127,12 +1143,12 @@ namespace AIMS.PublicUI.UI dgvVensity.KeyPress -= new KeyPressEventHandler(dgvTxt_KeyPress); // 绑定事件 dgvVensity.KeyPress += new KeyPressEventHandler(dgvTxt_KeyPress); // 绑定事件 } - if (_dataGridView.CurrentCell.ColumnIndex == 8) - { - dgvDensity = (DataGridViewTextBoxEditingControl)e.Control; // 得到单元格 - dgvDensity.KeyPress -= new KeyPressEventHandler(dgvTxt_KeyPress); // 绑定事件 - dgvDensity.KeyPress += new KeyPressEventHandler(dgvTxt_KeyPress); // 绑定事件 - } + //if (_dataGridView.CurrentCell.ColumnIndex == 8) + //{ + // dgvDensity = (DataGridViewTextBoxEditingControl)e.Control; // 得到单元格 + // dgvDensity.KeyPress -= new KeyPressEventHandler(dgvTxt_KeyPress); // 绑定事件 + // dgvDensity.KeyPress += new KeyPressEventHandler(dgvTxt_KeyPress); // 绑定事件 + //} } } diff --git a/AIMS/OperationAanesthesia/frmFactSpeedyDrug.cs b/AIMS/OperationAanesthesia/frmFactSpeedyDrug.cs index e65c69d..bedfa88 100644 --- a/AIMS/OperationAanesthesia/frmFactSpeedyDrug.cs +++ b/AIMS/OperationAanesthesia/frmFactSpeedyDrug.cs @@ -56,6 +56,24 @@ namespace AIMS.PublicUI.UI public frmFactSpeedyDrug() { InitializeComponent(); + if (PublicMethod.HospitalName.Contains("漳浦天福")) + { + this.dataGridViewTextBoxColumn8.HeaderText = "位置"; + this.dataGridViewTextBoxColumn8.Items.AddRange(new object[] { + "", + "上", + "下"}); + } + else + { + this.dataGridViewTextBoxColumn8.HeaderText = "通路"; + this.dataGridViewTextBoxColumn8.Items.AddRange(new object[] { + "", + "1", + "2", + "3", + "4"}); + } } private void frmFactDrugNew2_Load(object sender, EventArgs e) @@ -190,8 +208,8 @@ namespace AIMS.PublicUI.UI _dataGridView.Rows[index].Cells[6].Value = (double)item.Density;//浓度 if (item.DensityUnit != null && item.DensityUnit != "") _dataGridView.Rows[index].Cells[7].Value = item.DensityUnit;//浓度单位 - if (item.Velocity != 0) - _dataGridView.Rows[index].Cells[8].Value = (double)item.Velocity;//速度 + if (item.Velocity != "") + _dataGridView.Rows[index].Cells[8].Value = item.Velocity;//速度 if (item.VelocityUnit != null && item.VelocityUnit != "") _dataGridView.Rows[index].Cells[9].Value = item.VelocityUnit;//速度单位 if (Convert.ToDateTime(item.DrugBeginTime).ToString().Length > 0) @@ -407,7 +425,7 @@ namespace AIMS.PublicUI.UI } } //点击结束时间时判断是否持续事件,并显示时间 - if (_dataGridView.CurrentCell.ColumnIndex == 16) + else if (_dataGridView.CurrentCell.ColumnIndex == 16) { if (_dataGridView.CurrentRow.Cells[15].EditedFormattedValue.ToString() != "" && _dataGridView.CurrentCell.EditedFormattedValue.ToString() == "")//持续 { @@ -425,6 +443,19 @@ namespace AIMS.PublicUI.UI btnSave.Focus(); } } + else if (_dataGridView.CurrentCell.ColumnIndex == 18) + { + if (_dataGridView.CurrentRow.Cells[18].FormattedValue.ToString() == "") + { + _dataGridView.CurrentRow.Cells[18].Value = "下"; + btnSave.Focus(); + } + else + { + _dataGridView.CurrentRow.Cells[18].Value = ""; + btnSave.Focus(); + } + } } } private bool ValidTimeTxt(string dgvTimeTxt, ref string message) @@ -695,11 +726,11 @@ namespace AIMS.PublicUI.UI drugsR.DensityUnit = dr.Cells[7].EditedFormattedValue.ToString();//浓度单位 if (dr.Cells[8].EditedFormattedValue.ToString() != "") { - drugsR.Velocity = Convert.ToDecimal(dr.Cells[8].EditedFormattedValue.ToString());//速度 + drugsR.Velocity = dr.Cells[8].EditedFormattedValue.ToString();//速度 } else { - drugsR.Velocity = 0; + drugsR.Velocity = ""; } drugsR.VelocityUnit = dr.Cells[9].EditedFormattedValue.ToString();//速度单位 drugsR.BloodType = dr.Cells[12].EditedFormattedValue.ToString();//血型 @@ -815,7 +846,7 @@ namespace AIMS.PublicUI.UI public DataGridViewTextBoxEditingControl dgvTxt = null; // 声明 一个文本 CellEdit public DataGridViewTextBoxEditingControl dgvTxtName = null; // 声明 一个文本 CellEdit public DataGridViewTextBoxEditingControl dgvVensity = null; // 声明 一个文本 CellEdit - public DataGridViewTextBoxEditingControl dgvDensity = null; // 声明 一个文本 CellEdit + //public DataGridViewTextBoxEditingControl dgvDensity = null; // 声明 一个文本 CellEdit public DataGridViewTextBoxEditingControl dgvTextYP = null; // 声明 一个文本 CellEdit private void dgvDrugs_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e) { @@ -854,12 +885,12 @@ namespace AIMS.PublicUI.UI dgvVensity.KeyPress -= new KeyPressEventHandler(dgvTxt_KeyPress); // 绑定事件 dgvVensity.KeyPress += new KeyPressEventHandler(dgvTxt_KeyPress); // 绑定事件 } - if (_dataGridView.CurrentCell.ColumnIndex == 8) - { - dgvDensity = (DataGridViewTextBoxEditingControl)e.Control; // 得到单元格 - dgvDensity.KeyPress -= new KeyPressEventHandler(dgvTxt_KeyPress); // 绑定事件 - dgvDensity.KeyPress += new KeyPressEventHandler(dgvTxt_KeyPress); // 绑定事件 - } + //if (_dataGridView.CurrentCell.ColumnIndex == 8) + //{ + // dgvDensity = (DataGridViewTextBoxEditingControl)e.Control; // 得到单元格 + // dgvDensity.KeyPress -= new KeyPressEventHandler(dgvTxt_KeyPress); // 绑定事件 + // dgvDensity.KeyPress += new KeyPressEventHandler(dgvTxt_KeyPress); // 绑定事件 + //} } } diff --git a/AIMS/OperationAanesthesia/frmFeesRecord.cs b/AIMS/OperationAanesthesia/frmFeesRecord.cs index 2c9b207..4360a2d 100644 --- a/AIMS/OperationAanesthesia/frmFeesRecord.cs +++ b/AIMS/OperationAanesthesia/frmFeesRecord.cs @@ -220,11 +220,20 @@ namespace AIMS.PublicUI.UI if (item.DrugName == "吸入用七氟烷" && item.Density > 0 && item.DensityUnit != null && item.DensityUnit != "") { TimeSpan timeSpan = item.DrugEndTime - item.DrugBeginTime; - decimal yndden = 0; - _record.FactDrugList.ForEach(a => { if (a.DrugName == "氧气" && a.Velocity > 0) yndden = a.Velocity; }); - if (yndden > 0) + string yndden = ""; + decimal Velocity = 0; + _record.FactDrugList.ForEach(a => { if (a.DrugName == "氧气" && a.Velocity != "") yndden = a.Velocity; }); + if (yndden != "") { - dose += ((decimal)3.6) * yndden * item.Density * (decimal)Math.Round(timeSpan.TotalHours, 2) + (decimal)5.3; + try + { + Velocity = Convert.ToDecimal(yndden); + } + catch (Exception) + { + Velocity = 0; + } + dose += ((decimal)3.6) * Velocity * item.Density * (decimal)Math.Round(timeSpan.TotalHours, 2) + (decimal)5.3; } } } @@ -262,20 +271,29 @@ namespace AIMS.PublicUI.UI } } } + //2.速度 速度单位不为空 计算时间总量 + decimal Velocity = 0; + try + { + Velocity = Convert.ToDecimal(item.Velocity); + } + catch (Exception ex) + { + Velocity = 0; + } //1.当使用单位等于规格单位 总量增加实际用量 if (item.Dosage > 0 && drug.DosageUnit != null && drug.DosageUnit != "") dose += GetConvertedValue(item.Dosage, item.DosageUnit, DOSEPERUNIT); - //2.速度 速度单位不为空 计算时间总量 - else if (item.Velocity > 0 && item.VelocityUnit != null && item.VelocityUnit != "") + else if (Velocity > 0 && item.VelocityUnit != null && item.VelocityUnit != "") { TimeSpan timeSpan = item.DrugEndTime - item.DrugBeginTime; if (item.VelocityUnit.Contains("/h")) { - dose += GetConvertedValue(item.Velocity, item.VelocityUnit, DOSEPERUNIT) * (decimal)Math.Round(timeSpan.TotalHours, 2); + dose += GetConvertedValue(Velocity, item.VelocityUnit, DOSEPERUNIT) * (decimal)Math.Round(timeSpan.TotalHours, 2); } else if (item.VelocityUnit.Contains("/min")) { - dose += GetConvertedValue(item.Velocity, item.VelocityUnit, DOSEPERUNIT) * (decimal)Math.Round(timeSpan.TotalMinutes, 2); + dose += GetConvertedValue(Velocity, item.VelocityUnit, DOSEPERUNIT) * (decimal)Math.Round(timeSpan.TotalMinutes, 2); } } } @@ -699,7 +717,7 @@ namespace AIMS.PublicUI.UI feesR.IsInsure = ""; feesR.InsureNO = ""; feesR.LimitDrug = ""; - feesR.Extend4 = ""; + feesR.Extend4 = ""; feesR.Extend5 = "韩智慧"; diff --git a/AIMS/OperationAanesthesia/frmSelectPatientNew2.cs b/AIMS/OperationAanesthesia/frmSelectPatientNew2.cs index 764dde9..e2b3810 100644 --- a/AIMS/OperationAanesthesia/frmSelectPatientNew2.cs +++ b/AIMS/OperationAanesthesia/frmSelectPatientNew2.cs @@ -257,13 +257,7 @@ namespace AIMS.OperationAanesthesia MessageBox.Show("当前手术已停止 ,请确认后重新选择!", "系统提示"); FillDgv(); return; - } - if (operA.State == 5 || operA.State == 6) - { - MessageBox.Show("当前手术已开始 ,请确认后重新选择!", "系统提示"); - FillDgv(); - return; - } + } if (operA.OrderOperationTime.Value.Date != DateTime.Now.Date)// && operA.OrderOperationTime.Value.Hour < 20) { diff --git a/AIMS/OperationAfter/frmNotesRecordExport.cs b/AIMS/OperationAfter/frmNotesRecordExport.cs index 5fecc6f..4d3aa41 100644 --- a/AIMS/OperationAfter/frmNotesRecordExport.cs +++ b/AIMS/OperationAfter/frmNotesRecordExport.cs @@ -35,14 +35,17 @@ namespace AIMS { try { - dtpOpeTime.Value = DateTime.Now; - dtpEnd.Value = dtpOpeTime.Value; + DateTime today = DateTime.Today; + DateTime firstDayOfMonth = new DateTime(today.Year, today.Month, 1); + dtpOpeTime.Value = firstDayOfMonth; + dtpOpeTime2.Value = firstDayOfMonth; + dtpOpeTime3.Value = firstDayOfMonth; - dtpOpeTime2.Value = DateTime.Now; - dtpEnd2.Value = dtpOpeTime.Value; - - dtpOpeTime3.Value = DateTime.Now; - dtpEnd3.Value = dtpOpeTime.Value; + dtpEnd2.Value =DateTime.Now; + dtpEnd3.Value = DateTime.Now; + dtpEnd.Value = DateTime.Now; + + btn手术例数按月统计_Click(null,null); } catch (Exception exp) { @@ -52,52 +55,86 @@ namespace AIMS private void toolStripButton1_Click(object sender, EventArgs e) { - string fileName = superTabControl1.SelectedTab.Text; - GoldPrinter.ExcelAccess excel = new GoldPrinter.ExcelAccess(); - string strFileName = fileName + ".xlt"; //模板文件名 - string strExcelTemplateFile = System.Windows.Forms.Application.StartupPath; - strExcelTemplateFile += @"\Template\" + strFileName; - excel.Open(strExcelTemplateFile); //用模板文件 - - int rowNum = 6; - if (selectdgv.Columns.Count == 8) + if (selectdgv.Rows.Count <= 0) return; + List records = new List(); + for (int i = 0; i < selectdgv.Rows.Count; i++) { - for (int i = 0; i < selectdgv.Rows.Count; i++) + DataGridViewRow dr = selectdgv.Rows[i]; + NotesRecord record = new NotesRecord(); + record.RecordTime = Convert.ToDateTime(dr.Cells[1].EditedFormattedValue.ToString()); + record.Content1 = dr.Cells[2].EditedFormattedValue.ToString(); + record.Content2 = dr.Cells[3].EditedFormattedValue.ToString(); + record.Content3 = dr.Cells[4].EditedFormattedValue.ToString(); + record.Content4 = dr.Cells[5].EditedFormattedValue.ToString(); + record.Content5 = dr.Cells[6].EditedFormattedValue.ToString(); + if (selectdgv.Columns.Count == 9) { - DataGridViewRow dr = selectdgv.Rows[i]; - excel.GetRange(rowNum, "A", rowNum, "G").Value = new string[]{ - ( dr.Cells[1].EditedFormattedValue.ToString()), - ( dr.Cells[2].EditedFormattedValue.ToString()), - dr.Cells[3].EditedFormattedValue.ToString(), - ( dr.Cells[4].EditedFormattedValue.ToString() ) , - (dr.Cells[5].EditedFormattedValue.ToString() ), - (dr.Cells[6].EditedFormattedValue.ToString() ), - (dr.Cells[7].EditedFormattedValue.ToString() ) }; - rowNum++; + record.Content6 = dr.Cells[7].EditedFormattedValue.ToString(); + record.ExecWork = dr.Cells[8].EditedFormattedValue.ToString(); } + else + record.ExecWork = dr.Cells[7].EditedFormattedValue.ToString(); + records.Add(record); } - else - { - rowNum = 7; - for (int i = 0; i < selectdgv.Rows.Count; i++) - { - DataGridViewRow dr = selectdgv.Rows[i]; - excel.GetRange(rowNum, "A", rowNum, "H").Value = new string[]{ - ( dr.Cells[1].EditedFormattedValue.ToString()), - ( dr.Cells[2].EditedFormattedValue.ToString()), - dr.Cells[3].EditedFormattedValue.ToString(), - ( dr.Cells[4].EditedFormattedValue.ToString() ) , - (dr.Cells[5].EditedFormattedValue.ToString() ), - (dr.Cells[6].EditedFormattedValue.ToString() ), - (dr.Cells[7].EditedFormattedValue.ToString() ) , - (dr.Cells[8].EditedFormattedValue.ToString() ) }; - rowNum++; - } + int n = 31; + List> groupedLists = new List>(); + for (int i = 0; i < records.Count; i += n) + { + List group = records.GetRange(i, Math.Min(n, records.Count - i)); + groupedLists.Add(group); + } + + foreach (var item in groupedLists) + { + string fileName = superTabControl1.SelectedTab.Text; + GoldPrinter.ExcelAccess excel = new GoldPrinter.ExcelAccess(); + string strFileName = fileName + ".xlt"; //模板文件名 + string strExcelTemplateFile = System.Windows.Forms.Application.StartupPath; + strExcelTemplateFile += @"\Template\" + strFileName; + excel.Open(strExcelTemplateFile); //用模板文件 + + int rowNum = 6; + if (selectdgv.Columns.Count == 8) + { + foreach (var record in item) + { + excel.GetRange(rowNum, "A", rowNum, "G").Value = new string[] + { + record.RecordTime.Value.ToString("yyyy-MM-dd"), + record.Content1, + record.Content2, + record.Content3, + record.Content4, + record.Content5, + record.ExecWork + }; + rowNum++; + } + } + else + { + rowNum = 7; + foreach (var record in item) + { + excel.GetRange(rowNum, "A", rowNum, "H").Value = new string[] + { + record.RecordTime.Value.ToString("yyyy-MM-dd"), + record.Content1, + record.Content2, + record.Content3, + record.Content4, + record.Content5, + record.Content6, + record.ExecWork + }; + rowNum++; + } + } + excel.Print(); + excel.Close(); + this.Focus(); } - excel.PrintPreview(); - excel.Close(); - this.Focus(); } private void LoadNoteData(string beginTime, string endTime, string notename) @@ -136,7 +173,13 @@ namespace AIMS record.Content3 = dr.Cells[4].EditedFormattedValue.ToString(); record.Content4 = dr.Cells[5].EditedFormattedValue.ToString(); record.Content5 = dr.Cells[6].EditedFormattedValue.ToString(); - record.ExecWork = dr.Cells[7].EditedFormattedValue.ToString(); + if (selectdgv.Columns.Count == 9) + { + record.Content6 = dr.Cells[7].EditedFormattedValue.ToString(); + record.ExecWork = dr.Cells[8].EditedFormattedValue.ToString(); + } + else + record.ExecWork = dr.Cells[7].EditedFormattedValue.ToString(); record.OperatorId = PublicMethod.OperatorId; record.OperatorTime = DateTime.Now; record.Remark = ""; @@ -187,7 +230,7 @@ namespace AIMS private void btn麻醉贵重物品清点本Save_Click(object sender, EventArgs e) { - NewMethod("麻醉贵重物品清点本"); + NewMethod("麻醉贵重物品清点本"); } private void dgvtReport3_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { @@ -214,12 +257,65 @@ namespace AIMS string beginTime = Convert.ToDateTime(dtpOpeTime.Value).ToString("yyyy-MM-dd 00:00:00"); string endTime = Convert.ToDateTime(dtpEnd.Value).AddDays(1).ToString("yyyy-MM-dd 00:00:00"); - LoadNoteData(beginTime, endTime, "麻醉机及心电监护仪使用消毒记录"); + System.Data.DataTable dataResult = BNotesRecords.GetMonthDayTable2(beginTime, endTime); + System.Data.DataTable dataResult2 = BNotesRecords.GetMonthDayTable3(beginTime, endTime); + List nrecords = BNotesRecord.Select(" NoteName = '麻醉机及心电监护仪使用消毒记录' and RecordTime>='" + beginTime + "' and RecordTime<'" + endTime + "' ", null); + List records = new List(); + for (int i = 0; i < dataResult.Rows.Count; i++) + { + DateTime RecordTime = Convert.ToDateTime(dataResult.Rows[i][0]); + string ExecWork = Convert.ToString(dataResult.Rows[i][1]); + NotesRecord record = new NotesRecord(); + record.RecordTime = RecordTime; + record.ExecWork = ExecWork; + for (int j = 0; j < dataResult2.Rows.Count; j++) + { + DateTime RecordTime2 = Convert.ToDateTime(dataResult2.Rows[j][0]); + string ExecWork2 = Convert.ToString(dataResult2.Rows[j][1]); + string room = Convert.ToString(dataResult2.Rows[j][2]); + if (RecordTime2 == RecordTime && ExecWork2 == ExecWork) + { + switch (room) + { + case "1间": + record.Content1 = "√"; + break; + case "2间": + record.Content2 = "√"; + break; + case "3间": + record.Content3 = "√"; + break; + case "4间": + record.Content4 = "√"; + break; + case "5间": + record.Content5 = "√"; + break; + case "6间": + record.Content6 = "√"; + break; + default: + break; + } + } + } + foreach (var item in nrecords) + { + if (item.RecordTime == RecordTime && item.ExecWork == ExecWork) + { + record = item; + continue; + } + } + records.Add(record); + } + selectdgv.DataSource = records; } private void buttonX1_Click(object sender, EventArgs e) { - NewMethod("麻醉机及心电监护仪使用消毒记录"); + NewMethod("麻醉机及心电监护仪使用消毒记录"); } private void dgvtReport_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { @@ -239,5 +335,90 @@ namespace AIMS this.dgvtReport.RowsDefaultCellStyle.BackColor = System.Drawing.Color.White;//设置背景为白色 this.dgvtReport.AlternatingRowsDefaultCellStyle.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(242)))), (((int)(((byte)242)))));//青色 } + + private void toolStripButton2_Click(object sender, EventArgs e) + { + + if (selectdgv.Rows.Count <= 0) return; + List records = new List(); + for (int i = 0; i < selectdgv.Rows.Count; i++) + { + DataGridViewRow dr = selectdgv.Rows[i]; + NotesRecord record = new NotesRecord(); + record.RecordTime = Convert.ToDateTime(dr.Cells[1].EditedFormattedValue.ToString()); + record.Content1 = dr.Cells[2].EditedFormattedValue.ToString(); + record.Content2 = dr.Cells[3].EditedFormattedValue.ToString(); + record.Content3 = dr.Cells[4].EditedFormattedValue.ToString(); + record.Content4 = dr.Cells[5].EditedFormattedValue.ToString(); + record.Content5 = dr.Cells[6].EditedFormattedValue.ToString(); + if (selectdgv.Columns.Count == 9) + { + record.Content6 = dr.Cells[7].EditedFormattedValue.ToString(); + record.ExecWork = dr.Cells[8].EditedFormattedValue.ToString(); + } + else + record.ExecWork = dr.Cells[7].EditedFormattedValue.ToString(); + records.Add(record); + } + + int n = 31; + List> groupedLists = new List>(); + for (int i = 0; i < records.Count; i += n) + { + List group = records.GetRange(i, Math.Min(n, records.Count - i)); + groupedLists.Add(group); + } + + foreach (var item in groupedLists) + { + string fileName = superTabControl1.SelectedTab.Text; + GoldPrinter.ExcelAccess excel = new GoldPrinter.ExcelAccess(); + string strFileName = fileName + ".xlt"; //模板文件名 + string strExcelTemplateFile = System.Windows.Forms.Application.StartupPath; + strExcelTemplateFile += @"\Template\" + strFileName; + excel.Open(strExcelTemplateFile); //用模板文件 + + int rowNum = 6; + if (selectdgv.Columns.Count == 8) + { + foreach (var record in item) + { + excel.GetRange(rowNum, "A", rowNum, "G").Value = new string[] + { + record.RecordTime.Value.ToString("yyyy-MM-dd"), + record.Content1, + record.Content2, + record.Content3, + record.Content4, + record.Content5, + record.ExecWork + }; + rowNum++; + } + } + else + { + rowNum = 7; + foreach (var record in item) + { + excel.GetRange(rowNum, "A", rowNum, "H").Value = new string[] + { + record.RecordTime.Value.ToString("yyyy-MM-dd"), + record.Content1, + record.Content2, + record.Content3, + record.Content4, + record.Content5, + record.Content6, + record.ExecWork + }; + rowNum++; + } + } + excel.PrintPreview(); + excel.Close(); + break; + } + } } } diff --git a/AIMS/OperationAfter/frmNotesRecordExport.designer.cs b/AIMS/OperationAfter/frmNotesRecordExport.designer.cs index 5ec3e80..1fd7730 100644 --- a/AIMS/OperationAfter/frmNotesRecordExport.designer.cs +++ b/AIMS/OperationAfter/frmNotesRecordExport.designer.cs @@ -28,31 +28,47 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); this.toolStrip1 = new System.Windows.Forms.ToolStrip(); this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); this.superTabControl1 = new DevComponents.DotNetBar.SuperTabControl(); this.superTabControlPanel1 = new DevComponents.DotNetBar.SuperTabControlPanel(); this.dgvtReport = new System.Windows.Forms.DataGridView(); + this.dataGridViewTextBoxColumn17 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn18 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn19 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn20 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn21 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn22 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn23 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn24 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.panel2 = new System.Windows.Forms.Panel(); this.dtpEnd = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.dtpOpeTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.label24 = new System.Windows.Forms.Label(); - this.buttonX2 = new DevComponents.DotNetBar.ButtonX(); this.buttonX1 = new DevComponents.DotNetBar.ButtonX(); this.btn手术例数按月统计 = new DevComponents.DotNetBar.ButtonX(); this.labDate = new System.Windows.Forms.Label(); this.R1 = new DevComponents.DotNetBar.SuperTabItem(); this.superTabControlPanel3 = new DevComponents.DotNetBar.SuperTabControlPanel(); this.dgvtReport3 = new System.Windows.Forms.DataGridView(); + this.dataGridViewTextBoxColumn9 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn10 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn11 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn12 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn13 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn14 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn15 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Content6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn16 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.panel3 = new System.Windows.Forms.Panel(); this.btn麻醉贵重物品清点本Save = new DevComponents.DotNetBar.ButtonX(); this.dtpEnd3 = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); @@ -87,23 +103,7 @@ this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn9 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn10 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn11 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn12 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn13 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn14 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn15 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Content6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn16 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn17 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn18 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn19 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn20 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn21 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn22 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn23 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn24 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.toolStripButton2 = new System.Windows.Forms.ToolStripButton(); this.toolStrip1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.superTabControl1)).BeginInit(); this.superTabControl1.SuspendLayout(); @@ -130,6 +130,7 @@ this.toolStrip1.Font = new System.Drawing.Font("微软雅黑", 10.5F); this.toolStrip1.ImageScalingSize = new System.Drawing.Size(25, 25); this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripButton2, this.toolStripButton1}); this.toolStrip1.Location = new System.Drawing.Point(0, 0); this.toolStrip1.Name = "toolStrip1"; @@ -204,13 +205,13 @@ this.dgvtReport.AllowUserToResizeRows = false; this.dgvtReport.BackgroundColor = System.Drawing.Color.White; this.dgvtReport.BorderStyle = System.Windows.Forms.BorderStyle.None; - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - this.dgvtReport.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + this.dgvtReport.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10; this.dgvtReport.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvtReport.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn17, @@ -221,28 +222,28 @@ this.dataGridViewTextBoxColumn22, this.dataGridViewTextBoxColumn23, this.dataGridViewTextBoxColumn24}); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F); - dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvtReport.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle11.Font = new System.Drawing.Font("微软雅黑", 9F); + dataGridViewCellStyle11.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvtReport.DefaultCellStyle = dataGridViewCellStyle11; this.dgvtReport.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvtReport.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter; this.dgvtReport.GridColor = System.Drawing.Color.Black; this.dgvtReport.Location = new System.Drawing.Point(0, 45); this.dgvtReport.MultiSelect = false; this.dgvtReport.Name = "dgvtReport"; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dgvtReport.RowHeadersDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvtReport.RowHeadersDefaultCellStyle = dataGridViewCellStyle12; this.dgvtReport.RowHeadersVisible = false; this.dgvtReport.RowTemplate.Height = 23; this.dgvtReport.ShowCellErrors = false; @@ -252,13 +253,66 @@ this.dgvtReport.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvtReport_CellDoubleClick); this.dgvtReport.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dgvtReport_RowPostPaint); // + // dataGridViewTextBoxColumn17 + // + this.dataGridViewTextBoxColumn17.DataPropertyName = "Id"; + this.dataGridViewTextBoxColumn17.HeaderText = "Id"; + this.dataGridViewTextBoxColumn17.Name = "dataGridViewTextBoxColumn17"; + this.dataGridViewTextBoxColumn17.Visible = false; + // + // dataGridViewTextBoxColumn18 + // + this.dataGridViewTextBoxColumn18.DataPropertyName = "RecordTime"; + this.dataGridViewTextBoxColumn18.HeaderText = "日期"; + this.dataGridViewTextBoxColumn18.Name = "dataGridViewTextBoxColumn18"; + // + // dataGridViewTextBoxColumn19 + // + this.dataGridViewTextBoxColumn19.DataPropertyName = "Content1"; + this.dataGridViewTextBoxColumn19.HeaderText = "1号麻醉机及监护仪"; + this.dataGridViewTextBoxColumn19.Name = "dataGridViewTextBoxColumn19"; + this.dataGridViewTextBoxColumn19.Width = 140; + // + // dataGridViewTextBoxColumn20 + // + this.dataGridViewTextBoxColumn20.DataPropertyName = "Content2"; + this.dataGridViewTextBoxColumn20.HeaderText = "2号麻醉机及监护仪"; + this.dataGridViewTextBoxColumn20.Name = "dataGridViewTextBoxColumn20"; + this.dataGridViewTextBoxColumn20.Width = 140; + // + // dataGridViewTextBoxColumn21 + // + this.dataGridViewTextBoxColumn21.DataPropertyName = "Content3"; + this.dataGridViewTextBoxColumn21.HeaderText = "3号麻醉机及监护仪"; + this.dataGridViewTextBoxColumn21.Name = "dataGridViewTextBoxColumn21"; + this.dataGridViewTextBoxColumn21.Width = 140; + // + // dataGridViewTextBoxColumn22 + // + this.dataGridViewTextBoxColumn22.DataPropertyName = "Content4"; + this.dataGridViewTextBoxColumn22.HeaderText = "4号麻醉机及监护仪"; + this.dataGridViewTextBoxColumn22.Name = "dataGridViewTextBoxColumn22"; + this.dataGridViewTextBoxColumn22.Width = 140; + // + // dataGridViewTextBoxColumn23 + // + this.dataGridViewTextBoxColumn23.DataPropertyName = "Content5"; + this.dataGridViewTextBoxColumn23.HeaderText = "5号麻醉机及监护仪"; + this.dataGridViewTextBoxColumn23.Name = "dataGridViewTextBoxColumn23"; + this.dataGridViewTextBoxColumn23.Width = 140; + // + // dataGridViewTextBoxColumn24 + // + this.dataGridViewTextBoxColumn24.DataPropertyName = "ExecWork"; + this.dataGridViewTextBoxColumn24.HeaderText = "确认签字"; + this.dataGridViewTextBoxColumn24.Name = "dataGridViewTextBoxColumn24"; + // // panel2 // this.panel2.BackColor = System.Drawing.Color.WhiteSmoke; this.panel2.Controls.Add(this.dtpEnd); this.panel2.Controls.Add(this.dtpOpeTime); this.panel2.Controls.Add(this.label24); - this.panel2.Controls.Add(this.buttonX2); this.panel2.Controls.Add(this.buttonX1); this.panel2.Controls.Add(this.btn手术例数按月统计); this.panel2.Controls.Add(this.labDate); @@ -348,18 +402,6 @@ this.label24.TabIndex = 470; this.label24.Text = "-"; // - // buttonX2 - // - this.buttonX2.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonX2.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonX2.Font = new System.Drawing.Font("微软雅黑", 11.5F); - this.buttonX2.Location = new System.Drawing.Point(548, 7); - this.buttonX2.Name = "buttonX2"; - this.buttonX2.Size = new System.Drawing.Size(90, 29); - this.buttonX2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonX2.TabIndex = 467; - this.buttonX2.Text = "导入"; - // // buttonX1 // this.buttonX1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -420,13 +462,13 @@ this.dgvtReport3.AllowUserToResizeRows = false; this.dgvtReport3.BackgroundColor = System.Drawing.Color.White; this.dgvtReport3.BorderStyle = System.Windows.Forms.BorderStyle.None; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - this.dgvtReport3.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle13.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + this.dgvtReport3.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle13; this.dgvtReport3.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvtReport3.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn9, @@ -438,28 +480,28 @@ this.dataGridViewTextBoxColumn15, this.Content6, this.dataGridViewTextBoxColumn16}); - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F); - dataGridViewCellStyle5.ForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvtReport3.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle14.Font = new System.Drawing.Font("微软雅黑", 9F); + dataGridViewCellStyle14.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvtReport3.DefaultCellStyle = dataGridViewCellStyle14; this.dgvtReport3.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvtReport3.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter; this.dgvtReport3.GridColor = System.Drawing.Color.Black; this.dgvtReport3.Location = new System.Drawing.Point(0, 45); this.dgvtReport3.MultiSelect = false; this.dgvtReport3.Name = "dgvtReport3"; - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dgvtReport3.RowHeadersDefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle15.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvtReport3.RowHeadersDefaultCellStyle = dataGridViewCellStyle15; this.dgvtReport3.RowHeadersVisible = false; this.dgvtReport3.RowTemplate.Height = 23; this.dgvtReport3.ShowCellErrors = false; @@ -469,6 +511,64 @@ this.dgvtReport3.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvtReport3_CellDoubleClick); this.dgvtReport3.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dgvtReport3_RowPostPaint); // + // dataGridViewTextBoxColumn9 + // + this.dataGridViewTextBoxColumn9.DataPropertyName = "Id"; + this.dataGridViewTextBoxColumn9.HeaderText = "Id"; + this.dataGridViewTextBoxColumn9.Name = "dataGridViewTextBoxColumn9"; + this.dataGridViewTextBoxColumn9.Visible = false; + // + // dataGridViewTextBoxColumn10 + // + this.dataGridViewTextBoxColumn10.DataPropertyName = "RecordTime"; + this.dataGridViewTextBoxColumn10.HeaderText = "日期"; + this.dataGridViewTextBoxColumn10.Name = "dataGridViewTextBoxColumn10"; + // + // dataGridViewTextBoxColumn11 + // + this.dataGridViewTextBoxColumn11.DataPropertyName = "Content1"; + this.dataGridViewTextBoxColumn11.HeaderText = "麻醉机(5)"; + this.dataGridViewTextBoxColumn11.Name = "dataGridViewTextBoxColumn11"; + // + // dataGridViewTextBoxColumn12 + // + this.dataGridViewTextBoxColumn12.DataPropertyName = "Content2"; + this.dataGridViewTextBoxColumn12.HeaderText = "心电监护仪(5)"; + this.dataGridViewTextBoxColumn12.Name = "dataGridViewTextBoxColumn12"; + this.dataGridViewTextBoxColumn12.Width = 130; + // + // dataGridViewTextBoxColumn13 + // + this.dataGridViewTextBoxColumn13.DataPropertyName = "Content3"; + this.dataGridViewTextBoxColumn13.HeaderText = "可视喉镜(1)"; + this.dataGridViewTextBoxColumn13.Name = "dataGridViewTextBoxColumn13"; + // + // dataGridViewTextBoxColumn14 + // + this.dataGridViewTextBoxColumn14.DataPropertyName = "Content4"; + this.dataGridViewTextBoxColumn14.HeaderText = "电子注药泵(7)"; + this.dataGridViewTextBoxColumn14.Name = "dataGridViewTextBoxColumn14"; + this.dataGridViewTextBoxColumn14.Width = 130; + // + // dataGridViewTextBoxColumn15 + // + this.dataGridViewTextBoxColumn15.DataPropertyName = "Content5"; + this.dataGridViewTextBoxColumn15.HeaderText = "掌上超声(1)"; + this.dataGridViewTextBoxColumn15.Name = "dataGridViewTextBoxColumn15"; + // + // Content6 + // + this.Content6.DataPropertyName = "Content6"; + this.Content6.HeaderText = "Matepad华为(1)"; + this.Content6.Name = "Content6"; + this.Content6.Width = 150; + // + // dataGridViewTextBoxColumn16 + // + this.dataGridViewTextBoxColumn16.DataPropertyName = "ExecWork"; + this.dataGridViewTextBoxColumn16.HeaderText = "确认 签字"; + this.dataGridViewTextBoxColumn16.Name = "dataGridViewTextBoxColumn16"; + // // panel3 // this.panel3.BackColor = System.Drawing.Color.WhiteSmoke; @@ -624,13 +724,13 @@ this.dgvtReport2.AllowUserToResizeRows = false; this.dgvtReport2.BackgroundColor = System.Drawing.Color.White; this.dgvtReport2.BorderStyle = System.Windows.Forms.BorderStyle.None; - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - this.dgvtReport2.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle16.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + this.dgvtReport2.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle16; this.dgvtReport2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvtReport2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.Id, @@ -641,28 +741,28 @@ this.Content4, this.Content5, this.ExecWork}); - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 9F); - dataGridViewCellStyle8.ForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvtReport2.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle17.Font = new System.Drawing.Font("微软雅黑", 9F); + dataGridViewCellStyle17.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvtReport2.DefaultCellStyle = dataGridViewCellStyle17; this.dgvtReport2.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvtReport2.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter; this.dgvtReport2.GridColor = System.Drawing.Color.Black; this.dgvtReport2.Location = new System.Drawing.Point(0, 45); this.dgvtReport2.MultiSelect = false; this.dgvtReport2.Name = "dgvtReport2"; - dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle9.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dgvtReport2.RowHeadersDefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle18.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvtReport2.RowHeadersDefaultCellStyle = dataGridViewCellStyle18; this.dgvtReport2.RowHeadersVisible = false; this.dgvtReport2.RowTemplate.Height = 23; this.dgvtReport2.ShowCellErrors = false; @@ -907,117 +1007,17 @@ this.dataGridViewTextBoxColumn8.HeaderText = "主任"; this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8"; // - // dataGridViewTextBoxColumn9 + // toolStripButton2 // - this.dataGridViewTextBoxColumn9.DataPropertyName = "Id"; - this.dataGridViewTextBoxColumn9.HeaderText = "Id"; - this.dataGridViewTextBoxColumn9.Name = "dataGridViewTextBoxColumn9"; - this.dataGridViewTextBoxColumn9.Visible = false; - // - // dataGridViewTextBoxColumn10 - // - this.dataGridViewTextBoxColumn10.DataPropertyName = "RecordTime"; - this.dataGridViewTextBoxColumn10.HeaderText = "日期"; - this.dataGridViewTextBoxColumn10.Name = "dataGridViewTextBoxColumn10"; - // - // dataGridViewTextBoxColumn11 - // - this.dataGridViewTextBoxColumn11.DataPropertyName = "Content1"; - this.dataGridViewTextBoxColumn11.HeaderText = "麻醉机(5)"; - this.dataGridViewTextBoxColumn11.Name = "dataGridViewTextBoxColumn11"; - // - // dataGridViewTextBoxColumn12 - // - this.dataGridViewTextBoxColumn12.DataPropertyName = "Content2"; - this.dataGridViewTextBoxColumn12.HeaderText = "心电监护仪(5)"; - this.dataGridViewTextBoxColumn12.Name = "dataGridViewTextBoxColumn12"; - this.dataGridViewTextBoxColumn12.Width = 130; - // - // dataGridViewTextBoxColumn13 - // - this.dataGridViewTextBoxColumn13.DataPropertyName = "Content3"; - this.dataGridViewTextBoxColumn13.HeaderText = "可视喉镜(1)"; - this.dataGridViewTextBoxColumn13.Name = "dataGridViewTextBoxColumn13"; - // - // dataGridViewTextBoxColumn14 - // - this.dataGridViewTextBoxColumn14.DataPropertyName = "Content4"; - this.dataGridViewTextBoxColumn14.HeaderText = "电子注药泵(7)"; - this.dataGridViewTextBoxColumn14.Name = "dataGridViewTextBoxColumn14"; - this.dataGridViewTextBoxColumn14.Width = 130; - // - // dataGridViewTextBoxColumn15 - // - this.dataGridViewTextBoxColumn15.DataPropertyName = "Content5"; - this.dataGridViewTextBoxColumn15.HeaderText = "掌上超声(1)"; - this.dataGridViewTextBoxColumn15.Name = "dataGridViewTextBoxColumn15"; - // - // Content6 - // - this.Content6.DataPropertyName = "Content6"; - this.Content6.HeaderText = "Matepad华为(1)"; - this.Content6.Name = "Content6"; - this.Content6.Width = 150; - // - // dataGridViewTextBoxColumn16 - // - this.dataGridViewTextBoxColumn16.DataPropertyName = "ExecWork"; - this.dataGridViewTextBoxColumn16.HeaderText = "确认 签字"; - this.dataGridViewTextBoxColumn16.Name = "dataGridViewTextBoxColumn16"; - // - // dataGridViewTextBoxColumn17 - // - this.dataGridViewTextBoxColumn17.DataPropertyName = "Id"; - this.dataGridViewTextBoxColumn17.HeaderText = "Id"; - this.dataGridViewTextBoxColumn17.Name = "dataGridViewTextBoxColumn17"; - this.dataGridViewTextBoxColumn17.Visible = false; - // - // dataGridViewTextBoxColumn18 - // - this.dataGridViewTextBoxColumn18.DataPropertyName = "RecordTime"; - this.dataGridViewTextBoxColumn18.HeaderText = "日期"; - this.dataGridViewTextBoxColumn18.Name = "dataGridViewTextBoxColumn18"; - // - // dataGridViewTextBoxColumn19 - // - this.dataGridViewTextBoxColumn19.DataPropertyName = "Content1"; - this.dataGridViewTextBoxColumn19.HeaderText = "1号麻醉机及监护仪"; - this.dataGridViewTextBoxColumn19.Name = "dataGridViewTextBoxColumn19"; - this.dataGridViewTextBoxColumn19.Width = 140; - // - // dataGridViewTextBoxColumn20 - // - this.dataGridViewTextBoxColumn20.DataPropertyName = "Content2"; - this.dataGridViewTextBoxColumn20.HeaderText = "2号麻醉机及监护仪"; - this.dataGridViewTextBoxColumn20.Name = "dataGridViewTextBoxColumn20"; - this.dataGridViewTextBoxColumn20.Width = 140; - // - // dataGridViewTextBoxColumn21 - // - this.dataGridViewTextBoxColumn21.DataPropertyName = "Content3"; - this.dataGridViewTextBoxColumn21.HeaderText = "3号麻醉机及监护仪"; - this.dataGridViewTextBoxColumn21.Name = "dataGridViewTextBoxColumn21"; - this.dataGridViewTextBoxColumn21.Width = 140; - // - // dataGridViewTextBoxColumn22 - // - this.dataGridViewTextBoxColumn22.DataPropertyName = "Content4"; - this.dataGridViewTextBoxColumn22.HeaderText = "4号麻醉机及监护仪"; - this.dataGridViewTextBoxColumn22.Name = "dataGridViewTextBoxColumn22"; - this.dataGridViewTextBoxColumn22.Width = 140; - // - // dataGridViewTextBoxColumn23 - // - this.dataGridViewTextBoxColumn23.DataPropertyName = "Content5"; - this.dataGridViewTextBoxColumn23.HeaderText = "5号麻醉机及监护仪"; - this.dataGridViewTextBoxColumn23.Name = "dataGridViewTextBoxColumn23"; - this.dataGridViewTextBoxColumn23.Width = 140; - // - // dataGridViewTextBoxColumn24 - // - this.dataGridViewTextBoxColumn24.DataPropertyName = "ExecWork"; - this.dataGridViewTextBoxColumn24.HeaderText = "确认签字"; - this.dataGridViewTextBoxColumn24.Name = "dataGridViewTextBoxColumn24"; + this.toolStripButton2.Font = new System.Drawing.Font("微软雅黑", 9F); + this.toolStripButton2.Image = global::AIMS.Properties.Resources.图标_预览; + this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton2.Name = "toolStripButton2"; + this.toolStripButton2.Size = new System.Drawing.Size(60, 46); + this.toolStripButton2.Text = "打印预览"; + this.toolStripButton2.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; + this.toolStripButton2.ToolTipText = "打印登记本"; + this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click); // // frmNotesRecordExport // @@ -1079,7 +1079,6 @@ private DevComponents.DotNetBar.SuperTabItem R2; private DevComponents.DotNetBar.SuperTabControlPanel superTabControlPanel3; private DevComponents.DotNetBar.SuperTabItem R3; - private DevComponents.DotNetBar.ButtonX buttonX2; private DevComponents.DotNetBar.ButtonX buttonX1; private DevComponents.DotNetBar.ButtonX btn冰箱监测Save; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1; @@ -1124,5 +1123,6 @@ private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn22; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn23; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn24; + private System.Windows.Forms.ToolStripButton toolStripButton2; } } \ No newline at end of file diff --git a/AIMS/PublicUI/frmCreateTemplate.cs b/AIMS/PublicUI/frmCreateTemplate.cs index 82ee71b..b329334 100644 --- a/AIMS/PublicUI/frmCreateTemplate.cs +++ b/AIMS/PublicUI/frmCreateTemplate.cs @@ -147,8 +147,8 @@ namespace AIMS.PublicUI.UI dgvDrugsSQ.Rows[index].Cells[6].Value = (double)item.Density;//浓度 if (item.DensityUnit != null && item.DensityUnit != "") dgvDrugsSQ.Rows[index].Cells[7].Value = item.DensityUnit;//浓度单位 - if (item.Velocity != 0) - dgvDrugsSQ.Rows[index].Cells[8].Value = (double)item.Velocity;//速度 + if (item.Velocity != "") + dgvDrugsSQ.Rows[index].Cells[8].Value = item.Velocity;//速度 if (item.VelocityUnit != null && item.VelocityUnit != "") dgvDrugsSQ.Rows[index].Cells[9].Value = item.VelocityUnit;//速度单位 if (Convert.ToDateTime(item.DrugBeginTime).ToString().Length > 0) @@ -786,7 +786,7 @@ namespace AIMS.PublicUI.UI } if (dr["Spare3"].ToString() != "" && dr["Spare3"].ToString() != "0" && dr["Spare3"].ToString() != "0.00") { - FactDrugObj.Velocity = decimal.Parse(dr["Spare3"].ToString()); + FactDrugObj.Velocity = dr["Spare3"].ToString() ; FactDrugObj.VelocityUnit = dr["Spare4"].ToString(); } @@ -832,7 +832,7 @@ namespace AIMS.PublicUI.UI } if (child["Spare3"].ToString() != "" && child["Spare3"].ToString() != "0" && child["Spare3"].ToString() != "0.00") { - FactDrugObjChild.Velocity = decimal.Parse(child["Spare3"].ToString()); + FactDrugObjChild.Velocity = child["Spare3"].ToString( ); FactDrugObjChild.VelocityUnit = child["Spare4"].ToString(); } @@ -1050,11 +1050,11 @@ namespace AIMS.PublicUI.UI drugsR.DensityUnit = dr.Cells[7].EditedFormattedValue.ToString();//浓度单位 if (dr.Cells[8].EditedFormattedValue.ToString() != "") { - drugsR.Velocity = Convert.ToDecimal(dr.Cells[8].EditedFormattedValue.ToString());//速度 + drugsR.Velocity = dr.Cells[8].EditedFormattedValue.ToString( );//速度 } else { - drugsR.Velocity = 0; + drugsR.Velocity = ""; } drugsR.VelocityUnit = dr.Cells[9].EditedFormattedValue.ToString();//速度单位 drugsR.BloodType = dr.Cells[12].EditedFormattedValue.ToString();//血型 diff --git a/AIMS/PublicUI/frmDrugSel.cs b/AIMS/PublicUI/frmDrugSel.cs index 17c00e4..4146d1f 100644 --- a/AIMS/PublicUI/frmDrugSel.cs +++ b/AIMS/PublicUI/frmDrugSel.cs @@ -336,8 +336,8 @@ namespace AIMS.PublicUI.UI _dataGridView.Rows[index].Cells[6].Value = (double)item.Density;//浓度 if (item.DensityUnit != null && item.DensityUnit != "") _dataGridView.Rows[index].Cells[7].Value = item.DensityUnit;//浓度单位 - if (item.Velocity != 0) - _dataGridView.Rows[index].Cells[8].Value = (double)item.Velocity;//速度 + if (item.Velocity != "") + _dataGridView.Rows[index].Cells[8].Value = item.Velocity;//速度 if (item.VelocityUnit != null && item.VelocityUnit != "") _dataGridView.Rows[index].Cells[9].Value = item.VelocityUnit;//速度单位 if (Convert.ToDateTime(item.DrugBeginTime).ToString().Length > 0) @@ -721,7 +721,7 @@ namespace AIMS.PublicUI.UI public DataGridViewTextBoxEditingControl dgvTxt = null; // 声明 一个文本 CellEdit public DataGridViewTextBoxEditingControl dgvTxtName = null; // 声明 一个文本 CellEdit public DataGridViewTextBoxEditingControl dgvVensity = null; // 声明 一个文本 CellEdit - public DataGridViewTextBoxEditingControl dgvDensity = null; // 声明 一个文本 CellEdit + //public DataGridViewTextBoxEditingControl dgvDensity = null; // 声明 一个文本 CellEdit public DataGridViewTextBoxEditingControl dgvTextYP = null; // 声明 一个文本 CellEdit private void dgvDrugs_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e) { @@ -760,12 +760,12 @@ namespace AIMS.PublicUI.UI dgvVensity.KeyPress -= new KeyPressEventHandler(dgvTxt_KeyPress); // 绑定事件 dgvVensity.KeyPress += new KeyPressEventHandler(dgvTxt_KeyPress); // 绑定事件 } - if (_dataGridView.CurrentCell.ColumnIndex == 8) - { - dgvDensity = (DataGridViewTextBoxEditingControl)e.Control; // 得到单元格 - dgvDensity.KeyPress -= new KeyPressEventHandler(dgvTxt_KeyPress); // 绑定事件 - dgvDensity.KeyPress += new KeyPressEventHandler(dgvTxt_KeyPress); // 绑定事件 - } + //if (_dataGridView.CurrentCell.ColumnIndex == 8) + //{ + // dgvDensity = (DataGridViewTextBoxEditingControl)e.Control; // 得到单元格 + // dgvDensity.KeyPress -= new KeyPressEventHandler(dgvTxt_KeyPress); // 绑定事件 + // dgvDensity.KeyPress += new KeyPressEventHandler(dgvTxt_KeyPress); // 绑定事件 + //} } } diff --git a/AIMSEntity/BLL/Extension/BOperationTemplate.cs b/AIMSEntity/BLL/Extension/BOperationTemplate.cs index 3f8665d..55a9d6d 100644 --- a/AIMSEntity/BLL/Extension/BOperationTemplate.cs +++ b/AIMSEntity/BLL/Extension/BOperationTemplate.cs @@ -97,7 +97,7 @@ namespace AIMSBLL } if (dr["Spare3"].ToString() != "" && dr["Spare3"].ToString() != "0" && dr["Spare3"].ToString() != "0.00") { - FactDrugObj.Velocity = decimal.Parse(dr["Spare3"].ToString()); + FactDrugObj.Velocity = dr["Spare3"].ToString() ; FactDrugObj.VelocityUnit = dr["Spare4"].ToString(); } @@ -146,7 +146,7 @@ namespace AIMSBLL } if (child["Spare3"].ToString() != "" && child["Spare3"].ToString() != "0" && child["Spare3"].ToString() != "0.00") { - FactDrugObjChild.Velocity = decimal.Parse(child["Spare3"].ToString()); + FactDrugObjChild.Velocity = child["Spare3"].ToString() ; FactDrugObjChild.VelocityUnit = child["Spare4"].ToString(); } diff --git a/AIMSEntity/DAL/AutoGenerate/DFactDrug.cs b/AIMSEntity/DAL/AutoGenerate/DFactDrug.cs index ab79fa3..8fdf00c 100644 --- a/AIMSEntity/DAL/AutoGenerate/DFactDrug.cs +++ b/AIMSEntity/DAL/AutoGenerate/DFactDrug.cs @@ -699,7 +699,7 @@ namespace AIMSDAL } if (dr["Velocity"] != System.DBNull.Value) { - entity.Velocity = Convert.ToDecimal(dr["Velocity"]); + entity.Velocity = dr["Velocity"].ToString(); } if (dr["VelocityUnit"] != System.DBNull.Value) { diff --git a/AIMSEntity/Extensions/BNotesRecords.cs b/AIMSEntity/Extensions/BNotesRecords.cs index c8886af..a00f00c 100644 --- a/AIMSEntity/Extensions/BNotesRecords.cs +++ b/AIMSEntity/Extensions/BNotesRecords.cs @@ -19,5 +19,17 @@ namespace AIMSBLL return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); } + public static DataTable GetMonthDayTable2(string beginTime, string endTime) + { + string strSql = "SELECT distinct [OpeDAY] , [AnesthesiaDoctor] FROM [AIMSDB_DLSJZQZYYY].[dbo].[V_OperationRecordInfo] where RecoverId =1 and [State] in('手术结束','麻醉复苏结束') and AnesthesiaDoctor is not null and InRoomTime>='" + beginTime + "' and InRoomTime<'" + endTime + "' "; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable GetMonthDayTable3(string beginTime, string endTime) + { + string strSql = "SELECT distinct [OpeDAY] ,[AnesthesiaDoctor],operationroom FROM [AIMSDB_DLSJZQZYYY].[dbo].[V_OperationRecordInfo] where RecoverId =1 and [State] in('手术结束','麻醉复苏结束') and AnesthesiaDoctor is not null and InRoomTime>='" + beginTime + "' and InRoomTime<'" + endTime + "' "; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + } } diff --git a/AIMSEntity/Extensions/BOperationRecord.cs b/AIMSEntity/Extensions/BOperationRecord.cs index 36d26cb..a6f8e64 100644 --- a/AIMSEntity/Extensions/BOperationRecord.cs +++ b/AIMSEntity/Extensions/BOperationRecord.cs @@ -21,7 +21,7 @@ namespace AIMSBLL { return DOperationRecord.AddTitleTime(PatientId, ApplyId, RecoverId, State, Time, RoomId); } - public static int AddTitleTime2(int PatientId, int ApplyId, int RecoverId, int State, int RoomId) + public static int AddTitleTime2(int PatientId, int ApplyId, int RecoverId, int State, int RoomId) { return DOperationRecord.AddTitleTime2(PatientId, ApplyId, RecoverId, State, RoomId); } @@ -63,7 +63,7 @@ namespace AIMSBLL _record.RHBloodType = OperationFrontdt.Rows[0]["RHBloodType"].ToString(); _record.OperationSite = OperationFrontdt.Rows[0]["OperationSite"].ToString(); if (_record.OperationSite == "内镜室" && _record.Bed == "") _record.Bed = "-"; - ASALevel = OperationFrontdt.Rows[0]["ASA"].ToString(); + ASALevel = OperationFrontdt.Rows[0]["ASA"].ToString(); if (OperationFrontdt.Rows[0]["Height"].ToString() != "") { double Height = 0; @@ -92,9 +92,9 @@ namespace AIMSBLL } _record.Applydiagnose = OperationFrontdt.Rows[0]["ApplyDiagnoseInfoId"].ToString(); _record.Applyoperation = OperationFrontdt.Rows[0]["ApplyOperationInfoId"].ToString(); - _record.OperationType = OperationFrontdt.Rows[0]["OperationType"].ToString(); + _record.OperationType = OperationFrontdt.Rows[0]["OperationType"].ToString(); _record.MedicalRecord = OperationFrontdt.Rows[0]["MedicalRecord"].ToString(); - _record.PlanOperationTime = DateTime.Parse(OperationFrontdt.Rows[0]["PlanOperationTime"].ToString()); + _record.PlanOperationTime = DateTime.Parse(OperationFrontdt.Rows[0]["PlanOperationTime"].ToString()); } DataTable OperationDoingdt = BOperationRecord.GetOperationDoingDataTableByPatientId(PatientId, RecoverId); @@ -143,8 +143,9 @@ namespace AIMSBLL _record.OpeRecordInfo.OperatorTime = DateTime.Now; _record.OpeRecordInfo.Id = BOperationRecordInfo.Insert(_record.OpeRecordInfo); //是否启用默认项 - if (PublicMethod.HospitalName.Contains("漳浦") && RecoverId==1) + if (PublicMethod.HospitalName.Contains("漳浦") && RecoverId == 1) { + _record.OperationType = ""; if (_record.OpeSpecialCondition == null || _record.OpeSpecialCondition == "") _record.OpeSpecialCondition = "无特殊情况"; if (_record.SpecialEvent == null || _record.SpecialEvent == "") @@ -361,7 +362,7 @@ namespace AIMSBLL FactDrug.IsContinue = int.Parse(DrugAllData.Rows[i]["IsContinue"].ToString()); if (DrugAllData.Rows[i]["Density"].ToString() != "") FactDrug.Density = decimal.Parse(DrugAllData.Rows[i]["Density"].ToString()); FactDrug.DensityUnit = DrugAllData.Rows[i]["DensityUnit"].ToString(); - if (DrugAllData.Rows[i]["Velocity"].ToString() != "") FactDrug.Velocity = decimal.Parse(DrugAllData.Rows[i]["Velocity"].ToString()); + if (DrugAllData.Rows[i]["Velocity"].ToString() != "") FactDrug.Velocity = DrugAllData.Rows[i]["Velocity"].ToString(); FactDrug.VelocityUnit = DrugAllData.Rows[i]["VelocityUnit"].ToString(); FactDrug.BloodType = DrugAllData.Rows[i]["BloodType"].ToString(); FactDrug.OperatorNo = DrugAllData.Rows[i]["OperatorNo"].ToString(); @@ -480,9 +481,9 @@ namespace AIMSBLL // messing = EventName + "时间不可以大于当前时间 !"; // return false; //} - if (EventName=="插管" || EventName=="拔管" ||EventName=="喉罩" ||EventName=="拔喉罩") + if (EventName == "插管" || EventName == "拔管" || EventName == "喉罩" || EventName == "拔喉罩") { - return true; + return true; } TimeSpan ifinroom = curTimeTemp - _record.InRoomTime.Value; if (EventName != "入室" && _record.InRoomTime == null) diff --git a/DrawGraph/AreaManage/DrugsManage.cs b/DrawGraph/AreaManage/DrugsManage.cs index b8f8417..20b426f 100644 --- a/DrawGraph/AreaManage/DrugsManage.cs +++ b/DrawGraph/AreaManage/DrugsManage.cs @@ -349,8 +349,7 @@ namespace DrawGraph for (int i = 0; i < _FactDrugList.Count; i++) { FactDrug temp = _FactDrugList[i]; - if (temp.GiveDrugType == "麻醉前用药" || temp.GiveDrugType == "术后镇痛药" || temp.DrugChannel == "备用" || temp.DrugChannel == "配药" || temp.Access == "下") continue;//|| temp.GiveDrugType == "麻醉诱导用药" - //子药不画 + if (temp.GiveDrugType == "麻醉前用药" || temp.GiveDrugType == "术后镇痛药" || temp.DrugChannel == "备用" || temp.DrugChannel == "配药" || temp.Access == "下") continue;//|| temp.GiveDrugType == "麻醉诱导用药" if (temp.ParentId > 0) continue; bool isEqual = false; @@ -505,9 +504,9 @@ namespace DrawGraph } } if (dose.Trim() != "") dose += " "; - if (temp.Velocity != 0) + if (temp.Velocity != "") { - dose += ((double)temp.Velocity).ToString(); + dose += temp.Velocity; if (temp.VelocityUnit != null) { dose += temp.VelocityUnit; diff --git a/DrawGraph/AreaManage/FactDrug.cs b/DrawGraph/AreaManage/FactDrug.cs index e09a62a..a1fce7e 100644 --- a/DrawGraph/AreaManage/FactDrug.cs +++ b/DrawGraph/AreaManage/FactDrug.cs @@ -34,7 +34,7 @@ namespace DrawGraph public decimal Density; public string DensityUnit; - public decimal Velocity; + public string Velocity; public string VelocityUnit; public string BloodType; public int ParentId; @@ -211,7 +211,7 @@ namespace DrawGraph DoseStr = (((double)this.Dosage).ToString()); string RemarkStr = this.Remark;// string DensityStr = Density == 0 ? "" : ((double)this.Density).ToString(); - string VelocityStr = Velocity == 0 ? "" : ((double)this.Velocity).ToString(); + string VelocityStr = Velocity ; string s = ""; if (DensityStr != "" || VelocityStr != "") { diff --git a/DrawGraph/AreaManage/IconManage.cs b/DrawGraph/AreaManage/IconManage.cs index b9e7c26..76f5fed 100644 --- a/DrawGraph/AreaManage/IconManage.cs +++ b/DrawGraph/AreaManage/IconManage.cs @@ -272,9 +272,9 @@ namespace DrawGraph } } if (dose.Trim() != "") dose += " "; - if (temp.Velocity != 0) + if (temp.Velocity != "") { - dose += ((double)temp.Velocity).ToString(); + dose += temp.Velocity; if (temp.VelocityUnit != null) { dose += temp.VelocityUnit; diff --git a/DrawGraph/AreaManage/RemarkManage.cs b/DrawGraph/AreaManage/RemarkManage.cs index 00ad6bb..6aec340 100644 --- a/DrawGraph/AreaManage/RemarkManage.cs +++ b/DrawGraph/AreaManage/RemarkManage.cs @@ -87,9 +87,9 @@ namespace DrawGraph public void DrawRemarkDate() { List PunctureAndIntubatio = new List(); - string punStr = ""; + //string punStr = ""; int remarkRowscount = 12; - remarkRowscount = Convert.ToInt32((remarkPpack.RealEndY - remarkPpack.RealY) / 0.0125) + 1; + remarkRowscount = Convert.ToInt32((remarkPpack.RealEndY - remarkPpack.RealY) / 0.0125) + 2; if (H3pack == null) return; double x = H3pack.RealX; int remarkRow = 0; @@ -317,7 +317,7 @@ namespace DrawGraph private void SetRemarkInfo(List PunctureAndIntubatios, int remarkRowscount, ref double x, ref int remarkRow, ref int AllRemarkRow, float fontsize, ref int fontlength) { - if (AllRemarkRow > (remarkRowscount * 3)) return; + if (AllRemarkRow > (remarkRowscount * 4)) return; double lastIndex = remarkPpack.RealEndY; double y = remarkPpack.RealY + getYPositionByListIndex(remarkRow, remarkPpack.RealY, lastIndex, remarkRowscount); diff --git a/DrawGraph/AreaManage/SapManage.cs b/DrawGraph/AreaManage/SapManage.cs index 0e051ce..dadff4c 100644 --- a/DrawGraph/AreaManage/SapManage.cs +++ b/DrawGraph/AreaManage/SapManage.cs @@ -308,7 +308,7 @@ namespace DrawGraph for (int i = 0; i < _FactDrugList.Count; i++) { FactDrug temp = _FactDrugList[i]; - if (temp.GiveDrugType == "麻醉前用药" || temp.GiveDrugType == "术后镇痛药" || temp.DrugChannel == "备用" ||temp.DrugChannel == "配药"|| temp.Access == "下") continue;// || temp.GiveDrugType == "麻醉诱导用药" + if (temp.GiveDrugType == "麻醉前用药" || temp.GiveDrugType == "术后镇痛药" || temp.DrugChannel == "备用" || temp.DrugChannel == "配药" || temp.Access == "下") continue;// || temp.GiveDrugType == "麻醉诱导用药" //子药不画 if (temp.ParentId > 0) continue; bool isEqual = false; @@ -433,7 +433,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 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); @@ -457,9 +457,9 @@ namespace DrawGraph } } if (dose.Trim() != "") dose += " "; - if (temp.Velocity != 0) + if (temp.Velocity != "") { - dose += ((double)temp.Velocity).ToString(); + dose += temp.Velocity; if (temp.VelocityUnit != null) { dose += temp.VelocityUnit;