コード例 #1
0
        public ActionResult Index(int? Page, string SortBy, bool? SortDescending)
        {
            int currentPageIndex = Page.HasValue ? Page.Value - 1 : 0;
            var option = new PagingOption { Page = currentPageIndex, PageSize = PageSize, SortBy = SortBy, SortDescending = SortDescending };

            var items = PeopleList.ToPagedList(option);
            return View(items);
        }
コード例 #2
0
        public ActionResult AjaxPeople(int? Page, string SortBy, bool? SortDescending)
        {
            int currentPageIndex = Page.HasValue ? Page.Value - 1 : 0;
            var option = new PagingOption { Page = currentPageIndex, PageSize = PageSize, SortBy = SortBy, SortDescending = SortDescending };
            var items = PeopleList.ToPagedList(option);

            System.Threading.Thread.Sleep(1000);

            return PartialView("PeopleGridPartial", items);
        }
コード例 #3
0
 public ActionResult Index()
 {
     var option = new PagingOption { Page = 0, PageSize = PageSize };
     var items = PeopleList.ToPagedList(option);
     return View(items);
 }