Exemplo n.º 1
0
        private void UserManager_Load(object sender, System.EventArgs e)
        {
            TreeNode node = new TreeNode();

            node.Text = "技术中心";

            IList deps = DepartmentData.LoadDepartments();

            foreach (object o in deps)
            {
                hbm.Department dep   = (hbm.Department)o;
                TreeNode       node1 = new TreeNode();
                node1.Text = dep.DepartmentName;
                node.Nodes.Add(node1);
            }

            treeView1.Nodes.Add(node);
            treeView1.ExpandAll();
        }