/// <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); }
/// <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); }
public AdresseType ToForeignAddressFromSupplementary() { return(new AdresseType() { Item = new VerdenAdresseType() { ForeignAddressStructure = new ForeignAddressStructureType() { // TODO: shouldn't this be a foreign address? CountryIdentificationCode = CountryIdentificationCodeType.Create(_CountryIdentificationSchemeType.imk, Constants.DenmarkKmdCode), LocationDescriptionText = Location, PostalAddressFirstLineText = AdditionalAddressLine1, PostalAddressSecondLineText = AdditionalAddressLine2, PostalAddressThirdLineText = AdditionalAddressLine3, PostalAddressFourthLineText = AdditionalAddressLine4, PostalAddressFifthLineText = AdditionalAddressLine5, }, NoteTekst = ToAddressNoteTekste(), UkendtAdresseIndikator = false } }); }
public CountryIdentificationCodeType ToCountryIdentificationCodeType() { return(CountryIdentificationCodeType.Create(_CountryIdentificationSchemeType.imk, Constants.DenmarkKmdCode)); }
public CountryIdentificationCodeType ToPersonNationalityCode() { return(CountryIdentificationCodeType.Create(_CountryIdentificationSchemeType.imk, this.StringCountryCode)); }
public CountryIdentificationCodeType ToCountryIdentificationCode() { return(CountryIdentificationCodeType.Create(_CountryIdentificationSchemeType.imk, Converters.DecimalToString(this.ExitCountryCode))); }
public CountryIdentificationCodeType ToCountryIdentificationCode() { // TODO: Many times the exit country is differnt from the entry country - also sometimes either of them is null/unknown. // Which country code to use in this case? return(CountryIdentificationCodeType.Create(_CountryIdentificationSchemeType.imk, Converters.DecimalToString(this.EntryCountryCode))); }
public virtual CountryIdentificationCodeType ToCountryIdentificationCodeType() { return(CountryIdentificationCodeType.Create(_CountryIdentificationSchemeType.imk, this.CountryCode.ToString())); // TODO: What do we do if Constants.UnknownCountryCodes contains CountryCode? }
public CountryIdentificationCodeType ToCountryIdentificationCodeType() { return(CountryIdentificationCodeType.Create(_CountryIdentificationSchemeType.imk, CountryCode.ToDecimalString())); }