Пример #1
0
        private void xapFormControl1_FormCreated(object sender, EventArgs e)
        {
            EmsHeadDO.Emsdrugs.Fg_treat = true;//默认为治疗用药
            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.DataTable.DataDisplay += new EventHandler <XDataDisplayEventArgs>(xapFormControl1_DataDisplay);
            //gv.DataTable.CellValueChanged += new CellValueChangedEventHandler(cellValueChanged);
            SetGridPolicy(true);
            gv.ReadOnly           = false;
            gv.DataTable.ReadOnly = false;

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

            tabControl1.SelectedIndexChanged += new XTabControl.selectedIndexChanged(tabControl1_SelectedIndexChanged);
            xtab.Controls.Clear();
            xtab.Controls.Add(desView);
            // 关联总量单元格编辑控件
            AttachQuanCurEditor();

            cof.getControlByName(xapFormControl1, "drugsUse", "note_or").GotFocus  += new EventHandler(Note_or_GotFocus);
            cof.getControlByName(xapFormControl1, "drugsUse", "note_or").LostFocus += new EventHandler(Note_or_LostFocus);
        }
Пример #2
0
 protected new void Visible(XTabPage Tab, XTabControl tabParent)
 {
     if (this.list.Count > 0)
     {
         foreach (PageDO TabDO in this.list)
         {
             if (TabDO.Name == Tab.Text)
             {
                 Tab.Name = TabDO.Code;
                 //Tab.Parent = tabParent;
                 Tab.Visible = true;
             }
             if (Tab.Text == "患者既往")
             {
                 if (this.Ent4BannerDTO != null && this.Ent4BannerDTO.Id_pat != null)
                 {
                     this.model = new PastTreeViewModel(Ent4BannerDTO.Id_pat);
                 }
                 if (this.model == null || (this.model.ListEntHisDiDTO != null && this.model.ListEntHisDiDTO.Count == 0))
                 {
                     //Tab.Parent = null;
                     Tab.Visible = true;
                 }
             }
         }
     }
 }
Пример #3
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);
        }
Пример #4
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);
        }
Пример #5
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)
            {
            }
        }
Пример #6
0
        void OrderDiInfoView_TabPageSelectChanged(object sender, EventArgs e)
        {
            XTabPage page = sender as XTabPage;

            if (page.Owner.SelectedIndex == 0)
            {
            }
            else if (page.Owner.SelectedIndex == 1)
            {
            }
            nSelectIndex = page.Owner.SelectedIndex;
        }
Пример #7
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;
        }
Пример #8
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected virtual void XapFormControl_FormCreated(object sender, EventArgs e)
        {
            // 初始化医嘱组件
            string path = Application.StartupPath + "\\modules\\iihci\\ui\\commoncontent\\OrderContent.xml";

            doctorOrderConfig = this.Deserialize(path);

            gv = this.xapFormControl1.GetGridView("order");
            gv.DataTable.DataDisplay            += tabControl_DataDisplay;
            gv.DataTable.CustomerCellMouseClick += OnXapFromGrid_CellClick;
            gv.DataTable.MultiCheckChanged      += new EventHandler <MutilCheckedEventArgs>(mutilCheckedEventArgs);
            gv.DataTable.SelectedAllChanged     += new EventHandler(SelectedAllChanged);
            gv.MouseClick                  += OnXapFromGrid_MouseClick;
            gv.MouseDoubleClick            += OnXapFromGrid_MouseDoubleClick;
            gv.ReadOnly                     = true;
            gv.DataTable.CrossBackColor     = true;
            gv.DataTable.Rows.DefaultHeight = 30;

            UdidocDO[] udidocs = OrReportPictureButton.GetInstance().getMap()[EnDictCodeConst.SD_ENTP_OUTPATIENT];
            if (udidocs == null)
            {
                udidocs = new UdidocDO[0];
            }
            int columnWidth = 6 + (2 + RelativeUIParam.RELATIVECELLSIZE.Height) * udidocs.Length;

            columnWidth = columnWidth <= 90 ? 90 : columnWidth;
            gv.DataTable.Columns["customercolumn_check_result"].Width        = columnWidth;
            gv.DataTable.Columns["customercolumn_check_result"].DefalutWidth = columnWidth;

            List <ControlTab> tabs       = xapFormControl1.FormModel.Tabs;
            XTabControl       tabControl = tabs[0].tabContrl;

            tabControl.SelectedChanging     += TabControl_SelectedChanging;
            tabControl.SelectedIndexChanged += tabControl_SelectedIndexChanged;
            XTabPage xtab = tabControl.XTabPages[1];

            this.orderPresView = this.createOrderPresControl();
            xtab.PageControl   = this.orderPresView;
            foreach (XDataColumn item in gv.DataTable.Columns)
            {
                item.AlignCell = StringAlignment.Center;
            }
        }
Пример #9
0
        private void xapFormControl1_FormCreated(object sender, EventArgs e)
        {
            tabPageLong = xapFormControl1.GetTabPageByTabCode("ordsortlong");
            tabPageTemp = xapFormControl1.GetTabPageByTabCode("ordsorttemp");

            tabPageLong.Visible = bLong.ToTarget;
            tabPageTemp.Visible = !bLong.ToTarget;

            gridOrdsLong = xapFormControl1.GetGridView("ordsortlong");
            gridOrdsTemp = xapFormControl1.GetGridView("ordsorttemp");

            gridOrdsLong.ReadOnly = true;
            gridOrdsTemp.ReadOnly = true;

            btnOK     = xapFormControl1.GetUserRender("ordsortctl", "btnOK");
            btnCancel = xapFormControl1.GetUserRender("ordsortctl", "btnCancel");

            btnOK.MouseClick     += new MouseEventHandler(btnOK_MouseClick);
            btnCancel.MouseClick += new MouseEventHandler(btnCancel_MouseClick);
        }
Пример #10
0
        /// <summary>
        /// 初始化控件,设置控件属性
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void xapFormControl1_FormCreated(object sender, EventArgs e)
        {
            this.xapFormControl1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 0);
            xTabPage = xapFormControl1.GetTabPageByTabCode("ordprnlong");

            radioGroup                   = xapFormControl1.GetUserRender("ordprnlong", "radioGroup") as XRadioboxGroup;
            radioGroup.Enabled           = true;
            radioGroup.ValueTextChanged += new EventHandler(radioGroup_ValueTextChanged);
            radioContinue                = radioGroup.Renders[0] as XRadiobox;
            radioSetup                   = radioGroup.Renders[1] as XRadiobox;
            radioCancel                  = radioGroup.Renders[2] as XRadiobox;
            radioStop   = radioGroup.Renders[3] as XRadiobox;
            radioSingle = radioGroup.Renders[4] as XRadiobox;

            userRenderPat  = xapFormControl1.GetUserRender("ordprnlong", "id_en.name_pat");
            userRenderPage = xapFormControl1.GetUserRender("ordprnlong", "page_num");
            //userRenderPat.Enabled = true;
            userRenderPat.Visible  = this.Context["PatientData"] == null;
            userRenderPat.Enabled  = this.Context["PatientData"] == null;
            userRenderPage.Enabled = false;
        }
Пример #11
0
        /// <summary>
        /// 多医疗单的处理
        /// </summary>
        /// <param name="objs">数据集合,type 是类型 1 服务,2 模板,3 cp ,4 其它</param>
        /// <param name="type"></param>
        private void ManyRecordSrv(List <Object> objs, String type)
        {
            if (tabPage1 == null)
            {
                tabPage1 = new XTabPage {
                    Text = "医疗单", PageControl = GetCardControl()
                };
                control.NavTabControl.XTabPages.Add(tabPage1); //右缩面板多页添加
            }

            if (objs != null && objs.Count > 6)
            {
                this.ShowInfo("选中的医嘱大于6个,暂时不支持");
                objs.Clear();
                return;
            }

            control.CanShowForm |= this.Created;
            //control.TabNavigationForm.Capture = true;
            orderCardView.SetOrderItemView(this);
            //将智能Form的数据由helperView传到悬浮窗
            orderCardView.ManyRecordSheet(objs, patDo, control);
        }
Пример #12
0
        void xapFormControl1_FormCreated(object sender, EventArgs e)
        {
            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.DataTable.DataDisplay += new EventHandler <XDataDisplayEventArgs>(xapFormControl1_DataDisplay);

            UserRender btnDel = this.xapFormControl1.GetUserRender("drugsUse", "del");//删除按钮

            btnDel.MouseClick += new MouseEventHandler(btnDel_MouseClick);

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

            btnAdd.MouseClick += new MouseEventHandler(btnAdd_MouseClick);

            SetGridPolicy(true);
            gv.ReadOnly           = false;
            gv.DataTable.ReadOnly = false;

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

            tabControl1.SelectedIndexChanged += new XTabControl.selectedIndexChanged(tabControl1_SelectedIndexChanged);
            xtab.Controls.Clear();
            xtab.Controls.Add(desView);
            // 关联总量单元格编辑控件
            AttachQuanCurEditor();

            cof.getControlByName(xapFormControl1, "drugsUse", "note_or").GotFocus  += new EventHandler(Note_or_GotFocus);
            cof.getControlByName(xapFormControl1, "drugsUse", "note_or").LostFocus += new EventHandler(Note_or_LostFocus);
        }
Пример #13
0
        void xapFormControl1_FormCreated(object sender, EventArgs e)
        {
            //备用条件和失效日期隐藏
            cof.getControlByName(xapFormControl1, "drugsUse", "bak_des").Visible = false;
            cof.getControlByName(xapFormControl1, "drugsUse", "dt_fail").Visible = false;
            cof.adjustHeight(this.xapFormControl1, "drugsUse", adjustHeightIds, -58);
            //首日最大执行次数
            int?freqct    = this.EmsHeadDO.Emsdrugs.Freqct;
            int numgreqct = 0;

            if (freqct != null)
            {
                numgreqct = (int)freqct;
            }
            XLabelBaseUserRender tmpUserRender = this.xapFormControl1.GetUserRender("drugsUse", "quan_firday_mp") as XLabelBaseUserRender;

            XNumbericUpDown numRender = tmpUserRender.UserRender as XNumbericUpDown;

            numRender.MaxValue = (double)numgreqct;
            numRender.MinValue = 0;


            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.ReadOnly    = true;
            UserRender btnDel = this.xapFormControl1.GetUserRender("drugsUse", "del");//删除按钮

            btnDel.MouseClick += new MouseEventHandler(btnDel_MouseClick);

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

            btnAdd.MouseClick += new MouseEventHandler(btnAdd_MouseClick);
            //UserRender btnOK = xapFormControl1.GetUserRender("drugsUse", "btnSave");//保存
            //btnOK.MouseClick += new MouseEventHandler(btnOK_MouseClick);
            gv_change = xapFormControl1.GetGridView("change");//变动用药

            SetGridPolicy(true);
            gv.ReadOnly           = false;
            gv.DataTable.ReadOnly = false;
            //gv.DataTable.Columns["Name_srv"].ReadOnly = true;
            //gv.DataTable.Columns["Name_mm"].ReadOnly = true;
            gv.DataTable.Columns["Quan_cur"].ReadOnly       = true;
            gv.DataTable.Columns["Name_unit_sale"].ReadOnly = true;
            //长期医嘱使用天数为空
            if (cof.getControlByName(xapFormControl1, "drugsUse", "fg_long").ValueCode == "True" && this.EmsHeadDO.IsNEW)
            {
                this.EmsHeadDO.Emsdrugs.Use_days = null;
            }
            //cof.getControlByName(xapFormControl1,"drugsUse", "fg_long").Enabled = false;

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

            tabControl1.SelectedIndexChanged += new XTabControl.selectedIndexChanged(tabControl1_SelectedIndexChanged);
            xtab.Controls.Clear();
            xtab.Controls.Add(desView);

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

            //失效日期控件
            UserRender usfail = xapFormControl1.GetUserRender("drugsUse", "dt_fail");

            dt_fail = usfail.Renders[0] as xap.cli.sdk.render.Items.XCalendarTimerComboBox;
        }
Пример #14
0
        /// <summary>
        /// 加载助手窗体
        /// </summary>
        /// <param name="parentCtrl"></param>
        /// <param name="classId"></param>
        public void loadFrame(XBaseControl parentCtrl, XUserControl xUserControl, AssiBtnDTO btnDTO)
        {
            this.xUserControl = xUserControl;
            this.xapFormControl.AddRender(xUserControl);

            if (btnDTO.ButtonId == "btnOpTemplateFrame")
            {
                this.loadFramePithy(parentCtrl, xUserControl, btnDTO);
                return;
            }

            LayoutPanelManager layoutPanelManager = xUserControl.GetConfig().GetInstance("LayoutPanelManager") as LayoutPanelManager;

            for (int n = 0; n < layoutPanelManager.ManagedPanels.Count; n++)
            {
                LayoutManagedPanel layoutManaged = layoutPanelManager.ManagedPanels[n] as LayoutManagedPanel;
                if (btnDTO.PanelManagerId == layoutManaged.Id)
                {
                    if (layoutManaged.Controls.Count < 1)
                    {
                        XmlNode node = xUserControl.GetConfig().GetNode("ManagedPanel", layoutManaged.Id);
                        xUserControl.GetConfig().CreateManagedPanelControl(layoutManaged, node);
                    }
                    layoutPanelManager.SelectedIndex = n;

                    foreach (Control ctrTemp in layoutManaged.Controls)
                    {
                        if (ctrTemp is XLayoutPanel)
                        {
                            if ((ctrTemp as XLayoutPanel).ControlCenter is XTabControl)
                            {
                                //if (ctrTemp is XTabControl)
                                {
                                    var tabCtr = (ctrTemp as XLayoutPanel).ControlCenter as XTabControl;
                                    for (var j = 0; j < tabCtr.XTabPages.Count; j++)
                                    {
                                        if (btnDTO.XTabPageId.Equals(tabCtr.XTabPages[j].Id))
                                        {
                                            tabCtr.SelectedIndex = j;
                                            break;
                                        }
                                    }
                                }
                            }
                        }
                    }
                    break;
                }
            }

            int     i       = 0;
            Control control = xUserControl.GetControl();

            foreach (Control obj in control.Controls)
            {
                XTabPage xtabPage = obj as XTabPage;
                if (xtabPage != null)
                {
                    i++;
                    if (i == 3)
                    {
                        xtabPage.Select();
                    }
                }
            }

            //layoutPanelManager.SelectedIndex = 1;

            // 如果窗体已经打开,只进行切换tab页签
            if (!IsFrameOpened)
            {
                IsFrameOpened = true;

                if (this.FrameOpenModel == AssiFrameOpenModel.SHOW_DIALOG)
                {
                    this.ShowDialog(parentCtrl);
                }
                else
                {
                    this.Show(parentCtrl);
                }
            }
        }
Пример #15
0
        private void xapFormControl1_FormCreated(object sender, EventArgs e)
        {
            getControlByName("drugsUse", "fg_long").Enabled = false;
            //getControlByName("drugsUse", "bak_des").Visible = false;
            //getControlByName("drugsUse", "dt_fail").Visible = false;

            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");//药品列表
            drugChange = this.xapFormControl1.GetUserRender("drugsUse", "fg_dose_anoma") as XLabelBaseUserRender;

            gv.MouseClick += new MouseEventHandler(gv_MouseClick);

            gv_change = this.xapFormControl1.GetGridView("change");//变动用药
            //this.drugChange = this.getControlByName("drugsUse", "fg_dose_anoma");
            //gv_change.Visible = false;

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

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

            //getControlByName("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.AddRender(desView);

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

            this.sugarLine = this.xapFormControl1.GetTabPageByTabCode("wq007");
            this.sugarLine.AddRender(new INSLineChartView());
            initPoint = getControlByName("drugsUse", "fg_dose_anoma").Location;
            //if (EmsHeadDO.Emsdrugs.EmsOrDrugList[0].Id_anti == null)
            //{

            //}
            //相关信息页签
            LoadInforPDF();
            informationPageControl = xapFormControl1.GetTabPageByTabCode("wq006");
            linkList = new List <XLinkButton>();
            if (inforDict != null && inforDict.Count > 0)
            {
                foreach (string InforName in inforDict.Keys)
                {
                    XLinkButton linkLabel = new XLinkButton();
                    linkLabel.Font        = new Font("微软雅黑", 10F);
                    linkLabel.Text        = InforName;
                    linkLabel.Size        = new Size(400, 24);
                    linkLabel.MouseClick += new MouseEventHandler(linkLabel_MouseClick);
                    informationPageControl.AddRender(linkLabel);
                    linkList.Add(linkLabel);
                }
            }
            InforReLocate();
        }