From 87c44823411a9f84945f6389fa03191bcb7962e8 Mon Sep 17 00:00:00 2001 From: leomon Date: Thu, 27 Jul 2023 12:04:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A4=E5=A3=AB=E8=BD=AC=E5=85=A5=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E7=8A=B6=E6=80=81=E4=B8=8D=E5=AF=B9=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frmAanesthesiaRecord.cs | 3 +++ .../frmInstrumentRecord2.cs | 22 ++++++++++--------- .../frmSelectPatientGoodsBill2.cs | 9 +++++--- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/AIMS/OperationAanesthesia/frmAanesthesiaRecord.cs b/AIMS/OperationAanesthesia/frmAanesthesiaRecord.cs index 24ad6c5..e552c7e 100644 --- a/AIMS/OperationAanesthesia/frmAanesthesiaRecord.cs +++ b/AIMS/OperationAanesthesia/frmAanesthesiaRecord.cs @@ -1137,8 +1137,10 @@ namespace AIMS.OperationAanesthesia _record.OperationApplyId = ApplyId; _record.PatientId = PatientId; _record.RecoverId = RecoverId; + HelperDB.DbHelperSQL.BeginTrans(); _record.Id = BOperationRecord.AddTitleTime(PatientId, ApplyId, RecoverId, 1, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd HH:mm:00")), NowRoom.Id.Value); SelectPatient.UpdateApplyState(PatientId, ApplyId); //修改状态 + HelperDB.DbHelperSQL.CommitTrans(); ClearTimeText(); btnSelectPatient.Enabled = false; btnCancelOperation.Enabled = true; @@ -1151,6 +1153,7 @@ namespace AIMS.OperationAanesthesia catch { HelperDB.DbHelperSQL.RollbackTrans(); + this.Close(); } } else if (PatientId > 0 && State == AIMSExtension.EditState.EDIT) diff --git a/AIMS/OperationAanesthesia/frmInstrumentRecord2.cs b/AIMS/OperationAanesthesia/frmInstrumentRecord2.cs index 2695183..4f2f195 100644 --- a/AIMS/OperationAanesthesia/frmInstrumentRecord2.cs +++ b/AIMS/OperationAanesthesia/frmInstrumentRecord2.cs @@ -442,20 +442,21 @@ namespace AIMS.OperationAanesthesia LoadAnesRescue(); } - private System.Windows.Forms.Timer timerLoadAnesRescue; + //private System.Windows.Forms.Timer timerLoadAnesRescue; public void LoadAnesRescue() { - timerLoadAnesRescue = new System.Windows.Forms.Timer(components); - timerLoadAnesRescue.Enabled = true;//调试时设置为FALSE , - timerLoadAnesRescue.Interval = 300; - timerLoadAnesRescue.Tick -= TimerLoadAnesRescue_Tick; - timerLoadAnesRescue.Tick += TimerLoadAnesRescue_Tick; - timerLoadAnesRescue.Start(); + //timerLoadAnesRescue = new System.Windows.Forms.Timer(components); + //timerLoadAnesRescue.Enabled = true;//调试时设置为FALSE , + //timerLoadAnesRescue.Interval = 300; + //timerLoadAnesRescue.Tick -= TimerLoadAnesRescue_Tick; + //timerLoadAnesRescue.Tick += TimerLoadAnesRescue_Tick; + //timerLoadAnesRescue.Start(); + TimerLoadAnesRescue_Tick(null, null); } private void TimerLoadAnesRescue_Tick(object sender, EventArgs e) { - timerLoadAnesRescue.Dispose(); + //timerLoadAnesRescue.Dispose(); if (PatientId > 0 && State == AIMSExtension.EditState.ADD) { try @@ -466,6 +467,7 @@ namespace AIMS.OperationAanesthesia _record.PatientId = PatientId; _record.RecoverId = RecoverId; _record.Id = BOperationRecord.AddTitleTime(PatientId, ApplyId, RecoverId, 1, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd HH:mm:00")), NowRoom.Id.Value); + SelectPatient.UpdateApplyState(PatientId, ApplyId); //修改状态 HelperDB.DbHelperSQL.CommitTrans(); ClearTimeText(); btnSelectPatient.Enabled = false; @@ -938,7 +940,7 @@ namespace AIMS.OperationAanesthesia var value = dr[i].ItemArray[1].ToString(); XTextInputFieldElement element = query.Where(x => x.FieldSettings.ListSource.SourceName == value).FirstOrDefault(); PropertyInfo info = p.Where(px => px.Name == name).FirstOrDefault(); - if (value == "KB20180604142714558" && element.Text!="") continue; + if (value == "KB20180604142714558" && element.Text != "") continue; if (element != null && info != null) { element.Text = info.GetValue(Patient, null).ToString(); @@ -1928,7 +1930,7 @@ namespace AIMS.OperationAanesthesia if (_record != null) { EMRExtension.OpenFeesRecord(_record, "护士"); - } + } } private void button10_Click(object sender, EventArgs e) diff --git a/AIMS/OperationAanesthesia/frmSelectPatientGoodsBill2.cs b/AIMS/OperationAanesthesia/frmSelectPatientGoodsBill2.cs index 5fa1d4d..7d5de67 100644 --- a/AIMS/OperationAanesthesia/frmSelectPatientGoodsBill2.cs +++ b/AIMS/OperationAanesthesia/frmSelectPatientGoodsBill2.cs @@ -281,6 +281,7 @@ namespace AIMS.OperationAanesthesia if (operA.State == 11) { MessageBox.Show("当前手术已停止 ,请确认后重新选择!", "系统提示"); + FillDgv(); return; } @@ -322,7 +323,6 @@ namespace AIMS.OperationAanesthesia frmAnasRecord.ApplyId = applyId; frmAnasRecord.NowRoom = AIMSBLL.BOperationRoom.SelectSingle(RoomId); frmAnasRecord.State = AIMSExtension.EditState.ADD; - SelectPatient.UpdateApplyState(PatientId, applyId); //修改状态 uc.label2.Text = "手术中"; uc.label2.ForeColor = Color.Red; @@ -334,7 +334,8 @@ namespace AIMS.OperationAanesthesia if (isMainOpen == false) { - frmAnasRecord.Show(); + frmAnasRecord.Show(this); + frmAnasRecord.Focus(); FillDgv(); } else @@ -364,7 +365,9 @@ namespace AIMS.OperationAanesthesia if (isMainOpen == false) { - frmAnasRecord.ShowDialog(); + frmAnasRecord.Show(this); + frmAnasRecord.Focus(); + FillDgv(); } else