Пример #1
0
        public static Employee Create(string firstName, string lastName, PayRate payRate, EmployeePosition employeePosition)
        {
            var employee = new Employee()
            {
                FirstName = firstName,
                LastName  = lastName,
                PayRateId = payRate.Id,
                PayRate   = payRate,
                IsFired   = false
            };

            employee.AssighnEmployeePossition(employeePosition);

            return(employee);
        }
Пример #2
0
        private static SubTotals CalculateSubTotals(WorkingHours workingHours, DaysOff daysOff, PayRate payRate)
        {
            var payForHours        = workingHours.Hours * payRate.Hour;
            var payForBusinessTrip = workingHours.HourOnBusinessTrip * payRate.BusinessTripHour;
            var payForExtraHours   = workingHours.ExtraHours * payRate.ExtraHour;
            var payForHolidayHours = workingHours.HourOnHolidays * payRate.HoidayHour;
            var payForPayedDaysOff = daysOff.PaidDaysOff * (payRate.Hour * 8);

            return(ValueObjects.SubTotals.Create(payForHours, payForBusinessTrip, payForExtraHours, payForHolidayHours, payForPayedDaysOff));
        }
Пример #3
0
 public void ApplayPayRate(PayRate payRate)
 {
     this.PayRate   = payRate;
     this.PayRateId = PayRateId;
 }