Esempio n. 1
0
 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
                              );
 }
Esempio n. 2
0
 public BarcoShiftViewModel(BarcoShift shift)
 {
     ShiftStatus = shift.ShiftStatus;
     BarcoMember = new BarcoMemberViewModel(shift.BarcoMember);
 }