using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CY.BLL.EC;
namespace CY.WebForm.Pages.front
{
/*
* 特价信息列表(前台)
*
* 作用:展示特价信息列表(前台)
* 创建时间:2013-4-19 9:36
* 修改时间:2013-4-19 9:36
* 创建人:吴崎均
* 修改人:吴崎均
*/
///
/// 特价信息列表(前台)
///
public partial class SeckillInfoList : MainPage
{
private EC_SeckillInfoBLL _eC_SeckillInfoBLL = null;//特价信息业务逻辑操作对象
///
/// 初始化
///
public SeckillInfoList()
{
_eC_SeckillInfoBLL = new EC_SeckillInfoBLL();
}
protected void Page_Load(object sender, EventArgs e)
{
try
{
switch (Request["Target"])
{
case "BatchDelete":
break;
default:
UCPager1.AspNetPager.PageChanged += AspNetPager1_PageChanged;
if (!IsPostBack && !IsCallback)
{
BingData();
}
else { }
return;
}
}
catch (Exception ex)
{
PAGEHandleException(ex);
Response.Clear();
Response.Write("-1");
}
Response.End();
}
///
/// 分页事件
///
///
///
protected void AspNetPager1_PageChanged(object src, EventArgs e)
{
BingData();
}
///
/// 绑定数据
///
private void BingData()
{
Infrastructure.Query.Pagination pagination = new Infrastructure.Query.Pagination() { PageSize = UCPager1.AspNetPager.PageSize, PageIndex = UCPager1.AspNetPager.CurrentPageIndex };
rptData.DataSource = _eC_SeckillInfoBLL.SelectModelPage(pagination, "", 0);
UCPager1.AspNetPager.RecordCount = pagination.RecordCount;
rptData.DataBind();
}
}
}