/// <summary>
        /// Converts the current object to AddressPostalType object
        /// </summary>
        /// <returns></returns>
        public AddressPostalType ToAddressPostalType()
        {
            var ret = new CprBroker.Schemas.Part.AddressPostalType()
            {
                // Set country code
                CountryIdentificationCode = CountryIdentificationCodeType.Create(_CountryIdentificationSchemeType.imk, Constants.DenmarkCountryCode.ToString()),

                // city name
                // TODO: Lookup historical city name
                DistrictSubdivisionIdentifier = null,

                // Set floor
                FloorIdentifier = this.Floor,

                // MailDeliverySublocationIdentifier is not supported - checked
                MailDeliverySublocationIdentifier = null,

                // Set post code
                // TODO: Get historical post code
                PostCodeIdentifier = null,

                // Set district name
                // TODO: Lookup historical DistrictName
                DistrictName = null,

                // PostOfficeBoxIdentifier is not supported
                PostOfficeBoxIdentifier = null,

                // Set building identifier
                StreetBuildingIdentifier = this.HouseNumber,

                // Set street name
                // TODO: Get Street name by looking up street code
                StreetName = null,

                // Set street addressing name
                // TODO: Get Street addressing name by looking up street code
                StreetNameForAddressingName = null,

                // Set suite identifier
                SuiteIdentifier = this.Door,
            };

            return(ret);
        }
예제 #2
0
        /// <summary>
        /// Converts the current object to AddressPostalType object
        /// Post code & district are passed, any values specified in this object (or sub objects) will be ignored.
        /// </summary>
        /// <param name="postCode"></param>
        /// <param name="postDistrict"></param>
        /// <returns></returns>
        public AddressPostalType ToAddressPostalType()
        {
            var ret = new CprBroker.Schemas.Part.AddressPostalType()
            {
                // Set country code
                CountryIdentificationCode = CountryIdentificationCodeType.Create(_CountryIdentificationSchemeType.imk, Constants.DenmarkCountryCode.ToString()),

                // Equals city name
                DistrictSubdivisionIdentifier = this.CityName,

                // Set floor
                FloorIdentifier = Converters.ToNeutralString(this.Floor),

                // MailDeliverySublocationIdentifier is not supported
                MailDeliverySublocationIdentifier = null,

                // Set post code
                PostCodeIdentifier = this.PostCode.ToString(),

                // Set to post district
                DistrictName = this.PostDistrict,

                // PostOfficeBoxIdentifier is not supported
                PostOfficeBoxIdentifier = null,

                // Set building identifier
                StreetBuildingIdentifier = Converters.ToNeutralString(this.HouseNumber),

                // Set street name
                StreetName = Converters.ToNeutralString(this.RoadName),

                // Set street addressing name
                StreetNameForAddressingName = Converters.ToNeutralString(this.GetActiveRoad().RoadAddressingName),

                // Set suite identifier
                SuiteIdentifier = Converters.ToNeutralString(this.Door),
            };

            return(ret);
        }