public WorkPackageViewModel(WorkPackage workPackage) { Id = workPackage.Id; Name = workPackage.Name; Manager = new BarcoMemberViewModel(workPackage.Manager); JobsTotal = workPackage.Jobs.Count; JobsOutstanding = workPackage.Jobs.Count(j => j.EndDateTime > DateTime.Now); JobsFailed = workPackage.Jobs .Count(j => j.EndDateTime < DateTime.Now && j.Shifts.Count(s => s.ShiftStatus == ShiftStatus.Worked) == 0 ); }
public BarcoShiftViewModel(BarcoShift shift) { ShiftStatus = shift.ShiftStatus; BarcoMember = new BarcoMemberViewModel(shift.BarcoMember); }