Ejemplo n.º 1
0
        /// <summary>
        /// 创建节点
        /// </summary>
        private void CreateTreeVie()
        {
            DepartmentDAO dptDAO   = new DepartmentDAO();
            ArrayList     dptList  = dptDAO.GetAllDepartments();
            TreeNode      rootNode = null;

            foreach (Department dpt in dptList)
            {
                rootNode = new TreeNode(dpt.Depname.ToString());
                treeView1.Nodes.Add(rootNode);
            }
        }
Ejemplo n.º 2
0
        public DataTable GetDeptInfo()
        {
            DataTable dt = DepartmentDAO.GetAllDepartments();

            if (dt != null)
            {
                return(dt);
            }
            else
            {
                return(null);
            }
        }
        public List <Department> GetAllDepartment()
        {
            DepartmentDAO dDAO = new DepartmentDAO();

            return(dDAO.GetAllDepartments());
        }