Account/NewUser.aspx.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;

namespace 客户订单管理2
{
    public partial class NewUser : System.Web.UI.Page
    {
        Random rd = new Random();
        protected void Page_Load(object sender, EventArgs e)
        {
            #region 权限检查
            if (TextBox11.Text == "")
            {
                Session["VerificationCode"] = rd.Next(99999999).ToString();
            }
            #endregion
            
            HiddenField1.Value = "";
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            if (TextBox1.Text == "")
            {
                HiddenField1.Value = "用户名称不能为空 ! ";
                return;
            }
            if (TextBox9.Text == "" ||  TextBox10.Text == "")
            {
                HiddenField1.Value = "用户密码能为空  ! ";
                return;
            }
            if (TextBox9.Text != TextBox10.Text)
            {
                HiddenField1.Value = "输入的密码不一致 ! ";
                return;
            }
            if (Session["VerificationCode"].ToString() != TextBox11.Text)
            {
                HiddenField1.Value = "验证码不正确 ! ";
                return;
            }
            string sql = "select count(*) from 系统_用户 where 用户名称='" + TextBox1.Text.Trim() + "'";
            SqlCommand sqlCmd = new SqlCommand();
            SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["默认连接_3HK0R6GAS"].ConnectionString);
            conn.Open();
            sqlCmd.Connection = conn;
            sqlCmd.CommandText = sql;
            object obj = sqlCmd.ExecuteScalar();
            if (obj != null)
            {
                if ((int)obj != 0)
                {
后面还有 74 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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