public ActionResult UpdatePool(Pool pool) { if (ModelState.IsValid) { try { repo.UpdatePool(pool, AdminId); } catch (Exception e) { ViewData["EditError"] = e.Message; } } else { ViewData["EditError"] = "Please, correct all errors."; } return(PartialView("PoolsGridViewPartial", repo.GetLotteryPools(pool.PoolStatus))); }