void ChangePassword() { //前端校验2次密码输入是否一致 LCSS.Model.T_Account model = new LCSS.Model.T_Account(); model.ACCT_LoginID = txtAccount.Value; model.ACCT_Pwd = txtCurrent.Value; LCSS.BLL.T_Account T_AccountBLL = new LCSS.BLL.T_Account(); bool isRight = T_AccountBLL.Exists(txtAccount.Value, DESEncrypt.Encrypt(txtCurrent.Value)); if (isRight) { if (T_AccountBLL.UpdatePassword(txtAccount.Value, DESEncrypt.Encrypt(txtNew.Value.Trim()))) { Response.Write("<script>alert('修改成功,请使用新密码重新登陆!');window.parent.location.href='../Login.aspx';</script>"); //Response.Redirect("../Login.aspx"); } else { Response.Write("<script>alert('密码修改失败,请联系管理员!');</script>"); } } else { Response.Write("<script>alert('当前密码输入不正确,请重新输入!');</script>"); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(LCSS.Model.T_Account model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public long Add(LCSS.Model.T_Account model) { return(dal.Add(model)); }