Esempio n. 1
0
        protected override Neusoft.FrameWork.WinForms.Forms.ToolBarService OnInit(object sender, object neuObject, object param)
        {
            try
            {
                tv = sender as TreeView;
            }
            catch { }
            this.neuTabControl1.TabPages.Clear();
            this.neuTabControl1.TabPages.Add(this.tbBedView);//默认显示病床
            ucBedListView uc = new ucBedListView();

            uc.ListViewItemChanged += new ListViewItemSelectionChangedEventHandler(uc_ListViewItemChanged);
            uc.Dock    = DockStyle.Fill;
            uc.Visible = true;
            Neusoft.FrameWork.WinForms.Forms.IControlable ic = uc as Neusoft.FrameWork.WinForms.Forms.IControlable;
            if (ic != null)
            {
                ic.Init(this.tv, null, null);
                ic.SetValue(patient, this.tv.Nodes[0]);
                ic.RefreshTree        += new EventHandler(ic_RefreshTree);
                ic.SendParamToControl += new Neusoft.FrameWork.WinForms.Forms.SendParamToControlHandle(ic_SendParamToControl);
                ic.StatusBarInfo      += new Neusoft.FrameWork.WinForms.Forms.MessageEventHandle(ic_StatusBarInfo);
            }
            this.tbBedView.Controls.Add(uc);


            return(base.OnInit(sender, neuObject, param));
        }
Esempio n. 2
0
        /// <summary>
        /// 开放的Tabpage
        /// </summary>
        /// <param name="control"></param>
        /// <param name="title"></param>
        /// <param name="tag"></param>
        public void AddTabpage(Neusoft.FrameWork.WinForms.Controls.ucBaseControl control, string title, object tag)
        {
            foreach (TabPage tb in this.neuTabControl1.TabPages)
            {
                if (tb.Text == title)
                {
                    this.neuTabControl1.SelectedTab = tb;
                    return;
                }
            }
            TabPage tp = new TabPage(title);

            this.neuTabControl1.TabPages.Add(tp);

            control.Dock    = DockStyle.Fill;
            control.Visible = true;

            Neusoft.FrameWork.WinForms.Forms.IControlable ic = control as Neusoft.FrameWork.WinForms.Forms.IControlable;
            if (ic != null)
            {
                ic.Init(this.tv, null, null);
            }
            tp.Controls.Add(control);
            if (ic != null)
            {
                ic.SetValue(patient, node);
            }
            this.neuTabControl1.SelectedTab = tp;
        }
Esempio n. 3
0
        /// <summary>
        /// 开放的Tabpage
        /// </summary>
        /// <param name="control"></param>
        /// <param name="title"></param>
        /// <param name="tag"></param>
        public void AddTabpage(Neusoft.FrameWork.WinForms.Controls.ucBaseControl control, string title, object tag)
        {
            foreach (TabPage tb in this.neuTabControl1.TabPages)
            {
                if (tb.Text == title)
                {
                    this.neuTabControl1.SelectedTab = tb;
                    return;
                }
            }
            TabPage tp = new TabPage(title);

            this.neuTabControl1.TabPages.Add(tp);

            control.Dock    = DockStyle.Fill;
            control.Visible = true;

            Neusoft.FrameWork.WinForms.Forms.IControlable ic = control as Neusoft.FrameWork.WinForms.Forms.IControlable;
            if (ic != null)
            {
                ic.Init(this.tv, null, null);
            }
            #region {5DF40042-300D-49b8-BB8D-4E4E906B7BAF}
            if (control.GetType() == typeof(Neusoft.HISFC.Components.RADT.Controls.ucBedManager))
            {
                Neusoft.HISFC.Components.RADT.Controls.ucBedManager uc = control as Neusoft.HISFC.Components.RADT.Controls.ucBedManager;

                uc.IsAllBedWave = this.isAllBedWave;

                tp.Controls.Add(uc);
            }
            else
            {
                tp.Controls.Add(control);
            }
            #endregion
            if (ic != null)
            {
                ic.SetValue(patient, node);
            }
            this.neuTabControl1.SelectedTab = tp;
        }
Esempio n. 4
0
        public static void ShowForm(Neusoft.HISFC.Models.Admin.SysMenu obj)
        {
            if (obj == null)
            {
                return;
            }

            string dllName  = obj.ModelFuntion.DllName + ".dll";
            string formName = obj.ModelFuntion.WinName.TrimStart().TrimEnd();
            string tag      = obj.MenuParm;
            string param    = "";
            string showType = obj.ModelFuntion.FormShowType;
            string tree     = obj.ModelFuntion.TreeControl.WinName;
            string treeDll  = obj.ModelFuntion.TreeControl.DllName + ".dll";
            string treeTag  = obj.ModelFuntion.TreeControl.Param;


            if (formName == "")
            {
                return;
            }

            if (formName.IndexOf(" ") >= 0)
            {
                param    = formName.Substring(formName.IndexOf(" ") + 1).TrimStart();
                formName = formName.Substring(0, formName.IndexOf(" "));
            }

            System.Windows.Forms.Control form     = null;
            System.Reflection.Assembly   assembly = null;

            switch (obj.MenuWin)//特殊窗口
            {
            case "Test":

                return;

            case "Register":

                return;

            case "Help":

                return;

            case "ChangePWD":
                /*应该实现代码*/
                return;

            case "Exit":

                return;

            default:     //其它窗口
                Object[] objParam = null;
                if (param != "")
                {
                    objParam    = new object[0];
                    objParam[0] = param;
                }
                try
                {
                    assembly = System.Reflection.Assembly.LoadFrom(dllName);
                    Type type = assembly.GetType(formName);
                    if (type == null)
                    {
                        MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("创建窗体出错!\n") + formName);
                        return;
                    }
                    System.Object objHandle = System.Activator.CreateInstance(type, objParam);
                    form     = objHandle as Control;
                    form.Tag = tag;
                }
                catch (Exception ex)
                {
                    MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("创建窗体出错!\n") + ex.Message);
                    return;
                }

                break;
            }

            Neusoft.FrameWork.WinForms.Forms.IMaintenanceControlable iQueryControl = form as Neusoft.FrameWork.WinForms.Forms.IMaintenanceControlable;
            if (iQueryControl != null) //维护查询窗口
            {
                form = new Neusoft.FrameWork.WinForms.Forms.frmQuery(iQueryControl);
                //将菜单的名称付给窗口的名称
                form.Text = obj.MenuName;
            }

            Neusoft.FrameWork.WinForms.Forms.IControlable iControlable = form as Neusoft.FrameWork.WinForms.Forms.IControlable;
            if (iControlable != null) //功能窗口
            {
                //添加树
                System.Windows.Forms.TreeView tv = null;
                if (tree.Trim() != "")
                {
                    assembly = System.Reflection.Assembly.LoadFrom(treeDll);
                    tv       = AddTree(tree, assembly, tv);
                }
                if (tv == null)
                {
                    form = new Neusoft.FrameWork.WinForms.Forms.frmBaseForm(form);
                }
                else
                {
                    tv.Tag = treeTag;
                    form   = new Neusoft.FrameWork.WinForms.Forms.frmBaseForm(form, tv);
                }
                //将菜单的名称付给窗口的名称
                form.Text = obj.MenuName;
            }

            Type typeSender = form.GetType();

            if (typeSender.IsSubclassOf(typeof(Neusoft.FrameWork.WinForms.Forms.frmBaseForm)) || typeSender == typeof(Neusoft.FrameWork.WinForms.Forms.frmBaseForm))
            {
                ((Neusoft.FrameWork.WinForms.Forms.frmBaseForm)form).SetFormID(obj.MenuWin);
            }

            switch (showType)
            {
            case "FormDialog":
                ((Form)form).ShowDialog();
                break;

            case "Web":
                try
                {
                    System.Diagnostics.Process.Start("iexplore.exe", formName);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
                break;

            default:
                ((Form)form).ShowDialog();
                break;
            }
        }
Esempio n. 5
0
        private void neuTabControl1_SelectedIndexChanged(object sender, EventArgs e)
        {
            //tabControl Selected Changed
            Neusoft.FrameWork.WinForms.Forms.IControlable ic = null;
            if (this.neuTabControl1.SelectedTab == this.tbBedView)//床位一览
            {
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    ucBedListView uc = new ucBedListView();
                    uc.ListViewItemChanged += new ListViewItemSelectionChangedEventHandler(uc_ListViewItemChanged);
                    uc.Dock    = DockStyle.Fill;
                    uc.Visible = true;
                    ic         = uc as Neusoft.FrameWork.WinForms.Forms.IControlable;
                    if (ic != null)
                    {
                        ic.Init(this.tv, null, null);
                    }
                    this.neuTabControl1.SelectedTab.Controls.Add(uc);
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                }
            }
            else if (this.neuTabControl1.SelectedTab == this.tpArrive)//接珍
            {
                #region 接珍
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    ucBasePatientArrive uc = new ucBasePatientArrive();
                    uc.Dock    = DockStyle.Fill;
                    uc.Visible = true;
                    if (this.node.Parent != null && this.node.Parent.Tag.ToString() == "ShiftIn")
                    {
                        uc.arrivetype = ArriveType.ShiftIn;
                    }
                    else
                    {
                        uc.arrivetype = ArriveType.Regedit;
                    }

                    ic = uc as Neusoft.FrameWork.WinForms.Forms.IControlable;
                    if (ic != null)
                    {
                        ic.Init(this.tv, null, null);
                    }
                    this.neuTabControl1.SelectedTab.Controls.Add(uc);
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                    ucBasePatientArrive uc = ic as ucBasePatientArrive;
                    if (this.node.Parent != null && this.node.Parent.Tag.ToString() == "ShiftIn")
                    {
                        uc.arrivetype = ArriveType.ShiftIn;
                    }
                    else
                    {
                        uc.arrivetype = ArriveType.Regedit;
                    }
                }
                #endregion
            }
            else if (this.neuTabControl1.SelectedTab == this.tpCallBack)//找回
            {
                #region 找回
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    Neusoft.HISFC.BizProcess.Interface.ICallBackPatient uc = null;
                    uc = Neusoft.FrameWork.WinForms.Classes.UtilInterface.CreateObject(this.GetType(), typeof(Neusoft.HISFC.BizProcess.Interface.ICallBackPatient)) as Neusoft.HISFC.BizProcess.Interface.ICallBackPatient;
                    if (uc == null)
                    {
                        ucBasePatientArrive defaultuc = new ucBasePatientArrive();
                        defaultuc.Dock       = DockStyle.Fill;
                        defaultuc.Visible    = true;
                        defaultuc.arrivetype = ArriveType.CallBack;
                        ic = defaultuc as Neusoft.FrameWork.WinForms.Forms.IControlable;
                        if (ic != null)
                        {
                            ic.Init(this.tv, null, null);
                        }
                        this.neuTabControl1.SelectedTab.Controls.Add((Neusoft.FrameWork.WinForms.Controls.ucBaseControl)defaultuc);
                    }
                    else
                    {
                        ic = uc as Neusoft.FrameWork.WinForms.Forms.IControlable;
                        if (ic != null)
                        {
                            ic.Init(this.tv, null, null);
                        }
                        this.neuTabControl1.SelectedTab.Controls.Add((Neusoft.FrameWork.WinForms.Controls.ucBaseControl)uc);
                    }
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                }
                #endregion
            }
            else if (this.neuTabControl1.SelectedTab == this.tpCancelDept)//取消转科
            {
                #region 取消转科
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    ucPatientShiftOut uc = new ucPatientShiftOut();
                    uc.Dock     = DockStyle.Fill;
                    uc.Visible  = true;
                    uc.IsCancel = true;
                    ic          = uc as Neusoft.FrameWork.WinForms.Forms.IControlable;
                    if (ic != null)
                    {
                        ic.Init(this.tv, null, null);
                    }
                    this.neuTabControl1.SelectedTab.Controls.Add(uc);
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                }
                #endregion
            }
            else if (this.neuTabControl1.SelectedTab == this.tpChangeDoc)//换医生
            {
                #region 换医生
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    ucBasePatientArrive uc = new ucBasePatientArrive();
                    uc.Dock       = DockStyle.Fill;
                    uc.Visible    = true;
                    uc.arrivetype = ArriveType.ChangeDoc;
                    ic            = uc as Neusoft.FrameWork.WinForms.Forms.IControlable;
                    if (ic != null)
                    {
                        ic.Init(this.tv, null, null);
                    }
                    this.neuTabControl1.SelectedTab.Controls.Add(uc);
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                }
                #endregion
            }
            else if (this.neuTabControl1.SelectedTab == this.tpDept)//换科室
            {
                #region 换科室
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    ucPatientShiftOut uc = new ucPatientShiftOut();
                    uc.Dock     = DockStyle.Fill;
                    uc.Visible  = true;
                    uc.IsCancel = false;
                    ic          = uc as Neusoft.FrameWork.WinForms.Forms.IControlable;
                    if (ic != null)
                    {
                        ic.Init(this.tv, null, null);
                    }
                    this.neuTabControl1.SelectedTab.Controls.Add(uc);
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                }
                #endregion
            }
            else if (this.neuTabControl1.SelectedTab == this.tpLeave)//请假
            {
                #region 请假
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    ucPatientLeave uc = new ucPatientLeave();
                    uc.Dock    = DockStyle.Fill;
                    uc.Visible = true;
                    ic         = uc as Neusoft.FrameWork.WinForms.Forms.IControlable;
                    if (ic != null)
                    {
                        ic.Init(this.tv, null, null);
                    }
                    this.neuTabControl1.SelectedTab.Controls.Add(uc);
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                }
                #endregion
            }
            else if (this.neuTabControl1.SelectedTab == this.tpNurse)//婴儿登记
            {
                #region 婴儿登记
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    ucBabyInfo uc = new ucBabyInfo();
                    uc.Dock    = DockStyle.Fill;
                    uc.Visible = true;
                    ic         = uc as Neusoft.FrameWork.WinForms.Forms.IControlable;
                    if (ic != null)
                    {
                        ic.Init(this.tv, null, null);
                    }
                    this.neuTabControl1.SelectedTab.Controls.Add(uc);
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                }
                #endregion
            }
            else if (this.neuTabControl1.SelectedTab == this.tpOut)//出院登记
            {
                #region 出院登记
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    //ucPatientOut uc = new ucPatientOut();

                    Neusoft.HISFC.BizProcess.Interface.IucOutPatient uc = null;
                    uc = Neusoft.FrameWork.WinForms.Classes.UtilInterface.CreateObject(this.GetType(), typeof(Neusoft.HISFC.BizProcess.Interface.IucOutPatient)) as Neusoft.HISFC.BizProcess.Interface.IucOutPatient;
                    if (uc == null)
                    {
                        ucPatientOut ucDefault = new ucPatientOut();
                        ucDefault.Dock    = DockStyle.Fill;
                        ucDefault.Visible = true;
                        //{29F39131-89B4-4128-B4C9-EAB9F07B719F}
                        ucDefault.QuitFeeApplyFlag = this.quitFeeApplyFlag;
                        ic = ucDefault as Neusoft.FrameWork.WinForms.Forms.IControlable;
                        if (ic != null)
                        {
                            ic.Init(this.tv, null, null);
                        }
                        this.neuTabControl1.SelectedTab.Controls.Add(ucDefault);
                    }
                    else
                    {
                        ((System.Windows.Forms.UserControl)uc).Dock    = DockStyle.Fill;
                        ((System.Windows.Forms.UserControl)uc).Visible = true;
                        ic = uc as Neusoft.FrameWork.WinForms.Forms.IControlable;
                        if (ic != null)
                        {
                            ic.Init(this.tv, null, null);
                        }
                    }
                    this.neuTabControl1.SelectedTab.Controls.Add((System.Windows.Forms.UserControl)uc);
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                }
                #endregion
            }
            else if (this.neuTabControl1.SelectedTab == this.tpPatient)//患者基本信息
            {
                #region 患者基本信息
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    ucPatientInfo uc = new ucPatientInfo();
                    uc.SexReadOnly        = sexReadOnly;
                    uc.BirthdayReadOnly   = birthdayReadOnly;
                    uc.RelationReadOnly   = relationReadOnly;
                    uc.HeightReadOnly     = heightReadOnly;
                    uc.WeightReadOnly     = weightReadOnly;
                    uc.IDReadOnly         = iDReadOnly;
                    uc.ProfessionReadOnly = professionReadOnly;
                    uc.MarryReadOnly      = marryReadOnly;
                    uc.HomeAddrReadOnly   = homeAddrReadOnly;
                    uc.HomeTelReadOnly    = homeTelReadOnly;
                    uc.WorkReadOnly       = workReadOnly;
                    uc.LinkManReadOnly    = linkManReadOnly;
                    uc.KinAddressReadOnly = kinAddressReadOnly;
                    uc.LinkTelReadOnly    = linkTelReadOnly;
                    uc.MemoReadOnly       = memoReadOnly;
                    uc.Dock    = DockStyle.Fill;
                    uc.Visible = true;
                    ic         = uc as Neusoft.FrameWork.WinForms.Forms.IControlable;
                    if (ic != null)
                    {
                        ic.Init(this.tv, null, null);
                    }
                    this.neuTabControl1.SelectedTab.Controls.Add(uc);
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                }
                #endregion
            }
            else if (this.neuTabControl1.SelectedTab == this.tpShiftNurseCell)//{9A2D53D3-25BE-4630-A547-A121C71FB1C5}
            {
                #region 转病区{9A2D53D3-25BE-4630-A547-A121C71FB1C5}
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    ucPatientShiftNurseCell uc = new ucPatientShiftNurseCell();
                    uc.Dock     = DockStyle.Fill;
                    uc.Visible  = true;
                    uc.IsCancel = false;
                    ic          = uc as Neusoft.FrameWork.WinForms.Forms.IControlable;
                    if (ic != null)
                    {
                        ic.Init(this.tv, null, null);
                    }
                    this.neuTabControl1.SelectedTab.Controls.Add(uc);
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                }
                #endregion
            }
            else if (this.neuTabControl1.SelectedTab == this.tpCancelNurseCell)//{9A2D53D3-25BE-4630-A547-A121C71FB1C5}
            {
                #region 取消转病区{9A2D53D3-25BE-4630-A547-A121C71FB1C5}
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    ucPatientShiftNurseCell uc = new ucPatientShiftNurseCell();
                    uc.Dock     = DockStyle.Fill;
                    uc.Visible  = true;
                    uc.IsCancel = true;
                    ic          = uc as Neusoft.FrameWork.WinForms.Forms.IControlable;
                    if (ic != null)
                    {
                        ic.Init(this.tv, null, null);
                    }
                    this.neuTabControl1.SelectedTab.Controls.Add(uc);
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                }
                #endregion
            }
            else
            {
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    return;
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                }
            }

            if (ic != null)
            {
                ic.SetValue(patient, node);
                ic.RefreshTree        -= new EventHandler(ic_RefreshTree);
                ic.SendParamToControl -= new Neusoft.FrameWork.WinForms.Forms.SendParamToControlHandle(ic_SendParamToControl);
                ic.StatusBarInfo      -= new Neusoft.FrameWork.WinForms.Forms.MessageEventHandle(ic_StatusBarInfo);

                ic.RefreshTree        += new EventHandler(ic_RefreshTree);
                ic.SendParamToControl += new Neusoft.FrameWork.WinForms.Forms.SendParamToControlHandle(ic_SendParamToControl);
                ic.StatusBarInfo      += new Neusoft.FrameWork.WinForms.Forms.MessageEventHandle(ic_StatusBarInfo);
            }
        }
Esempio n. 6
0
        private void neuTabControl1_SelectedIndexChanged(object sender, EventArgs e)
        {
            //tabControl Selected Changed
            Neusoft.FrameWork.WinForms.Forms.IControlable ic = null;
            if (this.neuTabControl1.SelectedTab == this.tbBedView)//床位一览
            {
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    ucBedListView uc = new ucBedListView();
                    uc.ListViewItemChanged += new ListViewItemSelectionChangedEventHandler(uc_ListViewItemChanged);
                    uc.Dock    = DockStyle.Fill;
                    uc.Visible = true;
                    ic         = uc as Neusoft.FrameWork.WinForms.Forms.IControlable;
                    if (ic != null)
                    {
                        ic.Init(this.tv, null, null);
                    }
                    this.neuTabControl1.SelectedTab.Controls.Add(uc);
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                }
            }
            else if (this.neuTabControl1.SelectedTab == this.tpArrive)//接珍
            {
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    ucBasePatientArrive uc = new ucBasePatientArrive();
                    uc.Dock    = DockStyle.Fill;
                    uc.Visible = true;
                    if (this.node.Parent != null && this.node.Parent.Tag.ToString() == "ShiftIn")
                    {
                        uc.arrivetype = ArriveType.ShiftIn;
                    }
                    else
                    {
                        uc.arrivetype = ArriveType.Regedit;
                    }

                    ic = uc as Neusoft.FrameWork.WinForms.Forms.IControlable;
                    if (ic != null)
                    {
                        ic.Init(this.tv, null, null);
                    }
                    this.neuTabControl1.SelectedTab.Controls.Add(uc);
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                    ucBasePatientArrive uc = ic as ucBasePatientArrive;
                    if (this.node.Parent != null && this.node.Parent.Tag.ToString() == "ShiftIn")
                    {
                        uc.arrivetype = ArriveType.ShiftIn;
                    }
                    else
                    {
                        uc.arrivetype = ArriveType.Regedit;
                    }
                }
            }
            else if (this.neuTabControl1.SelectedTab == this.tpCallBack)//找回
            {
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    ucBasePatientArrive uc = new ucBasePatientArrive();
                    uc.Dock       = DockStyle.Fill;
                    uc.Visible    = true;
                    uc.arrivetype = ArriveType.CallBack;
                    ic            = uc as Neusoft.FrameWork.WinForms.Forms.IControlable;
                    if (ic != null)
                    {
                        ic.Init(this.tv, null, null);
                    }
                    this.neuTabControl1.SelectedTab.Controls.Add(uc);
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                }
            }
            else if (this.neuTabControl1.SelectedTab == this.tpCancelDept)//取消转科
            {
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    ucPatientShiftOut uc = new ucPatientShiftOut();
                    uc.Dock     = DockStyle.Fill;
                    uc.Visible  = true;
                    uc.IsCancel = true;
                    ic          = uc as Neusoft.FrameWork.WinForms.Forms.IControlable;
                    if (ic != null)
                    {
                        ic.Init(this.tv, null, null);
                    }
                    this.neuTabControl1.SelectedTab.Controls.Add(uc);
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                }
            }
            else if (this.neuTabControl1.SelectedTab == this.tpChangeDoc)//换医生
            {
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    ucBasePatientArrive uc = new ucBasePatientArrive();
                    uc.Dock       = DockStyle.Fill;
                    uc.Visible    = true;
                    uc.arrivetype = ArriveType.ChangeDoc;
                    ic            = uc as Neusoft.FrameWork.WinForms.Forms.IControlable;
                    if (ic != null)
                    {
                        ic.Init(this.tv, null, null);
                    }
                    this.neuTabControl1.SelectedTab.Controls.Add(uc);
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                }
            }
            else if (this.neuTabControl1.SelectedTab == this.tpDept)//换科室
            {
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    ucPatientShiftOut uc = new ucPatientShiftOut();
                    uc.Dock     = DockStyle.Fill;
                    uc.Visible  = true;
                    uc.IsCancel = false;
                    ic          = uc as Neusoft.FrameWork.WinForms.Forms.IControlable;
                    if (ic != null)
                    {
                        ic.Init(this.tv, null, null);
                    }
                    this.neuTabControl1.SelectedTab.Controls.Add(uc);
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                }
            }


            else if (this.neuTabControl1.SelectedTab == this.tpOut)//出院登记
            {
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    ucPatientOut uc = new ucPatientOut();
                    uc.Dock    = DockStyle.Fill;
                    uc.Visible = true;
                    ic         = uc as Neusoft.FrameWork.WinForms.Forms.IControlable;
                    if (ic != null)
                    {
                        ic.Init(this.tv, null, null);
                    }
                    this.neuTabControl1.SelectedTab.Controls.Add(uc);
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                }
            }
            //{1C0814FA-899B-419a-94D1-789CCC2BA8FF}
            else if (this.neuTabControl1.SelectedTab == this.tpIn) //转住院
            {
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    ucPatientIn uc = new ucPatientIn();
                    uc.Dock    = DockStyle.Fill;
                    uc.Visible = true;
                    ic         = uc as Neusoft.FrameWork.WinForms.Forms.IControlable;
                    if (ic != null)
                    {
                        ic.Init(this.tv, null, null);
                    }
                    this.neuTabControl1.SelectedTab.Controls.Add(uc);
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                }
            }
            else if (this.neuTabControl1.SelectedTab == this.tpPatient)//患者基本信息
            {
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    ucPatientInfo uc = new ucPatientInfo();
                    uc.Dock    = DockStyle.Fill;
                    uc.Visible = true;
                    ic         = uc as Neusoft.FrameWork.WinForms.Forms.IControlable;
                    if (ic != null)
                    {
                        ic.Init(this.tv, null, null);
                    }
                    this.neuTabControl1.SelectedTab.Controls.Add(uc);
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                }
            }
            else
            {
                if (this.neuTabControl1.SelectedTab.Controls.Count == 0)
                {
                    return;
                }
                else
                {
                    ic = this.neuTabControl1.SelectedTab.Controls[0] as Neusoft.FrameWork.WinForms.Forms.IControlable;
                }
            }

            if (ic != null)
            {
                ic.SetValue(patient, node);
                ic.RefreshTree        -= new EventHandler(ic_RefreshTree);
                ic.SendParamToControl -= new Neusoft.FrameWork.WinForms.Forms.SendParamToControlHandle(ic_SendParamToControl);
                ic.StatusBarInfo      -= new Neusoft.FrameWork.WinForms.Forms.MessageEventHandle(ic_StatusBarInfo);

                ic.RefreshTree        += new EventHandler(ic_RefreshTree);
                ic.SendParamToControl += new Neusoft.FrameWork.WinForms.Forms.SendParamToControlHandle(ic_SendParamToControl);
                ic.StatusBarInfo      += new Neusoft.FrameWork.WinForms.Forms.MessageEventHandle(ic_StatusBarInfo);
            }
        }