/// <summary> /// 生成科室项目树 /// </summary> private void InitItem() { if (this.DesignMode) { return; } // 父级节点 TreeNode parentNode = new TreeNode("科室项目"); neuTreeView1.ImageList = neuTreeView1.groupImageList; parentNode.ImageIndex = 0; parentNode.SelectedImageIndex = 0; // 医技业务层 Neusoft.HISFC.BizProcess.Integrate.Terminal.Booking bookingIntegrate = new Neusoft.HISFC.BizProcess.Integrate.Terminal.Booking(); // 选择的科室编码 string deptCode = this.GetDept().ID; // 科室维护的预约项目 ArrayList deptItemList = new ArrayList(); deptItemList = bookingIntegrate.QueryMedTechItem(deptCode); this.neuTreeView1.Nodes.Clear(); this.neuTreeView1.Nodes.Add(parentNode); if (deptItemList == null) { MessageBox.Show("获取科室项目列表时出错!" + bookingIntegrate.Err, "提示"); return; } ArrayList alReturn = bookingIntegrate.GetAllList("MEDTECHITEM"); if (alReturn == null) { MessageBox.Show("获取常数 MEDTECHITEM 失败"); } foreach (Neusoft.HISFC.Models.Terminal.MedTechItem obj in deptItemList) { foreach (Neusoft.HISFC.Models.Base.Const con in alReturn) { if (obj.Item.ID == con.ID && con.IsValid) { TreeNode node = new TreeNode(); node.Text = obj.Item.Name; node.Tag = obj; node.ImageIndex = 3; node.SelectedImageIndex = 4; parentNode.Nodes.Add(node); } } } parentNode.ExpandAll(); }