/// <summary> /// 刷新界面数据 /// </summary> /// <param name="msg">搜索框中的文本信息</param> private void RefreshPatientList(dynamic msg) { DateTime scheduledTime = Convert.ToDateTime(msg.scheduledTime); string RoomNo = msg.roomNo; string msg1 = msg.inputText; // List<MED_PAT_INFO> list = PatInfoService.ClientInstance.GetPatInfos(msg1, ExtendAppContext.Current.OperDeptCode); List <MED_PAT_INFO> list = PatInfoService.ClientInstance.GetPatInfosByData(scheduledTime, RoomNo, msg1, ExtendAppContext.Current.OperDeptCode); List <MED_OPERATING_ROOM> listOperatingRoom = DictService.ClientInstance.GetOperatingRoomList(); if (ApplicationConfiguration.IsOpenPatConfirm && this.CheckIsNumberic(msg1) && listOperatingRoom.Find(x => x.ROOM_NO == ExtendAppContext.Current.OperRoomNo).PATIENT_ID == null) { if (list.Count > 0) { var ls = list.GroupBy(x => x.PATIENT_ID); if (ls.Count() == 1) { var item = list.OrderByDescending(x => x.SCHEDULED_DATE_TIME).FirstOrDefault(); ShowContentWindowMessage message; message = new ShowContentWindowMessage("PatConfirmControl", "患者核对") { Height = 500, Width = 600, Args = new object[] { PatientModel.CreateModel(item) } }; Messenger.Default.Send <ShowContentWindowMessage>(message); } } } this.PatientModelListCount = list.Count; // 先转换8条数据 this.PatientModelList = PatientModel.CreateListModel(list, new EventHandler(this.CreatePageList)).ToList <PatientModel>(); }
protected override void KeyBoardMessage(string keyCode) { ShowContentWindowMessage message; switch (keyCode) { case KeyCode.AppCode.VitalSigns: message = new ShowContentWindowMessage("SignEntryControl", "体征录入"); message.Height = 680; message.Width = 750; message.CallBackCommand = VitalSignsEditorCommand; ExtendAppContext.Current.CurntOpenForm = new OpenForm(KeyCode.AppCode.VitalSigns, null); Messenger.Default.Send <ShowContentWindowMessage>(message); break; case KeyCode.AppCode.Event: message = new ShowContentWindowMessage("OperationEventNoteControl", "事件录入"); message.Height = 600; message.Width = 750; message.CallBackCommand = VitalSignsEditorCommand; message.Args = new object[] { KeyCode.AppCode.Event }; ExtendAppContext.Current.CurntOpenForm = new OpenForm(KeyCode.AppCode.Event, null); Messenger.Default.Send <ShowContentWindowMessage>(message); break; } }
/// <summary> /// 根据窗体名,载入窗体 /// </summary> private void ShowContentWindow(string windowName, string title) { var message = new ShowContentWindowMessage(windowName, title); message.Height = MED_CONSTANT.POPUP_WINDOW_HEIGHT; message.Width = MED_CONSTANT.POPUP_WINDOW_WIDTH; Messenger.Default.Send <ShowContentWindowMessage>(message); }
/// <summary> /// 根据窗体名,载入窗体,同时设置窗体的宽和高 /// </summary> public void ShowContentWindow(string windowName, string title, int width, int height) { var message = new ShowContentWindowMessage(windowName, title); message.Height = height; message.Width = width; Messenger.Default.Send <ShowContentWindowMessage>(message); }
/// <summary> /// 显示急诊登记界面 /// </summary> private void ShowEmergencyRegister() { var message = new ShowContentWindowMessage("EmergencyRegisterControl", MED_CONSTANT.EMERGENCY_REGISTER); message.Height = MED_CONSTANT.POPUP_WINDOW_HEIGHT; message.Width = MED_CONSTANT.POPUP_WINDOW_WIDTH; message.TileBackground = (Brush)(new BrushConverter()).ConvertFromString("#F2806D"); Messenger.Default.Send <ShowContentWindowMessage>(message); }
/// <summary> /// 补录体征 /// </summary> /// <returns></returns> protected override bool InsertData() { this.keyBoardMessageLock = true;//补录锁定键盘消息 var message = new ShowContentWindowMessage("SignMakeupControl", "体征补录"); message.Height = 700; message.Width = 500; message.Args = new Object[] { rowDict, SelectColumsItems }; message.CallBackCommand = CallRecordPoints; Messenger.Default.Send <ShowContentWindowMessage>(message); return(true); }
/// <summary> /// 有参构造 /// </summary> public ShowContentWindowAction(ShowContentWindowMessage message) : this() { ContentMessage = message; Args = message.Args; CallBackCommand = message.CallBackCommand; Content = message.Content; Title = message.Title; Icon = message.Icon; ContentMargin = message.ContentMargin; Height = message.Height; Width = message.Width; ContentName = message.ContentName; IsModal = true; WindowType = message.WindowType; WindowAnimation = message.WindowAnimation; PositionX = message.PositionX; PositionY = message.PositionY; if (message.TileBackground == null) { BrushConverter brushConverter = new BrushConverter(); Brush brush = (Brush)brushConverter.ConvertFromString("#20C1D3"); message.TileBackground = brush; } TileBackground = message.TileBackground; switch (WindowType) { case ContentWindowType.Document: WindowState = WindowState.Maximized; IsModal = message.IsModal; break; case ContentWindowType.Common: WindowState = WindowState.Maximized; BorderMargin = message.BorderMargin; ContentMargin = message.ContentMargin; ResizeMode = message.ResizeMode; MinHeight = message.MinHeight; MinWidth = message.MinWidth; IsModal = message.IsModal; WindowState = message.WindowState; break; case ContentWindowType.ToolBox: IsModal = message.IsModal; break; } }
/// <summary> /// 根据选中患者的手术状态进入对应的文书 /// </summary> private void ShowPatientDoc(object sender) { ListBoxItem lbi = null; PatientModel pm = null; if (sender is ListBoxItem) { lbi = sender as ListBoxItem; pm = lbi.Content as PatientModel; } else if (sender is PatientModel) { pm = sender as PatientModel; } if (null == pm) { return; } ExtendAppContext.Current.PatientInformationExtend = pm.Med_Pat_Info; this.RefreshPermissions(); var contentType = "LoadReport"; var windowAnimation = MED_CONSTANT.MA_ZUI_JI_LU; var windowType = ContentWindowType.Document; var height = SystemParameters.PrimaryScreenHeight; var width = SystemParameters.PrimaryScreenWidth; if (pm.OperStatusCode >= OperationStatus.InOperationRoom) // 术中及术后 { } else // 术前 { contentType = "OperationInformationControl"; windowAnimation = MED_CONSTANT.OPERATION_INFOMATION; windowType = ContentWindowType.Common; height = MED_CONSTANT.POPUP_WINDOW_HEIGHT;; width = MED_CONSTANT.POPUP_WINDOW_WIDTH; } var message = new ShowContentWindowMessage(contentType, windowAnimation); message.Height = height; message.Width = width; message.WindowType = windowType; message.Args = new object[] { windowAnimation }; Messenger.Default.Send <ShowContentWindowMessage>(message); }
/// <summary> /// 打开文书 /// </summary> /// <param name="docName">文书名称</param> public void ShowDocByDocName(string docName) { if (ExtendAppContext.Current.PatientInformationExtend == null || ExtendAppContext.Current.PatientInformationExtend.PATIENT_ID == "") { ConfirmMessageBox.Show("系统提示", "请先选中一个患者后重试。", MessageBoxButton.OK, MessageBoxImage.Warning); return; } var message = new ShowContentWindowMessage("LoadReport", docName); message.Height = SystemParameters.PrimaryScreenHeight; message.Width = SystemParameters.PrimaryScreenWidth; message.WindowType = ContentWindowType.Document; message.Args = new object[] { docName }; Messenger.Default.Send <ShowContentWindowMessage>(message); }
/// <summary> /// 锁屏还是切换用户还是关机 /// </summary> private void LbChangeType_SelectionChanged(object sender, SelectionChangedEventArgs e) { switch (this.lbChangeType.SelectedIndex) { case 0: //锁屏 ExtendAppContext.Current.CurEnumLoginType = Anes.FrameWork.Enum.EnumLoginType.LockScreen; break; case 1: ExtendAppContext.Current.CurEnumLoginType = Anes.FrameWork.Enum.EnumLoginType.Logout; //注销 break; case 2: ExtendAppContext.Current.CurEnumLoginType = Anes.FrameWork.Enum.EnumLoginType.ShutDown; //关机 break; case 3: // 关于界面 var message = new ShowContentWindowMessage("About", "关于"); message.Height = 230; message.Width = 500; Messenger.Default.Send <ShowContentWindowMessage>(message); this.lbChangeType.SelectedIndex = -1; return; case 4: this.WindowState = WindowState.Minimized; this.lbChangeType.SelectedIndex = -1; return; default: return; } this.popupChange.IsOpen = false; if (ExtendAppContext.Current.CurEnumLoginType == Anes.FrameWork.Enum.EnumLoginType.ShutDown) { MessageBoxResult dr = ConfirmMessageBox.Show("", "确定要关闭麻醉信息工作站?", MessageBoxButton.YesNo, MessageBoxImage.Question, false, 2000); if (dr == MessageBoxResult.Yes || dr == MessageBoxResult.OK) { Process[] pros = Process.GetProcessesByName("MedicalSystem.AnesWorkStationCoordination.View"); if (pros.Length == 1) { pros[0].Kill(); } ExtendAppContext.Current.IsNormalClosing = true; System.Windows.Application.Current.Shutdown(); } } else { //关闭手术进程状态LED,隐藏主页面 Messenger.Default.Send <object>(this, EnumMessageKey.HideMainWindow); Messenger.Default.Send <object>(this, EnumMessageKey.CloseInOperationWindow); KeyBoardStateCache.KeyBoard.CloseSecondKeyBoardAllLed(); // 异步弹出登录框 Dispatcher.BeginInvoke(new Action(() => { Login login = new Login(); login.Topmost = true; login.Show(); })); } this.lbChangeType.SelectedIndex = -1; }
/// <summary> /// 注册命令信息 /// </summary> private void RegisterCommand() { // 切换血气分析明细信息 this.ShowDetailCommand = new RelayCommand <object>(par => { // 在新增血气状态下不能切换 if (this.AddButtonIsEnabled) { MED_BLOOD_GAS_MASTER tempMaster = par as MED_BLOOD_GAS_MASTER; if (null != tempMaster) { this.RefreshDetailData(tempMaster.DETAIL_ID); } } }); // 新增血气分析项 this.AddMasterCommand = new RelayCommand <object>(par => { var message = new ShowContentWindowMessage("AddBloodGasMaster", "新增血气分析记录"); message.Height = 250; message.Width = 300; Messenger.Default.Send <ShowContentWindowMessage>(message); }); // 增加血气成功后刷新左侧列表信息 Messenger.Default.Register <object>(this, EnumMessageKey.RefreshBloodGasMaster, msg => { if (null != msg && msg is MED_BLOOD_GAS_MASTER) { // 添加按钮不可用 this.AddButtonIsEnabled = false; this.DelButtonIsEnabled = false; this.EditButtonIsEnabled = true; // 将新添加的血气主信息添加到数据源 this.insertBloodGasMaster = msg as MED_BLOOD_GAS_MASTER; List <MED_BLOOD_GAS_MASTER> tempMasterList = new List <MED_BLOOD_GAS_MASTER>(this.MedBloodGasMaster); MED_BLOOD_GAS_MASTER tmpItem = tempMasterList.Find(x => x.DETAIL_ID == insertBloodGasMaster.DETAIL_ID); if (tmpItem != null) { tempMasterList.Remove(tmpItem); } tempMasterList.Add(this.insertBloodGasMaster); this.MedBloodGasMaster = tempMasterList; // 新增明细项 this.InsertBloodGasDetail(this.insertBloodGasMaster); // 刷新界面 Messenger.Default.Send <object>(this.insertBloodGasMaster, EnumMessageKey.RefreshBloodGasMasterSelection); } }); // 保存血气分析明细 this.SaveDetailCommand = new RelayCommand <object>(par => { this.PublicKeyBoardMessage(KeyCode.AppCode.Save); }); // 删除血气主表数据 this.DelMasterCommand = new RelayCommand <object>(par => { if (par != null && par is MED_BLOOD_GAS_MASTER) { this.ShowMessageBox("确认删除选中项?", MessageBoxButton.YesNo, MessageBoxImage.Question, new Action <MessageBoxResult>((mbr) => { if (mbr == MessageBoxResult.OK) { TransactionParamsters tp = TransactionParamsters.Create(); MED_BLOOD_GAS_MASTER tempMaster = par as MED_BLOOD_GAS_MASTER; tempMaster.ModelStatus = ModelStatus.Deleted; tp.Append(tempMaster); // 不修改EXT表的内容 //List<MED_BLOOD_GAS_DETAIL_EXT> detailList = AnesInfoService.ClientInstance.GetBloodGasDetailExtList(tempMaster.DETAIL_ID); //foreach (MED_BLOOD_GAS_DETAIL_EXT item in detailList) //{ // item.ModelStatus = ModelStatus.Deleted; //} // //tp.Append(detailList); CommonService.ClientInstance.UpdateByTransaction(tp.ToString()); // 刷新主表数据 this.RefreshMasterData(); this.ShowMessageBox("删除成功!", MessageBoxButton.OK, MessageBoxImage.Information); } })); } else { this.ShowMessageBox("请选中数据行再执行删除!", MessageBoxButton.OK, MessageBoxImage.Information); } }); // 编辑血气主表数据 this.EditMasterCommand = new RelayCommand <object>(par => { if (par != null && par is MED_BLOOD_GAS_MASTER) { var message = new ShowContentWindowMessage("AddBloodGasMaster", "新增血气分析记录"); message.Height = 250; message.Width = 300; message.Args = new object[] { par }; Messenger.Default.Send <ShowContentWindowMessage>(message); } }); }
protected override void KeyBoardMessage(string keyCode) { ShowContentWindowMessage message; switch (keyCode) { case KeyCode.AppCode.AnesDrug: message = new ShowContentWindowMessage("OperationMedNoteControl", "麻药录入"); message.Height = 600; message.Width = 750; message.CallBackCommand = ClosingWindow; message.Args = new object[] { KeyCode.AppCode.AnesDrug }; ExtendAppContext.Current.CurntOpenForm = new OpenForm(KeyCode.AppCode.AnesDrug, null); Messenger.Default.Send <ShowContentWindowMessage>(message); break; case KeyCode.AppCode.Drug: message = new ShowContentWindowMessage("OperationMedNoteControl", "用药录入"); message.Height = 600; message.Width = 750; message.CallBackCommand = ClosingWindow; message.Args = new object[] { KeyCode.AppCode.Drug }; ExtendAppContext.Current.CurntOpenForm = new OpenForm(KeyCode.AppCode.Drug, null); Messenger.Default.Send <ShowContentWindowMessage>(message); break; case KeyCode.AppCode.InLiquid: message = new ShowContentWindowMessage("OperationMedNoteControl", "输液录入"); message.Height = 600; message.Width = 750; message.CallBackCommand = ClosingWindow; message.Args = new object[] { KeyCode.AppCode.InLiquid }; ExtendAppContext.Current.CurntOpenForm = new OpenForm(KeyCode.AppCode.InLiquid, null); Messenger.Default.Send <ShowContentWindowMessage>(message); break; case KeyCode.AppCode.Breath: message = new ShowContentWindowMessage("OperationMedNoteControl", "呼吸录入"); message.Height = 600; message.Width = 750; message.CallBackCommand = ClosingWindow; message.Args = new object[] { KeyCode.AppCode.Breath }; ExtendAppContext.Current.CurntOpenForm = new OpenForm(KeyCode.AppCode.Breath, null); Messenger.Default.Send <ShowContentWindowMessage>(message); break; case KeyCode.AppCode.Oxygen: message = new ShowContentWindowMessage("OperationMedNoteControl", "输氧录入"); message.Height = 600; message.Width = 750; message.CallBackCommand = ClosingWindow; message.Args = new object[] { KeyCode.AppCode.Oxygen }; ExtendAppContext.Current.CurntOpenForm = new OpenForm(KeyCode.AppCode.Oxygen, null); Messenger.Default.Send <ShowContentWindowMessage>(message); break; case KeyCode.AppCode.Blood: message = new ShowContentWindowMessage("OperationMedNoteControl", "输血录入"); message.Height = 600; message.Width = 750; message.CallBackCommand = ClosingWindow; message.Args = new object[] { KeyCode.AppCode.Blood }; ExtendAppContext.Current.CurntOpenForm = new OpenForm(KeyCode.AppCode.Blood, null); Messenger.Default.Send <ShowContentWindowMessage>(message); break; case KeyCode.AppCode.Intubatton: message = new ShowContentWindowMessage("OperationEventNoteControl", "插管录入"); message.Height = 600; message.Width = 750; message.CallBackCommand = ClosingWindow; message.Args = new object[] { KeyCode.AppCode.Intubatton }; ExtendAppContext.Current.CurntOpenForm = new OpenForm(KeyCode.AppCode.Intubatton, null); Messenger.Default.Send <ShowContentWindowMessage>(message); break; case KeyCode.AppCode.Extubation: message = new ShowContentWindowMessage("OperationEventNoteControl", "拔管录入"); message.Height = 600; message.Width = 750; message.CallBackCommand = ClosingWindow; message.Args = new object[] { KeyCode.AppCode.Extubation }; ExtendAppContext.Current.CurntOpenForm = new OpenForm(KeyCode.AppCode.Extubation, null); Messenger.Default.Send <ShowContentWindowMessage>(message); break; case KeyCode.AppCode.OutLiquid: message = new ShowContentWindowMessage("OperationMedNoteControl", "出液录入"); message.Height = 600; message.Width = 750; message.CallBackCommand = ClosingWindow; message.Args = new object[] { KeyCode.AppCode.OutLiquid }; ExtendAppContext.Current.CurntOpenForm = new OpenForm(KeyCode.AppCode.OutLiquid, null); Messenger.Default.Send <ShowContentWindowMessage>(message); break; case KeyCode.AppCode.AnesPath: message = new ShowContentWindowMessage("AnesthesiaPathControl", "麻醉路径"); message.Height = 600; message.Width = 750; message.CallBackCommand = ClosingWindow; message.Args = new object[] { KeyCode.AppCode.AnesPath }; ExtendAppContext.Current.CurntOpenForm = new OpenForm(KeyCode.AppCode.AnesPath, null); Messenger.Default.Send <ShowContentWindowMessage>(message); break; } }
/// <summary> /// 根据选择名称进行相应处理 /// </summary> private void DoLoadReportOrWork(SignleBottomMenuControl selectedSignleBottomMenuControl) { if (ExtendAppContext.Current.PatientInformationExtend == null) { ShowMessageBox("请先选中一个患者后再操作手术信息。", MessageBoxButton.OK, MessageBoxImage.Warning); return; } string controlName = selectedSignleBottomMenuControl.ControlName; switch (controlName) { case "麻醉记录单": case "术前访视单": case "术后随访单": case "三方核查单": case "麻醉同意书": case "不良后果告知书": case "麻醉总结单": case "术后镇痛记录单": case "输血评估单": case "手术安全核查单": this.ShowDocByDocName(controlName); break; case MED_CONSTANT.OPERATION_INFOMATION: this.ShowContentWindow("OperationInformationControl", MED_CONSTANT.OPERATION_INFOMATION); break; case MED_CONSTANT.AfterOperationInformationControl: this.ShowContentWindow("AfterOperationInformationControl", MED_CONSTANT.AfterOperationInformationControl); break; case "仪器设置": if (ExtendAppContext.Current.PatientInformationExtend == null) { this.ShowMessageBox("无正在进行的手术,无法绑定仪器。", MessageBoxButton.OK, MessageBoxImage.Warning); return; } this.ShowContentWindow("MonitorBind", "仪器设置", 760, 1200); break; case "模板调用": break; case "保存模板": this.ShowContentWindow("AnesthesiaRouteControl", "保存模板", 438, 185); break; case "更换手术间": this.ShowContentWindow("ChangeOperRoomNo", "更换手术间", 600, 660); break; case "查看术中": Messenger.Default.Send <object>(this, EnumMessageKey.ShowInOperationWindow); break; case "手术交接班": this.ShowContentWindow("OperationShift", "手术交接班", 700, 660); break; case "检验结果": this.ShowContentWindow("AssayReport", "检验结果查询", 600, 620); break; case "血气分析": this.BloodGasAnalysisControlMethod(); break; case "个性化体征": this.ShowContentWindow("IndividuationVitalSignControl", "个性化体征", 600, 620); Messenger.Default.Send <object>(this, EnumMessageKey.RefreshSignVitalWindow); break; case "手术跳转": this.OperatioinJumpMethod(); break; case "手术取消": if (ExtendAppContext.Current.PatientInformationExtend.OPER_STATUS_CODE == (int)OperationStatus.InOperationRoom) { this.ShowContentWindow("OperationCanceled", "手术取消", 600, 660); } else { this.ShowMessageBox("只有处于入室状态才能取消手术!", MessageBoxButton.OK, MessageBoxImage.Asterisk); } break; case "家属协同": this.ShowContentWindow("OperationScreen", "术中家属协同", 600, 660); break; case "麻醉计费": if (ExtendAppContext.Current.PatientInformationExtend.OPER_STATUS_CODE >= (int)OperationStatus.AnesthesiaEnd) { this.ShowContentWindow("AnesFree", "麻醉计费", 700, 800); } else { this.ShowMessageBox("只有麻醉结束后才能进入麻醉计费功能!", MessageBoxButton.OK, MessageBoxImage.Asterisk); } break; case "批量归档": if (ExtendAppContext.Current.LoginUser.USER_JOB_ID.Equals("MDSD")) { this.ShowMessageBox("当前登录账户为管理员账户,请使用医生账户重新登录!", MessageBoxButton.OK, MessageBoxImage.Asterisk); } else { this.ShowContentWindow("UnPostPDFControl", "批量归档", 600, 730); } break; case "拍照": var message = new ShowContentWindowMessage("CameraControl", "拍照"); message.Height = 660; message.Width = 600; message.WindowType = ContentWindowType.Document; Messenger.Default.Send <ShowContentWindowMessage>(message); // this.ShowContentWindow("CameraControl", "拍照", 600, 660); break; case "麻醉评分": this.ShowContentWindow("Balthazar", "麻醉评分", (int)SystemParameters.PrimaryScreenWidth, (int)SystemParameters.PrimaryScreenHeight); break; case "PACS检查信息": this.ShowContentWindow("PacsInterface", "PACS检查信息", 600, 660); break; default: // 当为找到对应的值时,默认使用文书解析 this.ShowDocByDocName(controlName); break; } this.CloseContentWindow(); }
/// <summary> /// 注册命令信息 /// </summary> private void RegisterCommand() { // 更新命令:将现有的数据直接清空,根据患者用药信息自动获取最新的数据 this.RefreshCommon = new RelayCommand <object>(par => { UpdateAnesEventInfo(); }); // 新增命令:再最后一行新增数据行 this.InsertCommon = new RelayCommand <object>(par => { MED_ANES_VALUATION_LIST valuation = AddNewInfo(null, 3); if (valuation != null) { IsAddEnabled = true; valuationList.Add(valuation); tmpValuationList.Add(valuation); } }); // 套用模板:左侧显示模板列表,确认模板后将模板数据追加到计费列表后 this.UserTemplateCommon = new RelayCommand <object>(par => { var message = new ShowContentWindowMessage("ChargeTempletControl", "收费模板"); message.Height = 800; message.Width = 700; message.CallBackCommand = CallChatgeTemplet; Messenger.Default.Send <ShowContentWindowMessage>(message); }); // 保存模板 this.SaveTemplateCommon = new RelayCommand <object>(par => { var message = new ShowContentWindowMessage("ChargeTemplateMethodControl", "收费模板名称"); message.Height = 220; message.Width = 500; message.CallBackCommand = CallSaveTemplet; Messenger.Default.Send <ShowContentWindowMessage>(message); }); //删除行命令 this.DeleteItemClickCommon = new RelayCommand <MED_ANES_VALUATION_LIST>(data => { if (null != data) { if (data.ModelStatus != ModelStatus.Add) { data.ModelStatus = ModelStatus.Deleted; ValuationList.Remove(data); } else { data.ModelStatus = ModelStatus.Deleted; tmpValuationList.Remove(data); ValuationList.Remove(data); } } }); // 保存命令:将现有数据保存到数据库 this.SaveCommon = new RelayCommand <object>(par => { bool con = true; foreach (MED_ANES_VALUATION_LIST row in tmpValuationList) { if (row.ModelStatus != ModelStatus.Deleted) { if (string.IsNullOrEmpty(row.ITEM_CLASS) || string.IsNullOrEmpty(row.ITEM_NAME) || !row.AMOUNT.HasValue) { ShowMessageBox("类别、项目名称、数量不能为空", MessageBoxButton.OK, MessageBoxImage.Information); con = false; break; } } } if (con) { bool result = ChargeInfoService.ClientInstance.SaveValuationList(new List <MED_ANES_VALUATION_LIST>(tmpValuationList)); if (result) { ShowMessageBox("保存成功", MessageBoxButton.OK, MessageBoxImage.Information); } foreach (var item in tmpValuationList) { if (item.ModelStatus != ModelStatus.Deleted) { item.ModelStatus = ModelStatus.Default; } } } }); // 提交命令:将现有数据提交,提交后的数据不能更改。提交前弹出确认框,再录入用户名和密码验证成功后才可提交 this.SubmitCommon = new RelayCommand <object>(par => { bool result = true; List <MED_ANES_VALUATION_LIST> anesList = new List <MED_ANES_VALUATION_LIST>(ValuationList); foreach (MED_ANES_VALUATION_LIST anes in anesList) { if (anes.ModelStatus != ModelStatus.Deleted) { if (string.IsNullOrEmpty(anes.ITEM_CLASS) || string.IsNullOrEmpty(anes.ITEM_NAME)) { ShowMessageBox("类别、项目名称、数量不能为空", MessageBoxButton.OK, MessageBoxImage.Information); result = false; break; } if (!anes.AMOUNT.HasValue) { result = false; ShowMessageBox(anes.ITEM_NAME + "的数量不能为空,请填写数量。", MessageBoxButton.OK, MessageBoxImage.Information); break; } } } if (result) { var message = new ShowContentWindowMessage("ChargeSubmitControl", "确认提交"); message.Height = 400; message.Width = 400; message.CallBackCommand = CallSubmit; Messenger.Default.Send <ShowContentWindowMessage>(message); } }); }