📄 updatepasswowd.aspx.cs
字号:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Model;
using BLL;
namespace 金利来服装连锁门店管理系统
{
public partial class UpdatePasswowd : System.Web.UI.Page
{
BLL.Employee.EmployeeBll EmployeePwdUpdate;
BLL.Employee.EmployeeBll employeebllshow;
public UpdatePasswowd()
{
EmployeePwdUpdate = new BLL.Employee.EmployeeBll();
employeebllshow = new BLL.Employee.EmployeeBll();
}
protected void Page_Load(object sender, EventArgs e)
{
//用户权限
if (Session["employee_id"] == null)
{
Response.Write("<script>alert('请您登陆系统');location.href='../Enter.aspx'</script>");
}
else
{
if (employeebllshow.UserRole(Session["role_id"].ToString(), "13") == false )
{
Response.Write("<script>alert('你无权查看此功能,请与管理员联系');location.href='../Aboutus.aspx'</script>");
}
}
}
//确定修改
protected void btn1_Click(object sender, EventArgs e)
{
List<Model.Employee.EmployeeModel> ass = EmployeePwdUpdate.EmployeeUpdatePwdSelect(Session["employee_id"].ToString());
foreach (Model.Employee.EmployeeModel item in ass)
{
if (this.txtOldPassword.Text == item.Employee_pwd)
{
EmployeePwdUpdate.EmployeeUpdatePwd(Session["employee_id"].ToString(), this.txtNewPassword.Text);
this.txtOldPassword.Text = "";
this.txtNewPassword.Text = "";
this.txtPasswordRepeat.Text = "";
Response.Write("<script>alert('密码修改成功')</script>");
}
else
{
Response.Write("<script>alert('您的密码输入有误')</script>");
}
}
}
//取消时
protected void btnEsc_Click(object sender, EventArgs e)
{
this.txtOldPassword.Text = "";
this.txtNewPassword.Text = "";
this.txtPasswordRepeat.Text = "";
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -