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> /// {997A8EEC-A27E-492f-941A-CDEAA3CC4AE7} /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void ic_RefreshTree(object sender, EventArgs e) { this.OnRefreshTree(); try { ucBedListView uc = this.tbBedView.Controls[0] as ucBedListView; uc.RefreshView(); } catch { } }
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); } }