public ActionResult List(int page = 1, string searchValue = "") { int rowCount = 0; int pageSize = 10; var listOfCategories = DataService.ListCategories(page, 10, searchValue, out rowCount); Models.CategoryPaginationQueryResult model = new Models.CategoryPaginationQueryResult() { Page = page, PageSize = pageSize, SearchValue = searchValue, RowCount = rowCount, Data = listOfCategories }; return(View(model)); }
/// <summary> /// /// </summary> /// <returns></returns> public ActionResult Index(int page = 1, string searchValue = "") { ViewBag.Title = "Quản lý danh mục"; int rowCount = 0; int pageSize = 10; var listOfCategories = DataService.ListCategories(page, pageSize, searchValue, out rowCount); Models.BasePaginationQueryResult model = new Models.CategoryPaginationQueryResult() { Page = page, PageSize = pageSize, SearchValue = searchValue, RowCount = rowCount, Data = listOfCategories }; return(View(model)); }