private PageResult ShowExceptionLog() { if (string.IsNullOrEmpty(_totalResult.ExceptionLogException) == false) { return(PageResult("/CodeScan/Partial/ScanFailedResult.cshtml", _totalResult.ExceptionLogException)); } List <ExceptionInfo> list = _totalResult.ExceptionInfos; if (_sortField == "Time") { list = (from x in list orderby x.Time ascending select x).ToList(); } else if (_sortField == "ExceptionType") { list = (from x in list orderby x.ExceptionType select x).ToList(); } ExceptionIndexViewModel model = new ExceptionIndexViewModel(list, _pageIndex); model.Today = _totalResult.Today; model.BranchId = _totalResult.Branch.Id; model.DataFlag = _dataFlag; return(PageResult("/CodeScan/Partial/ExceptionList.cshtml", model)); }
public void Index(ExceptionIndexViewModel viewModel) { try { var _listado = UoW.ErrorLog.ObtenerListado(new ErrorLog { ERR_FechaInicio = viewModel.ERR_Fecha.FechaInicio, ERR_FechaFin = viewModel.ERR_Fecha.FechaFin, ERR_Folio = viewModel.ERR_Folio }); viewModel.PaginarListado(_listado); } catch (Exception ex) { ModelState.AddModelError(string.Empty, ex.Message); } }