41 lines
1.5 KiB
C#
41 lines
1.5 KiB
C#
using System;
|
|
using System.Data;
|
|
using System.Configuration;
|
|
using System.Collections;
|
|
using System.Web;
|
|
using System.Web.Security;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using System.Web.UI.WebControls.WebParts;
|
|
using System.Web.UI.HtmlControls;
|
|
|
|
public partial class Personal_ChangPwd : System.Web.UI.Page
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!Page.IsPostBack)
|
|
{
|
|
ZWL.Common.PublicMethod.CheckSession();
|
|
this.Label1.Text = ZWL.Common.PublicMethod.GetSessionValue("UserName");
|
|
|
|
//设定按钮权限
|
|
ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|012M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
|
|
}
|
|
}
|
|
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
|
|
{
|
|
ZWL.BLL.ERPUser MyModel = new ZWL.BLL.ERPUser();
|
|
MyModel.ID = int.Parse(ZWL.Common.PublicMethod.GetSessionValue("UserID"));
|
|
MyModel.UserPwd = ZWL.Common.DEncrypt.DESEncrypt.Encrypt(this.TextBox1.Text);
|
|
MyModel.UpdatePwd();
|
|
ZWL.Common.MessageBox.Show(this, "修改用户密码成功!");
|
|
|
|
|
|
//写系统日志
|
|
ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
|
|
MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
|
|
MyRiZhi.DoSomething = "用户修改密码";
|
|
MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
|
|
MyRiZhi.Add();
|
|
}
|
|
} |