Ejemplo n.º 1
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        adminmanage.Name = txtName.Text;
        DataSet ds = adminmanage.GetAllAdminByName(adminmanage, "tb_admin");

        if (txtYPwd.Text == ds.Tables[0].Rows[0][2].ToString())
        {
            adminmanage.Pwd = txtXPwd.Text;
            adminmanage.UpdateAdmin(adminmanage);
            Response.Write("<script>alert('密码修改成功!')</script>");
        }
        else
        {
            Response.Write("<script>alert('管理员原密码输入不正确!')</script>");
        }
    }