gov.va.medora.mdws.dto.DemographicSetTO.setDemographics C# (CSharp) Method

setDemographics() public method

public setDemographics ( DemographicSet mdo ) : void
mdo gov.va.medora.mdo.DemographicSet
return void
        void setDemographics(DemographicSet mdo)
        {
            if (mdo.StreetAddresses != null && mdo.StreetAddresses.Count > 0)
            {
                this.addresses = new AddressTO[mdo.StreetAddresses.Count];
                for (int i = 0; i < mdo.StreetAddresses.Count; i++)
                {
                    this.addresses[i] = new AddressTO(mdo.StreetAddresses[i]);
                }
            }
            if (mdo.PhoneNumbers != null && mdo.PhoneNumbers.Count > 0)
            {
                this.phones = new PhoneNumTO[mdo.PhoneNumbers.Count];
                for (int i = 0; i < mdo.PhoneNumbers.Count; i++)
                {
                    this.phones[i] = new PhoneNumTO(mdo.PhoneNumbers[i]);
                }
            }
            if (mdo.EmailAddresses != null && mdo.EmailAddresses.Count > 0)
            {
                this.emailAddresses = new string[mdo.EmailAddresses.Count];
                for (int i = 0; i < mdo.EmailAddresses.Count; i++)
                {
                    this.emailAddresses[i] = mdo.EmailAddresses[i].Address;
                }
            }
            if (mdo.Names != null && mdo.Names.Count > 0)
            {
                this.names = new string[mdo.Names.Count];
                for (int i = 0; i < mdo.Names.Count; i++)
                {
                    this.names[i] = mdo.Names[i].getLastNameFirst(); ;
                }
            }
        }