Web/jzlist.aspx.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _list : System.Web.UI.Page
{
UBW.BLL.books bll = new UBW.BLL.books();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindData();
}
}
/// <summary>
/// 绑定
/// </summary>
private void BindData()
{
//设置查询条件
string where = " price=0 ";
int count = 0;
if (Request.QueryString["tid"] != null)
{
where += " and tid=" + Request.QueryString["tid"];
}
if (Request.QueryString["k"] != null)
{
where += " and bname like '%" + Request.QueryString["k"] + "%' ";
}
DataSet ds = bll.GetData("*", where, AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1), AspNetPager1.PageSize, out count);
AspNetPager1.RecordCount = count;
Repeater1.DataSource = ds;
Repeater1.DataBind();
}
/// <summary>
/// 分页处理
/// </summary>
protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e)
{
AspNetPager1.CurrentPageIndex = e.NewPageIndex;
BindData();
}
protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
{
后面还有 3 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。