Exemplo n.º 1
0
 public async Task <ActionResult> UpdateInfo(RichmonddayInfoModel data, string sortOrder = "", int pageNumber = 1)
 {
     ViewBag.PageNumber  = pageNumber;
     ViewBag.CurrentSort = sortOrder;
     try
     {
         if (ModelState.IsValid)
         {
             string result = await _info.Update(data);
         }
         else
         {
             // do business logic
         }
         var allInfo = _info.GetAllInfo(sortOrder);
         return(PartialView("~/Views/Partials/_Info.cshtml", allInfo.ToPagedList(pageNumber, 10)));
     }
     catch (Exception ex)
     {
         ErrorLog.GetDefault(null).Log(new Error(ex));
         throw;
     }
 }