public ActionResult ReportEmployeesVacationsDuringPeriod() { ReportEmployeesVacationsDuringPeriodViewModel VM = new ReportEmployeesVacationsDuringPeriodViewModel() { StartDate = DateTime.Now.AddMonths(-1), EndDate = DateTime.Now, }; return(View(VM)); }
public ActionResult ReportEmployeesVacationsDuringPeriod(ReportEmployeesVacationsDuringPeriodViewModel VM) { HCMBLL.BaseVacationsBLL vacationsBLL = new BaseVacationsBLL() { Search = Search, Order = Order, OrderDir = OrderDir, StartRec = StartRec, PageSize = PageSize }; VacationsTypesEnum?vacationsTypesEnum = null; if (VM.VacationTypeID != null) { vacationsTypesEnum = (VacationsTypesEnum)VM.VacationTypeID; } var data = vacationsBLL.GetValidEmployeesVacationsDuringPeriod(vacationsTypesEnum, VM.StartDate, VM.EndDate); Session["EmployeesVacationsDuringPeriod"] = data.ToList(); return(Json(new { draw = Convert.ToInt32(Draw), recordsTotal = TotalRecordsOut, recordsFiltered = RecFilterOut, data = data }, JsonRequestBehavior.AllowGet)); }