Ejemplo n.º 1
0
    protected void lbtnSave_Click(object sender, EventArgs e)
    {
        DataTable userTable = userDal.GetUser(txtUserName.Text.Trim());

        if (userTable.Rows[0]["UserPassword"].ToString() == THOK.Util.Coding.Encoding(txtOldPwd.Text))
        {
            if (userDal.ChangePassword(txtUserName.Text.Trim(), THOK.Util.Coding.Encoding(txtAckPwd.Text)))
            {
                Response.Redirect("ModifyPwdSuccess.aspx");
            }
            else
            {
                Response.Write("<script>alert(\"密码修改失败!\")</script>");
            }
        }
        else
        {
            JScript.Instance.ShowMessage(this, "原密码错误!");
        }
    }