BookDetail.aspx.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using MyWeb.DBUtility;
using MyWeb.WebUtility;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace MyWeb
{
public partial class BookDetail : System.Web.UI.Page
{
public string hid = "";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
WebHelper wb = new WebHelper();
DBHelper db = new DBHelper();
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.id='" + Request["id"].ToString() + "'";
DataSet ds = db.Query(sql);
FoodsName.Text = ds.Tables[0].Rows[0]["FoodsName"].ToString();
Literal2.Text = ds.Tables[0].Rows[0]["className"].ToString();
Literal1.Text = ds.Tables[0].Rows[0]["name"].ToString();
price.Text = ds.Tables[0].Rows[0]["Price"].ToString();
imgGoods.ImageUrl = ds.Tables[0].Rows[0]["FoodsUrl"].ToString();
quantity.Text = ds.Tables[0].Rows[0]["sales"].ToString();
stock.Text = ds.Tables[0].Rows[0]["stock"].ToString();
content.Text = ds.Tables[0].Rows[0]["note"].ToString();
HiddenField1.Value = Request["id"].ToString();
hid = ds.Tables[0].Rows[0]["id"].ToString();
}
}
[WebMethod]
public static string loadBookDetail(string pi, string ps,string hid)
{
DBHelper db = new DBHelper();
//分页sql查询列表数据
string sql = "select top " + ((Convert.ToInt32(pi) - 1) * Convert.ToInt32(ps) + Convert.ToInt32(ps)) + " * from Order_Tbl where del=0 and FoodsID='"+hid+"' and id not in (select top " + ((Convert.ToInt32(pi) - 1) * Convert.ToInt32(ps)) + " id from Order_Tbl where del=0 and FoodsID='"+hid+"' order by addDate desc) order by addDate desc";
DataSet ds = db.Query(sql);
string html = "";
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
//得到列表数据
html += "<tr><td>评论" + (i + 1) + ":</td><td>" + ds.Tables[0].Rows[i]["remark"] + "</td></tr><tr><td>回复" + (i + 1) + ":</td><td>" + ds.Tables[0].Rows[i]["reply"] + "</td></tr>";
}
return html;
}
public void JoinShoppingCart(object sender, EventArgs e)
{
DBHelper db = new DBHelper();
WebHelper wb = new WebHelper();
if(shopcart.Value==""){
wb.Alert("请输入预订的商品数量");
}
else if (!IsNumeric(shopcart.Value))
{
后面还有 49 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
