com.huiyou.Web/admin/activitylist.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using com.huiyou.Web.tools;
using com.huiyou.Bll;
using System.Data;
using com.huiyou.Common;
using System.Web.UI.HtmlControls;
namespace com.huiyou.Web.admin
{
public partial class activitylist : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!AdminLoginHelper.AdminEnter()) return;
if (!Page.IsPostBack)
{
BindData();
}
}
private int GetPageIndex()
{
int pageIndex = 1;
string page = Request["page"];
if (!string.IsNullOrEmpty(page))
{
pageIndex = Convert.ToInt32(page);
if (pageIndex <= 0)
{
pageIndex = 1;
}
}
return pageIndex;
}
private void BindData()
{
int pageSize = 20;
int pageIndex = GetPageIndex();
int pageCount = 0;
int totalCount = 0;
string sql = "select T1.* from Tb_Activity T1 where 1=1 and CurStatus<>-1 " + Environment.NewLine;
DataTable dt = DBHelper.SelectPagedDataSet(sql, pageSize, pageIndex, "id", "id desc",
out pageCount, out totalCount).Tables[0];
repActivity.DataSource = dt;
repActivity.DataBind();
lrPagebar.Text = HtmlHelper.CreatePageBar(pageIndex, pageCount, totalCount);
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
