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

📄 edituser.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;

public partial class admin_EditUser : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Username"] == null)
        {
            Response.Write(Database.topMessageBox("请登录后进入该页面", "AdminIndex.aspx"));

        }
        if (!IsPostBack)
        {
            binder();
        }
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        UserInfo edituser = new UserInfo();
        string password = this.pwd.Text.Replace("'", "");
        password = Database.GetMD5(password);
        edituser.People = Request.Params["name"].ToString();
        if (edituser.ChangePassword(password, Request.Params["name"].ToString()) > -1)
        {

            Response.Write(Database.MessageBox("修改成功", "User.aspx"));
        }
        else
        {
            Response.Write(Database.MessageBox("修改失败", "User.aspx"));
        }
    }
    public void binder()
    {
        string name = Request.Params["name"].ToString();
        UserInfo dt = UserInfo.GetUserByName(name);
        this.people.Text = dt.People;
        this.email.Text = dt.Email;
        this.name.Text = dt.Name;
        this.address.Text = dt.Address;
        this.phone.Text = dt.Phone;
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Response.Write("<script language=javascript>window.parent.frames['right'].location.href= 'User.aspx';</script>");


    }
}

⌨️ 快捷键说明

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