// GET: clients public ActionResult Index(string nroFactura, int page = 1) { CobroVMIndex model = new CobroVMIndex { nroFactura = nroFactura, page = page }; try { IEnumerable <ListCobros> list = _repo.CobrosList(model.nroFactura); model.list = list.OrderByDescending(o => o.id).Skip((page - 1) * _pageSize).Take(_pageSize); model.pagingInfo = new PagingInfo { CurrentPage = page, ItemsPerPage = _pageSize, TotalItems = list.Count() }; } catch (Exception ex) { ModelState.AddModelError("", "Se produjo un error, en caso de persistir, ponerse en contacto con el Administrador."); } return(View(model)); }