public MainWindow() { InitializeComponent(); var list = TripDAO.GetAll(); list.ForEach(e => Debug.WriteLine(e)); ListViewMenu.SelectedIndex = 0; }
public HomeScreen() { InitializeComponent(); SearchComboBox.ItemsSource = Tags; completedJourney.ItemsSource = completedJourneyObj; currentJourney.ItemsSource = currentJourneyObj; data = TripDAO.GetAll(); Debug.WriteLine(data); ReloadData(); }
private void Search() { string key = VNCharacterUtils.RemoveAccent(SearchTextBox.Text).ToLower(); Debug.WriteLine(key); int sb = SearchComboBox.SelectedIndex; Debug.WriteLine($"{sb} {key}"); SearchBy searchBy = (sb == 0) ? SearchAll : (sb == 1) ? SearchByName : (sb == 2) ? SearchByPlace : (SearchBy)SearchByMember; var all = TripDAO.GetAll(); data = all.Where(e => searchBy(e, key)).ToList(); ReloadData(); }