1234567891011121314151617181920212223242526272829303132333435363738 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- public partial class ModiPassword : System.Web.UI.Page
- {
- // UserData myud = new UserData();
- LYS.UserData1 myud = new LYS.UserData1();
- protected void Page_Load(object sender, EventArgs e)
- {
- }
- protected void Button1_Click(object sender, EventArgs e)
- {
- Boolean AC = myud.check_userlogin("UserS", "用户名", UserName.Text.ToString(), "密码", PassWord.Text.ToString());
- if (AC)
- {
- if (ReNewPassWord.Text == NewPassWord.Text)
- {
- //修改密码
- myud.UpdateUserPassword("UserS", NewPassWord.Text, "用户名", UserName.Text, "密码", PassWord.Text);
- Response.Write("<script>alert('密码修改成功!,请记住你的新密码是:(" + NewPassWord.Text + "),以便下次使用!')</script>");
-
- }
- else
- { Response.Write("<script>alert('两次输入新密码不同,请重新输入,并一定记住!')</script>"); }
- }
- else
- {
- Response.Write("<script>alert('用户名或密码错误,登录失败,无法修改密码!')</script>");
-
- }
- }
- }
|