private static void CheckGroupRecord(GDMGroupRecord group) { for (int i = group.Members.Count - 1; i >= 0; i--) { GDMIndividualRecord mbr = group.Members[i].Individual; if (mbr == null) { group.Members.DeleteAt(i); } else { if (mbr.IndexOfGroup(group) < 0) { group.Members.DeleteAt(i); } } } }
private void CheckGroupRecord(GDMGroupRecord group) { for (int i = group.Members.Count - 1; i >= 0; i--) { GDMIndividualRecord mbr = fTree.GetPtrValue(group.Members[i]); if (mbr == null) { group.Members.DeleteAt(i); } else { if (mbr.IndexOfGroup(group) < 0) { group.Members.DeleteAt(i); } } } }
private bool CheckSpecificFilter() { bool result = false; IndividualListFilter iFilter = (IndividualListFilter)fFilter; if ((iFilter.Sex == GDMSex.svUnknown || fRec.Sex == iFilter.Sex) && (IsMatchesMask(buf_fullname, iFilter.Name)) && (IsMatchesPlace(iFilter.Residence)) && (IsMatchesEventVal(iFilter.EventVal)) && (!iFilter.PatriarchOnly || fRec.Patriarch)) { bool isLive = (buf_dd == null); switch (iFilter.FilterLifeMode) { case FilterLifeMode.lmOnlyAlive: if (!isLive) { return(false); } break; case FilterLifeMode.lmOnlyDead: if (isLive) { return(false); } break; case FilterLifeMode.lmAliveBefore: UDN bdt = (buf_bd == null) ? UDN.CreateEmpty() : buf_bd.Date.GetUDN(); UDN ddt = (buf_dd == null) ? UDN.CreateEmpty() : buf_dd.Date.GetUDN(); if ((bdt.CompareTo(filter_abd) > 0) || (ddt.CompareTo(filter_abd) < 0)) { return(false); } break; case FilterLifeMode.lmTimeLocked: break; } switch (iFilter.FilterGroupMode) { case FilterGroupMode.All: break; case FilterGroupMode.None: if (fRec.HasGroups) { return(false); } break; case FilterGroupMode.Any: if (!fRec.HasGroups) { return(false); } break; case FilterGroupMode.Selected: if (fRec.IndexOfGroup(filter_grp) < 0) { return(false); } break; } switch (iFilter.SourceMode) { case FilterGroupMode.All: break; case FilterGroupMode.None: if (fRec.HasSourceCitations) { return(false); } break; case FilterGroupMode.Any: if (!fRec.HasSourceCitations) { return(false); } break; case FilterGroupMode.Selected: if (fRec.IndexOfSource(filter_source) < 0) { return(false); } break; } result = true; } return(result); }