public SalariedEmployee(String firstName, String middleName, String lastName, Sex gender, DateTime birthday, Haircolor hairColor, String employeeNumber) : base(firstName, middleName, lastName, gender, birthday, hairColor, employeeNumber) { }
protected Employee(String firstName, String middleName, String lastName, Sex gender, DateTime birthday, Haircolor hairColor, String employeeNumber){ _person = new Person(firstName, middleName, lastName, gender, birthday, hairColor); _employeeNumber = employeeNumber; }
public IEmployee GetNewHourlyEmployee(String firstName, String middleName, String lastName, Sex gender, DateTime birthday, Haircolor hairColor, String employee_number) { return(new HourlyEmployee(firstName, middleName, lastName, gender, birthday, hairColor, employee_number)); }
// copy constructor public Person(Person person){ _firstName = person.FirstName; _middleName = person.MiddleName; _lastName = person.LastName; _gender = person.Gender; _birthday = person.Birthday; _hairColor = person.HairColor; }
//default constructor public Person(){ _firstName = string.Empty; _middleName = string.Empty; _lastName = string.Empty; _gender = Sex.MALE; _birthday = DateTime.Now; _hairColor = Haircolor.BLONDE; }
public Person(string firstName, string middleName, string lastName, Sex gender, DateTime birthday, Haircolor hairColor){ _firstName = firstName; _middleName = middleName; _lastName = lastName; _gender = gender; _birthday = birthday; _hairColor = hairColor; }
private void SetHaircolorRadioButton(Haircolor haircolor){ if(haircolor == Haircolor.UNKNOWN){ _unknownRadioButton.Checked = true; } if(haircolor == Haircolor.BLONDE){ _blondeRadioButton.Checked = true; } if(haircolor == Haircolor.BROWN){ _brownRadioButton.Checked = true; } if(haircolor == Haircolor.BLACK){ _blackRadioButton.Checked = true; } }
private Haircolor RadioButtonToHaircolorEnum(){ Haircolor haircolor = Haircolor.UNKNOWN; if(_unknownRadioButton.Checked){ haircolor = Haircolor.UNKNOWN; } if(_blondeRadioButton.Checked){ haircolor = Haircolor.BLONDE; } if(_brownRadioButton.Checked){ haircolor = Haircolor.BROWN; } if(_blackRadioButton.Checked){ haircolor = Haircolor.BLACK; } return haircolor; }
public override string ToString() => $"{Gender.ToString()}, Hair: {Hairtype}, Haircolor: {Haircolor.ToString()}, Emotion: {Emotion}, Glasses: {GlassesType}";