public BaseEmployeeFactory CreateFactory(Employee employee)
        {
            BaseEmployeeFactory returnValue = null;

            if (employee.EmployeeTypeID == 1)
            {
                returnValue = new PermanentEmployeeFactory(employee);
            }
            else if (employee.EmployeeTypeID == 2)
            {
                returnValue = new ContractEmployeeFactory(employee);
            }
            return(returnValue);
        }
        public BaseEmployeeFactory CreateFactory(Employee employee)
        {
            BaseEmployeeFactory baseEmployeeFactory = null;

            if (employee.EmployeeTypeID == 1)
            {
                baseEmployeeFactory = new PermanentEmployeeFactory(employee);
            }
            if (employee.EmployeeTypeID == 2)
            {
                baseEmployeeFactory = new ContractEmployeeFactory(employee);
            }

            return(baseEmployeeFactory);
        }