/// <summary> /// 加载所需字典数据 /// </summary> private void CustomLoadDictData() { // 快速切换进入,需要重新设置数据源,不然界面上无法显示 if (null != this._drugDictData) { this.DrugDictData.Clear(); this.DrugDictData = null; this.AnesEvent.Clear(); this.AnesEvent = null; this.DosageUnitDict.Clear(); this.DosageUnitDict = null; this.SpeedUnitDict.Clear(); this.SpeedUnitDict = null; this.ConcentrationUnitDict.Clear(); this.ConcentrationUnitDict = null; this.AdministrationDict.Clear(); this.AdministrationDict = null; } _drugDictData = AILearnInputUtil.GetSortedList(ApplicationModel.Instance.AllDictList.EventDictList, ApplicationModel.Instance.AllDictList.EventSortList); List <MED_ADMINISTRATION_DICT> tempAdminDict = new List <MED_ADMINISTRATION_DICT>(ApplicationModel.Instance.AllDictList.AdministrationDictList); if (tempAdminDict[0].ADMINISTRATION_NAME != "") { MED_ADMINISTRATION_DICT item = new MED_ADMINISTRATION_DICT(); item.ADMINISTRATION_NAME = ""; item.ADMINISTRATION_CODE = ""; tempAdminDict.Insert(0, item); } List <MED_UNIT_DICT> tempDosageUnitDict = ApplicationModel.Instance.AllDictList.UnitDictList.Where(x => x.UNIT_TYPE == 3).ToList(); List <MED_UNIT_DICT> tempSpeedUnitDict = ApplicationModel.Instance.AllDictList.UnitDictList.Where(x => x.UNIT_TYPE == 2).ToList(); List <MED_UNIT_DICT> tempConcentrationUnitDict = ApplicationModel.Instance.AllDictList.UnitDictList.Where(x => x.UNIT_TYPE == 1).ToList(); if (tempDosageUnitDict[0].UNIT_NAME != "") { MED_UNIT_DICT item = new MED_UNIT_DICT(); item.UNIT_NAME = ""; item.UNIT_CODE = ""; tempDosageUnitDict.Insert(0, item); tempSpeedUnitDict.Insert(0, item); tempConcentrationUnitDict.Insert(0, item); } this.AdministrationDict = tempAdminDict; this.DosageUnitDict = tempDosageUnitDict; this.SpeedUnitDict = tempSpeedUnitDict; this.ConcentrationUnitDict = tempConcentrationUnitDict; }
public static void SaveAdministrationDict(string type) { List <MED_ANESTHESIA_INPUT_DICT> inputDict = DictService.ClientInstance.GetAnesthesiaInputDictList(type); List <MED_ADMINISTRATION_DICT> adminDict = DictService.ClientInstance.GetAdminstrationDictList(); adminDict.Clear(); int index = 1; if (inputDict != null && inputDict.Count > 0) { foreach (MED_ANESTHESIA_INPUT_DICT dict in inputDict) { MED_ADMINISTRATION_DICT admRow = new MED_ADMINISTRATION_DICT(); admRow.ADMINISTRATION_CODE = index.ToString(); admRow.ADMINISTRATION_NAME = dict.ITEM_NAME; admRow.ADMINISTRATION_ABBR = dict.ITEM_NAME; index++; adminDict.Add(admRow); } } DictService.ClientInstance.SaveAdministrationList(adminDict); }
public void SaveAdministrationDict(string type) { List <MED_ANESTHESIA_INPUT_DICT> inputDict = comnDictRepository.GetAnesInputDictList(type).Data; List <MED_ADMINISTRATION_DICT> adminDict = comnDictRepository.GetAdminstrationDictList().Data; adminDict.Clear(); int index = 1; if (inputDict != null && inputDict.Count > 0) { foreach (MED_ANESTHESIA_INPUT_DICT dict in inputDict) { MED_ADMINISTRATION_DICT admRow = new MED_ADMINISTRATION_DICT(); admRow.ADMINISTRATION_CODE = index.ToString(); admRow.ADMINISTRATION_NAME = dict.ITEM_NAME; admRow.ADMINISTRATION_ABBR = dict.ITEM_NAME; index++; adminDict.Add(admRow); } } comnDictRepository.SaveAdministrationDict(adminDict); }
public RequestResult <int> EditAdministrationDict(int type, MED_ADMINISTRATION_DICT AdministrationDict) { return(Success(sysConfig.EditAdministrationDict(type, AdministrationDict))); }