Пример #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = ResumeId;
         hashCode = (hashCode * 397) ^ VacancyId;
         hashCode = (hashCode * 397) ^ (FirstName != null ? FirstName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (LastName != null ? LastName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Patronymic != null ? Patronymic.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ BirthDate.GetHashCode();
         hashCode = (hashCode * 397) ^ (Phone != null ? Phone.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Email != null ? Email.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Education != null ? Education.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Institution != null ? Institution.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Specialty != null ? Specialty.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Deleted.GetHashCode();
         return(hashCode);
     }
 }
Пример #2
0
 public override int GetHashCode()
 {
     return(Surname.GetHashCode() ^ Name.GetHashCode() ^ Patronymic.GetHashCode());
 }
Пример #3
0
        public string FormatName()
        {
            string formatName = Surname + " " + Name.First() + ". " + Patronymic.First() + ".";

            return(formatName);
        }
Пример #4
0
 public override string ToString()
 {
     return($"{Surname} {Name.FirstOrDefault()}. {Patronymic.FirstOrDefault()}.");
 }
Пример #5
0
 public string GetFIO()
 {
     return(Family + " " + Name.Substring(0, 1) + " " + Patronymic.Substring(0, 1));
 }
 public override string ToString()
 {
     return
         ($"{LastName} {FirstName.Substring(0, 1)}. {Patronymic.Substring(0, 1)}.");
 }
        //////////////////////////////////////////////////////////////////////////
        //Операции общего назначения

        private void EditField_TextChanged(object sender, TextChangedEventArgs e)
        {
            TextBox textBox = (TextBox)sender;

            if (Name.Equals(textBox))
            {
                if (Name.Text.Length > 0)
                {
                    NameWatermark.Visibility = Visibility.Hidden;
                }
                else
                {
                    NameWatermark.Visibility = Visibility.Visible;
                }
            }
            else if (Surname.Equals(textBox))
            {
                if (Surname.Text.Length > 0)
                {
                    SurnameWatermark.Visibility = Visibility.Hidden;
                }
                else
                {
                    SurnameWatermark.Visibility = Visibility.Visible;
                }
            }
            else if (Patronymic.Equals(textBox))
            {
                if (Patronymic.Text.Length > 0)
                {
                    PatronymicWatermark.Visibility = Visibility.Hidden;
                }
                else
                {
                    PatronymicWatermark.Visibility = Visibility.Visible;
                }
            }
            else if (Password.Equals(textBox))
            {
                if (Password.Text.Length > 0)
                {
                    PasswordWatermark.Visibility = Visibility.Hidden;
                }
                else
                {
                    PasswordWatermark.Visibility = Visibility.Visible;
                }
            }
            else if (AuthorSurname.Equals(textBox))
            {
                if (AuthorSurname.Text.Length > 0)
                {
                    AuthorSurnameWatermark.Visibility = Visibility.Hidden;
                }
                else
                {
                    AuthorSurnameWatermark.Visibility = Visibility.Visible;
                }
            }
            else if (AuthorName.Equals(textBox))
            {
                if (AuthorName.Text.Length > 0)
                {
                    AuthorNameWatermark.Visibility = Visibility.Hidden;
                }
                else
                {
                    AuthorNameWatermark.Visibility = Visibility.Visible;
                }
            }
            else if (AuthorPatronymic.Equals(textBox))
            {
                if (AuthorPatronymic.Text.Length > 0)
                {
                    AuthorPatronymicWatermark.Visibility = Visibility.Hidden;
                }
                else
                {
                    AuthorPatronymicWatermark.Visibility = Visibility.Visible;
                }
            }
            else if (BookName.Equals(textBox))
            {
                if (BookName.Text.Length > 0)
                {
                    BookNameWatermark.Visibility = Visibility.Hidden;
                }
                else
                {
                    BookNameWatermark.Visibility = Visibility.Visible;
                }
            }
            else if (Publisher.Equals(textBox))
            {
                if (Publisher.Text.Length > 0)
                {
                    PublisherWatermark.Visibility = Visibility.Hidden;
                }
                else
                {
                    PublisherWatermark.Visibility = Visibility.Visible;
                }
            }
            else if (PublicationDate.Equals(textBox))
            {
                if (PublicationDate.Text.Length > 0)
                {
                    PublicationDateWatermark.Visibility = Visibility.Hidden;
                }
                else
                {
                    PublicationDateWatermark.Visibility = Visibility.Visible;
                }
            }
            else if (PageCount.Equals(textBox))
            {
                if (PageCount.Text.Length > 0)
                {
                    PageCountWatermark.Visibility = Visibility.Hidden;
                }
                else
                {
                    PageCountWatermark.Visibility = Visibility.Visible;
                }
            }
            else if (Location.Equals(textBox))
            {
                if (Location.Text.Length > 0)
                {
                    LocationWatermark.Visibility = Visibility.Hidden;
                }
                else
                {
                    LocationWatermark.Visibility = Visibility.Visible;
                }
            }
            else if (Search.Equals(textBox))
            {
                SearchUpdate();
            }
        }
Пример #8
0
 private bool CheckPatronymic()
 {
     Patronymic.Trim();
     return(true);
     // допилить при необходимости
 }