User/yhzc.aspx.cs

(完整代码) 1KB

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;
using System.Data.SqlClient;
using LYF.SqlHelper;

public partial class User_yhzc : System.Web.UI.Page
{
    private SqlHelper shp = new SqlHelper("XS");
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        { 
        
        }
    }
    protected void qrzc_Click1(object sender, EventArgs e)
    {
        int count = 0;
        string selsql = "select count(*) from XS_User where username='" + this.zh.Value + "'";
        using (SqlDataReader dr = shp.ExecuteReader(selsql)) 
        {
            if (dr.Read()) 
            {
                count = Int32.Parse(dr[0].ToString());
            }
        }
        shp.CloseDB();
        if (count > 0)
        {
            ShowJsMsg("用户名已存在--!");
        }
        else
        {
            string insql = "insert into XS_User(username,loginpwd,card,name,address,tel,money,date) values('" + this.zh.Value + "','" + this.pwd.Value + "','" + this.sfz.Value + "','" + this.name.Value + "','" + this.address.Value + "','" + this.tel.Value + "',0,getdate())";
            shp.ExecuteNonQuery(insql);
            ShowJsMsg("注册成功*_*");
        }
    }
    public void ShowJsMsg(string msg)
    {
        this.ClientScript.RegisterStartupScript(this.GetType(), "message",
            "<script type='text/javascript' defer='defer'>alert('" + msg + "');</script>");
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。