Exemplo n.º 1
0
 //保存
 protected void Button_Save_Click(object sender, EventArgs e)
 {
     HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
     if (Hyoa_user.DoChPwd(this.txtuserid.Value, this.txtNewPass.Value))
     {
         Response.Write("<script>alert('修改密码成功!');self.close();</script>");
     }
 }
Exemplo n.º 2
0
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        String password = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(this.txtOldPass.Value, "MD5");
        HyoaClass.Hyoa_user Users = new HyoaClass.Hyoa_user();

        if (Users.Login(this.txtuserid.Value, password))
        {
            HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
            if (Hyoa_user.DoChPwd(this.txtuserid.Value, this.txtNewPass.Value))
            {
                Response.Write("<script>alert('修改密码成功!');self.close();</script>");
            }
        }
        else
        {
            Response.Write("<script>alert('旧密码不正确,请重新输入!');</script>");
            return;
        }
    }