Exemple #1
0
 /////////添加检验、检查、诊疗多剂量多次执行,杨敬本20171111
 /// <summary>
 /// 更新用户自定义列单元格信息
 /// </summary>
 /// <param name="row"></param>
 /// <param name="drug"></param>
 protected virtual void updateCustomerControlInfo(XDataRow row, EmsOrDrug drug)
 {
     if (drug == null || row == null)
     {
         return;
     }
     if (row.ColumnCellDict.ContainsKey("customercolumn_med_unit"))
     {
         if (drug.Name_unit_medu_virtual == null)
         {
             drug.Name_unit_medu_virtual = "";
         }
         String spltStr     = drug.Name_unit_medu_virtual.Length > 0 && IsNumberic(drug.Name_unit_medu_virtual.Substring(0, 1)) ? "*" : "";
         string strMed_unit = drug.Quan_medu_virtual + spltStr + drug.Name_unit_medu_virtual;
         row.ColumnCellDict["customercolumn_med_unit"].SetValue(strMed_unit);
     }
     if (row.ColumnCellDict.ContainsKey("customercolumn_sale_unit"))
     {
         if (drug.Quan_cur == null)
         {
             drug.Quan_cur = 0;
         }
         if (drug.Name_unit_sale == null)
         {
             drug.Name_unit_sale = "";
         }
         String spltStr     = drug.Name_unit_sale.Length > 0 && IsNumberic(drug.Name_unit_sale.Substring(0, 1)) ? "*" : "";
         string strCur_unit = drug.Quan_cur + spltStr + drug.Name_unit_sale;
         row.ColumnCellDict["customercolumn_sale_unit"].SetValue(strCur_unit);
     }
 }
Exemple #2
0
        //protected void OnGridView_RowSelectChanged(Object sender, XSelectedRowChangedEventArgs e)
        //{
        //    if (null != Event_SelectChanged)
        //    {
        //        this.setFgSelfValue();
        //        this.Event_SelectChanged(sender, e);
        //    }
        //}
        void xapFormControl_ModelFilled(object sender, EventArgs e)
        {
            if (this.emsordrug.Fg_self == true)
            {
                cr.Checked       = true;
                gridView.Enabled = false;
            }
            else
            {
                cr.Checked       = false;
                gridView.Enabled = true;
                warncard.Visible = false;

                //设置表格选中行
                EmsOrDrug focusDrug = this.mms.FirstOrDefault(p => p.Id_mm == this.emsordrug.Id_mm);
                if (focusDrug != null)
                {
                    XDataRow row = gridView.DataTable.GetRow(focusDrug);
                    row.Selected = true;
                    row.Focus();
                }
            }
            this.xapFormControl.DataChanged -= new EventHandler <DataChangedEventArgs>(xapFormControl_DataChanged);
            this.xapFormControl.DataChanged += new EventHandler <DataChangedEventArgs>(xapFormControl_DataChanged);
        }
Exemple #3
0
 void UpdateCustomerControlInfo(XDataRow row, EmsOrDrug drug)
 {
     if (row != null && row.ColumnCellDict.ContainsKey("customercolumn_med_unit"))
     {
         if (drug.Quan_med == null)
         {
             drug.Quan_med = 0;
         }
         if (drug.Name_unit_med == null)
         {
             drug.Name_unit_med = "";
         }
         string strMed_unit = drug.Quan_med + drug.Name_unit_med;
         row.ColumnCellDict["customercolumn_med_unit"].SetValue(strMed_unit);
         row.ColumnCellDict["customercolumn_med_unit"].HasError  = drug.Quan_med == 0;
         row.ColumnCellDict["customercolumn_med_unit"].ErrorText = drug.Quan_med == 0 ? "数值不能为 0" : null;
     }
     if (row != null && row.ColumnCellDict.ContainsKey("customercolumn_sale_unit"))
     {
         if (drug.Quan_cur == null)
         {
             drug.Quan_cur = 0;
         }
         if (drug.Name_unit_sale == null)
         {
             drug.Name_unit_sale = "";
         }
         string strMed_unit = drug.Quan_cur + drug.Name_unit_sale;
         row.ColumnCellDict["customercolumn_sale_unit"].SetValue(strMed_unit);
         row.ColumnCellDict["customercolumn_sale_unit"].HasError  = drug.Quan_cur == 0;
         row.ColumnCellDict["customercolumn_sale_unit"].ErrorText = drug.Quan_cur == 0 ? "数值不能为 0" : null;
     }
 }
Exemple #4
0
 void xapFormControl_ModelFilled(object sender, System.EventArgs e)
 {
     if (this.uidto != null && this.uidto.CiordubDTO != null && this.uidto.CiordubDTO.Id_apbu != null)
     {
         xapFormControl.AfterFocused -= xapFormControl_AfterFocused;
         if (ciordUbDto != null)
         {
             XDataRow row = this.xapFormControl.GetGridView().DataTable.GetRow(ciordUbDto);
             if (row != null)
             {
                 row.Selected = true;
                 ciordUbDto   = null;
             }
         }
         else
         {
             XDataRow row = this.xapFormControl.GetGridView().DataTable.Rows[0] as XDataRow;
             if (row != null)
             {
                 row.Selected = true;
             }
         }
         xapFormControl.AfterFocused += xapFormControl_AfterFocused;
     }
     if (this.uidto.IsNEW)
     {
         //默认选中第一行数据
         if (this.xapFormControl.GetGridView().DataTable.Rows != null && this.xapFormControl.GetGridView().DataTable.Rows.Count > 0)
         {
             XDataRow row = this.xapFormControl.GetGridView().DataTable.Rows[0] as XDataRow;
             row.Selected = true;
             //FireSelected(row.DataSource as CiordubDTO);
         }
     }
 }
Exemple #5
0
 /// <summary>
 /// 数量字段显示 总量信息
 /// </summary>
 /// <param name="row"></param>
 /// <param name="feeSrv"></param>
 void UpdateCustomerControlInfo(XDataRow row, CiOrdFeeSrvDTO feeSrv)
 {
     if (row != null && row.ColumnCellDict.ContainsKey("customercolumn_med_unit"))
     {
         if (feeSrv.Fg_mm == null || !feeSrv.Fg_mm.Value)
         {
             if (feeSrv.Quan_total_medu == null)
             {
                 feeSrv.Quan_total_medu = 0;
             }
             if (feeSrv.Name_unit_sale == null)
             {
                 feeSrv.Name_unit_sale = "";
             }
             string strMed_unit = feeSrv.Quan_total_medu + feeSrv.Name_unit_sale;
             row.ColumnCellDict["customercolumn_med_unit"].SetValue(strMed_unit);
         }
         else
         {
             if (feeSrv.Quan_cur == null)
             {
                 feeSrv.Quan_cur = 0;
             }
             if (feeSrv.Name_unit_sale == null)
             {
                 feeSrv.Name_unit_sale = "";
             }
             string strMed_unit = feeSrv.Quan_cur + feeSrv.Name_unit_sale;
             row.ColumnCellDict["customercolumn_med_unit"].SetValue(strMed_unit);
         }
     }
 }
Exemple #6
0
 void updateCustomerControlInfo(XDataRow row)
 {
     if (row != null && row.ColumnCellDict.ContainsKey("customercolumn_dep_invitors"))
     {
         row.ColumnCellDict["customercolumn_dep_invitors"].SetValue(CustomRefControl.ConstructInvitedDeptInfo((row.RowDataSource as EmsConsItemDO).EmsConsAssistItem));
     }
 }
Exemple #7
0
 void UpdateCustomerControlInfo_1(XDataRow row, CiOrdFeeSrvDTO drug)
 {
     if (drug == null)
     {
         return;
     }
     if (row != null && row.ColumnCellDict.ContainsKey("customercolumn_med_unit"))
     {
         if (drug.Quan_med == null)
         {
             drug.Quan_med = 0;
         }
         if (drug.Name_unit_med == null)
         {
             drug.Name_unit_med = "";
         }
         string strMed_unit = drug.Quan_med + drug.Name_unit_med;
         row.ColumnCellDict["customercolumn_med_unit"].SetValue(strMed_unit);
     }
     if (row != null && row.ColumnCellDict.ContainsKey("customercolumn_sale_unit"))
     {
         if (drug.Quan_cur == null)
         {
             drug.Quan_cur = 0;
         }
         if (drug.Name_unit_sale == null)
         {
             drug.Name_unit_sale = "";
         }
         string strMed_unit = drug.Quan_cur + drug.Name_unit_sale;
         row.ColumnCellDict["customercolumn_sale_unit"].SetValue(strMed_unit);
     }
 }
        void OnGridViewControl_SelectRowChanged(object sender, XSelectedRowChangedEventArgs e)
        {
            XDataRow selectrow = sender as XDataRow;

            if (selectrow == null)
            {
                return;
            }
            if (setRadio == false)
            {
                return;
            }
            gv.DataTable.SelectedRowChanged -= OnGridViewControl_SelectRowChanged;

            selectrow.Selected = true;
            for (int i = gv.DataTable.SelectedRows.Count - 1; i >= 0; i--)
            {
                if (gv.DataTable.SelectedRows[i] != selectrow)
                {
                    gv.DataTable.SelectedRows[i].Selected = false;
                }
            }

            gv.DataTable.SelectedRowChanged += OnGridViewControl_SelectRowChanged;
        }
Exemple #9
0
        /// <summary>
        /// 数据改变时候的消息事件处理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected override void OnXapFormControl_DataChanged(object sender, DataChangedEventArgs e)
        {
            if (this.GetViewModel() == null)
            {
                return;
            }
            // 获取表单对象
            var gv = sender as XapFormGridControl;

            if (gv != null && gv.DataTable.Rows.DataSourceRow.ContainsKey(e.Data) &&
                gv.DataTable.Rows.DataSourceRow[e.Data] != null)
            {
                this.GetViewModel().OnDataChanged(e.Data, e.PropName, e.Input.ToString());

                XDataRow row = gv.DataTable.Rows.DataSourceRow[e.Data];
                this.updateCustomerControlInfo(row, e.Data as EmsOrDrug);
                if (!string.IsNullOrEmpty(e.PropName) && e.PropName.Equals("Fg_treat"))
                {
                    this.SentNotify(EventCodeType.EVENT_EMS_ORSRV_HP_DATACHANGED, e.PropName, e.Data);
                }
                else
                {
                    this.SentNotify(EventCodeType.NM_EMS_ORSRV_DATACHANGED, e.PropName, e.Input.ToString(), e.Data);
                }
            }
        }
Exemple #10
0
 protected virtual bool OnGridEnterKeyOver(XDataRow row)
 {
     if (this.delegate_OnEnterKeyOver != null)
     {
         return(delegate_OnEnterKeyOver(row));
     }
     return(false);
 }
Exemple #11
0
        void EmsDrugsViewCard_DataDisplay(object sender, xap.cli.sdk.controls.DataView.Model.XDataDisplayEventArgs e)
        {
            XDataRow row = sender as XDataRow;

            if (row != null)
            {
                ChangeRowColor(new XDataRow[] { row });
            }
        }
Exemple #12
0
        protected override void OnXapFormControl_DataDisplay(object sender, xap.cli.sdk.controls.DataView.Model.XDataDisplayEventArgs e)
        {
            XDataRow row = sender as XDataRow;

            if (row != null && row.RowDataSource is EmsConsItemDO)
            {
                this.updateCustomerControlInfo(row);
            }
        }
        protected virtual void OnXapFormControl_EnterKeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            XDataRow row = sender as XDataRow;

            if (row != null && row.ClickCell.FieldName.Equals(row.CellList[row.ColumnCellDict.Count - 1].FieldName))
            {
                e.Handled = OnGridEnterKeyOver(row);
            }
        }
        void saveButton_MouseClick(object sender, MouseEventArgs e)
        {
            bool hasSelected = false;

            for (int i = 0; i < gv.DataTable.Rows.Count; i++)
            {
                XDataRow row = gv.DataTable.Rows[i];
                if (row.GetMultiSelectStatus())
                {
                    hasSelected = true;
                    break;
                }
            }
            if (!hasSelected)
            {
                this.ShowInfo("请至少选择一个服务项目!");
                return;
            }
            bool bChanged = false;

            for (int i = 0; i < gv.DataTable.Rows.Count; i++)
            {
                XDataRow row = gv.DataTable.Rows[i];

                EmsObsLap ds = row.RowDataSource as EmsObsLap;

                if (row.GetMultiSelectStatus())
                {
                    if (ds.Fg_chk != true)
                    {
                        bChanged  = true;
                        ds.Fg_chk = true;
                    }
                }
                else
                {
                    if (ds.Fg_chk != false)
                    {
                        bChanged  = true;
                        ds.Fg_chk = false;
                    }
                }
            }

            if (this.itemlist.ToList().Count(p => p.Fg_chk != null && p.Fg_chk.Value) == 0)
            {
                this.ShowInfo("请至少选择一个服务项目!");
                return;
            }

            DialogResult = DialogResult.OK;

            if (bChanged && this.ownerView != null)
            {
                this.ownerView.SentNotify(EventCodeType.NM_EMS_ORSRV_DATACHANGED);
            }
        }
Exemple #15
0
        private Object EncloseClientRequestParam(string param)
        {
            if (param == null)
            {
                return(param);
            }

            if (!param.StartsWith("#"))
            {
                return(param);
            }

            param = param.Remove(0, 1);

            XTable_1   xTable = new XTable_1();
            WbdlSchema schame = pageCtr.Schame;
            int        i      = 0;

            string[] fieldNames = { };

            foreach (FieldBindSchema fieldBind in schame.FieldBinds)
            {
                if (fieldBind.TableId.Equals(param, StringComparison.OrdinalIgnoreCase))
                {
                    i++;
                    Array.Resize <string>(ref fieldNames, i);
                    fieldNames[i - 1] = fieldBind.Id;
                }
            }


            foreach (DataListBindSchema dataList in schame.DataListBinds)
            {
                foreach (FieldBindSchema fieldBind in dataList.Columns)
                {
                    if (fieldBind.TableId.Equals(param, StringComparison.OrdinalIgnoreCase))
                    {
                        i++;
                        Array.Resize <string>(ref fieldNames, i);
                        fieldNames[i - 1] = fieldBind.Id;
                    }
                }
            }

            //  xTable.FieldNames = fieldNames;
            XDataRow dataRow = new XDataRow();

            //            dataRow.Values = new string[] { "1111", "222" };
            //    dataRow.Id = "1";
            xTable.Rows.Add(dataRow);
            dataRow = new XDataRow();
            //     dataRow.Id = "2";
            //            dataRow.Values = new string[] { "1111", "222" };
            xTable.Rows.Add(dataRow);
            return(xTable);
        }
Exemple #16
0
 /// <summary>
 /// 处理子窗口通知事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 /// <returns></returns>
 public override bool OnChildNotify(object sender, xap.rui.engine.DictionaryEventArgs e)
 {
     if (AssToolEx.EventCodeOfEventArgs(e) == EventCodeType.NM_TABLE_CLICK)
     {
         XDataRow row = AssToolEx.ObjectOfEventArgs(e, EventCodeType.NM_TABLE_CLICK) as XDataRow;
         this.GetCardViewControl().Cell_MouseClick(row);
         return(true);
     }
     return(base.OnChildNotify(sender, e));
 }
Exemple #17
0
 /////////添加检验、检查、诊疗多剂量多次执行,杨敬本20171111
 protected void updateCustomerControlInfo(XDataRow row, EmsObsItemDO model)
 {
     if (row != null && model != null)
     {
         if (row.ColumnCellDict.ContainsKey("customercolumn_details"))
         {
             row.ColumnCellDict["customercolumn_details"].SetValue(
                 model.Fg_set == true ? CustomRefSetItmsControl.ConstructDetialInfo(model.EmsOrObsList) : model.Name_body);
         }
     }
 }
Exemple #18
0
        /// <summary>
        /// XapFormControl 数据显示时间响应
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void xfc_DataDisplay(object sender, XDataDisplayEventArgs e)
        {
            XDataRow    row  = sender as XDataRow;
            PresDrugDTO drug = e.Object as PresDrugDTO;

            if (drug.Id_freq.Equals(CiDictCodeConst.ID_FREQ_ONCE))
            {
                drug.Use_day = null;
            }
            this.updateCustomerControlInfo(row, drug);
        }
Exemple #19
0
        /// <summary>
        ///     CreateView执行完毕后,用LoadData的数据填充界面
        /// </summary>
        protected override void OnFillData()
        {
            var f = new FormFile();

            //20160815012934772L07
            f.FormId                = CiOrdBillFormTmplConst.CIORD_IP_OrderConfirmView;// "20161026093054112000";
            f.FormStyle             = FormStyle.Card;
            f.ViewModel             = model.OrderList;
            xapFormControl.ViewFile = f;
            xapFormControl.SetEditPolicy(true);
            oldrow = null;
        }
Exemple #20
0
        void UpdateCustomerControlInfo(XDataRow row, CiOrdFeeSrvDTO drug)
        {
            if (drug == null)
            {
                return;
            }

            String spltStr = "";

            // 非物品的总量单位默认都为 医学计量单位
            if (row != null && row.ColumnCellDict.ContainsKey("customercolumn_med_unit"))
            {
                if (drug.Fg_mm == null || !drug.Fg_mm.Value)
                {
                    if (drug.Quan_total_medu == null)
                    {
                        drug.Quan_total_medu = 0;
                    }
                    if (drug.Name_unit_med == null)
                    {
                        drug.Name_unit_med = "";
                    }

                    if (drug.Name_unit_med.Length > 0 && IsNumberic(drug.Name_unit_med.Substring(0, 1)))
                    {
                        spltStr = "*";
                    }
                    string strMed_unit = drug.Quan_total_medu + spltStr + drug.Name_unit_med;
                    row.ColumnCellDict["customercolumn_med_unit"].SetValue(strMed_unit);
                }
                else
                {
                    if (drug.Quan_cur == null)
                    {
                        drug.Quan_cur = 0;
                    }
                    if (drug.Name_unit_med == null)
                    {
                        drug.Name_unit_med = "";
                    }
                    if (drug.Name_unit_med.Length > 0 && IsNumberic(drug.Name_unit_med.Substring(0, 1)))
                    {
                        spltStr = "*";
                    }
                    string strMed_unit = drug.Quan_cur + spltStr + drug.Name_unit_sale;
                    row.ColumnCellDict["customercolumn_med_unit"].SetValue(strMed_unit);
                }
            }
            if (row != null && row.ColumnCellDict.ContainsKey("customercolumn_ord_colligate"))
            {
                row.ColumnCellDict["customercolumn_ord_colligate"].SetValue(drug.getAttrVal("Ord_colligate"));
            }
        }
Exemple #21
0
        /// <summary>
        /// 弹出物品选择器
        /// </summary>
        /// <param name="ds"></param>
        /// <param name="def"></param>
        /// <param name="atPoint"></param>
        private void ShowMmSelector(XDataRow row, List <EmsOrDrug> ds, EmsOrDrug def, Point atPoint, bool canEdit = true)
        {
            var mmContainer = new XBaseControl();

            mmContainer.Size = new Size(473, 160);

            var query = from items in ds orderby items.Fact_count descending select items;

            var mm = new ExtMmRefView(LogicEx.GetInstance().ConvertDataSouse <EmsOrDrug>(query.ToList()), def, false);

            mm.Dock = DockStyle.Fill;
            mmContainer.AddRender(mm);
            var popWindow = new XContextForm(mmContainer);

            mm.Event_SelectChanged += (sender, e) =>
            {
                EmsOrDrug orDrug = EmsHeadDO.Emsdrugs.EmsOrDrugList[gv.FocusedRowHandle];
                var       mmDrug = e.Data as EmsOrDrug;

                if (mmDrug == null)
                {
                    if (orDrug.Fg_self == true)
                    {
                        orDrug.Name_mm = orDrug.Name_srv;
                        orDrug.Id_mm   = null;
                    }
                    popWindow.Close();
                    return;
                }

                #region 皮试逻辑的判断
                if (mmDrug.Fg_skintest != null && mmDrug.Fg_skintest == true)
                {
                    SkinTestLogic logic = new SkinTestLogic(EmsHeadDO.PatInfo);
                    orDrug.Name_mm    = mmDrug.Name_mm;
                    orDrug.Id_mm      = mmDrug.Id_mm;
                    orDrug.Id_srvskin = mmDrug.Id_srvskin;
                    if (logic.skinTestLogic(orDrug).Equals("0"))
                    {
                        popWindow.Close();
                        return;
                    }
                }
                #endregion
                cof.CopyTo(mmDrug, orDrug, "Id_srv", "Name_srv");
                cof.concateMMSpecAndName(orDrug);
                orDrug.Fg_mm = true;
                updateTableCustomerComtrol();
                popWindow.Close();
            };
            popWindow.Show(atPoint);
            mm.Enabled = canEdit;
        }
Exemple #22
0
        void TrOrderDrugsView_EnterKeyDown(object sender, KeyEventArgs e)
        {
            XDataRow row    = sender as XDataRow;
            bool     result = true;

            if (row != null && row.DataTable.ParentControl.FocusedCell != null)
            {
                switch (row.DataTable.ParentControl.FocusedCell.FieldName)
                {
                case "customercolumn_med_unit":
                    row.ColumnCellDict["Name_mp_dep"].Focus();
                    row.DataTable.ParentControl.ShowEditor();
                    break;

                case "Name_mp_dep":
                    if (row.RowData["Name_srv"] == null)
                    {
                        row.ColumnCellDict["Name_srv"].Focus();
                        row.DataTable.ParentControl.ShowEditor();
                    }
                    else
                    {
                        var ds = row.DataSource as EmsOrDrug;
                        if (ds.Eu_blmd == Convert.ToInt32(MedSrvBlModeEnum.MANUALBL))
                        {
                            row.ColumnCellDict["Price"].Focus();
                            row.DataTable.ParentControl.ShowEditor();
                        }
                        else
                        {
                            if (row.IsLast)
                            {
                                this.SentNotify(EventCodeType.NM_EMS_SAVE_FOCUS);
                            }
                        }
                    }
                    break;

                case "Price":
                    if (row.IsLast)
                    {
                        this.SentNotify(EventCodeType.NM_EMS_SAVE_FOCUS);
                    }
                    break;

                default:
                    result = false;
                    break;
                }
            }

            e.Handled = result;
        }
Exemple #23
0
        //草药删除
        void btndelete_MouseClick(object sender, MouseEventArgs e)
        {
            XDataRow row = gv.DataTable.GetFirstRow();

            //删除前应该提示一下吧?
            if (row != null)
            {
                EmsOrDrug delDo = row.DataSource as EmsOrDrug;
                cof.DeleteOrDrug(EmsHeadDO, delDo);
                gv.DataTable.DataSource = null;
            }
        }
 public static void OrContentDisplay(XDataRow row)
 {
     if (row != null)
     {
         foreach (UserRender render in row.UserRenderList)
         {
             if (render is DoctorOrderCard)
             {
                 var card = render as DoctorOrderCard;
                 card.ConfigPath = "\\modules\\iihci\\ui\\commoncontent\\OrderContent.xml";
             }
         }
     }
 }
 public static void SetDoctorCardColor(XDataRow row, Color col)
 {
     if (row == null)
     {
         return;
     }
     foreach (UserRender render in row.UserRenderList)
     {
         if (render is DoctorOrderCard)
         {
             var card = render as DoctorOrderCard;
             card.ForeColor = col;
         }
     }
 }
Exemple #26
0
 private void updateCustomerControlInfo(XDataRow row, EmsOrDrug drug)
 {
     if (row != null && row.ColumnCellDict.ContainsKey("customercolumn_stock"))
     {
         if (drug.Fact_count == null)
         {
             drug.Fact_count = 0;
         }
         if (drug.Name_unit_sale == null)
         {
             drug.Name_unit_sale = "";
         }
         string strMed_unit = drug.Fact_count + drug.Name_unit_sale;
         row.ColumnCellDict["customercolumn_stock"].SetValue(strMed_unit);
     }
 }
Exemple #27
0
        void xapFormControl_DataChanged(object sender, DataChangedEventArgs e)
        {
            if (e.PropName == "Fg_self")
            {
                //gridView.DataTable.SelectedRowChanged -= OnGridView_RowSelectChanged;
                if (e.Input != null && e.Input.Equals("true"))
                {
                    warncard.Visible = true;

                    List <XDataRow> selectRows = gridView.GetSelectedRows();//.DataTable.GetSelectedRows();
                    if (selectRows != null)
                    {
                        selectRows.ForEach(p => p.Selected = false);
                    }
                    gridView.Enabled = false;
                    if (Event_SelectChanged != null)
                    {
                        this.setFgSelfValue();
                        XSelectedRowChangedEventArgs rowChanged = new XSelectedRowChangedEventArgs();
                        rowChanged.Data = SelectedDrug;
                        Event_SelectChanged(gridView, rowChanged);
                    }
                }
                else
                {
                    warncard.Visible = false;
                    gridView.Enabled = true;
                    XDataRow row = gridView.DataTable.GetFirstRow();
                    if (row != null)
                    {
                        row.Selected = true;
                        row.Focus();
                        if (Event_SelectChanged != null && SelectedDrug != null)
                        {
                            cr.Checked = false;
                            this.setFgSelfValue();
                            XSelectedRowChangedEventArgs rowChanged = new XSelectedRowChangedEventArgs();
                            rowChanged.Data = SelectedDrug;
                            Event_SelectChanged(gridView, rowChanged);
                        }
                    }
                }
                //gridView.DataTable.SelectedRowChanged += OnGridView_RowSelectChanged;
            }
            //this.xapFormControl.Refresh();
        }
Exemple #28
0
        void tabControl_DataDisplay(Object sender, XDataDisplayEventArgs e)
        {
            XDataRow row = sender as XDataRow;

            if (row != null)
            {
                foreach (UserRender render in row.UserRenderList)
                {
                    if (render is DoctorOrderCard)
                    {
                        DoctorOrderCard card = render as DoctorOrderCard;

                        card.ConfigPath = "\\modules\\iihci\\ui\\commoncontent\\OrderContent.xml";
                    }
                }
            }
        }
Exemple #29
0
 public void ClearSelectedState(XDataRow row = null)
 {
     if (row == null)
     {
         var listSelectedRows = tableGridControl.GetSelectedRows();
         if (listSelectedRows != null)
         {
             for (int index = listSelectedRows.Count - 1; index >= 0; --index)
             {
                 listSelectedRows[index].Selected = false;
             }
         }
     }
     else
     {
         row.Selected = false;
     }
 }
Exemple #30
0
        //草药删除
        void btnDelete_MouseClick(object sender, MouseEventArgs e)
        {
            XDataRow row = gv.DataTable.GetFirstRow();

            if (row != null)
            {
                EmsOrDrug delDo = row.DataSource as EmsOrDrug;
                //删除前应该提示一下吧?
                if (delDo != null)
                {
                    cof.DeleteOrDrug(this.EmsHeadDO, delDo);
                    gv.DataTable.DataSource = null;
                }
            }
            else
            {
                this.ShowInfo("请选择要删除的草药");
            }
        }