Beispiel #1
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 42, Configuration.FieldSeparator),
                       Id,
                       SetIdNk1.HasValue ? SetIdNk1.Value.ToString(culture) : null,
                       Name != null ? string.Join(Configuration.FieldRepeatSeparator, Name.Select(x => x.ToDelimitedString())) : null,
                       Relationship?.ToDelimitedString(),
                       Address != null ? string.Join(Configuration.FieldRepeatSeparator, Address.Select(x => x.ToDelimitedString())) : null,
                       PhoneNumber != null ? string.Join(Configuration.FieldRepeatSeparator, PhoneNumber.Select(x => x.ToDelimitedString())) : null,
                       BusinessPhoneNumber != null ? string.Join(Configuration.FieldRepeatSeparator, BusinessPhoneNumber.Select(x => x.ToDelimitedString())) : null,
                       ContactRole?.ToDelimitedString(),
                       StartDate.HasValue ? StartDate.Value.ToString(Consts.DateFormatPrecisionDay, culture) : null,
                       EndDate.HasValue ? EndDate.Value.ToString(Consts.DateFormatPrecisionDay, culture) : null,
                       NextOfKinAssociatedPartiesJobTitle,
                       NextOfKinAssociatedPartiesJobCodeClass?.ToDelimitedString(),
                       NextOfKinAssociatedPartiesEmployeeNumber?.ToDelimitedString(),
                       OrganizationNameNk1 != null ? string.Join(Configuration.FieldRepeatSeparator, OrganizationNameNk1.Select(x => x.ToDelimitedString())) : null,
                       MaritalStatus?.ToDelimitedString(),
                       AdministrativeSex?.ToDelimitedString(),
                       DateTimeOfBirth.HasValue ? DateTimeOfBirth.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       LivingDependency != null ? string.Join(Configuration.FieldRepeatSeparator, LivingDependency.Select(x => x.ToDelimitedString())) : null,
                       AmbulatoryStatus != null ? string.Join(Configuration.FieldRepeatSeparator, AmbulatoryStatus.Select(x => x.ToDelimitedString())) : null,
                       Citizenship != null ? string.Join(Configuration.FieldRepeatSeparator, Citizenship.Select(x => x.ToDelimitedString())) : null,
                       PrimaryLanguage?.ToDelimitedString(),
                       LivingArrangement?.ToDelimitedString(),
                       PublicityCode?.ToDelimitedString(),
                       ProtectionIndicator,
                       StudentIndicator?.ToDelimitedString(),
                       Religion?.ToDelimitedString(),
                       MothersMaidenName != null ? string.Join(Configuration.FieldRepeatSeparator, MothersMaidenName.Select(x => x.ToDelimitedString())) : null,
                       Nationality?.ToDelimitedString(),
                       EthnicGroup != null ? string.Join(Configuration.FieldRepeatSeparator, EthnicGroup.Select(x => x.ToDelimitedString())) : null,
                       ContactReason != null ? string.Join(Configuration.FieldRepeatSeparator, ContactReason.Select(x => x.ToDelimitedString())) : null,
                       ContactPersonsName != null ? string.Join(Configuration.FieldRepeatSeparator, ContactPersonsName.Select(x => x.ToDelimitedString())) : null,
                       ContactPersonsTelephoneNumber != null ? string.Join(Configuration.FieldRepeatSeparator, ContactPersonsTelephoneNumber.Select(x => x.ToDelimitedString())) : null,
                       ContactPersonsAddress != null ? string.Join(Configuration.FieldRepeatSeparator, ContactPersonsAddress.Select(x => x.ToDelimitedString())) : null,
                       NextOfKinAssociatedPartysIdentifiers != null ? string.Join(Configuration.FieldRepeatSeparator, NextOfKinAssociatedPartysIdentifiers.Select(x => x.ToDelimitedString())) : null,
                       JobStatus?.ToDelimitedString(),
                       Race != null ? string.Join(Configuration.FieldRepeatSeparator, Race.Select(x => x.ToDelimitedString())) : null,
                       Handicap?.ToDelimitedString(),
                       ContactPersonSocialSecurityNumber,
                       NextOfKinBirthPlace,
                       VipIndicator?.ToDelimitedString(),
                       NextOfKinTelecommunicationInformation?.ToDelimitedString(),
                       ContactPersonsTelecommunicationInformation?.ToDelimitedString()
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (entityId_ != null)
            {
                hash ^= EntityId.GetHashCode();
            }
            if (IataId.Length != 0)
            {
                hash ^= IataId.GetHashCode();
            }
            if (CommissionType != 0)
            {
                hash ^= CommissionType.GetHashCode();
            }
            if (commissionAmount_ != null)
            {
                hash ^= CommissionAmount.GetHashCode();
            }
            if (commissionPercentage_ != null)
            {
                hash ^= CommissionPercentage.GetHashCode();
            }
            if (GivenName.Length != 0)
            {
                hash ^= GivenName.GetHashCode();
            }
            if (FamilyName.Length != 0)
            {
                hash ^= FamilyName.GetHashCode();
            }
            if (BusinessAddress1.Length != 0)
            {
                hash ^= BusinessAddress1.GetHashCode();
            }
            if (BusinessAddress2.Length != 0)
            {
                hash ^= BusinessAddress2.GetHashCode();
            }
            if (BusinessCity.Length != 0)
            {
                hash ^= BusinessCity.GetHashCode();
            }
            if (BusinessState.Length != 0)
            {
                hash ^= BusinessState.GetHashCode();
            }
            if (BusinessZip.Length != 0)
            {
                hash ^= BusinessZip.GetHashCode();
            }
            if (BusinessNation.Length != 0)
            {
                hash ^= BusinessNation.GetHashCode();
            }
            if (BusinessPhoneNumber.Length != 0)
            {
                hash ^= BusinessPhoneNumber.GetHashCode();
            }
            if (BusinessFaxNumber.Length != 0)
            {
                hash ^= BusinessFaxNumber.GetHashCode();
            }
            if (BusinessEmailAddress.Length != 0)
            {
                hash ^= BusinessEmailAddress.GetHashCode();
            }
            return(hash);
        }