private void About_Load(object sender, EventArgs e) { try { string version = "1000"; if (File.Exists(this.FilePath)) { XmlDocument doc = new XmlDocument(); doc.Load(this.FilePath); if (doc.ChildNodes.Count > 1 && doc.ChildNodes[1].ChildNodes.Count > 0) { version = doc.ChildNodes[1].ChildNodes[0].InnerText; } } this.labMainVersion.Text = "当前版本程序:2.2." + version; // 获取版本信息 ComnDictRepository comn = new ComnDictRepository(); MED_VER_INFO maxVerInfo = comn.GetVerInfoList("PACU").Data.Where(x => !x.ROLL_BACK.HasValue || x.ROLL_BACK.Value == 0).OrderByDescending(x => x.VER_NO).FirstOrDefault(); if (null != maxVerInfo) { this.hasDiff = !version.Equals(maxVerInfo.VER_NO.ToString()); this.labLatestVersion.Text = string.Format("最新版本程序:2.2.{0}{1}", maxVerInfo.VER_NO, this.hasDiff ? ",请重启更新程序" : ""); if (this.hasDiff) { this.labLatestVersion.ForeColor = System.Drawing.Color.Red; } } else { this.labLatestVersion.Text = string.Format("最新版本程序:2.2.{0}", version); this.hasDiff = false; } } catch (Exception ex) { Logger.Error("加载关于界面错误!" + ex.Message); } }
public static List <MED_EVENT_DICT> RefreshEventOpenDataTalbe(string event_item_Class, string eventAttr) { ComnDictRepository comnDictRepository = new ComnDictRepository(); var tmpList = comnDictRepository.GetEventDictList().Data; if (string.IsNullOrEmpty(eventAttr)) { return(tmpList.FindAll(x => x.EVENT_CLASS_CODE == event_item_Class)); } else if (event_item_Class == "9" && eventAttr == "4")//9为呼吸 { return(tmpList.Where(x => new string[] { "9", "A", "Y" }.Contains(x.EVENT_CLASS_CODE) || new string[] { "辅助呼吸", "控制呼吸", "自主呼吸" }.Contains(x.EVENT_ITEM_NAME)) .OrderBy(x => x.SORT_NO).ToList()); } else { return(tmpList.Where(x => x.EVENT_CLASS_CODE == event_item_Class && x.EVENT_ATTR2 == eventAttr) .OrderBy(x => x.SORT_NO).ToList()); } }
private bool InPacuRoom() { PacuRoom = txtPacuNo.Text; DateTime inPacuTime = Convert.ToDateTime(txtInPacuTime.EditValue); if (!string.IsNullOrEmpty(PacuRoom) && inPacuTime != DateTime.MaxValue && inPacuTime != DateTime.MinValue) { List <MED_OPERATING_ROOM> operatingRoomList = new ComnDictRepository().GetOperatingRoomList("1").Data; MED_OPERATION_MASTER operMaster = operationInfoRepository.GetOperMaster(ExtendApplicationContext.Current.PatientContextExtend.PatientID, ExtendApplicationContext.Current.PatientContextExtend.VisitID, ExtendApplicationContext.Current.PatientContextExtend.OperID).Data; if (operMaster.IN_PACU_DATE_TIME.HasValue) { MessageBoxFormPC.Show("该患者已经入室,请刷新数据!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return(false); } else if (operMaster.OPER_STATUS_CODE < (int)OperationStatus.TurnToPACU) { MessageBoxFormPC.Show("该患者已被跳转到【" + OperationStatusHelper.OperationStatusToString((OperationStatus)operMaster.OPER_STATUS_CODE) + "】状态,请刷新数据!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return(false); } if (operMaster != null) { if (operMaster.OUT_DATE_TIME.HasValue) { if (inPacuTime < operMaster.OUT_DATE_TIME) { MessageBoxFormPC.Show("【入复苏室】 时间 [" + inPacuTime + "] 小于 【出手术室】时间 [" + operMaster.OUT_DATE_TIME + "],请重新输入!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return(false); } } } if (operatingRoomList != null && operatingRoomList.Count > 0) { List <string> bedNos = new List <string>(); operatingRoomList.ForEach(row => { if (!string.IsNullOrEmpty(row.BED_TYPE) && row.BED_TYPE.Equals("1")) { bedNos.Add(row.ROOM_NO); } }); } if (string.IsNullOrEmpty(PacuRoom)) { return(false); } bool isUpdate = new OperatingRoomRepository().SetOperatingRoomPatient(operatingRoomList, PacuRoom, ExtendApplicationContext.Current.OperRoom, _patientID, _visitID, _operID); if (isUpdate) { new OperatingRoomRepository().SetOperMaster(_patientID, _visitID, _operID, "IN_PACU_DATE_TIME", inPacuTime, 45); new OperatingRoomRepository().SetMonitorDictPatient("1", ExtendApplicationContext.Current.OperRoom, PacuRoom, _patientID, _visitID, _operID); _patientCard.OPER_STATUS_CODE = 45; _patientCard.IN_PACU_DATE_TIME = inPacuTime; ExtendApplicationContext.Current.PatientInformationExtend = _patientCard; } else { MessageBoxFormPC.Show("床位被占用,请重新选择", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(isUpdate); } else { return(false); } return(true); }