📄 passwordreset.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 PassWordReset : System.Web.UI.Page
{
//实例化BLL层
BLL.Employee.EmployeeBll PasswordReset;
BLL.Employee.EmployeeBll employeebllshow;
public PassWordReset()
{
PasswordReset = new BLL.Employee.EmployeeBll();
employeebllshow = new BLL.Employee.EmployeeBll();
}
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
//用户权限
if (Session["employee_id"] == null)
{
Response.Write("<script>alert('请您登陆系统');location.href='../Enter.aspx'</script>");
}
else
{
if (employeebllshow.UserRole(Session["role_id"].ToString(), "8") == true)
{
BindData();
}
else
{
Response.Write("<script>alert('你无权查看此功能,请与管理员联系');location.href='../Aboutus.aspx'</script>");
}
}
}
}
private void BindData()
{
//员工信息显示
gvEmployeePasswordReset.DataSource = PasswordReset.EmployeeInfShow();
gvEmployeePasswordReset.DataBind();
}
//根据员工名称查询信息
protected void btnFind_Click(object sender, EventArgs e)
{
if (this.ddlFindInf.Text == "员工姓名")
{
gvEmployeePasswordReset.DataSource = PasswordReset.EmployeeNameSelect(this.txtFindData.Text);
gvEmployeePasswordReset.DataBind();
}
else
{
BindData();
}
}
protected void lblPwdReset_Command(object sender, CommandEventArgs e)
{
//密码重置
PasswordReset.EmployeePasswordReset(e.CommandArgument.ToString());
BindData();
Response.Write("<script>alert('该员工密码已重置成功')</script>");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -