Register.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MyWeb.DBUtility;
using System.Web.Services;
using System.Data;
namespace MyWeb
{
public partial class Register : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
[WebMethod]
public static int AddRegister(string Account, string Password, string Name, string Sex, string Identity,string address,string IDNo)
{
//声明sql类
DBHelper db = new DBHelper();
//查询这个账号是否存在
string sql0 = "select * from UserInfo_Tbl where del=0 and account='" + Account + "'";
DataSet ds = db.Query(sql0);
if (ds.Tables[0].Rows.Count > 0)
{
return 0;
}
else
{
//搜集输入框数据放入UserInfo_Tbl表
string sql = "insert into UserInfo_Tbl(account,password,name,sex,tel,IDNo,address,isAudit,addDate,del) values('" + Account + "','" + Password + "','" + Name + "','" + Sex + "','" + Identity + "','"+IDNo+"','"+address+"',1,getdate(),0)";
int renum = db.ExecuteSql(sql);
if (renum == 1)
{
//成功
return 1;
}
else
{
//失败
return 0;
}
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。