recommend_product.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Meiqi.BusinessLogicLayer;
public partial class recommend_product : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//显示产品大类
string strSql = "";
strSql = "select MajorID,MajorName from cai_MajorClass order by MajorSortID";
DataView dvlist = cai_MajorClass.QueryMajorClass(strSql);
ShowMajorClass.DataSource = dvlist;
ShowMajorClass.DataBind();
bindData();
}
}
void bindData()
{
string strSql = "";
strSql = "select ProductID,ProductName,Model,MajorID,SubID,PicPathSmall,PicPathBig,RetailPrice,IsRecommended,IsSpecial,IsDeleted,AddTime From cai_Product2 where IsRecommended=1 and IsDeleted=0 order by IsRecommended desc,ProductID desc";
DataView dvlist1 = cai_Product2.QueryProduct2(strSql);
ProductList.DataSource = dvlist1;
AspNetPager2.RecordCount = dvlist1.Table.Rows.Count;
//Session["dvlist1"] = dvlist1;
PagedDataSource pds = new PagedDataSource();
pds.AllowPaging = true;
pds.PageSize = AspNetPager2.PageSize;
pds.CurrentPageIndex = AspNetPager2.CurrentPageIndex - 1;
//pds.DataSource = (DataView)Session["dvlist1"];
pds.DataSource = dvlist1;
ProductList.DataSource = pds;
ProductList.DataBind();
}
protected void AspNetPager1_PageChanged(object sender, EventArgs e)
{
bindData();
}
protected void ShowMajorClass_ItemDataBind(object sender, DataListItemEventArgs e)
后面还有 28 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。