public override ISimpleFactoryInterFace Create() { SimpleFactoryPermamentEmp manager = new SimpleFactoryPermamentEmp(); _emp.HouseAllowance = manager.getHouseAllowance(); return(manager); }
public ISimpleFactoryInterFace GetEmployee(int EmployeeTypeId) { ISimpleFactoryInterFace returnValue = null; if (EmployeeTypeId == Convert.ToInt32(EmployeeType.Permanent.GetHashCode())) { returnValue = new SimpleFactoryPermamentEmp(); } else if (EmployeeTypeId == Convert.ToInt32(EmployeeType.Contract.GetHashCode())) { returnValue = new SimpleFactoryContractEmp(); } return(returnValue); }