/// <summary> /// Инициализирует экземпляю класса Employee /// </summary> public Employee() { Status = new WorkStatus(); Name = ""; Surname = ""; BirthDay = DateTime.Now; Number = new PhoneNumber(); Recruit(new Tuple <DateTime, DateTime>(DateTime.Now, DateTime.Now)); dismiss = new DismissCommand(this); }
/// <summary> /// Инициализирует экземпляю класса Employee /// </summary> /// <param name="name">Имя</param> /// <param name="surname">Фамилия</param> /// <param name="birthDay">День рождения</param> /// <param name="number">Номер телефона(личный)</param> /// <param name="period">Период работы</param> public Employee(string name, string surname, DateTime birthDay, PhoneNumber number, Tuple <DateTime, DateTime> period) { Name = name; Surname = surname; BirthDay = birthDay; Number = number; Status = new WorkStatus(); Recruit(period); dismiss = new DismissCommand(this); }
/// <summary> /// Приём сотрудника на работу /// </summary> /// <param name="period">Период работы</param> public void Recruit(Tuple <DateTime, DateTime> period) { //Модификация статуса Status = new WorkStatus(new Period(period)); }