internal EmploymentDetails(Guid employeeId, RoleType roleType, EmploymentType employmentType, DateTime commencementDate)
 {
     Key              = $"{roleType.ToString()}_{employmentType.ToString()}_{commencementDate.ToString("yyyyMMdd")}_{employeeId}";
     RoleType         = roleType;
     EmploymentType   = employmentType;
     CommencementDate = commencementDate;
 }
        /// <summary>
        /// Изменить тип занятости для вакансии (например, полный рабочий день)
        /// </summary>
        /// <param name="newType">Новый тип занятости</param>
        public void ChangeEmploymentType(EmploymentType newType)
        {
            try
            {
                if (this.EmployerItn == null || this.EmployerItn.CompareTo("") == 0)
                {
                    throw new Exception("Не задан работодатель");
                }

                int    idEmploymentType = Convert.ToInt32(Enum.Parse(typeof(EmploymentType), newType.ToString()));
                String query            = "UPDATE PERMANENT_USER.VACANCIES "
                                          + "SET IDTOF = " + idEmploymentType + " "
                                          + "WHERE NAME = '" + this.Name + "' "
                                          + "AND EMPLOYERITN = '" + this.EmployerItn + "'";
                ExecuteNonSelectQuery(query);
                this.CurrentEmploymentType = newType;
                Console.WriteLine("Тип занятости изменен для вакансии");
            }
            catch (Exception e)
            {
                Console.WriteLine("Невозможно сменить тип занятости для вакансии");
                throw e;
            }
        }