I am writing an ASP.Net MVC app which has a page that will display a standard table which will contain a person's hours for the week. The basic structure of the table would be a 7 column, muti-row table. The Header of each column would display the Day of the Week with the total hours worked that week. There would then be rows for the time of the day starting at 8AM going to 5:30 PM in 15m increments. In the table for each day would be a listing of what projects where worked on that day with an indication of when it started and stopped being worked on. (Please see image below for visual aid).
I have built a ViewModel to hold the data for this table and pass it up but I am not sure if I built it in a manor that makes it efficient to work though and have it's data displayed so I would love to have some feedback on ways I might be able to improve it or even alternate ways of building such a ViewModel.
If this is off topic here please let me know where is on topic and I will delete and post there.
My ViewModel Code:
{
public class TimesheetHoursTableVM
{
public int TimesheetHeaderID { get; set; }
public DateTime WeekEndingDate { get; set; }
public decimal TotalWeekHours { get; set; }
public decimal SundayHours { get; set; }
public decimal MondayHours { get; set; }
public decimal TuesdayHours { get; set; }
public decimal WednesdayHours { get; set; }
public decimal ThursdayHours { get; set; }
public decimal FridayHours { get; set; }
public decimal SaturdayHours { get; set; }
public IEnumerable<TimesheetDailyHoursVM> SundayTimesheet { get; set; }
public IEnumerable<TimesheetDailyHoursVM> MondayTimesheet { get; set; }
public IEnumerable<TimesheetDailyHoursVM> TuesdayTimesheet { get; set; }
public IEnumerable<TimesheetDailyHoursVM> WednesdayTimesheet { get; set; }
public IEnumerable<TimesheetDailyHoursVM> ThrusdayTimesheet { get; set; }
public IEnumerable<TimesheetDailyHoursVM> FrodauTimesheet { get; set; }
public IEnumerable<TimesheetDailyHoursVM> SaturdayTimesheet { get; set; }
}
public class TimesheetDailyHoursVM
{
public int TimesheetID { get; set; }
public DateTime StartDateTime { get; set; }
public DateTime EndDateTime { get; set; }
public string ProjectCode { get; set; }
public string TaskCode { get; set; }
public string ProjectDescription { get; set; }
public string TaskDescription { get; set; }
}
}
Table the data goes into: