Exemple #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        id = Convert.ToInt16(Request.QueryString["id"].ToString());
        //31为超级管理员,不能删除
        if (id != 31)
        {
            Tz888.BLL.dp.SysRoleTab bll = new Tz888.BLL.dp.SysRoleTab();

            bll.Delete(id);
        }
        Response.Redirect("Role.aspx");
        //Tz888.Common.MessageBox.Show(Role.aspx, "删除成功!");
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            if (Request.QueryString["SRoleID"] != null)//窗体加载ID为空则为添加角色,不为空则为修改角色
            {
                this.BtnInsert.Visible = false;
                this.ButUpdate.Visible = true;

                int id = Convert.ToInt32(Request.QueryString["SRoleID"]);
                Tz888.Model.dp.SysRoleTab model = new Tz888.Model.dp.SysRoleTab();
                Tz888.BLL.dp.SysRoleTab   bll   = new Tz888.BLL.dp.SysRoleTab();
                model = bll.GetModel(id);
                this.TxtSRDoc.Value = model.SRDoc;
                this.TxtSrName.Text = model.SRName;
            }
            else
            {
                this.BtnInsert.Visible = true;
                this.ButUpdate.Visible = false;
            }
        }
    }