예제 #1
0
 public static GroenlandAdresseType ToXmlType(GreenlandicAddress db)
 {
     if (db != null && db.DenmarkAddress != null && db.DenmarkAddress.Address != null)
     {
         return(new GroenlandAdresseType()
         {
             AddressCompleteGreenland = new AddressCompleteGreenlandType()
             {
                 CountryIdentificationCode = CountryRef.ToXmlType(db.DenmarkAddress.CountryRef),
                 DistrictName = db.DenmarkAddress.DistrictName,
                 DistrictSubdivisionIdentifier = db.DenmarkAddress.DistrictSubdivisionIdentifier,
                 FloorIdentifier = db.DenmarkAddress.FloorIdentifier,
                 GreenlandBuildingIdentifier = db.GreenlandBuildingIdentifierField,
                 MailDeliverySublocationIdentifier = db.DenmarkAddress.MailDeliverySublocation,
                 MunicipalityCode = db.DenmarkAddress.MunicipalityCode,
                 PostCodeIdentifier = db.DenmarkAddress.PostCodeIdentifier,
                 StreetBuildingIdentifier = db.DenmarkAddress.StreetBuildingIdentifier,
                 StreetCode = db.DenmarkAddress.StreetCode,
                 StreetName = db.DenmarkAddress.StreetName,
                 StreetNameForAddressingName = db.DenmarkAddress.StreetNameForAddressing,
                 SuiteIdentifier = db.DenmarkAddress.SuiteIdentifier,
             },
             SpecielVejkodeIndikator = db.DenmarkAddress.SpecialRoadCode.HasValue ? db.DenmarkAddress.SpecialRoadCode.Value : false,
             SpecielVejkodeIndikatorSpecified = db.DenmarkAddress.SpecialRoadCode.HasValue,
             NoteTekst = db.DenmarkAddress.Address.Note,
             UkendtAdresseIndikator = db.DenmarkAddress.Address.IsUnknown,
         });
     }
     return(null);
 }
예제 #2
0
 public static GreenlandicAddress FromXmlType(GroenlandAdresseType oio)
 {
     return(new GreenlandicAddress()
     {
         GreenlandBuildingIdentifierField = oio.AddressCompleteGreenland.GreenlandBuildingIdentifier,
         DenmarkAddress = new DenmarkAddress()
         {
             Address = new Address()
             {
                 IsUnknown = oio.UkendtAdresseIndikator,
                 Note = oio.NoteTekst,
             },
             CountryRef = CountryRef.FromXmlType(oio.AddressCompleteGreenland.CountryIdentificationCode),
             DistrictName = oio.AddressCompleteGreenland.DistrictName,
             DistrictSubdivisionIdentifier = oio.AddressCompleteGreenland.DistrictSubdivisionIdentifier,
             FloorIdentifier = oio.AddressCompleteGreenland.FloorIdentifier,
             MailDeliverySublocation = oio.AddressCompleteGreenland.MailDeliverySublocationIdentifier,
             MunicipalityCode = oio.AddressCompleteGreenland.MunicipalityCode,
             PostCodeIdentifier = oio.AddressCompleteGreenland.PostCodeIdentifier,
             SpecialRoadCode = oio.SpecielVejkodeIndikatorSpecified ? oio.SpecielVejkodeIndikator : (bool?)null,
             StreetBuildingIdentifier = oio.AddressCompleteGreenland.StreetBuildingIdentifier,
             StreetCode = oio.AddressCompleteGreenland.StreetCode,
             StreetName = oio.AddressCompleteGreenland.StreetName,
             StreetNameForAddressing = oio.AddressCompleteGreenland.StreetNameForAddressingName,
             SuiteIdentifier = oio.AddressCompleteGreenland.SuiteIdentifier,
         },
     });
 }
 public static CountryIdentificationCodeType ToXmlType(ForeignCitizenCountry db)
 {
     if (db != null)
     {
         return(CountryRef.ToXmlType(db.CountryRef));
     }
     return(null);
 }
예제 #4
0
 public static CountryIdentificationCodeType ToXmlType(CountryRef db)
 {
     if (db != null)
     {
         return(new CountryIdentificationCodeType()
         {
             scheme = (_CountryIdentificationSchemeType)db.CountrySchemeTypeId,
             Value = db.Value
         });
     }
     return(null);
 }
 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);
 }
예제 #6
0
 /// <summary>
 /// Represents the ForeignCitizenData table
 /// </summary>
 public static UdenlandskBorgerType ToXmlType(ForeignCitizenData db)
 {
     if (db != null)
     {
         return(new UdenlandskBorgerType()
         {
             FoedselslandKode = CountryRef.ToXmlType(db.BirthCountryRef),
             PersonCivilRegistrationReplacementIdentifier = db.CivilRegistrationReplacementIdentifier,
             PersonIdentifikator = db.PersonIdentifier,
             SprogKode = ForeignCitizenCountry.ToXmlType(db.ForeignCitizenCountries, false),
             PersonNationalityCode = ForeignCitizenCountry.ToXmlType(db.ForeignCitizenCountries, true),
         });
     }
     return(null);
 }
예제 #7
0
        public static ForeignCitizenData FromXmlType(UdenlandskBorgerType oio)
        {
            if (oio != null)
            {
                var ret = new ForeignCitizenData()
                {
                    BirthCountryRef = CountryRef.FromXmlType(oio.FoedselslandKode),
                    CivilRegistrationReplacementIdentifier = oio.PersonCivilRegistrationReplacementIdentifier,
                    PersonIdentifier = oio.PersonIdentifikator,
                };

                ret.ForeignCitizenCountries.AddRange(ForeignCitizenCountry.FromXmlType(oio.SprogKode, false));
                ret.ForeignCitizenCountries.AddRange(ForeignCitizenCountry.FromXmlType(oio.PersonNationalityCode, true));

                return(ret);
            }
            return(null);
        }
예제 #8
0
 public static ForeignAddress FromXmlType(VerdenAdresseType oio)
 {
     if (oio != null)
     {
         var ret = new ForeignAddress()
         {
             LocationDescription = oio.ForeignAddressStructure.LocationDescriptionText,
             CountryRef          = CountryRef.FromXmlType(oio.ForeignAddressStructure.CountryIdentificationCode),
             FirstLine           = oio.ForeignAddressStructure.PostalAddressFirstLineText,
             SecondLine          = oio.ForeignAddressStructure.PostalAddressSecondLineText,
             ThirdLine           = oio.ForeignAddressStructure.PostalAddressThirdLineText,
             FourthLine          = oio.ForeignAddressStructure.PostalAddressFourthLineText,
             FifthLine           = oio.ForeignAddressStructure.PostalAddressFifthLineText,
         };
         return(ret);
     }
     return(null);
 }
예제 #9
0
 public static CprBorgerType ToXmlType(CprData db)
 {
     if (db != null)
     {
         return(new CprBorgerType()
         {
             AdresseNoteTekst = db.AddressNote,
             FolkekirkeMedlemIndikator = db.ChurchMember,
             FolkeregisterAdresse = Address.ToXmlType(db.Address),
             ForskerBeskyttelseIndikator = db.ResearchProtection,
             NavneAdresseBeskyttelseIndikator = db.NameAndAddressProtectionIndicator,
             PersonCivilRegistrationIdentifier = db.CprNumber,
             PersonNummerGyldighedStatusIndikator = db.CprNumberValidity,
             PersonNationalityCode = CountryRef.ToXmlType(db.NationalityCountryRef),
             TelefonNummerBeskyttelseIndikator = db.TelephoneNumberProtection,
         });
     }
     return(null);
 }
예제 #10
0
 public static CprData FromXmlType(CprBorgerType partCprData)
 {
     if (partCprData != null)
     {
         return(new CprData()
         {
             AddressNote = partCprData.AdresseNoteTekst,
             ChurchMember = partCprData.FolkekirkeMedlemIndikator,
             Address = Address.FromXmlType(partCprData.FolkeregisterAdresse),
             ResearchProtection = partCprData.ForskerBeskyttelseIndikator,
             NameAndAddressProtectionIndicator = partCprData.NavneAdresseBeskyttelseIndikator,
             CprNumber = partCprData.PersonCivilRegistrationIdentifier,
             CprNumberValidity = partCprData.PersonNummerGyldighedStatusIndikator,
             NationalityCountryRef = CountryRef.FromXmlType(partCprData.PersonNationalityCode),
             TelephoneNumberProtection = partCprData.TelefonNummerBeskyttelseIndikator,
         });
     }
     return(null);
 }
예제 #11
0
 public static VerdenAdresseType ToXmlType(ForeignAddress db)
 {
     if (db != null)
     {
         var ret = new VerdenAdresseType()
         {
             ForeignAddressStructure = new ForeignAddressStructureType()
             {
                 CountryIdentificationCode   = CountryRef.ToXmlType(db.CountryRef),
                 LocationDescriptionText     = db.LocationDescription,
                 PostalAddressFirstLineText  = db.FirstLine,
                 PostalAddressSecondLineText = db.SecondLine,
                 PostalAddressThirdLineText  = db.ThirdLine,
                 PostalAddressFourthLineText = db.FourthLine,
                 PostalAddressFifthLineText  = db.FifthLine
             }
         };
         return(ret);
     }
     return(null);
 }
예제 #12
0
 public static DanishAddress FromXmlType(DanskAdresseType oio)
 {
     return(new DanishAddress()
     {
         DenmarkAddress = new DenmarkAddress()
         {
             CountryRef = CountryRef.FromXmlType(oio.AddressComplete.AddressPostal.CountryIdentificationCode),
             DistrictName = oio.AddressComplete.AddressPostal.DistrictName,
             SpecialRoadCode = oio.SpecielVejkodeIndikator,
             StreetBuildingIdentifier = oio.AddressComplete.AddressPostal.StreetBuildingIdentifier,
             StreetCode = oio.AddressComplete.AddressAccess.StreetCode,
             StreetName = oio.AddressComplete.AddressPostal.StreetName,
             StreetNameForAddressing = oio.AddressComplete.AddressPostal.StreetNameForAddressingName,
             DistrictSubdivisionIdentifier = oio.AddressComplete.AddressPostal.DistrictSubdivisionIdentifier,
             MailDeliverySublocation = oio.AddressComplete.AddressPostal.MailDeliverySublocationIdentifier,
             MunicipalityCode = oio.AddressComplete.AddressAccess.MunicipalityCode,
             FloorIdentifier = oio.AddressComplete.AddressPostal.FloorIdentifier,
             PostCodeIdentifier = oio.AddressComplete.AddressPostal.PostCodeIdentifier,
             SuiteIdentifier = oio.AddressComplete.AddressPostal.SuiteIdentifier,
             Address = new Address()
             {
                 //TODO: Fill
                 IsUnknown = false,
                 Note = null,
             }
         },
         AddressPoint = oio.AddressPoint != null?AddressPoint.FromXmlType(oio.AddressPoint) : null as AddressPoint,
                            ConstituencyDistrict = oio.ValgkredsDistriktTekst,
                            ParishDistrict = oio.SogneDistriktTekst,
                            PoliceDistrict = oio.PolitiDistriktTekst,
                            PostDistrict = oio.PostDistriktTekst,
                            PostOfficeBoxIdentifier = oio.AddressComplete.AddressPostal.PostOfficeBoxIdentifier,
                            SchoolDistrict = oio.SkoleDistriktTekst,
                            SocialDistrict = oio.SocialDistriktTekst,
     });
 }