Esempio n. 1
0
        /// <summary>
        /// 设置麻醉事件排序值
        /// </summary>
        private void SetEventSortValue(MED_ANESTHESIA_EVENT row)
        {
            MED_EVENT_SORT tempSortData = ApplicationModel.Instance.AllDictList.EventSortList.Where(p => p.EVENT_ITEM_CODE == row.EVENT_ITEM_CODE && p.EVENT_CLASS_CODE == row.EVENT_CLASS_CODE).FirstOrDefault();

            if (tempSortData != null)
            {
                tempSortData.SORT_NO    += 1;
                tempSortData.ModelStatus = ModelStatus.Modeified;
            }
            else
            {
                tempSortData = new MED_EVENT_SORT
                {
                    EVENT_CLASS_CODE = row.EVENT_CLASS_CODE,
                    EVENT_ITEM_CODE  = row.EVENT_ITEM_CODE,
                    EVENT_ITEM_NAME  = row.EVENT_ITEM_NAME,
                    USER_ID          = ExtendAppContext.Current.LoginUser.USER_JOB_ID,
                    SORT_NO          = 1,
                    ModelStatus      = ModelStatus.Add
                };
                ApplicationModel.Instance.AllDictList.EventSortList.Add(tempSortData);
            }

            // 设置选中到最后一项
            if (this.AnesEvent.Count > 0)
            {
                this.SelectedIndex = this.AnesEvent.Count - 1;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 设置麻醉事件排序值
        /// </summary>
        private void SetEventSortValue(MED_ANESTHESIA_EVENT row)
        {
            // MED_EVENT_DICT tempEventData = listInfo.Where(p => p.EVENT_ITEM_CODE == this.selectEvent.EVENT_ITEM_CODE && p.EVENT_CLASS_CODE == _strClassCode).FirstOrDefault();
            MED_EVENT_SORT tempSortData = ExtendApplicationContext.Current.CommDict.EventSortDict.Where(p => p.EVENT_ITEM_CODE == row.EVENT_ITEM_CODE && p.EVENT_CLASS_CODE == row.EVENT_CLASS_CODE).FirstOrDefault();

            // if (tempEventData != null) tempEventData.SORT_NO += 1;EVENT_ITEM_CODE EVENT_ITEM_NAME USER_ID SORT_NO
            if (tempSortData != null)
            {
                tempSortData.SORT_NO += 1;
            }
            else
            {
                tempSortData = new MED_EVENT_SORT();
                tempSortData.EVENT_CLASS_CODE = row.EVENT_CLASS_CODE;
                tempSortData.EVENT_ITEM_CODE  = row.EVENT_CLASS_CODE;
                tempSortData.EVENT_ITEM_NAME  = row.EVENT_ITEM_NAME;
                tempSortData.USER_ID          = ExtendApplicationContext.Current.LoginUser.USER_JOB_ID;
                tempSortData.SORT_NO          = 1;
                ExtendApplicationContext.Current.CommDict.EventSortDict.Add(tempSortData);
            }
        }