Web_ScienceManage/UsersRegistered.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Model;
using BLL;
public partial class UsersRegistered : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnAdd_Click(object sender, EventArgs e)
{
Users st = new Users();
st.Email = txtEmail.Value.Trim();
st.IsLogin = "是";
st.Pwd = txtPwd.Value.Trim();
st.RealName = txtRealName.Value.Trim();
st.RoleId = 3;
st.Phone = txtPhone.Value.Trim();
st.UserName = txtUserName.Value.Trim();
st.RealName = txtRealName.Value.Trim();
st.Sex = ddlSex.SelectedValue.Trim();
if (!UsersBLL.IsTrue(st.UserName))
{
if (UsersBLL.AddUsers(st) > 0)
{
this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('注册成功!');window.location.replace('login.aspx')</script>");
return;
}
else
{
this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('注册失败!');</script>");
return;
}
}
else
{
this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('该用户名已存在,请用别名!');</script>");
return;
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。