Example #1
0
        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);
        }
Example #2
0
 public static UkendtBorgerType ToXmlType(UnknownCitizenData db)
 {
     if (db != null)
     {
         return(new UkendtBorgerType()
         {
             PersonCivilRegistrationReplacementIdentifier = db.CprNumber
         });
     }
     return(null);
 }
Example #3
0
        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());
        }