protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ArrayList lists; lists = DictManager.GetDictItems("RoleTypeID"); foreach (string item in lists) { RoleTypeList.Items.Add(item); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ArrayList lists; lists = DictManager.GetDictItems("RoleTypeID"); foreach (string item in lists) { RoleTypeList.Items.Add(item); } TreeView treeView = (TreeView)Page.Form.FindControl("ContentPlaceHolder1").FindControl("SchoolTreeView"); TreeNode treeNode = treeView.FindNode("20"); if (treeNode != null) { if (treeNode.Depth == 0) { treeNode.Expand(); } else { treeNode.Parent.Expand(); } } else { treeView.CollapseAll(); } ViewState["SortColumn"] = "Code"; ViewState["OrderDirection"] = "ASC"; SchoolGridView.EmptyDataText = "请先设置查询条件,然后点击【查询】按钮!"; //BindSchoolGridView( "[Code]='0000'" ); string condition = ConstructSelectCondition(); BindSchoolGridView(condition); } }