private void neuButton1_Click(object sender, EventArgs e) { Neusoft.FrameWork.Models.NeuObject roomObj = this.cmbRoom.SelectedItem; if (this.cmbRoom.Items.Count <= 0) { MessageBox.Show("请先维护诊室!", "提示"); return; } if (roomObj == null) { MessageBox.Show("请选择分诊诊室!", "提示"); this.cmbRoom.Focus(); return; } Neusoft.FrameWork.Models.NeuObject consoleObj = this.cmbConsole.SelectedItem; if (this.cmbConsole.Items.Count <= 0) { MessageBox.Show("请先维护该诊室的诊台!", "提示"); return; } if (consoleObj == null) { MessageBox.Show("请选择分诊诊台!", "提示"); this.cmbConsole.Focus(); return; } Neusoft.HISFC.BizLogic.Nurse.Assign assMgr = new Neusoft.HISFC.BizLogic.Nurse.Assign(); Neusoft.FrameWork.Management.PublicTrans.BeginTransaction(); //Neusoft.FrameWork.Management.Transaction SQLCA = new Neusoft.FrameWork.Management.Transaction(Neusoft.FrameWork.Management.Connection.Instance); //SQLCA.BeginTransaction(); try { assMgr.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans); int rtn = assMgr.Update(this.Assign.Register.ID, roomObj, consoleObj, assMgr.GetDateTimeFromSysDateTime()); if (rtn == -1) { Neusoft.FrameWork.Management.PublicTrans.RollBack(); MessageBox.Show(assMgr.Err, "提示"); return; } if (rtn == 0) { Neusoft.FrameWork.Management.PublicTrans.RollBack(); MessageBox.Show("该患者分诊状态已经改变,请重新刷新屏幕!", "提示"); return; } Neusoft.FrameWork.Management.PublicTrans.Commit(); } catch (Exception error) { Neusoft.FrameWork.Management.PublicTrans.RollBack(); MessageBox.Show(error.Message, "提示"); return; } this.Assign.Queue.SRoom = roomObj; this.Assign.Queue.Console = consoleObj; if (this.OK != null) { this.OK(this.Assign); } this.FindForm().Close(); }
/// <summary> /// 诊出 /// </summary> /// <param name="consoleCode">诊台编码</param> /// <param name="clinicID">门诊流水号</param> /// <param name="outDate">诊出日期</param> /// <param name="doctID">医生编码</param> /// <returns></returns> public int UpdateAssign(string consoleCode, string clinicID, DateTime outDate, string doctID) { this.SetDB(assignManager); return(assignManager.Update(consoleCode, clinicID, outDate, doctID)); }