Example #1
0
        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);
        }
Example #2
0
        private void InitTaskList()
        {
            using (BackgroundWorker worker = new BackgroundWorker())
            {
                worker.DoWork += delegate(object sender, DoWorkEventArgs e)
                {
                    if (null == ExtendApplicationContext.Current.CommDict.EventDict)
                    {
                        ExtendApplicationContext.Current.CommDict.EventDict = comnDictRepository.GetEventDictList().Data;
                    }
                    if (null == ExtendApplicationContext.Current.CommDict.UnitDictExt)
                    {
                        ExtendApplicationContext.Current.CommDict.UnitDictExt = comnDictRepository.GetUnitDictList().Data;
                    }
                    if (ExtendApplicationContext.Current.CommDict.AdministrationDictExt == null)
                    {
                        ExtendApplicationContext.Current.CommDict.AdministrationDictExt = comnDictRepository.GetAdminstrationDictList().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.HisUsersDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.HisUsersDict = comnDictRepository.GetHisUsersList().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.DeptDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.DeptDict = comnDictRepository.GetDeptDictList().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.OperationRoomDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.OperationRoomDict = comnDictRepository.GetAllOperatingRoomList().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.AnesInputDictDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.AnesInputDictDict = comnDictRepository.GetAnesInputDictList(null).Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.BloodGasDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.BloodGasDict = comnDictRepository.GetBloodGasDictList().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.WardDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.WardDict = comnDictRepository.GetWardDictList().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.EventDictExt == null)
                    {
                        ExtendApplicationContext.Current.CommDict.EventDictExt = comnDictRepository.GetAnesEventDictExt().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.ConfigDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.ConfigDict = comnDictRepository.GetConfig().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.HosotalConfigDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.HosotalConfigDict = comnDictRepository.GetHosotalConfig().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.AnesMethodDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.AnesMethodDict = comnDictRepository.GetAnesMethodDictList().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.DiagnosisDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.DiagnosisDict = comnDictRepository.GetDiagDictList().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.OperationNameDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.OperationNameDict = comnDictRepository.GetOperNameDictList().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.MonitorDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.MonitorDict = comnDictRepository.GetMonitorDictList().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.MonitorFuntionDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.MonitorFuntionDict = comnDictRepository.GetMonitorFuctionCodeList().Data;
                    }
                };
                worker.RunWorkerAsync();
            };
        }