Ejemplo n.º 1
0
 private bool FilterData(BalanceSheetModel o)
 {
     if (FilterKonto != null && FilterName == null)
     {
         return(o.Konto.StartsWith(FilterKonto));
     }
     else if (FilterKonto == null && FilterName != null)
     {
         return(o.Opis.ToUpper().Contains(FilterName.ToUpper()));
     }
     else if (FilterKonto != null && FilterName != null)
     {
         return(o.Opis.ToUpper().Contains(FilterName.ToUpper()) && o.Konto.StartsWith(FilterKonto));
     }
     else
     {
         return(true);
     }
 }
 private void OnFilterCustomers(object obj)
 {
     // var _customer = args != null ? args as Customer : null;
     if (string.IsNullOrWhiteSpace(FilterName))
     {
         Customers = CustomersUnfiltered;
     }
     else
     {
         CustomersFiltered = new ObservableCollection <Customer>(CustomersUnfiltered.Where(x => x.Name.Contains(FilterName.ToUpper())));
         Customers         = CustomersFiltered;
     }
 }
Ejemplo n.º 3
0
 private void OnFilterProducts(object obj)
 {
     // var _customer = args != null ? args as Customer : null;
     if (string.IsNullOrWhiteSpace(FilterName))
     {
         Products = ProductsUnfiltered;
     }
     else
     {
         ProductsFiltered = new ObservableCollection <Product>(ProductsUnfiltered.Where(x => x.Name.Contains(FilterName.ToUpper())));
         Products         = ProductsFiltered;
     }
 }