📄 useredit.aspx.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_UserEdit : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["UserID"] == null || Session["UserID"] == "")
{
Response.Write("<script language='javascript'>alert('您尚未登陆或登陆超时');location.href='/';</script>");
Response.End();
}
else
{
if (!CheckLogin.CheckAdmin(Convert.ToInt32(Session["UserID"])))
{
Response.Write("<script language='javascript'>alert('您的权限不够请不要非法登陆');location.href='/';</script>");
Response.End();
}
}
Panel1.Visible = true;
Panel2.Visible = false;
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Panel1.Visible = true;
Panel2.Visible = false;
}
protected void LinkButton2_Click(object sender, EventArgs e)
{
Panel1.Visible = false;
Panel2.Visible = true;
}
protected void Button1_Click(object sender, EventArgs e)
{
string UName = UserName.Text;
string Pwd = PassWord.Text;
string AlignKeep = DropDownList1.Text;
string Types = Select1.Value;
//Response.Write(AlignKeep+"||"+Types);
UserAction MyA = new UserAction();
if (MyA.UserAdd(UName,Pwd,AlignKeep,Types))
{
Response.Write("<script language='javascript'>alert('用户添加成功');location.href='UserEdit.aspx';</script>");
}
else
{
Response.Write("<script language='javascript'>alert('该用户名已经存在,请重新输入');history.go(-1);</script>");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -