private void Bind() { DataTable dt = B_Role.GetRoleName(); this.cblRoleList.DataSource = dt; this.cblRoleList.DataTextField = "RoleName"; this.cblRoleList.DataValueField = "RoleId"; this.cblRoleList.DataBind(); }
private void Bind() { DataTable dt = B_Role.GetRoleName(); cblRoleList.DataSource = dt; cblRoleList.DataTextField = "RoleName"; cblRoleList.DataValueField = "RoleId"; cblRoleList.DataBind(); if (dt != null) { dt.Dispose(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { B_ARoleAuth.CheckEx(ZLEnum.Auth.model, "NodeEdit"); Call.SetBreadCrumb(Master, "<li><a href='../Config/SiteOption.aspx'>系统设置</a></li><li><a href='NodeManage.aspx'>节点管理</a></li><li class=\"active\">节点批量设置</li>" + Call.GetHelp(16)); UPromoDT = psll.Select_All(); //绑定模型 DataTable dt = this.bllmodel.GetList(); this.Model_RPT.DataSource = dt; this.Model_RPT.DataBind(); //绑定节点 this.LstNodes.DataSource = nodeBll.CreateForListBox(); this.LstNodes.DataTextField = "NodeName"; this.LstNodes.DataValueField = "NodeID"; this.LstNodes.DataBind(); //绑定权限 DataTable Rt = B_Role.GetRoleName(); this.Egv.DataSource = Rt; this.Egv.DataBind(); this.GridView1.DataSource = gpBll.GetGroupList(); this.GridView1.DataBind(); //用户组 DataTable tinfo = gpBll.GetGroupList(); for (int i = 0; i < tinfo.Rows.Count; i++) { ViewGroup.Items.Add(new ListItem(tinfo.Rows[i]["GroupName"].ToString(), tinfo.Rows[i]["GroupID"].ToString())); ViewGroup2.Items.Add(new ListItem(tinfo.Rows[i]["GroupName"].ToString(), tinfo.Rows[i]["GroupID"].ToString())); ViewGroup3.Items.Add(new ListItem(tinfo.Rows[i]["GroupName"].ToString(), tinfo.Rows[i]["GroupID"].ToString())); } } }
protected void Page_Load(object sender, EventArgs e) { #region disuse //if (function.isAjax()) //{ // string action = Request.Form["action"]; // string value = Request.Form["val"]; // //{\"result\":\"This Is The JSON Data\"} // string jsonR = "{"; // switch (action) // { // case "NodeInfo": // M_Node node = this.bll.GetNodeXML(DataConverter.CLng(value)); // jsonR += "\"NodeName\":\""+node.NodeName+"\","; // jsonR += "\"IndexTemplate\":\"" + node.IndexTemplate + "\","; // jsonR += "\"ListTemplateFile\":\"" + node.ListTemplateFile + "\","; // jsonR += "\"LastinfoTemplate\":\"" + node.LastinfoTemplate + "\","; // jsonR += "\"ProposeTemplate\":\"" + node.ProposeTemplate + "\","; // jsonR += "\"HotinfoTemplate\":\"" + node.HotinfoTemplate + "\","; // //----模型块 // jsonR += "\"ContentModel\":\"" + node.ContentModel + "\""; // break; // } // jsonR += "}"; // //jsonR = "{\"NodeName\":\"This Is The JSON Data\"}"; // Response.Write(jsonR); Response.Flush(); Response.End(); //} #endregion if (!IsPostBack) { B_ARoleAuth.CheckEx(ZLEnum.Auth.model, "NodeEdit"); Call.SetBreadCrumb(Master, "<li><a href='../Config/SiteOption.aspx'>系统设置</a></li><li><a href='NodeManage.aspx'>节点管理</a></li><li class=\"active\">节点批量设置</li>" + Call.GetHelp(16)); UPromoDT = psll.Select_All(); //绑定模型 DataTable dt = this.bllmodel.GetList(); this.Model_RPT.DataSource = dt; this.Model_RPT.DataBind(); //绑定节点 this.LstNodes.DataSource = nodeBll.CreateForListBox(); this.LstNodes.DataTextField = "NodeName"; this.LstNodes.DataValueField = "NodeID"; this.LstNodes.DataBind(); //绑定权限 DataTable Rt = B_Role.GetRoleName(); this.Egv.DataSource = Rt; this.Egv.DataBind(); this.GridView1.DataSource = gpBll.GetGroupList(); this.GridView1.DataBind(); //用户组 DataTable tinfo = gpBll.GetGroupList(); for (int i = 0; i < tinfo.Rows.Count; i++) { ViewGroup.Items.Add(new ListItem(tinfo.Rows[i]["GroupName"].ToString(), tinfo.Rows[i]["GroupID"].ToString())); ViewGroup2.Items.Add(new ListItem(tinfo.Rows[i]["GroupName"].ToString(), tinfo.Rows[i]["GroupID"].ToString())); ViewGroup3.Items.Add(new ListItem(tinfo.Rows[i]["GroupName"].ToString(), tinfo.Rows[i]["GroupID"].ToString())); } } }