public void TryUpdateFamily(Rock.Client.Family family)
        {
            // see if the family exists
            Rock.Client.Family currFamily = Families.Where(f => f.Id == family.Id).SingleOrDefault( );

            // if it does, get its index and replace it.
            if (currFamily != null)
            {
                int currIndex = Families.IndexOf(currFamily);
                Families[currIndex] = family;
            }
        }
        protected override void OnQueryChanged(string oldValue, string newValue)
        {
            Families = StaticDataStore.Families;
            base.OnQueryChanged(oldValue, newValue);

            if (string.IsNullOrWhiteSpace(newValue))
            {
                ItemsSource = null;
            }
            else
            {
                ItemsSource = Families
                              .Where(family => family.ParentName.ToLower().Contains(newValue.ToLower()))
                              .ToList <FamilyModel>();
            }
        }
Beispiel #3
0
 public List <Family> GetFamilies()
 {
     return(Families.Where(a => a.IsDeleted == false).ToList());
 }