public void Search()
 {
     if (SearchText != String.Empty)
     {
         Categories = new ObservableCollection <Category>
                          (AllCategories.Where(x => x.Name != null && x.Name.ToLower().Contains(_searchText.ToLower()))
                          .ToList());
     }
     else
     {
         Categories = AllCategories;
     }
 }
Ejemplo n.º 2
0
 public void GetCategories()
 {
     Categories     = new ObservableCollection <Category>(AllCategories.Where(allcategory => Affiliation.CategoriesUsingInThisAffiliationFK.Contains(allcategory.CategoryId)));
     BindingContext = this;
 }
Ejemplo n.º 3
0
 public IEnumerable <Category> GetChildCategories(int parentId)
 {
     return(AllCategories.Where(x => x.Parent_Id == parentId));
 }