440petSaleWeb/Web/news.aspx.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindData();
}
}
/// <summary>
/// 绑定
/// </summary>
private void BindData()
{
PSD.BLL.news bll = new PSD.BLL.news();
//设置查询条件
string where = " 1=1 ";
if (Request.QueryString["tid"]!=null)
{
where += " and tid="+Request.QueryString["tid"];
PSD.Model.newsType md = new PSD.BLL.newsType().GetModel(int.Parse(Request.QueryString["tid"]));
Literal1.Text = md.tname;
}
else
{
Literal1.Text = "宠物新闻";
}
int pagesize = this.AspNetPager1.PageSize;
int pageindex = this.AspNetPager1.CurrentPageIndex;
Repeater1.DataSource = bll.GetListByPage(where, " nid desc ", 1 + (AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex * AspNetPager1.PageSize);
Repeater1.DataBind();
this.AspNetPager1.RecordCount = bll.GetRecordCount(where);
}
/// <summary>
/// 分页
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void AspNetPager1_PageChanged(object sender, EventArgs e)
{
BindData();
}
protected void btnSearch_Click(object sender, EventArgs e)
后面还有 4 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。