/// <summary> /// 绑定文档类别树树 数据源 /// </summary> private void DocuemntClassDataSource() { DataTable dt = new DataTable(); //获取部门数据源 BLL.BASE_ARTICLE_TYPE bll = new BLL.BASE_ARTICLE_TYPE(); Utility.UserSession _userSession = (Utility.UserSession)Session["user"]; if (_userSession == null) { Response.Redirect("~/AdminLogin.aspx", true); } dt = bll.GetList(string.Format("DEPTID={0}", _userSession.DEPTID.ToString())); TreeNode rootNode = new TreeNode(); rootNode.Text = "档案分类树"; rootNode.Value = "0"; rootNode.Expanded = true; if (dt != null && dt.Rows.Count != 0) { InitTreeView(rootNode, dt); } this.trvControl.Nodes.Add(rootNode); }