public override int GetHashCode()
        {
            int hash = 1;

            if (entityId_ != null)
            {
                hash ^= EntityId.GetHashCode();
            }
            if (UserId.Length != 0)
            {
                hash ^= UserId.GetHashCode();
            }
            if (Password.Length != 0)
            {
                hash ^= Password.GetHashCode();
            }
            if (DisplayName.Length != 0)
            {
                hash ^= DisplayName.GetHashCode();
            }
            if (EmergencyContactPhoneNumber.Length != 0)
            {
                hash ^= EmergencyContactPhoneNumber.GetHashCode();
            }
            if (IsPhoneDataDisplayable != false)
            {
                hash ^= IsPhoneDataDisplayable.GetHashCode();
            }
            if (dateHired_ != null)
            {
                hash ^= DateHired.GetHashCode();
            }
            if (IsActive != false)
            {
                hash ^= IsActive.GetHashCode();
            }
            if (department_ != null)
            {
                hash ^= Department.GetHashCode();
            }
            if (DepartmentName.Length != 0)
            {
                hash ^= DepartmentName.GetHashCode();
            }
            if (contactInfo_ != null)
            {
                hash ^= ContactInfo.GetHashCode();
            }
            if (IsIncluded != false)
            {
                hash ^= IsIncluded.GetHashCode();
            }
            return(hash);
        }
示例#2
0
 public override int GetHashCode()
 {
     return(-0x502B77AC ^ Name.GetHashCode() ^ Address.GetHashCode() ^ DepartmentName.GetHashCode());
 }
示例#3
0
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                var hashCode = 41;
                // Suitable nullity checks etc, of course :)
                if (EmployeeId != null)
                {
                    hashCode = hashCode * 59 + EmployeeId.GetHashCode();
                }
                if (EmployeeCode != null)
                {
                    hashCode = hashCode * 59 + EmployeeCode.GetHashCode();
                }
                if (EmployeeName != null)
                {
                    hashCode = hashCode * 59 + EmployeeName.GetHashCode();
                }

                hashCode = hashCode * 59 + Gender.GetHashCode();
                if (DateOfBirth != null)
                {
                    hashCode = hashCode * 59 + DateOfBirth.GetHashCode();
                }
                if (PhoneNumber != null)
                {
                    hashCode = hashCode * 59 + PhoneNumber.GetHashCode();
                }
                if (DepartmentId != null)
                {
                    hashCode = hashCode * 59 + DepartmentId.GetHashCode();
                }
                if (DepartmentName != null)
                {
                    hashCode = hashCode * 59 + DepartmentName.GetHashCode();
                }
                if (Email != null)
                {
                    hashCode = hashCode * 59 + Email.GetHashCode();
                }

                hashCode = hashCode * 59 + Salary.GetHashCode();

                hashCode = hashCode * 59 + WorkStatus.GetHashCode();
                if (PositionId != null)
                {
                    hashCode = hashCode * 59 + PositionId.GetHashCode();
                }
                if (PositionName != null)
                {
                    hashCode = hashCode * 59 + PositionName.GetHashCode();
                }
                if (TaxCode != null)
                {
                    hashCode = hashCode * 59 + TaxCode.GetHashCode();
                }
                if (JoinDate != null)
                {
                    hashCode = hashCode * 59 + JoinDate.GetHashCode();
                }
                if (IdentityNumber != null)
                {
                    hashCode = hashCode * 59 + IdentityNumber.GetHashCode();
                }
                if (IdentityDate != null)
                {
                    hashCode = hashCode * 59 + IdentityDate.GetHashCode();
                }
                if (IdentityPlace != null)
                {
                    hashCode = hashCode * 59 + IdentityPlace.GetHashCode();
                }
                return(hashCode);
            }
        }