public DataTable GetDictDataByTableName(string tableName) { DataTable data = null; switch (tableName) { case "MED_MONITOR_FUNCTION_CODE": data = ModelHelper <MED_MONITOR_FUNCTION_CODE> .ConvertListToDataTable(comnDictRepository.GetMonitorFuctionCodeList().Data); break; case "MED_EVENT_DICT": data = ModelHelper <MED_EVENT_DICT> .ConvertListToDataTable(comnDictRepository.GetEventDictList().Data); break; case "MED_EVENT_DICT_EXT": data = ModelHelper <MED_EVENT_DICT_EXT> .ConvertListToDataTable(comnDictRepository.GetAnesEventDictExt().Data); break; case "MED_UNIT_DICT": data = ModelHelper <MED_UNIT_DICT> .ConvertListToDataTable(comnDictRepository.GetUnitDictList().Data); break; case "MED_ADMINISTRATION_DICT": data = ModelHelper <MED_ADMINISTRATION_DICT> .ConvertListToDataTable(comnDictRepository.GetAdminstrationDictList().Data); break; case "MED_EVENT_SORT": data = ModelHelper <MED_EVENT_SORT> .ConvertListToDataTable(comnDictRepository.GetEventSortList(ExtendApplicationContext.Current.LoginUser.LOGIN_NAME).Data); break; case "MED_HIS_USERS": data = ModelHelper <MED_HIS_USERS> .ConvertListToDataTable(comnDictRepository.GetHisUsersList().Data); break; case "MED_DEPT_DICT": data = ModelHelper <MED_DEPT_DICT> .ConvertListToDataTable(comnDictRepository.GetDeptDictList().Data); break; case "MED_OPERATING_ROOM": data = ModelHelper <MED_OPERATING_ROOM> .ConvertListToDataTable(comnDictRepository.GetOperatingRoomList("0").Data); break; case "MED_ANESTHESIA_INPUT_DICT": data = ModelHelper <MED_ANESTHESIA_INPUT_DICT> .ConvertListToDataTable(comnDictRepository.GetAnesInputDictList(null).Data); break; case "MED_BLOOD_GAS_DICT": data = ModelHelper <MED_BLOOD_GAS_DICT> .ConvertListToDataTable(comnDictRepository.GetBloodGasDictList().Data); break; case "MED_WARD_DICT": data = ModelHelper <MED_WARD_DICT> .ConvertListToDataTable(comnDictRepository.GetWardDictList().Data); break; case "MED_ANESTHESIA_DICT": data = ModelHelper <MED_ANESTHESIA_DICT> .ConvertListToDataTable(comnDictRepository.GetAnesMethodDictList().Data); break; case "MED_MONITOR_DICT": data = ModelHelper <MED_MONITOR_DICT> .ConvertListToDataTable(comnDictRepository.GetMonitorDictList().Data); break; case "MED_PAT_MONITOR_DATA_DICT": data = ModelHelper <MED_PAT_MONITOR_DATA_DICT> .ConvertListToDataTable(comnDictRepository.GetPatMonitorDict().Data); break; } return(data); }
private void AnesthesiaEventDictSelectorLoad() { // this.Location = floatLocation; EventName = string.IsNullOrEmpty(EventName) ? "ALL" : EventName; ClearButton(); if (anesClassTypes.ContainsKey(EventName) || AnesEventType.CPBEventType.ContainsKey(EventName) || EventName.Equals("ALL"))// { if (ExtendApplicationContext.Current.SystemStatus == ProgramStatus.CPBReport) { _isEvent = EventName.Equals("事件"); } else if (EventName.Equals("ALL")) { _isEvent = true; } else { _isEvent = ("234BCX".IndexOf(anesClassTypes[EventName]) < 0); } // timeEvent.Value = DateTime.Now; listEventSortList = ExtendApplicationContext.Current.CommDict.EventSortDict; if (listEventSortList.Count == 0) { listEventSortList = comnDictRepository.GetEventSortList("MDSD").Data; ExtendApplicationContext.Current.CommDict.EventSortDict = listEventSortList; } if (!dataSet.Tables.Contains(EventName)) { string itemClass = ""; DataTable dataTable = null; if (EventName.Equals("呼吸")) { dataTable = ModelHelper <MED_EVENT_DICT> .ConvertListToDataTable(new AnesEventRepository().GetAnesEventDictByhuxi().Data); for (int i = 0; i < dataTable.Rows.Count; i++) { if (dataTable.Rows[i]["EVENT_ITEM_NAME"].ToString() == "辅助呼吸") { dataTable.Rows[i]["EVENT_CLASS_CODE"] = "9"; } else if (dataTable.Rows[i]["EVENT_ITEM_NAME"].ToString() == "控制呼吸") { dataTable.Rows[i]["EVENT_CLASS_CODE"] = "A"; } else if (dataTable.Rows[i]["EVENT_ITEM_NAME"].ToString() == "自主呼吸") { dataTable.Rows[i]["EVENT_CLASS_CODE"] = "Y"; } } } else if (EventName.Equals("ALL")) { List <MED_EVENT_DICT> eventList = ExtendApplicationContext.Current.CommDict.EventDict.OrderByDescending(p => p.SORT_NO).ToList(); dataTable = ModelHelper <MED_EVENT_DICT> .ConvertListToDataTable(eventList); } else { itemClass = anesClassTypes[EventName]; List <MED_EVENT_DICT> eventList = ExtendApplicationContext.Current.CommDict.EventDict.Where(p => p.EVENT_CLASS_CODE == itemClass).ToList(); eventList = AILearnInputUtil.GetSortedList(eventList, ExtendApplicationContext.Current.CommDict.EventSortDict, itemClass); dataTable = ModelHelper <MED_EVENT_DICT> .ConvertListToDataTable(eventList); } dataSet.Tables.Add(dataTable); dataTable.TableName = EventName; } ReSetDictIndexList(searchTextBox.CurrentText); // CalcPage(); AddDosageButton(0); if (!EventName.Equals("ALL")) { AddPageButton(); } foreach (Control control in panelBody.Controls) { if (control is Button && !control.Text.Equals("?")) { control.Visible = true; } } } }