示例#1
0
        private void BuildAccessGroupPersonList_inter(TreeListNode parent, List <TreeListNode> list)
        {
            List <Depart_Archi> Childs = DA.getDepart_Childs(parent.text);

            foreach (Depart_Archi item in Childs)
            {
                if (item.Depart_Name.Equals("机动处") || item.Depart_Name.Equals("设备支持中心") || item.Depart_Name.Equals("检安公司") || item.Depart_Name.Equals("调度处") || item.Depart_Name.Equals("工程处"))
                {
                    TreeListNode mn = new TreeListNode();
                    mn.text       = item.Depart_Name;
                    mn.id         = item.Depart_Id;
                    mn.selectable = false;

                    parent.nodes.Add(mn);
                    if (parent.text == "root")
                    {
                        list.Add(mn);
                    }

                    {
                        List <Person_Info> listP = DA.getPersons_Belong(item.Depart_Id);
                        TreeListNode       mn_person;
                        foreach (Person_Info pitem in listP)
                        {
                            mn_person            = new TreeListNode();
                            mn_person.text       = pitem.Person_Name;
                            mn_person.id         = pitem.Person_Id;
                            mn_person.selectable = true;
                            mn.nodes.Add(mn_person);
                        }
                    }
                }
            }
        }
示例#2
0
        private void BuildDepartPersonList_inter(TreeListNode parent, List <TreeListNode> list)
        {
            List <Depart_Archi> Childs = DA.getDepart_Childs(parent.text);

            foreach (Depart_Archi item in Childs)
            {
                TreeListNode mn = new TreeListNode();
                mn.text       = item.Depart_Name;
                mn.id         = item.Depart_Id;
                mn.selectable = false;

                parent.nodes.Add(mn);
                if (parent.text == "root")
                {
                    list.Add(mn);
                }
                if (DA.getDepart_Childs(item.Depart_Id).Count > 0)
                {
                    BuildDepartPersonList_inter(mn, list);
                }
                else
                {
                    List <Person_Info> listP = DA.getPersons_Belong(item.Depart_Id);
                    TreeListNode       mn_person;
                    foreach (Person_Info pitem in listP)
                    {
                        mn_person            = new TreeListNode();
                        mn_person.text       = pitem.Person_Name;
                        mn_person.id         = pitem.Person_Id;
                        mn_person.selectable = true;
                        mn.nodes.Add(mn_person);
                    }
                }
            }
        }