public virtual NavnStrukturType ToNavnStrukturType() { var addressingName = Converters.ToNeutralString(this.AddressingName); var ret = NavnStrukturType.Create(addressingName); ret.PersonNameForAddressingName = addressingName; return(ret); }
public AddressAccessType ToAddressAccessType() { return(new CprBroker.Schemas.Part.AddressAccessType() { MunicipalityCode = Converters.ShortToString(this.MunicipalityCode), StreetBuildingIdentifier = Converters.ToNeutralString(this.HouseNumber), StreetCode = Converters.ShortToString(this.RoadCode) }); }
public virtual EgenskabType ToEgenskabType() { var ret = new EgenskabType() { AndreAdresser = this.ToAndreAdresse(), BirthDate = this.ToBirthdate(), FoedestedNavn = Converters.ToNeutralString(this.BirthPlaceText), FoedselsregistreringMyndighedNavn = ToBirthRegistrationAuthority(), KontaktKanal = this.ToKontaktKanalType(), NaermestePaaroerende = this.ToNextOfKin(), NavnStruktur = this.ToNavnStrukturType(), PersonGenderCode = Converters.ToPersonGenderCodeType(this.Gender), Virkning = this.ToEgenskabTypeVirkning() }; return(ret); }
public static string ToAuthorityName(Authority authority) { if (authority != null) { var authorityName = Converters.ToNeutralString(authority.AuthorityName); if (!string.IsNullOrEmpty(authorityName)) { return(authorityName); } else { throw new ArgumentException("Authority.AuthorityName cannot be null or empty"); } } else { return(null); } }
/// <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); }