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

📄 updatepass.aspx.cs

📁 介绍学习的管理系统说明什么的
💻 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 DataAccess;
public partial class employees_UpdatePass : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    protected void Button1_Click(object sender, EventArgs e)
    {

        string cmd = "update Employees set EmpPassword='" + txtPass.Text + "' where EmpLogin='" + Session["emplogin"] + "'";
        string cmd1 = "select EmpPassword from employees where EmpLogin='" + Session["emplogin"] + "'";
        DataBase db = new DataBase();
        string a = db.QueryValue(cmd1);
        if (a == txtOPass.Text)
        {
            db.QueryExec(cmd);
            Response.Write("<script>alert('密码修改成功!')</script>");
            txtOPass.Text = "";
            txtPass.Text = "";
            txtPass1.Text = "";
        }
        else
        {
            Response.Write("<script>alert('旧密码错误,请重新输入!')</script>");
            txtOPass.Text = "";
            txtPass.Text = "";
            txtPass1.Text="";
        }
    }
}

⌨️ 快捷键说明

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