Example #1
0
 public EfficiencyRecord([NotNull] EfficiencyShift shift, [NotNull] DateRange range, string transactionTypeCode) : base(shift, transactionTypeCode)
 {
     SiteCode                = shift.SiteCode;
     SiteEmployeeCode        = shift.SiteEmployeeCodes?.OrderBy(x => x).FirstOrDefault();
     SegmentCode             = shift.SiteCode;
     IntervalStartTime       = range.Start;
     IntervalEndTime         = range.End;
     ClockInStartTime        = shift.StartTime;
     ClockInEndTime          = shift.EndTime;
     ShiftCode               = shift.ShiftCode;
     EmployeeNumber          = shift.EmployeeNumber;
     Supervisor              = shift.Supervisor;
     ShiftSupervisor         = shift.ShiftSupervisor;
     EmployeeFullName        = shift.EmployeeFullName;
     WorkCenterCode          = shift.WorkedWorkCenterCode;
     QuantityEarned          = 0;
     QuantityProcessed       = 0;
     OperationalDay          = shift.OperationalDate;
     IsTransactional         = shift.IsTransactional;
     SalaryClassCode         = shift.SalaryClassCode;
     IsClockedIn             = shift.IsClockedIn;
     IsPartTimeEmployee      = shift.IsPartTimeEmployee;
     EmployeeJobCode         = shift.BusinessUnitType != BusinessUnitType.LTL || shift.EmployeeJobCode == JobType.Driver.Code ? shift.EmployeeJobCode : JobType.DockWorker.Code;
     IsEmployeeTransactional = shift.IsEmployeeTransactional;
     WorkcenterType          = shift.WorkcenterType;
 }
 public EfficiencyRecordType([NotNull] EfficiencyShift shift, string transactionTypeCode)
 {
     _transactionTypes        = shift.TransactionTypes;
     _isEmployeeTransactional = shift.IsEmployeeTransactional;
     _workcenterType          = shift.WorkcenterType;
     _hasTimesheet            = shift.TimeSheetId.HasValue;
     _businessUnitType        = shift.BusinessUnitType;
     TransactionTypeCode      = transactionTypeCode;
     _isRecordTypeComputed    = true;
 }