⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 password.aspx.cs

📁 OA自动化办公系统,就是OA自动化办公系统
💻 CS
字号:
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;
using COM.OA.BLL;
using COM.OA.Entity;

public partial class index_top_password : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //取登陆人信息 
        COM.OA.Entity.users loginuser = Session["loginuser"] as COM.OA.Entity.users;
        //如果取不到跳转到登陆页
        if (loginuser == null)
        {
            this.Response.Write(string.Format(GetRedirect.ALLREDIRECT, "../login.aspx"));
        }
        int loginuid= loginuser.u_id;
        string oldpd = this.Request["oldpd"];
        if (oldpd != loginuser.u_password)
        {
            this.Response.Write(string.Format(GetRedirect.WINALERT, "原始密码错误"));
            this.Response.Write(string.Format(GetRedirect.REDIRECT, "updatepassword.aspx"));
        }
        else
        {
            string newpd = this.Request["newpd"];
            users uu = usersBLL.Select(loginuid);
            uu.u_password = newpd;
            int flag = usersBLL.Update(uu);
            if (flag != 0)
            {
                this.Response.Write(string.Format(GetRedirect.WINALERT, "密码修改成功"));
                this.Response.Write(string.Format(GetRedirect.REDIRECT, "../officetable.aspx"));
            }
            else
            {
                this.Response.Write(string.Format(GetRedirect.WINALERT, "密码修改失败"));
                this.Response.Write(string.Format(GetRedirect.REDIRECT, "../login.aspx"));
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -