Esempio n. 1
0
 public ActionResult Index(string sortOrder, int?page)
 {
     try
     {
         ViewBag.CurrentSort        = sortOrder;
         ViewBag.FirstNameSortParam = String.IsNullOrEmpty(sortOrder) ? "fDesc" : null;
         ViewBag.LastNameSortParam  = String.IsNullOrEmpty(sortOrder) ? "lDesc" : null;
         var allInfo    = _info.GetAllInfo(sortOrder);
         int pageNumber = (page ?? 1);
         ViewBag.pageNumber = pageNumber;
         return(View(allInfo.ToPagedList(pageNumber, 10)));
     }
     catch (Exception ex)
     {
         ErrorLog.GetDefault(null).Log(new Error(ex));
         throw;
     }
 }