UserSelfInfoManage.aspx.cs

(开头部分) 3KB

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

using MyWeb.DBUtility;
using MyWeb.WebUtility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text.RegularExpressions;
using System.Data;

namespace MyWeb
{
    public partial class UserSelfInfoManage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //声明sql查询类
                DBHelper db = new DBHelper();
                //使用查询语句查询Class_Tbl表
                string sql = "select * from UserInfo_Tbl where del=0 and id='" + Session["id"].ToString() + "'";
                DataSet ds = db.Query(sql);
                //将查询得到的数据赋值给文本框
                if (ds.Tables[0].Rows.Count > 0)
                {
                    //输入框的赋值
                    TextBox1.Text = ds.Tables[0].Rows[0]["account"].ToString();
                    TextBox2.Text = ds.Tables[0].Rows[0]["password"].ToString();
                    TextBox3.Text = ds.Tables[0].Rows[0]["name"].ToString();
                    TextBox4.Text = ds.Tables[0].Rows[0]["tel"].ToString();
                    TextBox5.Text = ds.Tables[0].Rows[0]["IDNo"].ToString();
                    TextBox6.Text = ds.Tables[0].Rows[0]["address"].ToString();
                    if (ds.Tables[0].Rows[0]["sex"].ToString() == "1")
                    {
                        RadioButton1.Checked = true;
                    }
                    else
                    {
                        RadioButton2.Checked = true;
                    }
                }
            }
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            //声明sql查询类
            DBHelper db = new DBHelper();
            //声明提示类
            WebHelper wb = new WebHelper();
            if (TextBox1.Text == "")
            {
                wb.Alert("用户名不能为空");
            }
            else if (TextBox2.Text == "")
            {
                wb.Alert("密码不能为空");
            }
            else if (TextBox3.Text == "")
后面还有 39 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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