public ActionResult List(int page = 1) { int pageSize = 100; var list = FunsCateService.GetList(page, pageSize); ViewBag.Total = list.TotalItem; ViewBag.PageIndex = page; ViewBag.TotalPages = Math.Ceiling(list.TotalItem * 1.0 / pageSize); return(View(list.Data)); }
public ActionResult List(int page = 1) { int cateID = Request.Form["cate"].ToInt32(0); int pageSize = 100; var list = FunsService.GetList(page, pageSize, cateID); ViewBag.Total = list.TotalItem; ViewBag.PageIndex = page; ViewBag.TotalPages = Math.Ceiling(list.TotalItem * 1.0 / pageSize); ViewBag.Cates = FunsCateService.GetList(false); ViewBag.CurrentCateID = cateID; return(View(list.Data)); }