protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString.Count > 0) { RoleGroupBLL roleGroupBll = new RoleGroupBLL(); string Id = Request.QueryString["Id"].ToString().Trim(); int Check = Convert.ToInt32(Request.QueryString["IsKai"]); int IsKai = Check == 1 ? 0 : 1; if (roleGroupBll.UPdateRoleGroupSCheck(Id, IsKai)) { Response.Redirect("ShowRoleList.aspx"); } } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString.Count > 0) { RoleGroupBLL roleGroupBll = new RoleGroupBLL(); int roleGroupId = Convert.ToInt32(Request.QueryString["Id"]); int num = roleGroupBll.DeleteRoleGroup(roleGroupId); if (num > 0) { this.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('删除成功!');location.href='ShowRoleList.aspx'", true); } else { this.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('删除失败!');location.href='ShowRoleList.aspx'", true); } } } }