public static EgenskabType ToXmlType(PersonProperties db) { if (db != null) { new EgenskabType() { BirthDate = db.BirthDate, PersonGenderCode = Data.Part.Gender.GetPartGender(db.GenderId), NavnStruktur = new NavnStrukturType() { KaldenavnTekst = db.NickName, NoteTekst = db.NameNoteText, PersonNameForAddressingName = db.AddressingName, PersonNameStructure = PersonName.ToXmlType(db.PersonName), }, FoedestedNavn = db.BirthPlace, FoedselsregistreringMyndighedNavn = db.BirthRegistrationAuthority, KontaktKanal = ContactChannel.ToXmlType(db.ContactChannel), NaermestePaaroerende = ContactChannel.ToXmlType(db.NextOfKinContactChannel), AndreAdresser = Address.ToXmlType(db.OtherAddress), Virkning = Effect.ToVirkningType(db.PersonAttributes.Effect) }; } return(null); }
public static EgenskabType ToEgenskabType(PersonAttributes db) { if (db != null && db.PersonProperties != null) { return(PersonProperties.ToXmlType(db.PersonProperties)); } 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()); }