GoodsBook.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MyWeb.DBUtility;
using MyWeb.WebUtility;
using System.Data;
namespace MyWeb
{
public partial class GoodsBook : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack){
DBHelper db = new DBHelper();
WebHelper wb = new WebHelper();
if (Session["id"] == null)
{
wb.Alert("您还未登录,请先登录", "Login.aspx");
}
else if(Request["str"]!=null){
string sql = "select * from Goods_Tbl a inner join UserInfo_Tbl b on a.userID=b.id inner join Class_Tbl c on a.classID=c.id where a.del=0 and b.del=0 and c.del=0 and a.stock>0 and a.state=1 and a.classID="+Request["str"]+" and a.userID<>'" + Session["id"].ToString() + "' order by a.addDate desc";
DataSet ds = db.Query(sql);
Repeater1.DataSource = ds.Tables[0];
Repeater1.DataBind();
sql = "select * from Class_Tbl where del=0";
ds = db.Query(sql);
string html = "商品分类:";
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
html += "<a class='fenlei' dataid='" + ds.Tables[0].Rows[i]["id"].ToString() + "'>" + ds.Tables[0].Rows[i]["className"].ToString() + "</a>   ";
}
leibie.InnerHtml = html;
}
else {
string sql = "select * from Goods_Tbl a inner join UserInfo_Tbl b on a.userID=b.id inner join Class_Tbl c on a.classID=c.id where a.del=0 and b.del=0 and c.del=0 and a.stock>0 and a.state=1 and a.userID<>'"+Session["id"].ToString()+"' order by a.addDate desc";
DataSet ds = db.Query(sql);
Repeater1.DataSource = ds.Tables[0];
Repeater1.DataBind();
sql="select * from Class_Tbl where del=0";
ds=db.Query(sql);
string html = "商品分类:";
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
html += "<a class='fenlei' dataid='" + ds.Tables[0].Rows[i]["id"].ToString() + "'>" + ds.Tables[0].Rows[i]["className"].ToString() + "</a>   ";
}
leibie.InnerHtml = html;
}
}
}
public void searchBtn_click(object sender, EventArgs e)
{
DBHelper db = new DBHelper();
string sqlwhere = "";
if (seach.Value != "")
{
后面还有 9 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。