//填充子结点 private void m_FillTree(TreeNode Tr) { string strDepID = Tr.Tag.ToString(); clsDepartmentVO[] objResultArr = null; long lngRes = m_objDoMain.m_lngGetChildDepList(strDepID, out objResultArr); if ((lngRes > 0) && (objResultArr != null)) { if (objResultArr.Length > 0) { TreeNode TrN = null; for (int i1 = 0; i1 < objResultArr.Length; i1++) { TrN = new TreeNode(objResultArr[i1].strDeptName); TrN.Tag = objResultArr[i1].strDeptID; Tr.Nodes.Add(TrN); // if(IsSec==false) // { // lngRes = m_objDoMain.m_lngGetChildDepList(strDepID,out objResultArr); // if (objResultArr.Length > 0)//如果还有子科室 // IsSec=false; //继续循环 // else // IsSec=true; // this.m_FillTree(objResultArr[i1].strDeptID,TrN); // } } } } }
//填充子结点 private void m_FillTree(TreeNode Tr) { string strDepID = Tr.Tag.ToString(); clsDepartmentVO[] objResultArr = null; long lngRes = m_objDoMain.m_lngGetChildDepList(strDepID, out objResultArr); if ((lngRes > 0) && (objResultArr != null)) { if (objResultArr.Length > 0) { TreeNode TrN = null; for (int i1 = 0; i1 < objResultArr.Length; i1++) { TrN = new TreeNode(objResultArr[i1].strDeptName); TrN.Tag = objResultArr[i1].strDeptID; Tr.Nodes.Add(TrN); } } } }