public ActionResult PayrollExportXlsx(DateTime targetDate, bool commit, string filter) { var filterValue = PayrollFilterListItem.GetEnumValue(filter); ProviderService.PayrollExportXlxs(targetDate, commit, filterValue, out GridViewSettings gridViewSettings, out IEnumerable <PayrollGridItemVM> data); return(GridViewExtension.ExportToXlsx(gridViewSettings, data)); }
public ActionResult PayrollGridCallback(DateTime targetDate, string selectedFilter) { var filtersList = PayrollFilterListItem.GetList(); ViewBag.FilterSelection = filtersList; ViewBag.SelectedFilter = filtersList.Where(x => x.Value == selectedFilter).Single(); ViewBag.AvailableDates = HoursRepository.GetScrubAvailableDates(); ViewBag.SelectedDate = new AvailableDate() { Date = targetDate }; var filterEnumValue = PayrollFilterListItem.GetEnumValue(selectedFilter); var model = HoursRepository.GetPayablesByPeriod(new DateTime(targetDate.Year, targetDate.Month, 1), filterEnumValue); return(PartialView("PayrollGrid", model)); }