private void frmOutpatientDrug_FormClosed(object sender, FormClosedEventArgs e) { if (!this.isCancel) { if (this.funMode == Neusoft.HISFC.Components.DrugStore.OutpatientFun.Drug) { Neusoft.HISFC.BizLogic.Pharmacy.DrugStore drugStoreManager = new Neusoft.HISFC.BizLogic.Pharmacy.DrugStore(); this.Terminal = drugStoreManager.GetDrugTerminalById(this.Terminal.ID); this.Terminal.Memo = ""; if (drugStoreManager.UpdateDrugTerminal(this.Terminal) == -1) { MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("更新配药终端为可用标记失败")); return; } } } }
/// <summary> /// 门诊终端选择业务 /// </summary> /// <param name="stockDept">操作库房科室</param> /// <param name="terminalType">门诊终端类别 0 发药窗口 1 配药台</param> /// <param name="isShowMessageBox">对相应的提示信息是否采用MessageBox弹出显示</param> /// <returns>成功返回 门诊终端实体 失败返回null</returns> public static Neusoft.HISFC.Models.Pharmacy.DrugTerminal TerminalSelect(string stockDept, Neusoft.HISFC.Models.Pharmacy.EnumTerminalType terminalType, bool isShowMessageBox) { Neusoft.HISFC.Models.Pharmacy.DrugTerminal terminal = new DrugTerminal( ); Neusoft.HISFC.BizLogic.Pharmacy.DrugStore drugStoreManager = new Neusoft.HISFC.BizLogic.Pharmacy.DrugStore( ); string strErr = ""; bool isShowTerminalList = true; ArrayList alValues = Neusoft.FrameWork.WinForms.Classes.Function.GetDefaultValue("ClinicDrug", "TerminalCode", out strErr); if (alValues != null && alValues.Count > 0 && (alValues[0] as string) != "") { //根据配置文件内编码确定终端 terminal = drugStoreManager.GetDrugTerminalById(alValues[0] as string); if (terminal != null) { if (terminal.IsClose && isShowMessageBox) { System.Windows.Forms.MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("配置文件内设置的终端" + terminal.Name + "已关闭")); } if (terminal.TerminalType == terminalType) { isShowTerminalList = false; } } } if (isShowTerminalList) { #region 配置文件内编码无效 弹出列表供人员选择 ArrayList al = drugStoreManager.QueryDrugTerminalByDeptCode(stockDept, terminalType.GetHashCode( ).ToString( )); if (al == null && isShowMessageBox) { System.Windows.Forms.MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("未获取终端列表") + drugStoreManager.Err); return(null); } Neusoft.FrameWork.Models.NeuObject tempTerminal = new NeuObject( ); if (Neusoft.FrameWork.WinForms.Classes.Function.ChooseItem(al, null, new bool[] { true, true, false, false, false, false, false, false }, null, ref tempTerminal) == 0) //if (Neusoft.FrameWork.WinForms.Classes.Function.ChooseItem(al, ref tempTerminal) == 0) { return(null); } else { terminal = tempTerminal as Neusoft.HISFC.Models.Pharmacy.DrugTerminal; } #endregion } if (terminal != null && terminal.TerminalType == EnumTerminalType.配药台) { Neusoft.HISFC.Models.Pharmacy.DrugTerminal sendTerminal = drugStoreManager.GetDrugTerminalById(terminal.SendWindow.ID); if (sendTerminal != null) { terminal.SendWindow.Name = sendTerminal.Name; } } return(terminal); }