Ejemplo n.º 1
0
 public void OnEmployeeCreation(Employee employee)
 {
     var a = employee;
     IPrivileges b = new HollidayPrivilege(a);
     b.AddPrivilege();
     b = new LunchTichetsPrivilege(a);
     b.AddPrivilege();
     b = new SalaryBonusPrivilege(a);
     b.AddPrivilege();
     _displayInfoAction.DisplayInfo(employee);
     //employee.DisplayAll();
 }
Ejemplo n.º 2
0
        public Employee CreateEmployee(string fName, string lName, DateTime bDate,
            Dictionary<string, int> skillsDictionary, Address address,
            Company company, double workexp, Salary salary,
            string department, string function)
        {
            var employee = new Employee(fName, lName, bDate, skillsDictionary,  address, company, workexp,
                salary, department, function);
            OnEmployeeCreation(employee);
            Logger.Logger.AddToLog("EmployeeFactory|CreateEmployee Employee");
            //var salaryCalculator = new SalaryCalculator();
            //employee.Salary = salaryCalculator.Calculate(employee.Salary, new EmployeeSalaryCalculator());

            return employee;
        }