i getting the date range from sql, i am passing the date range in linq query as below to display employee time-offs in that pay-period.
var query = from l in leaves
where (l.Company == Convert.ToString(500)&&(l.StartDate >= Convert.ToDateTime(PayCheckDates[0].ToString()).Date) && (l.StartDate <= Convert.ToDateTime(PayCheckDates[1].ToString()).Date))
select new
{
l.Title,
l.RequesterImnName,
l.ManagerImnName,
l.StartDate,
l.EndDate,
l.TotalHours,
l.VacationType
};
i am able to get the results if the start-date begins in that pay-period. lets say the PayCheckDates[0] is 2018-05-28 and PayCheckDates[1] is 2018-06-10 is person took time off from 2018-05-25 to 2018-06-05. it is not showing in that result, because the start date of that timeoff is before PayCheckDates0, if an employee took the time off before current payperiod to next payperiod, i want to show that time off in both current and next period views