Пример #1
0
        public void SetHourlyRates(int rateStart, int rateEnd, int rate)
        {
            List <int> hours = HoursHelper.CalculateHoursRange(rateStart, rateEnd);

            foreach (int hour in hours)
            {
                HourlyRates[hour] = rate;
            }
        }
Пример #2
0
        public int CalculatePay(FamilyRate rate)
        {
            List <int> workedHours = HoursHelper.CalculateHoursRange(FirstHour, LastHour);

            int pay = 0;

            foreach (int hour in workedHours)
            {
                pay += rate.HourlyRates[hour];
            }

            return(pay);
        }
Пример #3
0
        public int CalculatePay(int shiftStart, int shiftEnd, FamilyRate rate)
        {
            List <int> workedHours = HoursHelper.CalculateHoursRange(shiftStart, shiftEnd);

            ValidateWorkedHours(workedHours);

            int pay = 0;

            foreach (int hour in workedHours)
            {
                pay += rate.HourlyRates[hour];
            }

            return(pay);
        }
Пример #4
0
 public Shift(int shiftStart, int shiftEnd)
 {
     shiftHours = HoursHelper.CalculateHoursRange(shiftStart, shiftEnd);
     FirstHour  = shiftStart;
     LastHour   = shiftEnd;
 }