Пример #1
0
 public IPayrollCalculator Create(EmployeeSalaryDTO employeeSalary)
 {
     if (employeeSalary is MonthlyContractDTO)
     {
         return(new PayrollMonthly());
     }
     else
     {
         return(new PayrollHourly());
     }
 }
Пример #2
0
 public decimal CalculateSalary(EmployeeSalaryDTO employeeSalary)
 {
     return(120 * employeeSalary.Salary * 12);
 }