Ejemplo n.º 1
0
        private void catalogueTabContentChangedEventHandler(object sender, RoutedEventArgs e)
        {
            if (titleTextBox.Text == "" && authorTextBox.Text == "" && publisherTextBox.Text == "" && selectedGenresList.Count == 0 && languageComboBox.SelectedIndex <= -1)
            {
                cashierCatalogue.ItemsSource = catalogue;
            }
            else
            {
                var title     = titleTextBox.Text;
                var author    = authorTextBox.Text;
                var publisher = publisherTextBox.Text;
                var language  = languageComboBox.SelectedItem == null ? "" : languageComboBox.SelectedItem.ToString();
                var genres    = selectedGenresListBox.Items;

                cashierCatalogue.ItemsSource = new CatalogueViewList((List <Book>)bookChangeManager.bookBeingSearched(title, author, publisher, language, genres),
                                                                     dao.CachedBookstores,
                                                                     dao.CachedBookstoresOnBooksAvailability).list;
            }
        }