OrderSearch.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 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 OrderSearch : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DBHelper db = new DBHelper();
//string sql = "select * from Class_Tbl where del=0";
//DataSet ds = db.Query(sql);
//for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
//{
// DropDownList1.Items.Add(new ListItem(ds.Tables[0].Rows[i]["className"].ToString(), ds.Tables[0].Rows[i]["id"].ToString()));
//}
Hidden1.Value = Session["id"].ToString();
}
}
[WebMethod]
public static string loadOrderSearch(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 userID='" + hid + "' and id not in (select top " + ((Convert.ToInt32(pi) - 1) * Convert.ToInt32(ps)) + " id from Order_Tbl where del=0 and userID='" + 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++)
{
//得到列表数据 <td><img style='width:20px;height:20px;' src='" + ds.Tables[0].Rows[i]["FoodsUrl"].ToString() + "' /></td><td>" + ds.Tables[0].Rows[i]["FoodsName"] + "</td> <td>" + ds.Tables[0].Rows[i]["remark"] + "</td><td>" + ds.Tables[0].Rows[i]["reply"] + "</td><td><a href='AddRemark.aspx?id=" + ds.Tables[0].Rows[i]["id"] + "'>评价</a></td>
//<td>" + ds.Tables[0].Rows[i]["inDate"] + "</td>
html += "<tr><td>" + ds.Tables[0].Rows[i]["id"] + "</td><td>" + ds.Tables[0].Rows[i]["orderName"] + "</td><td>" + ds.Tables[0].Rows[i]["days"] + "</td><td>" + ds.Tables[0].Rows[i]["addDate"] + "</td><td>" + ds.Tables[0].Rows[i]["orderPrice"] + "</td><td>" + ds.Tables[0].Rows[i]["orderTel"] + "</td><td>" + ds.Tables[0].Rows[i]["address"] + "</td><td><a href='OrderDetail.aspx?id=" + ds.Tables[0].Rows[i]["id"] + "'>显示详情</a></td></tr>";
}
return html;
}
//查询数据
[WebMethod]
public static string SearchOrderSearch(string t1, string hid)
{
DBHelper db = new DBHelper();
string sqlwhere = "";
//获取查询条件
if (t1 != "")
{
sqlwhere += " and b.FoodsName like '%" + t1 + "%'";
}
string sql = "select * from Order_Tbl a inner join Goods_Tbl b on a.FoodsID=b.id where a.del=0 and a.userID='" + hid + "' and b.del=0 "+sqlwhere+" order by a.addDate desc";
DataSet ds = db.Query(sql);
string html = "";
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
后面还有 8 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。