Exemplo n.º 1
0
        private void SearchBox_TextChanged(object sender, TextChangedEventArgs e)
        {
            KhorshidContext.Services.Load();
            DataContext = Service = new ObservableCollection <Service>(KhorshidContext.Services.Where(c => c.DriveName == driver).ToList());;

            var ctr = (TextBox)sender;

            if (ctr.Text == "")
            {
                return;
            }
            SearchEngine.ApplySearchOnCollection(ctr.Text, Service);
        }
Exemplo n.º 2
0
        private void SearchTextBox_ApplyModification()
        {
            if (SearchBox.Text.Trim()?.Length == 0)
            {
                Context.Clear();
                KhorshidDataManager.GetModifiedTownData().ForEach(town => Context.Add(town));
            }
            else
            {
                string term = SearchBox.Text.Replace("آ", "ا");

                SearchEngine.ApplySearchOnCollection(term, Context);
            }
        }
Exemplo n.º 3
0
        private void SearchTextBox_ApplyModification()
        {
            if (SearchBox.Text.Trim()?.Length == 0)
            {
                var context = new KhorshidContext();
                CustomerItems.Clear();
                context.Customers.ToList().ForEach(c => CustomerItems.Add(c));
            }
            else
            {
                string term = SearchBox.Text.Replace("آ", "ا");

                SearchEngine.ApplySearchOnCollection(term, CustomerItems);
            }
        }