/// <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; }
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)); }
/// <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; }
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); } }
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); } }