public LivStatusType ToLivStatusType() { return(new LivStatusType() { LivStatusKode = Converters.ToLivStatusKodeType(this.CitizenStatusCode, Converters.ToDateTime(this.Birthdate, this.BirthdateUncertainty).HasValue), TilstandVirkning = TilstandVirkningType.Create(Converters.ToDateTime(this.CitizenStatusTimestamp, this.CitizenStatusTimestampUncertainty)) }); }
public CivilStatusType ToCivilStatusType() { return(new CivilStatusType() { CivilStatusKode = CivilStatusKodeType.Separeret, TilstandVirkning = TilstandVirkningType.Create(ToStartTS()), }); }
public CivilStatusType ToCivilStatusType() { return(new CivilStatusType() { CivilStatusKode = Converters.ToCivilStatusKodeType(this.MaritalStatus), TilstandVirkning = TilstandVirkningType.Create(ToMaritalStatusDate()) }); }
public LivStatusType ToLivStatusType() { return(new LivStatusType() { // We are not using the uncertainty flag here because an uncertain birthdate still means the person is already born LivStatusKode = Enums.ToLifeStatus(this.Status, this.Birthdate.HasValue), TilstandVirkning = TilstandVirkningType.Create(this.ToStatusDate()) }); }
public void ToVirkningType_Correct_CorrectCommentText( [Values("93kljakljslajfdas", "jakjkljf")] string commentText) { var virkning = new TilstandVirkningType() { CommentText = commentText }; var result = virkning.ToVirkningType(); Assert.AreEqual(commentText, result.CommentText); }
public void ToVirkningType_Correct_CorrectFraTidspunkt( [Values(1, 3, 5)] int yearOffset) { DateTime date = DateTime.Today.AddYears(yearOffset); var virkning = new TilstandVirkningType() { FraTidspunkt = TidspunktType.Create(date) }; var result = virkning.ToVirkningType(); Assert.AreEqual(date, result.FraTidspunkt.ToDateTime()); }
public void ToVirkningType_Correct_CorrectActorRef( [Values("93kljakljslajfdas", "jakjkljf")] string actorRefValue) { var virkning = new TilstandVirkningType() { AktoerRef = new UnikIdType { Item = actorRefValue } }; var result = virkning.ToVirkningType(); Assert.AreEqual(actorRefValue, result.AktoerRef.Item); }
TilstandListeType CreateTilstandListeType(DateTime date) { return(new TilstandListeType() { CivilStatus = new CivilStatusType() { TilstandVirkning = TilstandVirkningType.Create(date) }, LivStatus = new LivStatusType() { TilstandVirkning = TilstandVirkningType.Create(date) } }); }
public static Effect FromTilstandVirkningType(TilstandVirkningType virkning) { if (virkning != null) { return(new Effect() { EffectId = Guid.NewGuid(), ActorRef = ActorRef.FromXmlType(virkning.AktoerRef), CommentText = virkning.CommentText, FromDate = virkning.FraTidspunkt.ToDateTime(), ToDate = null }); } return(null); }
public TilstandListeType ToTilstandListeType() { return(new TilstandListeType() { CivilStatus = new CivilStatusType() { CivilStatusKode = Utilities.ToPartMaritalStatus(MaritallStatusCode[0]), TilstandVirkning = TilstandVirkningType.Create(Utilities.ToDateTime(MaritalStatusDate)), }, LivStatus = new LivStatusType { //TODO: Status date may not be the correct field (for example, the status may have changed from 01 to 07 at the date, but the life status is still alive) LivStatusKode = Schemas.Util.Enums.ToLifeStatus(Utilities.GetCivilRegistrationStatus(StatusKmd, StatusCpr), Utilities.ToDateTime(BirthDate)), TilstandVirkning = TilstandVirkningType.Create(Utilities.ToDateTime(StatusDate)), }, // No extensions now LokalUdvidelse = null }); }
public TilstandListeType ToTilstandListeType() { return(new TilstandListeType() { // TODO: Is it OK to get the full history here? // TODO: Use CivilStatusWrapper CivilStatus = new CivilStatusType() { CivilStatusKode = PersonTotal.ToCivilStatusCodeType(this.Separation), // TODO: Shall we use birthdate is status is Single ('U')? TilstandVirkning = TilstandVirkningType.Create(Utilities.DateFromDecimal(PersonTotal.MaritalStatusDate)) }, LivStatus = new LivStatusType() { LivStatusKode = PersonTotal.ToLivStatusKodeType(), // TODO: Shall we use other dates? StatusDate is sometimes null TilstandVirkning = TilstandVirkningType.Create(Utilities.DateFromFirstDecimal(PersonTotal.StatusDate)), }, // No extensions now LokalUdvidelse = null }); }