示例#1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        admin admin2 = new admin();

        admin2.id   = Convert.ToInt32(Label1.Text);
        admin2.name = txt_name.Text;
        admin2.pwd  = Common.DESEncrypt.Encrypt(txt_pwd.Text);

        BLLadmin blladmin = new BLLadmin();
        int      result   = blladmin.updateAdmin(admin2);

        if (result > 0)
        {
            Common.MessageAlert.AlertLocation(Page, "alert('更新成功');location.href='adminList.aspx'");
        }
        else
        {
            Common.MessageAlert.Alert(Page, "更新失败");
        }
    }