コード例 #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;
            }
        }
コード例 #2
0
 /// <summary>
 /// 构造方法
 /// </summary>
 /// <param name="startTime">开始时间</param>
 /// <param name="endTime">结束时间</param>
 /// <param name="text">文本(名称)</param>
 /// <param name="value">值</param>
 /// <param name="unit">单位</param>
 /// <param name="route">途径</param>
 public MedAnesSheetDetailPoint(DateTime startTime, DateTime endTime, string text, double value, string unit, string route, MED_ANESTHESIA_EVENT row)
     : this(startTime, text, value, unit, route, row)
 {
     _endTime   = endTime;
     _datarow   = row;
     _pointType = PointType.ProLonged;
 }
コード例 #3
0
 /// <summary>
 /// 构造方法
 /// </summary>
 /// <param name="text">文本(名称)</param>
 /// <param name="value">值</param>
 /// <param name="unit">单位</param>
 public MedAnesSheetDetailPoint(string text, double value, string unit, MED_ANESTHESIA_EVENT row)
 {
     _text    = text;
     _value   = value;
     _unit    = unit;
     _datarow = row;
 }
コード例 #4
0
        /// <summary>
        /// 删除麻醉事件
        /// </summary>
        /// <returns><![CDATA[RequestResult<string>]]></returns>
        public bool DelAnesEvent(MED_ANESTHESIA_EVENT item)
        {
            bool result = dapper.Set <MED_ANESTHESIA_EVENT>().Delete(item);

            dapper.SaveChanges();

            return(result);
        }
コード例 #5
0
 /// <summary>
 /// 构造方法
 /// </summary>
 /// <param name="startTime">开始时间</param>
 /// <param name="text">文本(名称)</param>
 /// <param name="value">值</param>
 /// <param name="unit">单位</param>
 /// <param name="route">途径</param>
 public MedAnesSheetDetailPoint(DateTime startTime, string text, double value, string unit, string route, MED_ANESTHESIA_EVENT row)
     : this(startTime, text, row)
 {
     _value   = value;
     _unit    = unit;
     _route   = route;
     _datarow = row;
 }
コード例 #6
0
 private void _anesthesiaEventDictSelector_ItemSelected(object sender, EventArgs e)
 {
     if (sender is DataGridViewRow)
     {
         MED_ANESTHESIA_EVENT row = AddRow(sender);
         if (_anesthesiaEventsEditor != null)
         {
             _anesthesiaEventsEditor.RefreshRow(row);
         }
     }
 }
コード例 #7
0
        /// <summary>
        /// 创建一条新的事件记录
        /// </summary>
        public MED_ANESTHESIA_EVENT NewAnesthesiaEventRow(List <MED_ANESTHESIA_EVENT> anesthestaEventDataTable, string eventNo)
        {
            int maxItemNo            = GetMaxItemNO(anesthestaEventDataTable);
            MED_ANESTHESIA_EVENT row = new MED_ANESTHESIA_EVENT();

            row.PATIENT_ID = ExtendAppContext.Current.PatientInformationExtend.PATIENT_ID;
            row.VISIT_ID   = ExtendAppContext.Current.PatientInformationExtend.VISIT_ID;
            row.OPER_ID    = ExtendAppContext.Current.PatientInformationExtend.OPER_ID;
            row.EVENT_NO   = eventNo;
            row.ITEM_NO    = maxItemNo;
            return(row);
        }
コード例 #8
0
        static ShowHelper()
        {
            MED_ANESTHESIA_EVENT anesEvent = new MED_ANESTHESIA_EVENT();

            //反射获取该类的信息
            System.Reflection.PropertyInfo[] properties = anesEvent.GetType().GetProperties(System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public);

            foreach (System.Reflection.PropertyInfo item in properties)
            {
                _propertyNames.Add(item.Name);
            }
        }
コード例 #9
0
        /// <summary>
        /// 删除事件
        /// </summary>
        private void ButtonDeleteItem_Click(object sender, RoutedEventArgs e)
        {
            if (sender != null && sender is Button)
            {
                DataGridRow          rw       = DataGridRow.GetRowContainingElement(sender as FrameworkElement);
                MED_ANESTHESIA_EVENT eventRow = rw.Item as MED_ANESTHESIA_EVENT;
                this.dg.SelectedItem = eventRow;
            }

            int rowIndex = this.dg.SelectedIndex;

            this.anesEventEditorViewModel.DeleteItemClick.Execute(this.dg.SelectedItem);
            this.ResetDataGridSelected(rowIndex);
        }
コード例 #10
0
        /// <summary>
        /// 鼠标Leave事件:响应当前时间设置成开始时间和结束时间
        /// </summary>
        private void MedGridGraph_MouseLeave(object sender, MouseEventArgs e)
        {
            RectangleF rectf = _currentGraph.GetMainRect();

            if (!rectf.Contains(e.Location.X, e.Location.Y))
            {
                return;
            }

            _currentGraph.SetMousePosition(e.Location);
            string eventNo = ExtendApplicationContext.Current.EventNo;

            if (Selectpt != null)
            {
                _currentTime = _currentGraph.MouseTime;
                MED_ANESTHESIA_EVENT eventRow = null;
                int Line = (int)Math.Ceiling((double)e.Location.Y / _currentGraph.Height * _currentGraph.Rows.Count);
                List <MED_ANESTHESIA_EVENT> anesEvent = ModelHelper <MED_ANESTHESIA_EVENT> .ConvertDataTableToList(this.DataSource["AnesthesiaEvent"]);

                foreach (MED_ANESTHESIA_EVENT row in anesEvent)
                {
                    if (row.EVENT_ITEM_NAME.Equals(_currentGraph.Rows[Line - 1].Text) && row.START_TIME.HasValue && row.START_TIME == Selectpt.Time)
                    {
                        eventRow = row;
                        break;
                    }
                }

                if (eventRow != null)
                {
                    if (eventRow.DURATIVE_INDICATOR.HasValue && eventRow.DURATIVE_INDICATOR == 1)
                    {
                        eventRow.END_TIME = _currentTime;
                    }
                    else
                    {
                        eventRow.START_TIME = _currentTime;
                    }
                }

                operationInfoRepository.SaveAnesthesiaEventList(anesEvent);
                RefreshData();
                _currentGraph.Refresh();
            }

            Selectpt = null;
        }
コード例 #11
0
        /// <summary>
        /// 鼠标Leave事件
        /// </summary>
        private void MedDrugGraph_MouseLeave(object sender, MouseEventArgs e)
        {
            RectangleF rectf = _currentGraph.GetMainRect();

            if (!rectf.Contains(e.Location.X, e.Location.Y))
            {
                return;
            }

            _currentGraph.SetMousePosition(e.Location);
            string eventNo = ExtendAppContext.Current.EventNo;

            if (Selectpt != null)
            {
                _currentTime = _currentGraph.MouseTime;
                MED_ANESTHESIA_EVENT eventRow = null;
                int Line = (int)Math.Ceiling(((double)e.Location.Y - _currentGraph.TopOffSet) / _currentGraph.Height * _currentGraph.LineParameters.Count);
                List <MED_ANESTHESIA_EVENT> anesEvent = new ModelHandler <MED_ANESTHESIA_EVENT>().FillModel(this.DataSource["AnesthesiaEvent"]);
                foreach (MED_ANESTHESIA_EVENT row in anesEvent)
                {
                    if (row.EVENT_ITEM_NAME.Equals(_currentGraph.Curves[Line - 1].Text) && row.START_TIME.HasValue && row.START_TIME == Selectpt.StartTime)
                    {
                        eventRow = row;
                        break;
                    }
                }

                if (eventRow != null)
                {
                    if (eventRow.DURATIVE_INDICATOR.HasValue && eventRow.DURATIVE_INDICATOR == 1)
                    {
                        eventRow.END_TIME = _currentTime;
                    }
                    else
                    {
                        eventRow.START_TIME = _currentTime;
                    }
                }

                AnesInfoService.ClientInstance.UpadteAnesthesiaEvent(anesEvent);
                this.RefreshData();
                this._currentGraph.Refresh();
            }

            this.Selectpt             = null;
            this._currentGraph.Cursor = Cursors.Default;
        }
コード例 #12
0
        private void lblDosage_Click(object sender, MouseEventArgs e)
        {
            Label lbl = sender as Label;

            if (!lbl.Text.Equals("?"))
            {
                ItemAdd(Convert.ToInt32(lbl.Tag), lbl.Text);
                if (items.Count > 0)
                {
                    foreach (EventInfo info in items)
                    {
                        MED_ANESTHESIA_EVENT row = _anesthesiaEventsEditor.AddRow(info.ItemClass, info.ItemName, info.ItemSpec, info.ItemCode, info.Administrator, (decimal)info.Concentration
                                                                                  , info.ConcentrationUnit, (decimal)info.Dosage, info.DosageUnits, (decimal)info.PerformSpeed, info.SpeedUnit, ExtendApplicationContext.Current.LoginUser.USER_JOB_ID, info.Event_Attr, (int)info.DuractiveIndicator);
                        SetEventSortValue(row);
                    }
                    items.Clear();
                }
            }
        }
コード例 #13
0
        public static MED_ANESTHESIA_EVENT CopyAnesthesiaEventRow(List <MED_ANESTHESIA_EVENT> anesthestaEventDataTable
                                                                  , MED_PAT_INFO patientContext, string eventNo, MED_ANESTHESIA_EVENT sourceRow)
        {
            MED_ANESTHESIA_EVENT row = NewAnesthesiaEventRow(anesthestaEventDataTable, patientContext, eventNo);

            row.EVENT_CLASS_CODE   = sourceRow.EVENT_CLASS_CODE;
            row.EVENT_ITEM_NAME    = sourceRow.EVENT_ITEM_NAME;
            row.EVENT_ITEM_SPEC    = sourceRow.EVENT_ITEM_SPEC;
            row.EVENT_ITEM_CODE    = sourceRow.EVENT_ITEM_CODE;
            row.ADMINISTRATOR      = sourceRow.ADMINISTRATOR;
            row.CONCENTRATION      = sourceRow.CONCENTRATION;
            row.CONCENTRATION_UNIT = sourceRow.CONCENTRATION_UNIT;
            row.DOSAGE             = sourceRow.DOSAGE;
            row.DOSAGE_UNITS       = sourceRow.DOSAGE_UNITS;
            row.PERFORM_SPEED      = sourceRow.PERFORM_SPEED;
            row.SPEED_UNIT         = sourceRow.SPEED_UNIT;
            row.PERFORM_SPEED      = sourceRow.PERFORM_SPEED;
            row.EVENT_ATTR         = sourceRow.EVENT_ATTR;
            return(row);
        }
コード例 #14
0
        public static MED_ANESTHESIA_EVENT NewAnesthesiaEventRow(List <MED_ANESTHESIA_EVENT> anesthestaEventDataTable, MED_PAT_INFO patientContext, string eventNo)
        {
            int      maxItemNo = 0;
            DateTime dt        = DateTime.MaxValue;

            if (anesthestaEventDataTable != null && anesthestaEventDataTable.Count > 0)
            {
                anesthestaEventDataTable.ForEach(dataRow =>
                {
                    if (dataRow.ITEM_NO > maxItemNo)
                    {
                        maxItemNo = dataRow.ITEM_NO;
                    }
                    if (dataRow.START_TIME.HasValue && dataRow.START_TIME.Value < dt)
                    {
                        dt = dataRow.START_TIME.Value;
                    }
                });
            }
            if (dt == DateTime.MaxValue)
            {
                dt = DateTime.Now;
            }
            maxItemNo++;
            MED_ANESTHESIA_EVENT row = new MED_ANESTHESIA_EVENT();

            row.PATIENT_ID = patientContext.PATIENT_ID;
            row.VISIT_ID   = patientContext.VISIT_ID;
            row.OPER_ID    = patientContext.OPER_ID;
            row.EVENT_NO   = eventNo;
            row.ITEM_NO    = maxItemNo;
            DateTime dt1 = DateTime.Now;

            row.START_TIME = new DateTime(dt.Year, dt.Month, dt.Day, dt1.Hour, dt1.Minute, 0);
            dt             = new DateTime(dt.Year, dt.Month, dt.Day, dt.Hour, dt.Minute, 0);
            if (row.START_TIME < dt)
            {
                row.START_TIME = row.START_TIME.Value.AddDays(1);
            }
            return(row);
        }
コード例 #15
0
        /// <summary>
        /// 删除数据
        /// </summary>
        protected override bool DeleteData()
        {
            bool result = false;

            if (_selectItem != null)
            {
                // 在删除后selectindex会变动,所以在这声明一个临时变量记录
                int tempSelectIndex = this.SelectedIndex;

                MED_ANESTHESIA_EVENT data = tmpAnesEvent.Single(x => x.PATIENT_ID == _selectItem.PATIENT_ID &&
                                                                x.VISIT_ID == _selectItem.VISIT_ID &&
                                                                x.OPER_ID == _selectItem.OPER_ID &&
                                                                x.ITEM_NO == _selectItem.ITEM_NO &&
                                                                x.EVENT_NO == _selectItem.EVENT_NO);
                MED_ANESTHESIA_EVENT data2 = AnesEvent.Single(x => x.PATIENT_ID == _selectItem.PATIENT_ID &&
                                                              x.VISIT_ID == _selectItem.VISIT_ID &&
                                                              x.OPER_ID == _selectItem.OPER_ID &&
                                                              x.ITEM_NO == _selectItem.ITEM_NO &&
                                                              x.EVENT_NO == _selectItem.EVENT_NO);
                if (data.ModelStatus != ModelStatus.Add)
                {
                    data.ModelStatus = ModelStatus.Deleted;
                    AnesEvent.Remove(data2);
                }
                else
                {
                    tmpAnesEvent.Remove(data);
                    AnesEvent.Remove(data2);
                }

                result = true;
                Messenger.Default.Send <object>(tempSelectIndex, EnumMessageKey.ResetOperationMedNoteControlFocus);
            }
            else
            {
                this.ShowMessageBox("当前选中项为空,请重新操作!", MessageBoxButton.OK, MessageBoxImage.Information);
                Messenger.Default.Send <object>(this, EnumMessageKey.ResetOperationMedNoteControlFocus);
            }

            return(result);
        }
コード例 #16
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);
            }
        }
コード例 #17
0
        private void btnDosage_Click(object sender, MouseEventArgs e)
        {
            Button simpleButton = sender as Button;

            if (e.Button == MouseButtons.Right)
            {
                ContextMenuStrip  menu = new ContextMenuStrip();
                ToolStripMenuItem item = new ToolStripMenuItem("药品查询");
                item.Click += new EventHandler(delegate(object sender1, EventArgs e1)
                {
                    AcsContent acsContent = new AcsContent();
                    string strSearch      = "";
                    DataRow row           = dataSet.Tables[EventName].Rows[_dictIndexList[(int)(simpleButton.Tag)]];
                    strSearch             = row["EVENT_ITEM_NAME"].ToString();
                    acsContent.SetContextKeyWords(strSearch);
                    DialogHostFormPC dialog = new DialogHostFormPC("临床麻醉知识查询", acsContent.Width, acsContent.Height);
                    dialog.ShowDialog();
                });
                menu.Items.Add(item);
                menu.Show(Control.MousePosition);
            }
            else
            {
                if (!simpleButton.Text.Equals("?"))
                {
                    ItemAdd(Convert.ToInt32(simpleButton.Tag), simpleButton.Text);
                    if (items.Count > 0)
                    {
                        foreach (EventInfo info in items)
                        {
                            MED_ANESTHESIA_EVENT row = _anesthesiaEventsEditor.AddRow(info.ItemClass, info.ItemName, info.ItemSpec, info.ItemCode, info.Administrator, (decimal)info.Concentration
                                                                                      , info.ConcentrationUnit, (decimal)info.Dosage, info.DosageUnits, (decimal)info.PerformSpeed, info.SpeedUnit, ExtendApplicationContext.Current.LoginUser.USER_JOB_ID, info.Event_Attr, (int)info.DuractiveIndicator);
                            SetEventSortValue(row);
                        }
                        items.Clear();
                    }
                }
            }
        }
コード例 #18
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     try
     {
         if (items.Count > 0)
         {
             foreach (EventInfo info in items)
             {
                 MED_ANESTHESIA_EVENT row = _anesthesiaEventsEditor.AddRow(info.ItemClass, info.ItemName, info.ItemSpec, info.ItemCode, info.Administrator, (decimal)info.Concentration
                                                                           , info.ConcentrationUnit, (decimal)info.Dosage, info.DosageUnits, (decimal)info.PerformSpeed, info.SpeedUnit, ExtendApplicationContext.Current.LoginUser.USER_JOB_ID, info.Event_Attr);
                 if (row != null)
                 {
                     row.START_TIME         = timeEvent.Value;
                     row.DURATIVE_INDICATOR = (int)info.DuractiveIndicator;
                 }
             }
             items.Clear();
         }
     }
     catch (Exception ex)
     {
         ExceptionHandler.Handle(ex);
     }
 }
コード例 #19
0
        /// <summary>
        /// 删除麻醉事件
        /// </summary>
        /// <returns><![CDATA[RequestResult<string>]]></returns>

        public RequestResult <bool> DelAnesEvent(MED_ANESTHESIA_EVENT item)
        {
            string address = "PacuAnesEvent/DelAnesEvent";

            return(BaseRepository.PostCallApi <MED_ANESTHESIA_EVENT, bool>(address, item));
        }
コード例 #20
0
 public RequestResult <bool> DelAnesEvent(MED_ANESTHESIA_EVENT item)
 {
     return(Success(_anesEventDataService.DelAnesEvent(item)));
 }
コード例 #21
0
 public RequestResult <bool> DeleteAnesthesiaEventRow(MED_ANESTHESIA_EVENT anesEventRow)
 {
     return(Success(_anesInfoService.DeleteAnesthesiaEventRow(anesEventRow)));
 }
コード例 #22
0
        /// <summary>
        /// 重写加载方法
        /// </summary>
        public override void LoadData()
        {
            this.CustomLoadDictData();

            tmpDrugDictData = _drugDictData;
            _anesEvent      = new ObservableCollection <MED_ANESTHESIA_EVENT>(AnesInfoService.ClientInstance.GetAnesthesiaEventByEventNo(_patientID, _visitID, _operID, _eventNo).OrderBy(x => x.START_TIME));

            tmpAnesEvent = _anesEvent;
            if (paramaterData != null)
            {
                if (paramaterData is IntakeAndOutputClickData)
                {
                    if (paramaterData.InAndOutType == IntakeAndOutputType.Medicine)
                    {
                        AnesEvent    = new ObservableCollection <MED_ANESTHESIA_EVENT>(_anesEvent.Where(x => x.EVENT_CLASS_CODE == "4" || x.EVENT_CLASS_CODE == "2" || x.EVENT_CLASS_CODE == "C").ToList());
                        DrugDictData = _drugDictData.Where(x => x.EVENT_CLASS_CODE == "4" || x.EVENT_CLASS_CODE == "2" || x.EVENT_CLASS_CODE == "C").ToList();
                    }
                    else if (paramaterData.InAndOutType == IntakeAndOutputType.Output)
                    {
                        AnesEvent    = new ObservableCollection <MED_ANESTHESIA_EVENT>(_anesEvent.Where(x => x.EVENT_CLASS_CODE == "D").ToList());
                        DrugDictData = _drugDictData.Where(x => x.EVENT_CLASS_CODE == "D").ToList();
                    }
                    else if (paramaterData.InAndOutType == IntakeAndOutputType.Infusion)
                    {
                        AnesEvent    = new ObservableCollection <MED_ANESTHESIA_EVENT>(_anesEvent.Where(x => x.EVENT_CLASS_CODE == "3" || x.EVENT_CLASS_CODE == "B").ToList());
                        DrugDictData = _drugDictData.Where(x => x.EVENT_CLASS_CODE == "3" || x.EVENT_CLASS_CODE == "B").ToList();
                    }
                }
                else if (paramaterData is string)
                {
                    switch ((string)paramaterData)
                    {
                    case KeyCode.AppCode.AnesDrug:
                        AnesEvent = new ObservableCollection <MED_ANESTHESIA_EVENT>(
                            _anesEvent.Where(x => x.EVENT_CLASS_CODE == "2").ToList());
                        DrugDictData = _drugDictData.Where(x => x.EVENT_CLASS_CODE == "2").ToList();
                        break;

                    case KeyCode.AppCode.Drug:
                        AnesEvent = new ObservableCollection <MED_ANESTHESIA_EVENT>(
                            _anesEvent.Where(x => x.EVENT_CLASS_CODE == "C").ToList());
                        DrugDictData = _drugDictData.Where(x => x.EVENT_CLASS_CODE == "C").ToList();
                        break;

                    case KeyCode.AppCode.InLiquid:
                        AnesEvent = new ObservableCollection <MED_ANESTHESIA_EVENT>(
                            _anesEvent.Where(x => x.EVENT_CLASS_CODE == "3").ToList());
                        DrugDictData = _drugDictData.Where(x => x.EVENT_CLASS_CODE == "3").ToList();
                        break;

                    case KeyCode.AppCode.Breath:
                        AnesEvent = new ObservableCollection <MED_ANESTHESIA_EVENT>(
                            _anesEvent.Where(x => x.EVENT_CLASS_CODE == "Y" || x.EVENT_CLASS_CODE == "A" ||
                                             x.EVENT_CLASS_CODE == "9").ToList());
                        DrugDictData = _drugDictData.Where(x => x.EVENT_CLASS_CODE == "Y" ||
                                                           x.EVENT_CLASS_CODE == "A" || x.EVENT_CLASS_CODE == "9").ToList();

                        // 隐藏途径列,把剂量列的表头设置成频率
                        this.IsShowAdministratorColumn = false;
                        this.StrDosageColumnHeader     = "频率";
                        break;

                    case KeyCode.AppCode.Oxygen:
                        AnesEvent = new ObservableCollection <MED_ANESTHESIA_EVENT>(
                            _anesEvent.Where(x => x.EVENT_CLASS_CODE == "4").ToList());
                        DrugDictData = _drugDictData.Where(x => x.EVENT_CLASS_CODE == "4").ToList();
                        NormalMode   = true;
                        break;

                    case KeyCode.AppCode.Blood:
                        AnesEvent = new ObservableCollection <MED_ANESTHESIA_EVENT>(
                            _anesEvent.Where(x => x.EVENT_CLASS_CODE == "B").ToList());
                        DrugDictData = _drugDictData.Where(x => x.EVENT_CLASS_CODE == "B").ToList();
                        break;

                    case KeyCode.AppCode.OutLiquid:
                        AnesEvent = new ObservableCollection <MED_ANESTHESIA_EVENT>(
                            _anesEvent.Where(x => x.EVENT_CLASS_CODE == "D").ToList());
                        DrugDictData = _drugDictData.Where(x => x.EVENT_CLASS_CODE == "D").ToList();
                        break;
                    }
                }
                else if (paramaterData is List <MED_ANESTHESIA_EVENT_TEMPLET> )
                {
                    var maxEventNo = 0;
                    if (tmpAnesEvent != null && tmpAnesEvent.Count > 0)
                    {
                        maxEventNo = tmpAnesEvent.OrderByDescending(a => a.ITEM_NO).FirstOrDefault().ITEM_NO;
                    }
                    DateTime applyTime = (DateTime)Args[1];
                    for (int i = 0; i < paramaterData.Count; i++)
                    {
                        MED_ANESTHESIA_EVENT item = new MED_ANESTHESIA_EVENT();
                        item.PATIENT_ID = _patientID;
                        item.VISIT_ID   = _visitID;
                        item.OPER_ID    = _operID;
                        maxEventNo     += 1;
                        item.ITEM_NO    = maxEventNo;
                        item.EVENT_NO   = _eventNo;

                        item.EVENT_CLASS_CODE   = paramaterData[i].EVENT_ITEM_CLASS;
                        item.EVENT_ITEM_NAME    = paramaterData[i].EVENT_ITEM_NAME;
                        item.EVENT_ITEM_CODE    = paramaterData[i].EVENT_ITEM_CODE;
                        item.EVENT_ITEM_SPEC    = paramaterData[i].EVENT_ITEM_SPEC;
                        item.DOSAGE             = paramaterData[i].DOSAGE;
                        item.DOSAGE_UNITS       = paramaterData[i].DOSAGE_UNITS;
                        item.ADMINISTRATOR      = paramaterData[i].ADMINISTRATOR;
                        item.DURATIVE_INDICATOR = paramaterData[i].DURATIVE_INDICATOR;
                        item.METHOD             = paramaterData[i].METHOD;
                        item.METHOD_PARENT_NO   = paramaterData[i].METHOD_PARENT_NO;
                        item.PERFORM_SPEED      = paramaterData[i].PERFORM_SPEED;
                        item.SPEED_UNIT         = paramaterData[i].SPEED_UNIT;
                        item.CONCENTRATION      = paramaterData[i].CONCENTRATION;
                        item.CONCENTRATION_UNIT = paramaterData[i].CONCENTRATION_UNIT;
                        item.EVENT_ATTR         = paramaterData[i].EVENT_ATTR;
                        item.PARENT_ITEM_NO     = paramaterData[i].PARENT_ITEM_NO;
                        item.START_TIME         = applyTime.AddMinutes((double)paramaterData[i].START_AFTER_INPUT);
                        if (paramaterData[i].DURATIVE != null)
                        {
                            item.END_TIME = item.START_TIME.Value.AddMinutes((double)paramaterData[i].DURATIVE);
                        }
                        item.ModelStatus = ModelStatus.Add;
                        _anesEvent.Add(item);
                    }
                    AnesEvent = new ObservableCollection <MED_ANESTHESIA_EVENT>(_anesEvent);
                }
                tmpDrugDictData = DrugDictData;// 每次加载,用药、麻药、输液、出液、输血时都需要重新赋值字典
            }

            _clickTime = DateTime.Now;
        }
コード例 #23
0
        protected static void PopDrugItem_Selected(object s1, EventArgs e1)
        {
            try
            {
                DataRow row = s1 as DataRow;

                if (row == null)
                {
                    return;
                }
                List <MED_ANESTHESIA_EVENT> anesEvent = ModelHelper <MED_ANESTHESIA_EVENT> .ConvertDataTableToList(_handler.DataSource["AnesAllEvent"]);

                if (anesEvent == null)
                {
                    anesEvent = new List <MED_ANESTHESIA_EVENT>();
                }
                MED_ANESTHESIA_EVENT eventRow = DataContext.GetCurrent().NewAnesthesiaEventRow(anesEvent, _eventNo);

                eventRow.EVENT_CLASS_CODE = row["EVENT_CLASS_CODE"].ToString();
                eventRow.EVENT_ITEM_NAME  = row["EVENT_ITEM_NAME"].ToString();
                eventRow.EVENT_ITEM_SPEC  = row["EVENT_ITEM_SPEC"].ToString();
                eventRow.EVENT_ITEM_CODE  = row["EVENT_ITEM_CODE"].ToString();
                eventRow.START_TIME       = _currentTime;

                if (!row.IsNull("ADMINISTRATOR"))
                {
                    eventRow.ADMINISTRATOR = row["ADMINISTRATOR"].ToString();
                }

                if (!row.IsNull("CONCENTRATION_UNIT"))
                {
                    eventRow.CONCENTRATION_UNIT = row["CONCENTRATION_UNIT"].ToString();
                }

                if (!row.IsNull("DOSAGE_UNITS"))
                {
                    eventRow.DOSAGE_UNITS = row["DOSAGE_UNITS"].ToString();
                }

                if (!row.IsNull("SPEED_UNIT"))
                {
                    eventRow.SPEED_UNIT = row["SPEED_UNIT"].ToString();
                }

                if (!row.IsNull("SUPPLIER_NAME"))
                {
                    eventRow.SUPPLIER_NAME = row["SUPPLIER_NAME"].ToString();
                }

                if (!row.IsNull("CONCENTRATION"))
                {
                    eventRow.CONCENTRATION = Convert.ToDecimal(row["CONCENTRATION"]);
                }

                if (!row.IsNull("DOSAGE"))
                {
                    eventRow.DOSAGE = Convert.ToDecimal(row["DOSAGE"]);
                }

                if (!row.IsNull("PERFORM_SPEED"))
                {
                    eventRow.PERFORM_SPEED = Convert.ToDecimal(row["PERFORM_SPEED"]);
                }

                if (!row.IsNull("DURATIVE_INDICATOR"))
                {
                    eventRow.DURATIVE_INDICATOR = Convert.ToInt32(row["DURATIVE_INDICATOR"]);
                }

                EditEventItem editItem = new EditEventItem();
                editItem.DataSource = eventRow;
                editItem.ItemType   = _title == "事件" ? EditEventItem.ItemTypes.EventItem : EditEventItem.ItemTypes.MedicineItem;
                DialogHostFormPC dialogHostForm = new DialogHostFormPC(editItem.Caption, editItem.Width, editItem.Height);
                dialogHostForm.Child = editItem;
                dialogHostForm.Text  = _title;
                editItem.TitleColor  = Color.Blue;
                DialogResult result = dialogHostForm.ShowDialog(_parent);
                if (result == DialogResult.OK)
                {
                    anesEvent.Add(eventRow);

                    new OperationInfoRepository().SaveAnesthesiaEventList(anesEvent);

                    if (_handler.AttatchDoc != null)
                    {
                        _handler.AttatchDoc.RefreshData();
                    }
                }
            }
            catch (Exception err)
            {
                ExceptionHandler.Handle(err);
            }
        }
コード例 #24
0
 /// <summary>
 /// 构造方法
 /// </summary>
 /// <param name="startTime">开始时间</param>
 /// <param name="text">文本(名称)</param>
 public MedAnesSheetDetailPoint(DateTime startTime, string text, MED_ANESTHESIA_EVENT row)
 {
     _startTime = startTime;
     _text      = text;
     _datarow   = row;
 }
コード例 #25
0
        /// <summary>
        /// 鼠标单击事件
        /// </summary>
        protected void MedDrugGraph_MouseClick(object sender, MouseEventArgs e)
        {
            try
            {
                RectangleF rectf = _currentGraph.GetMainRect();
                if (!rectf.Contains(e.Location.X, e.Location.Y))
                {
                    return;
                }

                // 鼠标右键
                if (e.Button == MouseButtons.Right)
                {
                    _currentGraph.SetMousePosition(e.Location);
                    string eventNo = ExtendAppContext.Current.EventNo;
                    if (_currentGraph.MouseTime > DateTime.MinValue)
                    {
                        MedDrugPoint pt = _currentGraph.SelectedPoint;
                        _currentTime = _currentGraph.MouseTime;
                        // 弹出:麻药及用药 OR 新增麻药用药数据 窗口
                        if (pt == null)
                        {
                            List <MED_EVENT_DICT>       eventOpenTable = ApplicationModel.Instance.AllDictList.EventDictList;// ExtendAppContext.Current.CommDict.EventDict;
                            List <MED_ANESTHESIA_EVENT> anesEvent      = new ModelHandler <MED_ANESTHESIA_EVENT>().FillModel(this.DataSource["AnesthesiaEvent"]);
                            int    Line      = (int)Math.Ceiling(((double)e.Location.Y - _currentGraph.TopOffSet) / _currentGraph.Height * _currentGraph.LineParameters.Count);
                            double locationH = (double)e.Location.Y - _currentGraph.TopOffSet;
                            double rowH      = _currentGraph.Height / _currentGraph.LineParameters.Count;
                            for (int i = 1; i <= _currentGraph.LineParameters.Count; i++)
                            {
                                if (rowH * i > locationH)
                                {
                                    Line = i;
                                    break;
                                }
                            }

                            if (_currentGraph.Curves.Count < Line)
                            {
                                DataTable sourceTable = new ModelHandler <MED_EVENT_DICT>().FillDataTable(eventOpenTable.Where(x => x.EVENT_CLASS_CODE == "2" || x.EVENT_CLASS_CODE == "C").ToList());

                                PopupDrugSelector.ShowSelector(sourceTable, _currentGraph, e.Location, _currentTime != DateTime.MinValue ? _currentTime : DateTime.Now, this, "麻药及用药", eventNo);
                            }
                            else
                            {
                                if (_currentGraph.GetMainRect().X > e.Location.X)
                                {
                                    return;
                                }

                                List <MED_EVENT_DICT> eventDict = eventOpenTable.Where(x => x.EVENT_ITEM_NAME.Equals(_currentGraph.Curves[Line - 1].Text)).ToList();
                                MED_EVENT_DICT        row       = new MED_EVENT_DICT();
                                if (eventDict != null && eventDict.Count > 0)
                                {
                                    row = eventDict[0];
                                }

                                MED_ANESTHESIA_EVENT eventRow = DataContext.GetCurrent().NewAnesthesiaEventRow(anesEvent, eventNo);
                                eventRow.EVENT_CLASS_CODE = row.EVENT_CLASS_CODE;
                                eventRow.EVENT_ITEM_NAME  = row.EVENT_ITEM_NAME;
                                eventRow.EVENT_ITEM_SPEC  = row.EVENT_ITEM_SPEC;
                                eventRow.EVENT_ITEM_CODE  = row.EVENT_ITEM_CODE;
                                eventRow.START_TIME       = _currentTime;
                                if (!string.IsNullOrEmpty(row.EVENT_ATTR))
                                {
                                    eventRow.EVENT_ATTR = row.EVENT_ATTR;
                                }

                                if (!string.IsNullOrEmpty(_currentGraph.Curves[Line - 1].Points[0].Route))
                                {
                                    eventRow.ADMINISTRATOR = _currentGraph.Curves[Line - 1].Points[0].Route;
                                }

                                if (!string.IsNullOrEmpty(_currentGraph.Curves[Line - 1].Points[0].ThickNessUnit))
                                {
                                    eventRow.CONCENTRATION_UNIT = _currentGraph.Curves[Line - 1].Points[0].ThickNessUnit;
                                }

                                if (!string.IsNullOrEmpty(_currentGraph.Curves[Line - 1].Points[0].Unit))
                                {
                                    eventRow.DOSAGE_UNITS = _currentGraph.Curves[Line - 1].Points[0].Unit;
                                }

                                if (!string.IsNullOrEmpty(_currentGraph.Curves[Line - 1].Points[0].SpeedUnit))
                                {
                                    eventRow.SPEED_UNIT = _currentGraph.Curves[Line - 1].Points[0].SpeedUnit;
                                }

                                if (!string.IsNullOrEmpty(row.SUPPLIER_NAME))
                                {
                                    eventRow.SUPPLIER_NAME = row.SUPPLIER_NAME;
                                }

                                if (!string.IsNullOrEmpty(_currentGraph.Curves[Line - 1].Points[0].ThickNess.ToString()))
                                {
                                    eventRow.CONCENTRATION = (decimal)_currentGraph.Curves[Line - 1].Points[0].ThickNess;
                                }

                                if (!string.IsNullOrEmpty(_currentGraph.Curves[Line - 1].Points[0].Value.ToString()))
                                {
                                    eventRow.DOSAGE = Convert.ToDecimal(_currentGraph.Curves[Line - 1].Points[0].Value);
                                }

                                if (!string.IsNullOrEmpty(_currentGraph.Curves[Line - 1].Points[0].Speed.ToString()))
                                {
                                    eventRow.PERFORM_SPEED = (decimal)_currentGraph.Curves[Line - 1].Points[0].Speed;
                                }

                                if (row.DURATIVE_INDICATOR.HasValue)
                                {
                                    eventRow.DURATIVE_INDICATOR = row.DURATIVE_INDICATOR;
                                }

                                EditEventItem editItem = new EditEventItem();
                                editItem.DataSource = eventRow;
                                editItem.ItemType   = EditEventItem.ItemTypes.MedicineItem;
                                DialogHostFormPC dialogHostForm = new DialogHostFormPC(editItem.Caption, editItem.Width, editItem.Height);
                                dialogHostForm.Child = editItem;
                                dialogHostForm.Text  = "新增麻药用药数据";
                                editItem.TitleColor  = Color.Blue;
                                DialogResult result = dialogHostForm.ShowDialog();
                                if (result == DialogResult.OK)
                                {
                                    eventRow.ITEM_NO = DataContext.GetCurrent().GetMaxItemNO(anesEvent);
                                    anesEvent.Add(eventRow);
                                    AnesInfoService.ClientInstance.UpadteAnesthesiaEvent(anesEvent);
                                    RefreshData();
                                    _currentGraph.Refresh();
                                }
                            }
                        }
                        else // 弹出:修改麻药用药数据 窗口
                        {
                            MED_ANESTHESIA_EVENT        row       = _drugRows[pt];
                            List <MED_ANESTHESIA_EVENT> anesEvent = new ModelHandler <MED_ANESTHESIA_EVENT>().FillModel(this.DataSource["AnesthesiaEvent"]);
                            EditEventItem editItem = new EditEventItem();
                            editItem.DataSource = row;
                            editItem.ItemType   = EditEventItem.ItemTypes.MedicineItem;
                            editItem.IsAllowDel = true;
                            DialogHostFormPC dialogHostForm = new DialogHostFormPC("修改麻药用药数据", editItem.Width, editItem.Height);
                            dialogHostForm.Child = editItem;
                            editItem.TitleColor  = Color.DarkOrange;
                            if (dialogHostForm.ShowDialog() == DialogResult.OK)
                            {
                                if (editItem != null && editItem.IsDelete)
                                {
                                    if (MessageBoxFormPC.Show("是否确定要删除选中事件?", "操作提示", MessageBoxButtons.YesNo) == DialogResult.Yes)
                                    {
                                        List <MED_ANESTHESIA_EVENT> allEvent = new ModelHandler <MED_ANESTHESIA_EVENT>().FillModel(this.DataSource["AnesAllEvent"]);
                                        List <MED_ANESTHESIA_EVENT> rows     = allEvent.Where(x => x.EVENT_CLASS_CODE == row.EVENT_CLASS_CODE && x.ITEM_NO == row.ITEM_NO).ToList();
                                        if (rows.Count > 0)
                                        {
                                            allEvent.Remove(rows[0]);
                                        }

                                        AnesInfoService.ClientInstance.DeleteAnesthesiaEventRow(row);
                                    }
                                }
                                else
                                {
                                    List <MED_ANESTHESIA_EVENT> eventList = new List <MED_ANESTHESIA_EVENT>();
                                    eventList.Add(row);
                                    AnesInfoService.ClientInstance.UpadteAnesthesiaEvent(eventList);
                                }

                                this.RefreshData();
                                _currentGraph.Refresh();
                            }
                        }
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #26
0
 /// <summary>
 /// 构造方法
 /// </summary>
 /// <param name="startTime">开始时间</param>
 /// <param name="endTime">结束时间</param>
 /// <param name="text">文本(名称)</param>
 public MedAnesSheetDetailPoint(DateTime startTime, DateTime endTime, string text, MED_ANESTHESIA_EVENT row)
     : this(startTime, text, row)
 {
     _endTime   = endTime;
     _pointType = PointType.ProLonged;
 }
コード例 #27
0
        /// <summary>
        /// 鼠标按下事件:响应右键
        /// </summary>
        protected void MedGridGraph_MouseClick(object sender, MouseEventArgs e)
        {
            try
            {
                RectangleF rectf = _currentGraph.GetMainRect();
                if (!rectf.Contains(e.Location.X, e.Location.Y))
                {
                    return;
                }

                if (e.Button == MouseButtons.Right)
                {
                    _currentGraph.SetMousePosition(e.Location);
                    if (_currentGraph.MouseTime > DateTime.MinValue)
                    {
                        MedGridPoint pt = _currentGraph.SelectedPoint;
                        _currentTime = _currentGraph.MouseTime;
                        string eventNo = ExtendAppContext.Current.EventNo;
                        if (pt == null)
                        {
                            List <MED_EVENT_DICT>       eventOpenTable = ExtendApplicationContext.Current.CommDict.EventDict;
                            List <MED_ANESTHESIA_EVENT> anesEvent      = ModelHelper <MED_ANESTHESIA_EVENT> .ConvertDataTableToList(this.DataSource["AnesthesiaEvent"]);

                            int Line = (int)Math.Ceiling((double)e.Location.Y / _currentGraph.Height * _currentGraph.Rows.Count);
                            if (_currentGraph.Rows[Line - 1].Points.Count == 0 || Line == 7 || Line == 8 || Line == 9)
                            {
                                List <MED_EVENT_DICT> eventDict = null;
                                if (Line == 6)
                                {
                                    eventDict = eventOpenTable.Where(x => x.EVENT_CLASS_CODE == "B").ToList();
                                }
                                else if (Line == 7 || Line == 8 || Line == 9)
                                {
                                    eventDict = eventOpenTable.Where(x => x.EVENT_CLASS_CODE == "D").ToList();
                                }
                                else
                                {
                                    eventDict = eventOpenTable.Where(x => x.EVENT_CLASS_CODE == "3").ToList();
                                }

                                DataTable sourceTable = ModelHelper <MED_EVENT_DICT> .ConvertListToDataTable(eventDict);

                                DateTime tempDt = _currentTime != DateTime.MinValue ? _currentTime : DateTime.Now;
                                PopupDrugSelector.ShowSelector(sourceTable, _currentGraph, e.Location, tempDt, this, "输血及输液", eventNo);
                            }
                            else
                            {
                                if (_currentGraph.GetMainRect().X > e.Location.X)
                                {
                                    return;
                                }

                                List <MED_EVENT_DICT> eventDict = eventOpenTable.Where(x => x.EVENT_CLASS_CODE == _currentGraph.Rows[Line - 1].Text &&
                                                                                       (x.EVENT_CLASS_CODE == "B" ||
                                                                                        x.EVENT_CLASS_CODE == "D" ||
                                                                                        x.EVENT_CLASS_CODE == "3")).ToList();
                                if (eventDict.Count == 0)
                                {
                                    return;
                                }

                                MED_EVENT_DICT       row      = eventDict[0];
                                MED_ANESTHESIA_EVENT eventRow = DataContext.GetCurrent().NewAnesthesiaEventRow(anesEvent, eventNo);
                                eventRow.EVENT_CLASS_CODE = row.EVENT_CLASS_CODE;
                                eventRow.EVENT_ITEM_NAME  = row.EVENT_ITEM_NAME;
                                eventRow.EVENT_ITEM_SPEC  = row.EVENT_ITEM_SPEC;
                                eventRow.EVENT_ITEM_CODE  = row.EVENT_ITEM_CODE;
                                eventRow.START_TIME       = _currentTime;
                                if (!string.IsNullOrEmpty(row.EVENT_ATTR))
                                {
                                    eventRow.EVENT_ATTR = row.EVENT_ATTR;
                                }

                                MED_ANESTHESIA_EVENT firstrow = _gridRows[_currentGraph.Rows[Line - 1].Points[0]];
                                if (!string.IsNullOrEmpty(firstrow.ADMINISTRATOR))
                                {
                                    eventRow.ADMINISTRATOR = firstrow.ADMINISTRATOR;
                                }

                                if (!string.IsNullOrEmpty(_currentGraph.Rows[Line - 1].Points[0].ThickNessUnit))
                                {
                                    eventRow.CONCENTRATION_UNIT = _currentGraph.Rows[Line - 1].Points[0].ThickNessUnit;
                                }

                                if (!string.IsNullOrEmpty(_currentGraph.Rows[Line - 1].Points[0].Unit))
                                {
                                    eventRow.DOSAGE_UNITS = _currentGraph.Rows[Line - 1].Points[0].Unit;
                                }

                                if (!string.IsNullOrEmpty(_currentGraph.Rows[Line - 1].Points[0].SpeedUnit))
                                {
                                    eventRow.SPEED_UNIT = _currentGraph.Rows[Line - 1].Points[0].SpeedUnit;
                                }

                                if (!string.IsNullOrEmpty(row.SUPPLIER_NAME))
                                {
                                    eventRow.SUPPLIER_NAME = row.SUPPLIER_NAME;
                                }

                                if (!string.IsNullOrEmpty(_currentGraph.Rows[Line - 1].Points[0].ThickNess.ToString()))
                                {
                                    eventRow.CONCENTRATION = (decimal)_currentGraph.Rows[Line - 1].Points[0].ThickNess;
                                }

                                if (!string.IsNullOrEmpty(_currentGraph.Rows[Line - 1].Points[0].Value.ToString()))
                                {
                                    eventRow.DOSAGE = Convert.ToDecimal(_currentGraph.Rows[Line - 1].Points[0].Value);
                                }

                                if (!string.IsNullOrEmpty(_currentGraph.Rows[Line - 1].Points[0].Speed.ToString()))
                                {
                                    eventRow.PERFORM_SPEED = (decimal)_currentGraph.Rows[Line - 1].Points[0].Speed;
                                }

                                if (row.DURATIVE_INDICATOR.HasValue)
                                {
                                    eventRow.DURATIVE_INDICATOR = row.DURATIVE_INDICATOR;
                                }

                                EditEventItem editItem = new EditEventItem();
                                editItem.DataSource = eventRow;
                                editItem.ItemType   = EditEventItem.ItemTypes.MedicineItem;
                                DialogHostForm dialogHostForm = new DialogHostForm(editItem.Caption, 320, 300);
                                dialogHostForm.Child = editItem;
                                dialogHostForm.Text  = "新增输血及输液数据";
                                DialogResult result = dialogHostForm.ShowDialog();
                                if (result == DialogResult.OK)
                                {
                                    eventRow.ITEM_NO = DataContext.GetCurrent().GetMaxItemNO(anesEvent);
                                    anesEvent.Add(eventRow);
                                    operationInfoRepository.SaveAnesthesiaEventList(anesEvent);
                                    this.RefreshData();
                                    this._currentGraph.Refresh();
                                }
                            }
                        }
                        else
                        {
                            MED_ANESTHESIA_EVENT        row       = _gridRows[pt];
                            List <MED_ANESTHESIA_EVENT> anesEvent = ModelHelper <MED_ANESTHESIA_EVENT> .ConvertDataTableToList(this.DataSource["AnesthesiaEvent"]);

                            EditEventItem editItem = new EditEventItem();
                            editItem.DataSource = row;
                            editItem.ItemType   = EditEventItem.ItemTypes.MedicineItem;
                            editItem.IsAllowDel = true;
                            editItem.TitleColor = Color.DarkOrange;
                            DialogHostFormPC dialogHostForm = new DialogHostFormPC("修改输血及输液数据", 320, 300);
                            dialogHostForm.Child = editItem;
                            if (dialogHostForm.ShowDialog() == DialogResult.OK)
                            {
                                if (editItem != null && editItem.IsDelete)
                                {
                                    if (MessageBoxFormPC.Show("是否确定要删除选中事件?", "操作提示", MessageBoxButtons.YesNo) == DialogResult.Yes)
                                    {
                                        List <MED_ANESTHESIA_EVENT> allEvent = ModelHelper <MED_ANESTHESIA_EVENT> .ConvertDataTableToList(this.DataSource["AnesAllEvent"]);

                                        List <MED_ANESTHESIA_EVENT> rows = allEvent.Where(x => x.EVENT_CLASS_CODE == row.EVENT_CLASS_CODE && x.ITEM_NO == row.ITEM_NO).ToList();
                                        if (rows.Count > 0)
                                        {
                                            allEvent.Remove(rows[0]);
                                        }
                                        // OperationLogger.WriteOperate("文书液体模块", "右键删除", "右键液体模块弹出药品界面,勾选删除选择项,点确定进行删除保存,事件名称【" + row["ITEM_NAME"].ToString() + "】", false, OperationLogKind.Other);
                                        anesEventRepository.DelAnesEvent(row);
                                    }
                                }
                                operationInfoRepository.SaveAnesthesiaEventList(anesEvent);
                                RefreshData();
                                _currentGraph.Refresh();
                            }
                        }
                    }
                }
            }
            catch (Exception err)
            {
                ExceptionHandler.Handle(err);
            }
        }
コード例 #28
0
        public static MED_ANESTHESIA_EVENT CopyAnesthesiaEventRow(List <MED_ANESTHESIA_EVENT> anesthestaEventDataTable, MED_PAT_INFO patientContext, string eventNo, int index)
        {
            MED_ANESTHESIA_EVENT sourceRow = anesthestaEventDataTable[index];

            return(CopyAnesthesiaEventRow(anesthestaEventDataTable, patientContext, eventNo, sourceRow));
        }