Ejemplo n.º 1
0
        public Employee MatchEmployee(Emp emp)
        {
            EmployeeFactory fac          = new EmployeeFactory();
            string          contractType = emp.ContractTypeName;
            Employee        employee     = fac.ChooseEmployee(contractType);

            employee.ID               = emp.ID;
            employee.Name             = emp.Name;
            employee.ContractTypeName = emp.ContractTypeName;
            employee.RoleId           = emp.RoleId;
            employee.RoleName         = emp.RoleName;
            employee.RoleDescription  = emp.RoleDescription;
            employee.HourlySalary     = emp.HourlySalary;
            employee.MonthlySalary    = emp.MonthlySalary;
            employee.AnnualSalary     = employee.GetAnnualSalary();

            return(employee);
        }