コード例 #1
0
 public ActionResult GetAllRequests(int?page)
 {
     int pageSize = 5;
     int pageNumber = (page ?? 1);
     var colection = new RequestContext().Requests.OrderByDescending(x => x.InitialDate);
     return View(colection.ToPagedList(pageNumber, pageSize));
 }
コード例 #2
0
 public ActionResult GetRequestsById(int? page)
 {
     string id = User.Identity.GetUserId();
     var collection = new RequestContext().Requests.Where(x => x.ClientID == id).OrderByDescending(x => x.InitialDate);
     int pageSize = 5;
     int pageNumber = (page ?? 1);
     return View("GetAllRequests", collection.ToPagedList(pageNumber,pageSize));
 }