public async Task <ViewResult> GetTickets(string sortOrder, string currentFilter, string searchString, string tab, int?page) { ViewBag.CurrentSort = sortOrder; ViewBag.SortByIndex = String.IsNullOrEmpty(sortOrder) ? "sort_by_index_desc" : ""; ViewBag.SortByName = sortOrder == "sort_by_name" ? "sort_by_name_desc" : "sort_by_name"; ViewBag.SortByStatus = sortOrder == "sort_by_status" ? "sort_by_status_desc" : "sort_by_status"; if (searchString != null) { page = 1; } else { searchString = currentFilter; } ViewBag.CurrentFilter = searchString; ViewBag.Tab = tab; var tickets = await ticketsRepository.GetAll(); tickets = ticketsRepository.GetTicketsBySearchString(searchString, tickets); tickets = ticketsRepository.GetTicketsBySort(sortOrder, tickets); tickets = ticketsRepository.GetTicketsByTab(tab, tickets, User.Identity.GetUserId()); int pageSize = 3; int pageNumber = (page ?? 1); return(View("TicketsList", tickets.ToPagedList(pageNumber, pageSize))); }
public IReadOnlyCollection <Ticket> GetAll() { return(repository.GetAll()); }
public List <Ticket> GetAll() { return(_ticketsRepository.GetAll()); }
public IEnumerable <Ticket> Get() { return(_repo.GetAll()); }
public dynamic GetAll() { return(_Repository.GetAll()); }
public IEnumerable <TiketModel> GetAll() { IEnumerable <Ticket> models = _ticketRepository.GetAll(); return(_mapper.Map <IEnumerable <TiketModel> >(models)); }