protected void Page_Load(object sender, EventArgs e) { if (!EX_Admin.Power("promotion_list", "促销活动列表")) { PageReturnMsg = PageNoPowerMsg(); } tid = RequestTool.RequestInt("tid", 0); pt = B_Lebi_Promotion_Type.GetModel(tid); if (pt == null) { PageError(); return; } string where = "Promotion_Type_id=" + tid; PageSize = RequestTool.getpageSize(25); models = B_Lebi_Promotion.GetList(where, "Sort desc", PageSize, page); int recordCount = B_Lebi_Promotion.Counts(where); PageString = Pager.GetPaginationString("?page={0}&tid=" + tid, page, PageSize, recordCount); }
public int Count(int ptid) { return(B_Lebi_Promotion.Counts("Promotion_Type_id=" + ptid + "")); }