This 2 functions is supposed to get all the attendance days from data base and if there wasn't a day for an employee i generate one so it appears on the report
public IEnumerable<dynamic> AllDatesInMonth(int year, int month)
{
int days = DateTime.DaysInMonth(year, month);
for (int day = 1; day <= days; day++)
{
yield return new DateTime(year, month, day);
}
}
public IEnumerable<dynamic> MakeMonthReport(int year, int month)
{
List<ReportModel> activity = new List<ReportModel>();
List<employeeTb> employees = (from b in _db.employeeTbs
orderby b.id
select b).ToList();
for (int x = 0; x <= employees.Count; x++)
...
Go to the complete details ...