Exemplo n.º 1
0
        public RelationListeType ToRelationListeType(Func <string, Guid> cpr2UuidFunc)
        {
            // Marriages
            var civilStates = Interval
                              .CreateFromData <TimedTypeWrapper <ICivilStatus> >(this.ItemsAsTimedType, new DataTypeTags[] { DataTypeTags.CivilStatus })
                              .Select(w => w.TimedObject)
                              .ToList();
            var spouses  = CivilStatusWrapper.ToSpouses(null, civilStates, cpr2UuidFunc);
            var partners = CivilStatusWrapper.ToRegisteredPartners(null, civilStates, cpr2UuidFunc);

            // Now fill the return object
            return(new RelationListeType()
            {
                Aegtefaelle = spouses,
                RegistreretPartner = partners,
                Fader = FromLatestRegistration <ParentsInformationType>().ToFather(cpr2UuidFunc),
                Moder = FromLatestRegistration <ParentsInformationType>().ToMother(cpr2UuidFunc),
                Boern = ChildType.ToPersonFlerRelationType(LatestRegistration.Child, cpr2UuidFunc),
                RetligHandleevneVaergemaalsindehaver = ToRetligHandleevneVaergemaalsindehaver(cpr2UuidFunc),
                Foraeldremyndighedsindehaver = ToForaeldremyndighedsindehaver(cpr2UuidFunc),
                Bopaelssamling = null,
                ErstatningAf = ToErstatningAf(cpr2UuidFunc),
                ErstatningFor = null,
                Foraeldremyndighedsboern = null,
                LokalUdvidelse = null,
                RetligHandleevneVaergeForPersonen = null
            });
        }
 public PersonFlerRelationType[] ToChildren(Func <string, Guid> cpr2uuidFunc)
 {
     return(ChildType.ToPersonFlerRelationType(this.Child, cpr2uuidFunc));
 }