Ejemplo n.º 1
0
    /// <summary>
    /// 删除角色
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void LinkDelete_Click(object sender, EventArgs e)
    {
        LinkButton link = sender as LinkButton;
        int        id   = Convert.ToInt32(link.CommandArgument.ToString());

        Tz888.BLL.Sys.SysRoleTab bll = new Tz888.BLL.Sys.SysRoleTab();
        bll.Delete(id);

        // Response.Write("<script>alert('删除成功!');</script>");
        Tz888.Common.MessageBox.Show(this.Page, "删除成功!");
        GetRoleTable();
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        id = Convert.ToInt16(Request.QueryString["id"].ToString());
        //31为超级管理员,不能删除
        if (id != 31)
        {
            Tz888.BLL.Sys.SysRoleTab bll = new Tz888.BLL.Sys.SysRoleTab();

            bll.Delete(id);
        }
        Response.Redirect("Role.aspx");
        //Tz888.Common.MessageBox.Show(Role.aspx, "删除成功!");
    }