public EmploymentsFun(IEmploymentsOtherTypes otherEmployment = null) { if (otherEmployment != null) { _otherEmployment = otherEmployment; } }
public EmploymentsBusiness(IEmploymentsOtherTypes otherEmployment = null) { if (otherEmployment != null) { _otherEmployment = otherEmployment; } }
public static Employments GetEmploymentType(string employmentLine) { string empType = Management.GetValueByIndex(employmentLine); string code = Management.GetValueByIndex(employmentLine, 1); Employments employment = null; IEmploymentsOtherTypes employmentType = null; switch (code) { case Codes.anotherEmpCode: employmentType = new EmploymentsTypeOther(); break; case Codes.sleep: employmentType = new EmploymentsTypeSleep(); break; } switch (empType) { case "Business": employment = new EmploymentsBusiness(employmentType); break; case "Goals": employment = new EmploymentsGoals(employmentType); break; case "Rest": employment = new EmploymentsRest(employmentType); break; case "Fun": employment = new EmploymentsFun(employmentType); break; } employment.SetEmploymentValuesByCode(code); return(employment); }