public ActionResult WorkerPaymentHistory(string searchName, string orderBy) { var data = _data.Worker.AllWorkers(); data = SortingAndFilteringData.SortAndFilteringPayments(searchName, orderBy, data); ViewBag.SortSalary = _fillViewBag.SalarySortingOptionsViewBag(); ViewBag.Names = _fillViewBag.GetWorkerNamesForAutocomplete(data); return(View(data)); }
public ActionResult Index(string searchName, string orderBy, string status) { var data = _data.Worker.AllWorkers(); data = SortingAndFilteringData.SortAndFilteringPayments(searchName, orderBy, data); data = FilteringServices.PaymentStatus(status, data); ViewBag.PaymentStatus = _fillViewBag.PayStatusSortOptionsViewBag(); ViewBag.SortSalary = _fillViewBag.SalarySortingOptionsViewBag(); ViewBag.Names = _fillViewBag.GetWorkerNamesForAutocomplete(data); return(View(data)); }