示例#1
0
        /// <summary>
        /// 设置时间控件的最大值
        /// </summary>
        /// <param name="xapFormControl1"></param>
        /// <param name="Context"></param>
        /// <param name="tabName"></param>
        /// <param name="itemkey"></param>
        /// <param name="datetime"></param>
        public void setMaxTime(XapFormControl xapFormControl1, BaseContext Context, string tabName, string itemkey, DateTime datetime)
        {
            UserRender us = xapFormControl1.GetUserRender(tabName, itemkey);

            if (us.Renders[0] is XCalendarTimerComboBox)
            {
                XCalendarTimerComboBox timebox = us.Renders[0] as XCalendarTimerComboBox;
                if (timebox != null)
                {
                    if (datetime != null)
                    {
                        timebox.MaxDate = datetime;
                    }
                    else
                    {
                        timebox.MaxDate = null;
                    }
                }
            }
            else if (us.Renders[0] is XCalendarComboBox)
            {
                XCalendarComboBox timebox = us.Renders[0] as XCalendarComboBox;
                if (timebox != null)
                {
                    if (datetime != null)
                    {
                        timebox.MaxDate = datetime;
                    }
                    else
                    {
                        timebox.MaxDate = null;
                    }
                }
            }
        }
示例#2
0
        void xapFormControl_FormCreated(object sender, EventArgs e)
        {
            XTabPage patPage = this.xapFormControl.GetTabPageByTabCode("patmsg");

            if (patPage != null)
            {
                //patPage.PageControl.Visible = false;
                this.patvView = new ConsPatDetailCardView()
                {
                    Dock = DockStyle.Fill
                };
                if (!this.patvView.Created)
                {
                    this.patvView.CreateControl();
                }
                patPage.PageControl = this.patvView;
                if (this.id_ent != null)
                {
                    this.patvView.model = this.model;
                    this.patvView.LoadData();
                }
            }
            this.gv_eview              = this.xapFormControl.GetGridView("review");
            this.gv_invite             = this.xapFormControl.GetGridView("consorg");
            this.btnEdit               = this.xapFormControl.GetUserRender("consap", "btn_edit");
            this.btSave                = this.xapFormControl.GetUserRender("consap", "btn_save");
            this.btnCancle             = this.xapFormControl.GetUserRender("consap", "btn_cancle");
            this.btnEdit.Visible       = false;
            this.btSave.Visible        = false;
            this.btnCancle.Visible     = false;
            this.btnEdit.MouseClick   += new MouseEventHandler(button_MouseClick);
            this.btSave.MouseClick    += new MouseEventHandler(button_MouseClick);
            this.btnCancle.MouseClick += new MouseEventHandler(button_MouseClick);
        }
示例#3
0
        private void XapFormControl_FormCreated(object sender, EventArgs e)
        {
            xapFormControl.SetTabPageEnabled("opitem", !IsReadOnly);
            xapFormControl.SetTopPanelHeight(xap.cli.sdk.common.RelativeUIParam.RELATIVERATIO > xap.cli.sdk.common.RelativeUIParam.TEMPLETECHANGEDRATIO ? 535 : 335);
            xapFormControl.SetToilHeight(150);

            //List<ControlTab> tabs = xapFormControl.FormModel.Tabs;
            //dic = tabs[0].Pages[0].DicUserRenders;

            gv_emp = xapFormControl.GetGridView("otheremp");
            gv_mm  = xapFormControl.GetGridView("eisai");
            gv_mm.DataTable.MouseClick += new System.Windows.Forms.MouseEventHandler(gv_mm_MouseClick);
            gv_oper = xapFormControl.GetGridView("addsug");

            //gv_mm.MouseClick += gv_mm_MouseClick;
            //if (EmsHeadDO.IsNEW || this.CiEmsDTO.Sd_su_or == null || this.CiEmsDTO.Sd_su_or == "0")
            {
                SetTabCommand();
            }
            preHeight = indicatorControl.Height;

            UserRender btn = xapFormControl.GetUserRender("opitem", "btn");

            if (btn != null)
            {
                btn.Visible = false;
            }
            //xapFormControl.SetEditPolicy(true);
            //SetGridPolicy(true);this.thisthis.
            xapFormControl.ShowTabPage("eisai", false);//隐藏卫材页签,高值耗材 需求不确定
        }
示例#4
0
        private void XapFormControl_FormCreated(object sender, EventArgs e)
        {
            bloodQuanRender = xapFormControl.GetUserRender("bt_card", "blood_med") as XLabelBaseUserRender;
            bloodQuanRender.ValueTextChanged += new EventHandler(bloodQuanRender_ValueTextChanged);
            bloodQuanRender.MaxLength         = 5;
            bloodQuanRender.MultilineNum      = 1;
            (bloodQuanRender.UserRender as XUnitTextBoxMul).IsNumber = true;
            (bloodQuanRender.UserRender as XUnitTextBoxMul).MinValue = 1;

            preHeight = indicatorControl.Height;

            xapFormControl.GetUserRender("bt_card", "no_applyform").Enabled    = false;
            xapFormControl.GetUserRender("bt_card", "name_emp_create").Enabled = false;
            //indicatorControl.Width = xapFormControl.ClientRectangle.Width;

            XLabelBaseUserRender checkbox = xapFormControl.GetUserRender("bt_card", "fg_db") as XLabelBaseUserRender;

            checkbox.ValueTextChanged += new EventHandler(checkbox_ValueTextChanged);
            UserRender ur = xapFormControl.GetUserRender("bt_card", "no_db");

            ur.Enabled = EmsHeadDO.Emsapbt.Fg_db == true ? true : false;

            if (ur is XLabelBaseUserRender)
            {
                (ur as XLabelBaseUserRender).NullFlag = !ur.Enabled;
            }
        }
示例#5
0
        private void xapFormControl1_FormCreated(object sender, EventArgs e)
        {
            xapFormControl1.RefFilter    += xapFormControl1_RefFilter;
            xapFormControl1.AllowEditing += xapFormControl1_AllowEditing;

            fg_mp_bed = xapFormControl1.GetUserRender("ordobs", "fg_mp_bed") as XLabelBaseUserRender;

            //fg_mp_bed.ValueTextChanged += new EventHandler(fg_mp_bed_ValueChanged);
            gv = xapFormControl1.GetGridView("body");                   //检查部位

            gv_drug         = this.xapFormControl1.GetGridView("drug"); // 药品列表
            gv_drug.Visible = false;

            xapFormControl1.GetUserRender("ordobs", "checkdrug").Visible = false;  //隐藏检查药品

            UserRender btnDel = xapFormControl1.GetUserRender("ordobs", "btnDel"); //删除药品

            btnDel.MouseClick += new MouseEventHandler(btnDel_MouseClick);
            UserRender btnAdd = xapFormControl1.GetUserRender("ordobs", "btnAdd");//添加药品

            btnAdd.MouseClick += new MouseEventHandler(btnAdd_MouseClick);
            btnDel.Visible     = false;
            btnAdd.Visible     = false;

            // SetGridPolicy(true);
        }
示例#6
0
        void xapFormControl1_FormCreated(object sender, EventArgs e)
        {
            SetGridPolicy(true);
            this.xapFormControl1.SetTopPanelHeight(330);
            //this.xapFormControl1.SetToilHeight(50);

            UserRender btnSearch = xapFormControl1.GetUserRender("consres", "query");//保存

            btnSearch.MouseClick += new MouseEventHandler(btnSearch_MouseClick);
            //UserRender btn = xapFormControl1.GetUserRender("btn", "btnSave");//保存
            //btn.MouseClick += new MouseEventHandler(btnSave_MouseClick);
            gv_consItem          = xapFormControl1.GetGridView("conslist");
            gv_consItem.ReadOnly = true;

            gv_invite                    = xapFormControl1.GetGridView("consitem");
            gv_invite.ReadOnly           = false;
            gv_invite.DataTable.ReadOnly = false;
            gv_invite.DataTable.Columns["Name_org"].ReadOnly       = true;
            gv_invite.DataTable.Columns["Name_dep_emp"].ReadOnly   = true;
            gv_invite.DataTable.Columns["Name_emp_title"].ReadOnly = true;
            gv_invite.DataTable.Columns["Dt_response"].ReadOnly    = true;

            group = this.xapFormControl1.GetUserRender("consres", "resgroup") as XRadioboxGroup;
            UserRender contp = xapFormControl1.GetUserRender("consres", "name_constp");//保存

            contp.Enabled = true;

            this.xapFormControl1.ShowTabPage("consitem", true);
        }
示例#7
0
        void xapFormControl1_FormCreated(object sender, EventArgs e)
        {
            XTabControl       tabControl = new XTabControl();
            List <ControlTab> tabs       = xapFormControl1.FormModel.Tabs;

            dic = tabs[0].Pages[0].DicUserRenders;

            XTabControl tab = tabs[0].tabContrl;

            gv             = xapFormControl1.GetGridView("drug");//药品列表
            gv.MouseClick += new MouseEventHandler(gv_MouseClick);

            UserRender btnDelete = xapFormControl1.GetUserRender("drugsUse", "btndelete");//删除

            btnDelete.MouseClick += new MouseEventHandler(btnDelete_MouseClick);

            UserRender btnAdd = this.xapFormControl1.GetUserRender("drugsUse", "btnAdd");//新增按钮

            btnAdd.MouseClick += new MouseEventHandler(btnAdd_MouseClick);

            UserRender             ur_begin = xapFormControl1.GetUserRender("drugsUse", "dt_begin_ui");
            XCalendarTimerComboBox dt_begin = ur_begin.Renders[0] as XCalendarTimerComboBox;

            dt_begin.MouseClick += new MouseEventHandler(dt_begin_MouseClick);

            UserRender             ur_end = xapFormControl1.GetUserRender("drugsUse", "dt_end_ui");
            XCalendarTimerComboBox dt_end = ur_end.Renders[0] as XCalendarTimerComboBox;

            dt_end.MouseClick += new MouseEventHandler(dt_end_MouseClick);

            SetGridPolicy(true);
            gv.DataTable.ReadOnly = false;
            gv.DataTable.Columns["Spec_mm"].ReadOnly = true;
            //gv.DataTable.Columns["Quan_med"].ReadOnly = true;

            //----------药品说明----------------------
            XTabControl tabControl1 = tabs[0].tabContrl;
            XTabPage    xtab        = tabControl1.XTabPages[1];

            tabControl1.SelectedIndexChanged += new XTabControl.selectedIndexChanged(tabControl1_SelectedIndexChanged);
            xtab.RemoveRenderAll();
            xtab.AddRender(desView);
            //待歼付数
            ((XNumbericUpDown)((XLabelBaseUserRender)xapFormControl1.GetUserRender("drugsUse", "orders_boil")).UserRender).MinValue = 0;
            ((XNumbericUpDown)((XLabelBaseUserRender)xapFormControl1.GetUserRender("drugsUse", "orders")).UserRender).MinValue      = 1;
            //为医嘱备注绑定事件
            ((XLabelBaseUserRender)xapFormControl1.GetUserRender("drugsUse", "note_or")).GotFocus  += new EventHandler(OrderHerbsView_GotFocus);
            ((XLabelBaseUserRender)xapFormControl1.GetUserRender("drugsUse", "note_or")).LostFocus += new EventHandler(OrderHerbsView_LostFocus);
            xapFormControl1.GotFocus  += new EventHandler(xapFormControl1_GotFocus);
            xapFormControl1.LostFocus += new EventHandler(xapFormControl1_LostFocus);
            // 注册最后一次的回车换行的操作逻辑
            this.RegEnterKeyOverEvent(row =>
            {
                // 新增一行
                btnAdd_MouseClick(this, null);
                return(true);
            },
                                      null);
        }
示例#8
0
        void xapFormControl_ModelFilled(object sender, EventArgs e)
        {
            UserRender quan_med = xapFormControl.GetUserRender("common", "quan_med");

            quan_med.Focus();
            SetGridPolicy(!IsReadOnly);
            setEndTimeRenderEnabled();
        }
示例#9
0
        void xapFormControl1_ModelFilled(object sender, EventArgs e)
        {
            UserRender name_dep_to = xapFormControl1.GetUserRender("trans", "name_dep_to");

            name_dep_to.Focus();
            xapFormControl1.SetEditPolicy(!IsReadOnly);
            TimerComboBoxMaxAndMin.GetInstance().setMinTime(this.xapFormControl1, this.Context, "trans", "dt_end", this.EmsHeadDO.Emsaptrans.Dt_effe);
        }
示例#10
0
 void xapFormControl_FormCreated(object sender, EventArgs e)
 {
     gv_consList          = xapFormControl.GetGridView("grid");
     gv_consList.ReadOnly = true;
     btnAgree             = xapFormControl.GetUserRender("button", "btn_agree");
     btnAgree.Enabled     = false;
     btnAgree.MouseClick += new MouseEventHandler(btnAgree_MouseClick);
 }
示例#11
0
 void dt_begin_MouseClick(object sender, MouseEventArgs e)
 {
     if (this.EmsHeadDO.Emsdrugs.Dt_begin_ui == null)
     {
         UserRender             ur_begin = xapFormControl1.GetUserRender("drugsUse", "dt_begin_ui");
         XCalendarTimerComboBox dt_begin = ur_begin.Renders[0] as XCalendarTimerComboBox;
         dt_begin.TodayDateTime = this.NowTime();
     }
 }
示例#12
0
        protected override void OnXapFormControl_FormCreated(object sender, EventArgs e)
        {
            base.OnXapFormControl_FormCreated(sender, e);

            checkbox = this.GetXapFormControl().GetUserRender("preblood", "fg_db") as XLabelBaseUserRender;
            checkbox.ValueTextChanged += new EventHandler(checkbox_ValueTextChanged);
            UserRender ur = this.GetXapFormControl().GetUserRender("preblood", "no_db");

            ur.Enabled = checkbox.Checked;
        }
示例#13
0
        private void xapFormControl_FormCreated(object sender, EventArgs e)
        {
            btnSave  = xapFormControl.GetUserRender("entprove", "save");
            btnPrint = xapFormControl.GetUserRender("entprove", "print");

            btnSave.MouseClick  += new MouseEventHandler(btnSave_MouseClick);
            btnPrint.MouseClick += new MouseEventHandler(btnPrint_MouseClick);

            btnPrint.Enabled = !String.IsNullOrWhiteSpace(entDiProveDo.Id_diprove);
        }
示例#14
0
        private void xapFormControl1_FormCreated(object sender, EventArgs e)
        {
            cof.getControlByName(xapFormControl1, "drugsUse", "fg_long").Enabled = false;
            cof.getControlByName(xapFormControl1, "drugsUse", "bak_des").Visible = false;
            cof.getControlByName(xapFormControl1, "drugsUse", "dt_fail").Visible = false;

            this.EmsHeadDO.Emsdrugs.Fg_treat = true;//默认为治疗用药

            cof.adjustHeight(this.xapFormControl1, "drugsUse", adjustHeightIds, -58);
            XTabControl       tabControl = new XTabControl();
            List <ControlTab> tabs       = xapFormControl1.FormModel.Tabs;

            dic            = tabs[0].Pages[0].DicUserRenders;
            gv             = xapFormControl1.GetGridView("drug");//药品列表
            gv.MouseClick += new MouseEventHandler(gv_MouseClick);

            gv_change         = this.xapFormControl1.GetGridView("change");//变动用药
            gv_change.Visible = false;

            //SetGridPolicy(true);
            xapFormControl1.SetTabPageEnabled("drugsUse", !IsReadOnly);

            SetGridPolicy(!IsReadOnly);
            cof.getControlByName(xapFormControl1, "drugsUse", "fg_long").Enabled = false;
            if (cof.getControlByName(xapFormControl1, "drugsUse", "fg_long").ValueCode == "True" && this.EmsHeadDO.IsNEW)
            {
                this.EmsHeadDO.Emsdrugs.Use_days = null;
            }

            //cof.getControlByName(xapFormControl1,"drugsUse", "fg_long").Visible = false;
            gv.ReadOnly = false;
            gv.DataTable.Columns[0].ReadOnly                = true;
            gv.DataTable.Columns[1].ReadOnly                = true;
            gv.DataTable.Columns[4].ReadOnly                = true;
            gv.DataTable.Columns["Quan_cur"].ReadOnly       = true;
            gv.DataTable.Columns["Name_unit_sale"].ReadOnly = true;
            XTabControl tabControl1 = tabs[0].tabContrl;
            XTabPage    xtab        = tabControl1.XTabPages[1];

            tabControl1.SelectedIndexChanged += new XTabControl.selectedIndexChanged(tabControl1_SelectedIndexChanged);
            xtab.Controls.Clear();
            xtab.Controls.Add(desView);
            //失效日期控件
            UserRender usfail = xapFormControl1.GetUserRender("drugsUse", "dt_fail");

            dt_fail = usfail.Renders[0] as xap.cli.sdk.render.Items.XCalendarTimerComboBox;

            cof.getControlByName(xapFormControl1, "drugsUse", "work_time").LostFocus += new EventHandler(Work_time_LostFocus);
            cof.getControlByName(xapFormControl1, "drugsUse", "dt_fail").LostFocus   += new EventHandler(Dt_fail_LostFocus);

            if (this.EmsHeadDO.Emsdrugs.EmsOrDrugList[0].Id_anti == null)
            {
            }
        }
示例#15
0
        private void checkbox_ValueTextChanged(object sender, EventArgs e)
        {
            UserRender ur = this.GetXapFormControl().GetUserRender("preblood", "no_db");

            ur.Enabled = !ur.Enabled;
            (ur as XLabelBaseUserRender).NullFlag = !ur.Enabled;
            if (!ur.Enabled)
            {
                (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).Emsapbt.No_db = null;
            }
        }
示例#16
0
        void xapFormControl1_ModelFilled(object sender, EventArgs e)
        {
            if (this.model.rptArray.Count() != 0 && this.model.rptArray[0].Sd_su_rpt == CiDictCodeConst.SD_SU_RPT_SIGN)
            {
                xapFormControl1.SetEditPolicy(false);
            }
            else
            {
                xapFormControl1.SetEditPolicy(true);
            }

            this.gv_invite.DataTable.DataSource = this.model.consitemList;
            if (this.model.rptArray.Count() != 0)
            {
                //   SenMgs(this.model.rptArray[0].Sd_su_rpt);
            }
            //判断患者类型
            pattp = this.model.getEntpattp(this.ent4BannerDto.Id_ent);
            if (pattp == "2" || pattp == "9")
            {
                this.xapFormControl1.SetEditPolicy(false);
                SenPattp("unity");
            }
            else
            {
                this.xapFormControl1.SetEditPolicy(true);
                SenPattp("ununity");
                if (this.model.rptArray.Count() > 0)
                {
                    CiOrdConsRptDO conrpt = this.model.rptArray[0];
                    if (conrpt.Sd_su_rpt == CiDictCodeConst.SD_SU_RPT_SIGN)
                    {
                        this.xapFormControl1.SetEditPolicy(false);
                    }
                }
            }


            UserRender             us   = xapFormControl1.GetUserRender("consrpt", "dt_plan");
            XCalendarTimerComboBox time = us.Renders[0] as XCalendarTimerComboBox;

            if (time != null)
            {
                //会诊记录的最大时间暂时不限制,最小时间大于入科时间
                //     DateTime datetime = this.NowTime();
                //        time.TodayDateTime = datetime;
                time.MinDate = new GetInHosTime().GetPatInHosTime(this.ent4BannerDto.Id_ent);
                //int maxHours = Context.GetGroupParam<int>(ICiOrdNSysParamConst.SYS_PARAM_OrEarlyEntryMaxHours);
                //if (maxHours == null)
                //    maxHours = 72;
                //       time.MaxDate = datetime.AddHours(maxHours);
            }
        }
示例#17
0
        private void XapFormControl_ModelFilled(object sender, EventArgs e)
        {
            SetGridDataSource();
            if (EmsHeadDO.Emsapcons.EmsConsItem.Count == 1)
            {
                //consItemGrid.DataTable.Rows[0].SetMultiSelectStatus(true);
                consItemGrid.DataTable.Rows[0].Selected = true;
            }

            UserRender dt_plan = xapFormControl.GetUserRender("cons", "dt_plan");

            dt_plan.Focus();
        }
示例#18
0
        private void xapFormControl1_FormCreated(object sender, EventArgs e)
        {
            XTabControl       tabControl = new XTabControl();
            List <ControlTab> tabs       = xapFormControl1.FormModel.Tabs;

            dic = tabs[0].Pages[0].DicUserRenders;

            XTabControl tab = tabs[0].tabContrl;
            //UserRender ur = xapFormControl1.GetUserRender("drugsUse", "name_dep");//获取表格上方最近的控件

            //Point p = new Point(ur.Location.X, ur.Location.Y + 20);//计算表格应该放的位置

            List <XLabelBaseUserRender> xap = xapFormControl1.RendersListMustInput;

            gv             = xapFormControl1.GetGridView("drug");//药品列表
            gv.MouseClick += new MouseEventHandler(gv_MouseClick);

            //gv_change = this.xapFormControl1.GetGridView("change");//变动用药

            //UserRender btnOK = xapFormControl1.GetUserRender("drugsUse", "btnSave");//保存
            //btnOK.MouseClick += new MouseEventHandler(btnOK_MouseClick);

            UserRender btndelete = xapFormControl1.GetUserRender("drugsUse", "btndelete");//删除

            btndelete.MouseClick += new MouseEventHandler(btndelete_MouseClick);
            UserRender btnAdd = this.xapFormControl1.GetUserRender("drugsUse", "btnAdd");//新增按钮

            btnAdd.MouseClick += new MouseEventHandler(btnAdd_MouseClick);



            SetGridPolicy(true);
            gv.DataTable.ReadOnly = false;
            gv.DataTable.Columns["Spec_mm"].ReadOnly = true;
            //gv.DataTable.Columns["Quan_med"].ReadOnly = true;

            //----------药品说明----------------------
            //为医嘱备注绑定事件
            ((XLabelBaseUserRender)xapFormControl1.GetUserRender("drugsUse", "note_or")).GotFocus  += new EventHandler(OrderHerbsView_GotFocus);
            ((XLabelBaseUserRender)xapFormControl1.GetUserRender("drugsUse", "note_or")).LostFocus += new EventHandler(OrderHerbsView_LostFocus);

            XTabControl tabControl1 = tabs[0].tabContrl;
            XTabPage    xtab        = tabControl1.XTabPages[1];

            tabControl1.SelectedIndexChanged += new XTabControl.selectedIndexChanged(tabControl1_SelectedIndexChanged);
            xtab.Controls.Clear();
            xtab.Controls.Add(desView);
            //待歼付数
            ((XNumbericUpDown)((XLabelBaseUserRender)xapFormControl1.GetUserRender("drugsUse", "orders_boil")).UserRender).MinValue = 0;
            ((XNumbericUpDown)((XLabelBaseUserRender)xapFormControl1.GetUserRender("drugsUse", "orders")).UserRender).MinValue      = 1;
        }
示例#19
0
        private void xapFormControl_FormCreated(object sender, EventArgs e)
        {
            UserRender printRender = AssXapFormUtils.GetUserRender(xapFormControl, "choose.print");

            printRender.MouseClick += PrintRender_MouseClick;
            UserRender exportRender = AssXapFormUtils.GetUserRender(xapFormControl, "choose.export");

            exportRender.MouseClick += ExportRender_MouseClick;
            exportRender.Visible     = false;
            sheettpRender            = AssXapFormUtils.GetUserRender(xapFormControl, "choose.name_ciprnsheettp");
            bool bEn = lstSheetTp != null && lstSheetTp.Count > 0;

            sheettpRender.Enabled = bEn && IsEditable;
        }
示例#20
0
        void xapFormControl1_ModelFilled(object sender, EventArgs e)
        {
            //xapFormControl1.SetTabPageEnabled("drugsUse", !IsReadOnly);
            //xapFormControl1.SetEditable(!IsReadOnly);
            SetGridPolicy(!IsReadOnly);

            her.DataSource = this.EmsHeadDO.Emsdrugs.EmsOrDrugList;

            her.Enabled             = true;
            gv.DataTable.DataSource = null;
            if (gv.DataTable.Rows.Count == 0 && this.EmsHeadDO.Emsdrugs.EmsOrDrugList.Count > 0)
            {
                gv.DataTable.DataSource = new BindingList <EmsOrDrug>()
                {
                    this.EmsHeadDO.Emsdrugs.EmsOrDrugList.LastOrDefault()
                };
            }
            //--------------------------------
            ((XNumbericUpDown)((XLabelBaseUserRender)xapFormControl1.GetUserRender("drugsUse", "orders_boil")).UserRender).MaxValue = this.EmsHeadDO.Emsdrugs.Orders == null ? 0 : (double)this.EmsHeadDO.Emsdrugs.Orders;

            //限制开始时间的时间范围,入院日期,最大提前日期
            TimerComboBoxMaxAndMin.GetInstance().setMaxMinTime(xapFormControl1, this.Context, "drugsUse", "dt_begin_ui", EmsHeadDO.PatInfo.Id_ent);
            try
            {
                //限制结束日期为可拆分的最大天数
                int maxDays = this.Context.GetOrgParam <int>(ICiOrdNSysParamConst.SYS_PARAM_ORSRVSPLITDTENDMAXALLOWDAYS);
                TimerComboBoxMaxAndMin.GetInstance().setMaxTime(xapFormControl1, this.Context, "drugsUse", "dt_end_ui", ((DateTime)this.EmsHeadDO.Emsdrugs.Dt_begin_ui).AddDays(maxDays));
                TimerComboBoxMaxAndMin.GetInstance().setMinTime(xapFormControl1, this.Context, "drugsUse", "dt_end_ui", (DateTime)this.EmsHeadDO.Emsdrugs.Dt_begin_ui);
            }
            catch //(Exception ex)
            { }
            //UserRender us = xapFormControl1.GetUserRender("drugsUse", "dt_begin_ui");
            //xap.cli.sdk.render.Items.XCalendarTimerComboBox dt_begin = us.Renders[0] as xap.cli.sdk.render.Items.XCalendarTimerComboBox;
            //DateTime? dataA = new GetInHosTime().GetPatInHosTime(this.EmsHeadDO.PatInfo.Id_ent);
            //dt_begin.MinDate = dataA;
            //dt_begin.MaxDate = cof.GetServerDataTime().AddDays(OrdParam.GetOrdParam.orBeforStartDays);
            //重新填充数据时,设置为false
            UserRender orders = xapFormControl1.GetUserRender("drugsUse", "orders");

            orders.Focus();
            userEditFlag = !this.EmsHeadDO.IsNEW;
            if (this.EmsHeadDO.IsNEW)
            {
                cof.SetNoteOr(this.EmsHeadDO);
            }
            BindingList <EmsOrDrug> bds = gv.DataTable.DataSource as BindingList <EmsOrDrug>;

            her.FocusIndex = this.EmsHeadDO.Emsdrugs.EmsOrDrugList.IndexOf(bds.FirstOrDefault());
        }
示例#21
0
        protected override void OnXapFormControl_ModelFilled(object sender, EventArgs e)
        {
            base.OnXapFormControl_ModelFilled(sender, e);
            UserRender us = AssXapFormUtils.GetUserRender(this.GetXapFormControl(), "card.dt_plan");

            if (this.GetViewModel() != null)
            {
                EmsRisViewModel tmpModel = this.GetViewModel() as EmsRisViewModel;
                //this.detailButton.Visible = tmpModel.isSet();
            }
            //getControlByName("card", "des_pps").EnterFlag = false;
            //xap.cli.sdk.render.Items.XCalendarTimerComboBox dt_begin = us.Renders[0] as xap.cli.sdk.render.Items.XCalendarTimerComboBox;
            //dt_begin.MinDate = this.GetLogicEx().GetServerDataTime();
            //dt_begin.MaxDate = this.GetLogicEx().GetServerDataTime().AddDays(OrdParam.GetOrdParam.orBeforStartDays);
        }
示例#22
0
        void xapFormControl1_FormCreated(object sender, EventArgs e)
        {
            UserRender btn   = this.xapFormControl1.GetUserRender("sheet", "btnSelect");
            UserRender txt   = this.xapFormControl1.GetUserRender("sheet", "txtselect");
            UserRender btnOK = this.xapFormControl1.GetUserRender("sheet", "btnOk");

            btnOK.MouseClick += new MouseEventHandler(btnOK_MouseClick);
            btn.MouseClick   += delegate
            {
                if (openFileDialog1.ShowDialog() == DialogResult.OK)
                {
                    txt.ValueObj = openFileDialog1.FileName;
                }
            };
        }
示例#23
0
        private void checkbox_ValueTextChanged(object sender, EventArgs e)
        {
            if (isCreating)
            {
                return;
            }
            UserRender ur = xapFormControl.GetUserRender("bt_card", "no_db");

            ur.Enabled = !ur.Enabled;
            EmsHeadDO.Emsapbt.No_db = ur.Enabled ? null : "";
            if (ur is XLabelBaseUserRender)
            {
                (ur as XLabelBaseUserRender).NullFlag = !ur.Enabled;
            }
        }
示例#24
0
        void xapFormControl1_ModelFilled(object sender, EventArgs e)
        {
            UserRender name_dep_to = xapFormControl1.GetUserRender("trans", "name_dep_to");

            name_dep_to.Focus();
            xapFormControl1.SetEditPolicy(!IsReadOnly);
            //限制开始时间的时间范围,入院日期,最大提前日期
            TimerComboBoxMaxAndMin.GetInstance().setMaxMinTime(xapFormControl1, this.Context, "trans", "dt_effe", EmsHeadDO.PatInfo.Id_ent);

            if (this.EmsHeadDO.MedSrvDO.Sd_srvtp == BdSrvDictCodeConst.SD_SRVTP_PATIMAN_TRANSWARD)
            {
                name_dep_to.Enabled = false;
                this.EmsHeadDO.Emsaptrans.Id_dep_to   = EmsHeadDO.PatInfo.Id_dep_phy;
                this.EmsHeadDO.Emsaptrans.Name_dep_to = EmsHeadDO.PatInfo.Name_dep_phy;
            }
        }
示例#25
0
        private void XapFormControl_ModelFilled(object sender, EventArgs e)
        {
            UserRender dt_plan = xapFormControl.GetUserRender("cons", "dt_plan");

            dt_plan.Focus();

            if (EmsHeadDO.IsNEW && EmsHeadDO.Emsapcons.EmsConsAssistItem != null && EmsHeadDO.Emsapcons.EmsConsAssistItem.Count == 0)
            {
                EmsItemInCons itemDO = new EmsItemInCons();
                if (consDo != null && consDo.Fg_inorg == true)
                {
                    itemDO.Id_org   = UserManager.getInstance().CurrentOrg.Id_org;
                    itemDO.Name_org = UserManager.getInstance().CurrentOrg.Name;
                }
                EmsHeadDO.Emsapcons.EmsConsAssistItem.Add(itemDO);
            }

            SetGridDataSource();
            SetGridPolicy(!IsReadOnly);
            if (this.pageCommands != null && consDo != null)
            {
                foreach (XapCommand conmmands in this.pageCommands[0].Commands)
                {
                    // 当多科室会诊时,并且当前表单不是只读状态才显示添加按钮 consDo.Fg_deps 是否多科室会诊
                    conmmands.Visible = consDo.Fg_deps == FBoolean.True && !IsReadOnly;
                }
            }

            //this.consDo = cof.GetCons(EmsHeadDO.MedSrvDO.Id_srv);
            if (consDo != null && consDo.Fg_inorg == true)
            {
                assistGrid.DataTable.Columns["Name_org"].ReadOnly        = true;
                assistGrid.DataTable.Columns["Name_dep_emp"].ReadOnly    = false;
                assistGrid.DataTable.Columns["Name_dep_emp"].NullFlag    = false;
                assistGrid.DataTable.Columns["Name_emp_doctor"].ReadOnly = false;
            }
            else
            {
                assistGrid.DataTable.Columns["Name_org"].ReadOnly        = true;
                assistGrid.DataTable.Columns["Name_org"].NullFlag        = true;
                assistGrid.DataTable.Columns["Name_dep_emp"].ReadOnly    = true;
                assistGrid.DataTable.Columns["Name_dep_emp"].NullFlag    = true;
                assistGrid.DataTable.Columns["Name_emp_doctor"].ReadOnly = true;
            }
            //限制开始时间的时间范围,入院日期,最大提前日期
            TimerComboBoxMaxAndMin.GetInstance().setMaxMinTime(xapFormControl, this.Context, "cons", "dt_plan", EmsHeadDO.PatInfo.Id_ent);
        }
示例#26
0
        protected virtual void xapFormControl1_ModelFilled(object sender, EventArgs e)
        {
            UserRender dt_out = xapFormControl1.GetUserRender("pathgy", "name_samptp");

            dt_out.Focus();

            xapFormControl1.SetEditable(!IsReadOnly);

            if (org_pathgy_old != null)
            {
                org_pathgy_old.Enabled = this.EmsHeadDO.Emsappathgy.Fg_outer == true;
                no_pathgy_old.Visible  = this.EmsHeadDO.Emsappathgy.Fg_outer != true;
                ex_no_pathgy.ValueText = this.EmsHeadDO.Emsappathgy.No_pathgy_old;
                ex_no_pathgy.Visible   = this.EmsHeadDO.Emsappathgy.Fg_outer == true;
                dt_pathgy_old.Enabled  = this.EmsHeadDO.Emsappathgy.Fg_outer == true;
            }
        }
示例#27
0
        void xapFormControl1_ModelFilled(object sender, EventArgs e)
        {
            UserRender dt_out = xapFormControl1.GetUserRender("ordout", "dt_out");

            dt_out.Focus();
            //if (this.EmsHeadDO.Emsapout.IsNEW)
            //{
            //    (this.xapFormControl1.GetUserRender("ordout", "des_again31") as XLabelBaseUserRender).Enabled = false;
            //}
            //else
            //{
            //    (this.xapFormControl1.GetUserRender("ordout", "des_again31") as XLabelBaseUserRender).Enabled =(bool)this.EmsHeadDO.Emsapout.Fg_again31;
            //}
            xapFormControl1.SetEditPolicy(!IsReadOnly);
            //限制开始时间的时间范围,入院日期,最大提前日期
            TimerComboBoxMaxAndMin.GetInstance().setMaxMinTime(xapFormControl1, this.Context, "ordout", "dt_out", EmsHeadDO.PatInfo.Id_ent);
            TimerComboBoxMaxAndMin.GetInstance().setMaxTime(xapFormControl1, this.Context, "ordout", "dt_out", CommonExtentions.NowTime(this));
        }
示例#28
0
        private void xapFormControl1_FormCreated(object sender, EventArgs e)
        {
            userRenderPage         = xapFormControl1.GetUserRender("page", "page_num");
            userRenderPage.Enabled = true;

            labText           = xapFormControl1.GetUserRender("page", "labInfo") as XLabel;
            labText.ForeColor = Color.FromArgb(255, 0, 0);
            labText.Enabled   = true;
            labText.ValueText = "";

            btnOK             = xapFormControl1.GetUserRender("page", "btnOK");
            btnOK.Enabled     = true;
            btnCancel         = xapFormControl1.GetUserRender("page", "btnCancel");
            btnCancel.Enabled = true;

            btnOK.MouseClick     += new MouseEventHandler(btnOK_MouseClick);
            btnCancel.MouseClick += new MouseEventHandler(btnCancel_MouseClick);
        }
示例#29
0
        void xapFormControl1_ModelFilled(object sender, EventArgs e)
        {
            UserRender us = xapFormControl1.GetUserRender("ordobs", "dt_plan");

            xap.cli.sdk.render.Items.XCalendarTimerComboBox dt_begin = us.Renders[0] as xap.cli.sdk.render.Items.XCalendarTimerComboBox;
            DateTime dataA = (LogicEx.GetInstance()).GetServerDataTime();

            dt_begin.MinDate = dataA;
            dt_begin.MaxDate = cof.GetServerDataTime().AddDays(OrdParam.GetOrdParam.orBeforStartDays);


            gv.DataTable.DataSource      = CiHeadDo.Emsapobs.EmsOrObsList;
            gv_drug.DataTable.DataSource = CiHeadDo.Emsapobs.EmsOrDrugList;
            if (CiHeadDo.Emsapobs.EmsOrObsList.Count > 0)
            {
                //gv.DataTable.Rows[0].SetMultiSelectStatus(true);
                gv.DataTable.Rows[0].Selected = true;
            }
        }
示例#30
0
        public void setMaxMinTime(XapFormControl xapFormControl1, BaseContext Context, string tabName, string itemkey, string id_ent)
        {
            UserRender us = xapFormControl1.GetUserRender(tabName, itemkey);

            if (us != null && us.Renders[0] is XCalendarTimerComboBox)
            {
                XCalendarTimerComboBox dt_begin = us.Renders[0] as XCalendarTimerComboBox;
                if (dt_begin != null)
                {
                    DateTime datetime = this.NowTime();
                    dt_begin.TodayDateTime = datetime;
                    dt_begin.MinDate       = new GetInHosTime().GetPatInHosTime(id_ent);
                    try
                    {
                        int maxHours = Context.GetGroupParam <int>(ICiOrdNSysParamConst.SYS_PARAM_OrEarlyEntryMaxHours);
                        dt_begin.MaxDate = datetime.AddHours(maxHours);
                    }
                    catch //(Exception e)
                    {
                        this.ShowInfo("无法取得最大开立时间参数!");
                    }
                }
            }
            else if (us != null && us.Renders[0] is XCalendarComboBox)
            {
                XCalendarComboBox dt_begin = us.Renders[0] as XCalendarComboBox;
                if (dt_begin != null)
                {
                    DateTime datetime = this.NowTime();
                    dt_begin.TodayDate = datetime;
                    dt_begin.MinDate   = new GetInHosTime().GetPatInHosTime(id_ent);
                    try
                    {
                        int maxHours = Context.GetGroupParam <int>(ICiOrdNSysParamConst.SYS_PARAM_OrEarlyEntryMaxHours);
                        dt_begin.MaxDate = datetime.AddHours(maxHours);
                    }
                    catch //(Exception e)
                    {
                        this.ShowInfo("无法取得最大开立时间参数!");
                    }
                }
            }
        }