Exemplo n.º 1
0
        public ActionResult Index(int page = 1, string keyword = null)
        {
            int pageSize = 10;
            var list     = _campusService.GetListAsync(page, pageSize, keyword);

            ViewBag.Total      = list.Total;
            ViewBag.PageIndex  = page;
            ViewBag.TotalPages = Math.Ceiling(list.Total * 1.0 / pageSize);
            ViewBag.Keyword    = keyword;
            return(View(list.Data));
        }