public TimeCardViewModel() { EmployeeList = RFRepo.GetEmployees(); //JobsList = RFRepo.GetJobs(); if (DateTime.Now.DayOfWeek == DayOfWeek.Monday) { StartDate = DateTime.Now; } else if (DateTime.Now.DayOfWeek == DayOfWeek.Tuesday) { StartDate = DateTime.Now.AddDays(-1); } else if (DateTime.Now.DayOfWeek == DayOfWeek.Wednesday) { StartDate = DateTime.Now.AddDays(-2); } else if (DateTime.Now.DayOfWeek == DayOfWeek.Thursday) { StartDate = DateTime.Now.AddDays(-3); } else if (DateTime.Now.DayOfWeek == DayOfWeek.Friday) { StartDate = DateTime.Now.AddDays(-4); } else if (DateTime.Now.DayOfWeek == DayOfWeek.Saturday) { StartDate = DateTime.Now.AddDays(-5); } else if (DateTime.Now.DayOfWeek == DayOfWeek.Sunday) { StartDate = DateTime.Now.AddDays(-6); } EndDate = StartDate.AddDays(5); }
public AddLaborViewModel() { EmployeeList = RFRepo.GetEmployees(); if (SearchAllJobs) { JobsList = RFRepo.GetJobs(0); } else { JobsList = RFRepo.GetJobs(RFRepo.JobStatusInProgress); } LaborModel = new Labor(); }
public AddMaterialViewModel() { EmployeeList = RFRepo.GetEmployees(); MaterialList = RFRepo.GetMaterials(); if (SearchAllJobs) { JobList = RFRepo.GetJobs(0); } else { JobList = RFRepo.GetJobs(RFRepo.JobStatusInProgress); } Model = new MaterialHistory(); }