Exemplo n.º 1
0
        private void DeleteBookButton_Click(object sender, RoutedEventArgs e)
        {
            ListBook selectedBook = BooksLw.SelectedItem as ListBook;

            if (selectedBook != null)
            {
                library.RemoveBook(selectedBook.ID);
                BooksLw.ItemsSource = LoadBooks(library);
            }
            else
            {
                MessageBox.Show("Book is not choosen");
            }
        }
Exemplo n.º 2
0
        private void BorrowBook_ConfirmButton_Click(object sender, RoutedEventArgs e)
        {
            ListBook   selectedBook   = CliensAvailableBookLw.SelectedItem as ListBook;
            ListClient selectedClient = ClientsLw.SelectedItem as ListClient;

            if (selectedClient != null && selectedBook != null)
            {
                library.BorrowBook(selectedClient.ID, selectedBook.ID);
                CliensAvailableBookPanel.Visibility = Collapsed;
                BorrowBook_ConfirmButton.Visibility = Collapsed;
                ClientsLw.ItemsSource = LoadClients(library);
            }
            else if (selectedBook == null)
            {
                MessageBox.Show("Book is not choosen");
            }
            else if (selectedClient == null)
            {
                MessageBox.Show("Client is not choosen");
            }
        }
Exemplo n.º 3
0
Arquivo: Main.cs Projeto: Rinat1k/Tspp
        private void посмотретьКаталогToolStripMenuItem2_Click(object sender, EventArgs e)
        {
            var listBook = new ListBook();

            listBook.Show();
        }