public ActionResult PoolList(PoolSearchFilter searchFilter) { Logger.Info(_logMsg.Clear().SetPrefixMsg("Search Pool").Add("PoolName", searchFilter.PoolName) .Add("PoolDesc", searchFilter.PoolDesc).Add("Email", searchFilter.Email).ToInputLogString()); try { if (ModelState.IsValid) { _commonFacade = new CommonFacade(); _commPoolFacade = new CommPoolFacade(); PoolViewModel poolVM = new PoolViewModel(); poolVM.SearchFilter = searchFilter; poolVM.PoolList = _commPoolFacade.GetPoolList(poolVM.SearchFilter); ViewBag.PageSize = poolVM.SearchFilter.PageSize; ViewBag.PageSizeList = _commonFacade.GetPageSizeList(); Logger.Info(_logMsg.Clear().SetPrefixMsg("Search Pool").ToSuccessLogString()); return(PartialView("~/Views/CommPool/_PoolList.cshtml", poolVM)); } return(Json(new { Valid = false, Error = string.Empty, Errors = GetModelValidationErrors() })); } catch (Exception ex) { Logger.Error("Exception occur:\n", ex); Logger.Info(_logMsg.Clear().SetPrefixMsg("Search Pool").Add("Error Message", ex.Message).ToFailLogString()); return(Error(new HandleErrorInfo(ex, this.ControllerContext.RouteData.Values["controller"].ToString(), this.ControllerContext.RouteData.Values["action"].ToString()))); } }
public IEnumerable <PoolEntity> GetPoolList(PoolSearchFilter searchFilter) { _commPoolDataAccess = new CommPoolDataAccess(_context); return(_commPoolDataAccess.GetPoolList(searchFilter)); }