Site1.Master.cs

(开头部分) 2KB

这里只显示每个文件的开头 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;
namespace 电子商务
{
    public partial class Site1 : System.Web.UI.MasterPage
    {
        SQLHelper db = new SQLHelper();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

                if (Session["zh"] == null)
                {
                    this.Panel1.Visible = true;
                    this.Panel2.Visible = false;
                }
                else
                {
                    this.Panel1.Visible = false;
                    this.Panel2.Visible = true;
                    this.lb_session.Text = Session["zh"].ToString();
                    //
                }
                string cx = "select * from bigcategory order by big_id desc";
                DataTable dt = db.ExecuteQuery(cx, CommandType.Text);
                this.dt_big.DataSource = dt;
                this.dt_big.DataBind();
            }
            //
        }

        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("search.aspx?key=" + this.txt_key.Text + "");
        }

        protected void btn_login_Click(object sender, EventArgs e)
        {
            string zh = this.txt_zh.Text.ToString();
            string mima = this.txt_mima.Text.ToString();
            string sql = "select * from hy where username='" + zh + "' and password='" + mima + "'";
            DataTable dt = db.ExecuteQuery(sql, CommandType.Text);
            int count = dt.Rows.Count;
            if (count == 0)
            {
                Response.Write("<script language=javascript>alert('帐号密码不正确!');</script>");
            }
            else
            {
                Session["zh"] = dt.Rows[0]["username"].ToString();
                Session["hy_id"] = dt.Rows[0]["hy_id"].ToString();
                Response.Redirect("index.aspx");
            }
后面还有 22 行代码,购买后查看完整代码

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

AI 解读 AI

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

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