protected void Page_Load(object sender, EventArgs e) { if (base.IsPostBack) { return; } if (!this.Page.IsPostBack && base.Request.Params["id"] != null) { roleManageDb roleManageDb = new roleManageDb(); DataTable dataTable = roleManageDb.selAllUsers(this.Page.Request.Params["id"].ToString()); this.DataGrid1.DataSource = dataTable; this.DataGrid1.DataBind(); int count = dataTable.Rows.Count; dataTable.Clear(); dataTable = roleManageDb.roleQuary(this.Page.Request.Params["id"].ToString()); this.lblCaption.Text = string.Concat(new object[] { "共有 <font color='red'>", count, "</font> 个用户使用角色 <font color='red'>", dataTable.Rows[0]["v_jsmc"].ToString(), "</font>" }); } }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { string roleCode = this.Page.Request.QueryString["RecordID"].Trim(); roleManageDb roleManageDb = new roleManageDb(); DataTable dataTable = roleManageDb.roleQuary(roleCode); this.tbJsmc.Text = dataTable.Rows[0]["RoleName"].ToString(); } }
protected void Page_Load(object sender, EventArgs e) { string roleCode = base.Request.QueryString["RoleCode"].ToString(); string userCode = base.Request.QueryString["UserCode"].ToString(); roleManageDb roleManageDb = new roleManageDb(); DataTable dataTable = roleManageDb.roleQuary(roleCode); string scopeCode = dataTable.Rows[0]["v_bgfw"].ToString(); string moduleCode = dataTable.Rows[0]["v_xtqx"].ToString(); userManageDb userManageDb = new userManageDb(); bool flag = userManageDb.updateRolePriv(scopeCode, moduleCode, userCode); if (flag) { this.js.Text = "alert(\"更新用户权限成功!\");"; } else { this.js.Text = "alert(\"更新用户权限失败!\");"; } JavaScriptControl expr_C2 = this.js; expr_C2.Text += "window.close();"; }