public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) { return(false); } if (ReferenceEquals(this, obj)) { return(true); } if (obj.GetType() != this.GetType()) { return(false); } Employee other = (Employee)obj; return(EmployeeId == other.EmployeeId && PositionId == other.PositionId && string.Equals(FirstName, other.FirstName) && string.Equals(LastName, other.LastName) && string.Equals(Patronymic, other.Patronymic) && BirthDate.Equals(other.BirthDate) && string.Equals(Address, other.Address) && string.Equals(Phone, other.Phone) && string.Equals(Education, other.Education) && EmploymentDate.Equals(other.EmploymentDate) && Deleted == other.Deleted); }
public override int GetHashCode() { var hashCode = 1502939027; hashCode = hashCode * -1521134295 + FirstName.GetHashCode(); hashCode = hashCode * -1521134295 + LastName.GetHashCode(); if (MiddleName != null) { hashCode = hashCode * -1521134295 + MiddleName.GetHashCode(); } hashCode = hashCode * -1521134295 + Birthday.GetHashCode(); hashCode = hashCode * -1521134295 + Post.GetHashCode(); hashCode = hashCode * -1521134295 + EmploymentDate.GetHashCode(); return(hashCode); }
public override int GetHashCode() { unchecked { var hashCode = EmployeeId; hashCode = (hashCode * 397) ^ PositionId; 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) ^ (Address != null ? Address.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Phone != null ? Phone.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Education != null ? Education.GetHashCode() : 0); hashCode = (hashCode * 397) ^ EmploymentDate.GetHashCode(); hashCode = (hashCode * 397) ^ Deleted.GetHashCode(); return(hashCode); } }
public override string ToString() { return(String.Format(ID + "; " + Surname + "; " + Name + "; " + SecondName + "; " + BirthDay.ToShortDateString() + "; " + EmploymentDate.ToShortDateString() + "; " + Position + "; " + Division + "; " + Room + "; " + Phone + "; " + Email + "; " + Salary + "; " + Notes)); }
public override string ToString() { return($"Должность: {Post}, Имя: {Name}, Фамилия: {Surname}, Отчество: {Patronymic}, Дата трудоустройства: {EmploymentDate.ToString()}"); }
public override string ToString() { return(base.ToString() + ($" EmploymentDate: {EmploymentDate.ToString("dd/MM/yyyy")}, Salary: {Salary}")); }
public override string ToString() { return(string.Format("{0} (трудоустроен {1})", FIO, EmploymentDate.ToString())); }