/// <summary> /// 截图列表 /// </summary> /// <param name="page"></param> /// <returns></returns> public ActionResult Index(int?page) { PageIndex = page ?? 1; PageSize = 10; var predicate = PredicateBuilder.True <ScreenShot>().And(i => i.IsValid == true); var BLL = new ScreenShotBLL(); var list = BLL.GetPagedList(PageIndex, PageSize, predicate, i => i.ID, false); var rowCount = BLL.GetCount(predicate);; var pageCount = Convert.ToInt32(Math.Ceiling(rowCount * 1.0 / PageSize)); var pagedHtml = HtmlCommon.GetPagedHtml(PageIndex, pageCount, "", string.Format("&keyword={0}", "")); ViewBag.Data = new { PageIndex = PageIndex, PageSize = PageSize, PageCount = pageCount, PagedHtml = pagedHtml, RowCount = rowCount }.ToExpando(); return(View(list)); }
/// <summary> /// 截图展示页面视图 /// </summary> /// <returns></returns> public ActionResult Index() { PageIndex = 1; PageSize = 6; var predicate = PredicateBuilder.True <ScreenShot>().And(i => i.IsValid == true); var BLL = new ScreenShotBLL(); var list = BLL.GetPagedList(PageIndex, PageSize, predicate, i => i.ID, false); var rowCount = BLL.GetCount(predicate);; var pageCount = Convert.ToInt32(Math.Ceiling(rowCount * 1.0 / PageSize)); ViewBag.Data = new { PageCount = pageCount }.ToExpando(); return(View(list)); }