📄 adduser.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;
//该源码下载自www.51aspx.com(51aspx.com)
public partial class adduser : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
UserLogin.LoginNo();
}
protected void Button1_Click(object sender, EventArgs e)
{
string _name= username.Text;
string _pwd = userpwd.Text;
string _isadmin = isadmin.Text;
if ((_name == string.Empty) || (_pwd == string.Empty) || (_isadmin == string.Empty))
{
Jscript.Alert("请确定不为空!");
}
else
{
Info info = new Info(username.Text,userpwd.Text,isadmin.Text);
Dal dal = new Dal();
int result= dal.Insert(info);
if (result > 0)
{
Jscript.AlertAndRedirect("添加成功!","View.aspx");
}
else
{
Jscript.Alert("失败;");
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -