public bool IsOverwrittenBy(ITimedType newObject) { var newParentalAutority = newObject as ParentalAuthorityType; return(this.RelationshipType == newParentalAutority.RelationshipType && this.RelationPNR == newParentalAutority.RelationPNR); }
public bool IsOverwrittenBy(ITimedType newObject) { var newDisempowerment = newObject as DisempowermentType; if (newDisempowerment != null) { return(this.GuardianRelationType == newDisempowerment.GuardianRelationType && this.DisempowermentStartDate == newDisempowerment.DisempowermentStartDate); } return(false); }
public bool IsOverwrittenBy(ITimedType newObject) { var newCivilStatus = newObject as CurrentCivilStatusType; if (newCivilStatus != null) { return (this.CivilStatusCode == MaritalStatus.Deceased || newCivilStatus.CivilStatusCode == MaritalStatus.Unmarried); } return(false); }
public static bool IsOverwritten(ITimedType deleteCandidate, IEnumerable <ITimedType> dataOtherObjects) { if (deleteCandidate is IOverwritable) { var deleteCandidateO = deleteCandidate as IOverwritable; return(dataOtherObjects .Except(new ITimedType[] { deleteCandidate }) .Where(o => o.Tag == deleteCandidate.Tag && o.Registration != null && deleteCandidate.Registration != null && o.Registration.RegistrationDate > deleteCandidate.Registration.RegistrationDate && deleteCandidateO.IsOverwrittenBy(o) ) .FirstOrDefault() != null); } return(false); }