SystemManage/RoleEdit.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Web.UI;
public partial class SystemManage_RoleEdit : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Request.Cookies["roleid"] != null)
{
Authority myauthority = new Authority();
int RoleID = Convert.ToInt16(Server.HtmlEncode(Request.Cookies["roleid"].Value));
int ModuleID = 2;
if (myauthority.QXExists(RoleID, ModuleID))
{
if (!IsPostBack)
{
//绑定权限模块列表
DataSet ds = new DataSet();
Module mymodule = new Module();
ds = mymodule.GetList("ModuleFatherID<>0 ORDER BY [ModuleNum] DESC");
this.cbl_quanxian.DataSource = ds.Tables[0];
this.cbl_quanxian.DataBind();
//显示数据
int roleid = Convert.ToInt16(Request.QueryString["id"].ToString());
Role myrole = new Role();
myrole.GetModel(roleid);
this.tb_rolename.Text = myrole.PoleName;
this.tb_rolediscription.Text = myrole.RoleDescription;
this.txtNum.Text= myrole.RoleNum.ToString();
//勾选当前角色的模块
Authority myaut = new Authority();
ds = myaut.GetList("RoleID=" + roleid + "");
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
for (int j = 0; j < this.cbl_quanxian.Items.Count; j++)
{
if (Convert.ToInt16(this.cbl_quanxian.Items[j].Value) == Convert.ToInt16(ds.Tables[0].Rows[i].ItemArray[2]))
{
this.cbl_quanxian.Items[j].Selected = true;
}
}
}
}
}
else
{
MessageBox.ShowAndRedirect(this.Page, "对不起!您无权操作此版块。", "../Main.aspx");
}
}
else
{
MessageBox.ShowAndRedirect(this.Page, "对不起!您还没有登录系统。", "../Logout.aspx");
}
}
protected void butAdd_Click(object sender, ImageClickEventArgs e)
{
后面还有 35 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
