Account/UserInfo.aspx.cs

(开头部分) 5KB

这里只显示每个文件的开头 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 UserInfo : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            #region 权限检查
            if (Session["login"] == null || Session["login"].ToString() != "true")
            {
                Response.Write("<script>top.location.href='../Default.aspx';</script>");
                Response.End();
                return;
            }
            #endregion
            
            HiddenField1.Value = "";
            if (TextBox1.Text == "")
            {
                string sql = "select * from 系统_用户 where 用户名称 = '" + Session["username"].ToString() + "'";
                SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["默认连接_3HK0R6GAS"].ConnectionString);
                DataTable loginTable = new DataTable();
                SqlDataAdapter sda = new SqlDataAdapter();
                try
                {
                    sda.SelectCommand = new SqlCommand(sql, conn);
                    SqlCommandBuilder scb = new SqlCommandBuilder(sda);
                    sda.Fill(loginTable);
                    conn.Close();
                    TextBox1.Text = loginTable.Rows[0]["用户名称"].ToString().Trim();
                    TextBox2.Text = loginTable.Rows[0]["姓名"].ToString().Trim();
                    if (loginTable.Rows[0]["性别"].ToString().Trim() == "男")
                    {
                        RadioButton1.Checked = true;
                        RadioButton2.Checked = false;
                    }
                    else
                    {
                        if (loginTable.Rows[0]["性别"].ToString().Trim() == "女")
                        {
                            RadioButton1.Checked = false;
                            RadioButton2.Checked = true;
                        }
                    }
                    if (loginTable.Rows[0]["出生日期"] != DBNull.Value)
                    {
                        TextBox3.Text = Convert.ToDateTime(loginTable.Rows[0]["出生日期"]).ToString("yyyy.MM.dd");
                    }
                    TextBox4.Text = loginTable.Rows[0]["工作单位"].ToString().Trim();
                    TextBox5.Text = loginTable.Rows[0]["职务"].ToString().Trim();
                    TextBox6.Text = loginTable.Rows[0]["电话"].ToString().Trim();
后面还有 64 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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