public static RegisterOplysningType ToRegisterOplysningType(PersonAttributes db) { if (db != null) { var ret = new RegisterOplysningType(); if (db.CprData != null) { ret.Item = CprData.ToXmlType(db.CprData); } else if (db.ForeignCitizenData != null) { ret.Item = ForeignCitizenData.ToXmlType(db.ForeignCitizenData); } else if (db.UnknownCitizenData != null) { ret.Item = UnknownCitizenData.ToXmlType(db.UnknownCitizenData); } if (ret.Item != null) { ret.Virkning = Effect.ToVirkningType(db.Effect); return(ret); } } return(null); }
public static void SetChildLoadOptions(DataLoadOptions loadOptions) { loadOptions.LoadWith <PersonAttributes>(pa => pa.Effect); loadOptions.LoadWith <PersonAttributes>(pa => pa.PersonProperties); loadOptions.LoadWith <PersonAttributes>(pa => pa.CprData); loadOptions.LoadWith <PersonAttributes>(pa => pa.ForeignCitizenData); loadOptions.LoadWith <PersonAttributes>(pa => pa.UnknownCitizenData); loadOptions.LoadWith <PersonAttributes>(pa => pa.HealthInformation); PersonProperties.SetChildLoadOptions(loadOptions); CprData.SetChildLoadOptions(loadOptions); ForeignCitizenData.SetChildLoadOptions(loadOptions); }
public static PersonAttributes[] FromXmlType(Schemas.Part.AttributListeType oio) { var ret = new List <PersonAttributes>(); if (oio != null) { ret.AddRange(PersonProperties.FromXmlType(oio.Egenskab)); ret.AddRange(CprData.FromXmlType(oio.RegisterOplysning)); ret.AddRange(ForeignCitizenData.FromXmlType(oio.RegisterOplysning)); ret.AddRange(UnknownCitizenData.FromXmlType(oio.RegisterOplysning)); ret.AddRange(HealthInformation.FromXmlType(oio.SundhedOplysning)); } return(ret.ToArray()); }
/// <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); }
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); }