protected void Page_Load(object sender, EventArgs e)
        {
            string loginId = Request["loginId"] ?? "";
            if (loginId == "")
            {
                return;
            }
            this.LoginId = loginId;

            string loginPwd = Request["newPassword"] ?? "";
            if (loginPwd == "")
            {
                return;
            }
            BLL.UsersBll bll = new BLL.UsersBll();
            Model.Users user = bll.GetModelByLoginId(loginId);
            user.LoginPwd = Common.CommonTools.GetMd5String(Common.CommonTools.GetMd5String(loginPwd));
            if (bll.Update(user))
            {
                Response.Redirect("ShowMsg.aspx?TransCode=changePwdSuccess");
            }
            else
            {
                Response.Redirect("ShowMsg.aspx?TransCode=changePwdFailed");
            }


        }
Пример #2
0
 //检测用户名是否存在
 private bool CheckLoginInfo(string loginId, string loginMail)
 {
     BLL.UsersBll bll = new BLL.UsersBll();
     return bll.CheckUserMailByLoginId(loginId, loginMail);
 }
Пример #3
0
 //检测用户名是否存在
 private bool CheckIsExistName(string loginId)
 {
     BLL.UsersBll bll = new BLL.UsersBll();
     return bll.CheckIsExistNameByName(loginId);
 }
Пример #4
0
 //注册成功,增加数据
 private bool AddNewUserInfo(Model.Users user, out int userId)
 {
     BLL.UsersBll bll = new BLL.UsersBll();
     return bll.Add(user, out userId) > 0;
 }