ProOnsale.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using BLL.Article;
using CSA.DAL;
public partial class ProOnsale : System.Web.UI.Page
{
protected string cur_High, kindname, title, content, name, navname;
protected DataRow drList;
protected DataTable dtList, dtCat, dtProClass;
protected void Page_Load(object sender, EventArgs e)
{
BindProducts();
}
protected void BindProducts()
{
//dtCat = BLL.Product.Product.getList("", 0, " and isPromote =1 ");
string sql = "select * from bs_products where isPromote =1 " + getSortno();
dtCat = DBAccess.getRS(sql);
int pageSize = 10;
dtList = CSA.DAL.PageHelper.getPage(dtCat, pageSize, AspNetPager1.CurrentPageIndex);
AspNetPager1.RecordCount = dtCat != null ? dtCat.Rows.Count : 0;
AspNetPager1.PageSize = pageSize;
}
protected void AspNetPager1_PageChanged(object sender, EventArgs e)
{
BindProducts();
}
protected string getSortno()
{
string str = "";
string cur_sortno = Request.QueryString["sortno"];
if (string.IsNullOrEmpty(cur_sortno)) //如果没有Code传进,自定义Code
{
cur_sortno = "1";
}
switch (cur_sortno)
{
case "1": str = " order by Price desc "; break;
case "2": str = " order by Addtime desc "; break;
case "3": str = " order by Price asc "; break;
case "4": str = " order by Addtime asc "; break;
}
return str;
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
