コード例 #1
0
ファイル: CountryRef.cs プロジェクト: magenta-aps/cprbroker
 public static CountryRef FromXmlType(CountryIdentificationCodeType oio)
 {
     if (oio != null)
     {
         return(new CountryRef()
         {
             CountryRefId = Guid.NewGuid(),
             Value = oio.Value,
             CountrySchemeTypeId = (int)oio.scheme,
         });
     }
     return(null);
 }
コード例 #2
0
 public static ForeignCitizenCountry FromXmlType(CountryIdentificationCodeType oio, bool isNationality, int ordinal)
 {
     if (oio != null)
     {
         return(new ForeignCitizenCountry()
         {
             ForeignCitizenCountryId = Guid.NewGuid(),
             CountryRef = CountryRef.FromXmlType(oio),
             IsNationality = isNationality,
             Ordinal = ordinal,
         });
     }
     return(null);
 }
コード例 #3
0
        /// <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);
        }
コード例 #4
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);
        }
コード例 #5
0
 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
         }
     });
 }
コード例 #6
0
 public CountryIdentificationCodeType ToCountryIdentificationCodeType()
 {
     return(CountryIdentificationCodeType.Create(_CountryIdentificationSchemeType.imk, Constants.DenmarkKmdCode));
 }
コード例 #7
0
 public CountryIdentificationCodeType ToPersonNationalityCode()
 {
     return(CountryIdentificationCodeType.Create(_CountryIdentificationSchemeType.imk, this.StringCountryCode));
 }
コード例 #8
0
 public CountryIdentificationCodeType ToCountryIdentificationCode()
 {
     return(CountryIdentificationCodeType.Create(_CountryIdentificationSchemeType.imk, Converters.DecimalToString(this.ExitCountryCode)));
 }
コード例 #9
0
 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)));
 }
コード例 #10
0
 public virtual CountryIdentificationCodeType ToCountryIdentificationCodeType()
 {
     return(CountryIdentificationCodeType.Create(_CountryIdentificationSchemeType.imk, this.CountryCode.ToString()));
     // TODO: What do we do if Constants.UnknownCountryCodes contains CountryCode?
 }
コード例 #11
0
ファイル: Nationality.cs プロジェクト: magenta-aps/cprbroker
 public CountryIdentificationCodeType ToCountryIdentificationCodeType()
 {
     return(CountryIdentificationCodeType.Create(_CountryIdentificationSchemeType.imk, CountryCode.ToDecimalString()));
 }