Exemplo n.º 1
0
        protected override void OnXapFormControl_AllowEditing(object sender, AllowEditingEventArgs e)
        {
            EmsOrDrug dataSource = e.Object as EmsOrDrug;

            if (!this.enableEdit)
            {
                e.Cancel = true;
                return;
            }

            // 费用描述字段不能编辑
            if (e.PropName.Equals("Des"))
            {
                e.Cancel = true;

                return;
            }
            // 如果频次为 Once ,禁止修改总量 -- 取消总量限制修改
            if ((e.PropName.Equals("Use_days") /*|| e.PropName.Equals("customercolumn_sale_unit")*/) && BdSrvDictCodeConst.SD_FREQUNIT_ONCE.Equals(dataSource.Sd_frequnitct))
            {
                e.Cancel = true;
            }
            else
            {
                e.Cancel = DisableEditHP(e.PropName, dataSource, DisableEditSrv(dataSource));
            }
        }
Exemplo n.º 2
0
        public void HandleAllowEditing(object sender, AllowEditingEventArgs e)
        {
            var drug = e.Object as AddFeeDTO;

            // ************查询服务是否在可录入范围内*****************
            if (drug != null)
            {
                if (!iscontainSrv(drug.Id_srv))
                {
                    e.Cancel = true;
                }
                else
                {
                    e.Cancel = false;

                    if (e.PropName.Equals("Name_mm"))
                    {
                        if (drug.Fg_mm == false)
                        {
                            // ************设置物品为不可录入*****************
                            e.Cancel = true;
                        }
                    }
                }

                if (e.PropName.Equals("Name_mm"))
                {
                    if (drug.Id_srv == null)
                    {
                        // ************设置物品为不可录入*****************
                        e.Cancel = true;
                    }
                }
            }
        }
Exemplo n.º 3
0
        protected override void OnXapFormControl_AllowEditing(object sender, AllowEditingEventArgs e)
        {
            if (e.PropName.Equals("Name_srv"))
            {
                var grid = sender as XapFormGridControl;
                // 未选择患者提示信息
                //if (BizAssMessageBoxUtil.ShowPatIsNullMsg(GetViewModel().GetEnt4BannerDTO(), ""))
                //{
                //    e.Cancel = true;
                //    return;
                //}

                if (GetViewModel().GetEnt4BannerDTO() == null || GetViewModel().GetEnt4BannerDTO().Sd_status == EnDictCodeConst.SD_ENSTATUS_OP_FINISH)
                {
                    e.Cancel = true;
                }
                else
                {
                    bool rst = true;
                    if (grid.SelectedRowsCount > 0)
                    {
                        //点击处置开立列表,判断诊断是否为空,诊断是否更改
                        if (RelativeUIParam.RELATIVERATIO > RelativeUIParam.TEMPLETECHANGEDRATIO)
                        {
                            var DiListView = this.Context.Config.GetInstance("DiListView") as DiListView;
                            if (null != DiListView)
                            {
                                rst = DiListView.CheckDiEditable(true);
                            }
                        }
                        else
                        {
                            var DiBannerView = this.Context.Config.GetInstance("DiBannerView") as DiBannerView;
                            if (null != DiBannerView)
                            {
                                rst = DiBannerView.CheckDiEditable();
                            }
                        }
                    }

                    if (rst)
                    {
                        this.SetDataPolicy(true);
                        e.Cancel = false;
                    }
                    else
                    {
                        e.Cancel = true;
                        if (RelativeUIParam.RELATIVERATIO <= RelativeUIParam.TEMPLETECHANGEDRATIO)
                        {
                            this.SentNotify(EventCodeType.NM_ORDI_EDIT);
                        }
                    }
                }
            }
            else
            {
                e.Cancel = true;
            }
        }
Exemplo n.º 4
0
        protected override void OnXapFormControl_AllowEditing(object sender, AllowEditingEventArgs e)
        {
            EmsObsItemDO model = this.GetViewModel().GetFormDataSource() as EmsObsItemDO;
            var          ds    = e.Object as EmsOrDrug;

            if (e.PropName.Equals("Price"))
            {
                e.Cancel = !(ds.Eu_blmd == Convert.ToInt32(MedSrvBlModeEnum.MANUALBL));
            }
            else if (model != null && model.Fg_set != FBoolean.True && e.PropName.Equals("customercolumn_details"))
            {
                e.Cancel = true;
            }
            else if (e.PropName.Equals("Name_srv") && null != this.GetViewModel() && !System.String.IsNullOrEmpty(GetViewModel().getCiEmsDTO().Id_or))
            {
                e.Cancel = true;
            }
            else if (e.PropName.Equals("customercolumn_sale_unit"))
            {
                e.Cancel = string.IsNullOrEmpty(ds.Id_freq) || ds.Sd_frequnitct.Equals(BdSrvDictCodeConst.SD_FREQUNIT_ONCE);
            }
            else
            {
                base.OnXapFormControl_AllowEditing(sender, e);
            }
        }
Exemplo n.º 5
0
 protected override void OnXapFormControl_AllowEditing(object sender, AllowEditingEventArgs e)
 {
     if (e.PropName.Equals("Name_srv") && null != this.GetViewModel() && !System.String.IsNullOrEmpty(GetViewModel().getCiEmsDTO().Id_or))
     {
         e.Cancel = true;
     }
     else
     {
         base.OnXapFormControl_AllowEditing(sender, e);
     }
 }
Exemplo n.º 6
0
 void xapFormControl1_AllowEditing(object sender, AllowEditingEventArgs e)
 {
     if (e.Object is EmsOrDrug && e.PropName.Equals("customercolumn_sale_unit"))
     {
         e.Cancel = true;
     }
     else
     {
         e.Cancel = false;
     }
 }
Exemplo n.º 7
0
        /////////添加检验、检查、诊疗多剂量多次执行,杨敬本20171111
        protected override void OnXapFormControl_AllowEditing(object sender, AllowEditingEventArgs e)
        {
            EmsObsItemDO model = this.GetViewModel().GetFormDataSource() as EmsObsItemDO;

            if (model != null && model.Fg_set != FBoolean.True)
            {
                e.Cancel = true;
            }
            else
            {
                base.OnXapFormControl_AllowEditing(sender, e);
            }
        }
Exemplo n.º 8
0
        protected override void OnXapFormControl_AllowEditing(object sender, AllowEditingEventArgs e)
        {
            var ds = e.Object as EmsOrDrug;

            if (e.PropName.Equals("Price"))
            {
                e.Cancel = !(ds.Eu_blmd == Convert.ToInt32(MedSrvBlModeEnum.MANUALBL));
            }
            else
            {
                base.OnXapFormControl_AllowEditing(sender, e);
            }
        }
Exemplo n.º 9
0
 protected override void OnXapFormControl_AllowEditing(object sender, AllowEditingEventArgs e)
 {
     if (e.PropName.Equals("customercolumn_sale_unit"))
     {
     }
     else if (!e.PropName.Equals("Name_srv"))
     {
         e.Cancel = String.IsNullOrEmpty((e.Object as EmsOrDrug).Id_srv);
     }
     else
     {
         base.OnXapFormControl_AllowEditing(sender, e);
     }
 }
Exemplo n.º 10
0
        /// <summary>
        /// 处理表格的编辑规则
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected override void OnXapFormControl_AllowEditing(object sender, AllowEditingEventArgs e)
        {
            // 由于网络延迟加载数据缓慢,此时禁止用户的所有操作
            if (this.IsLoading)
            {
                e.Cancel = true;
                return;
            }
            if (isReadOnly)
            {
                e.Cancel = true;
                return;
            }
            if (this.model.GetEnt4BannerDTO() != null && this.model.GetEnt4BannerDTO().Sd_status == EnDictCodeConst.SD_ENSTATUS_OP_FINISH)
            {
                e.Cancel = true;

                return;
            }

            // 费用描述字段不能编辑
            if (e.PropName.Equals("Des_srv") || e.PropName.Equals("Code_or"))
            {
                e.Cancel = true;

                return;
            }

            CiOrdFeeSrvDTO ordFeeBill = e.Object as CiOrdFeeSrvDTO;

            if (null != ordFeeBill)
            {
                CiOrderDO ord = this.model.GetOrderDO(ordFeeBill.Id_or);
                if (null != ord && ord.Fg_sign != null && ord.Fg_sign.Value)
                {
                    e.Cancel = true;
                    return;
                }
                if (string.IsNullOrEmpty(ordFeeBill.Id_srv) && !e.PropName.Equals("Name_srv"))
                {
                    e.Cancel = true;
                    return;
                }


                e.Cancel = DisableEditHP(e.PropName, ordFeeBill, DisableEditSrv(e.PropName, ordFeeBill)); //!EnableAllowEdit(e.PropName,ordFeeBill);
            }
        }
Exemplo n.º 11
0
        //void TrOrderRisView_AllowEditing(object sender, xap.rui.control.formcontrol.model.AllowEditingEventArgs e)
        //{
        //    if (e.PropName.Equals("Use_days") || e.PropName.Equals("customercolumn_sale_unit"))
        //    {
        //        // 当频次下次数是一次的时候,检查的使用天数、总量都不能修改
        //        EmsOrDrug ds = e.Object as EmsOrDrug;
        //        e.Cancel = (ds.Freqct != null && ds.Sd_frequnitct == BdSrvDictCodeConst.SD_FREQUNIT_ONCE);
        //    }

        //}

        protected override void OnXapFormControl_AllowEditing(object sender, AllowEditingEventArgs e)
        {
            EmsObsItemDO model = this.GetViewModel().GetFormDataSource() as EmsObsItemDO;

            if (model != null && model.Fg_set != FBoolean.True && e.PropName.Equals("customercolumn_details"))
            {
                e.Cancel = true;
            }
            else if (e.PropName.Equals("Name_srv") && null != this.GetViewModel() && !System.String.IsNullOrEmpty(GetViewModel().getCiEmsDTO().Id_or))
            {
                e.Cancel = true;
            }
            else
            {
                base.OnXapFormControl_AllowEditing(sender, e);
            }
        }
Exemplo n.º 12
0
        protected override void OnXapFormControl_AllowEditing(object sender, AllowEditingEventArgs e)
        {
            var ds = e.Object as EmsConsItemDO;

            if (e.PropName.Equals("Price"))
            {
                e.Cancel = !(ds.Eu_blmd == Convert.ToInt32(MedSrvBlModeEnum.MANUALBL));
            }
            else if (e.PropName.Equals("Name_srv") && null != this.GetViewModel() && !System.String.IsNullOrEmpty(GetViewModel().getCiEmsDTO().Id_or))
            {
                e.Cancel = true;
            }
            else
            {
                base.OnXapFormControl_AllowEditing(sender, e);
            }
        }
Exemplo n.º 13
0
        private void XapFormControl_AllowEditing(object sender, AllowEditingEventArgs e)
        {
            EmsItemInOp item = e.Object as EmsItemInOp;

            if (item == null)
            {
                return;
            }

            string[] readonlyNames = new[] { "Name_role", "Name_emp_op" };
            string[] readonlyProps = new[] { CiDictCodeConst.SD_OP_ROLE_ZDYS, CiDictCodeConst.SD_OP_ROLE_DYZS };

            if (readonlyNames.Contains(e.PropName) && readonlyProps.Contains(item.Sd_role))
            {
                e.Cancel = true;
            }
        }
Exemplo n.º 14
0
        void xapFormControl1_AllowEditing(object sender, AllowEditingEventArgs e)
        {
            EmsObsLap obs = e.Object as EmsObsLap;

            // 只读情况,表格不可以编辑;

            if (this.IsReadOnly || e.PropName.ToLower().Equals("name_srv"))
            {
                e.Cancel = true;
            }
            else if (e.PropName == "Name_body")
            {
                //if (obs != null)
                //    e.Object.SetPropValue("Name_body", obs.Name_body);
                e.Cancel = true;
            }
            else if (e.PropName.Equals("Name_pos"))
            {
                //if (obs != null)
                // e.Cancel = (obs.Fg_pos == null || !obs.Fg_pos.Value);
                e.Cancel = true;
            }
        }
Exemplo n.º 15
0
 protected virtual void OnXapFormControl_AllowEditing(object sender, AllowEditingEventArgs e)
 {
 }
Exemplo n.º 16
0
 private void xapFormControl_AllowEditing(object sender, AllowEditingEventArgs e)
 {
     model.HandleAllowEditing(sender, e);
 }