public async Task <RepResult <DayVM> > GetDayData(int personnelId, DateTime dayDate) { if (dbContext != null) { var day = await spanRep.GetDayModel(personnelId, dayDate); day.AttendanceSpans = (await spanRep.GetSpans(day)).ResultObject.ToList(); var vm = DayVM.GetVM(day); return(new RepResult <DayVM> { Successed = true, ResultObject = vm }); } return(new RepResult <DayVM>()); }
public PlannedEmployeeVM(InspectorPlanning pe) { _plannedEmployee = pe; Employee = new EmployeeVM(pe.Employee); Day = new DayVM(pe.Day); }