Ejemplo n.º 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);
 }
Ejemplo n.º 2
0
 public static DenmarkAddress FromXmlType(AdresseBaseType oio)
 {
     if (oio is DanskAdresseType)
     {
         return(DanishAddress.FromXmlType(oio as DanskAdresseType).DenmarkAddress);
     }
     else if (oio is GroenlandAdresseType)
     {
         return(GreenlandicAddress.FromXmlType(oio as GroenlandAdresseType).DenmarkAddress);
     }
     return(null);
 }
Ejemplo n.º 3
0
 public static AdresseBaseType ToXmlType(DenmarkAddress db)
 {
     if (db.DanishAddress != null)
     {
         return(DanishAddress.ToXmlType(db.DanishAddress));
     }
     else if (db.GreenlandicAddress != null)
     {
         return(GreenlandicAddress.ToXmlType(db.GreenlandicAddress));
     }
     return(null);
 }