Beispiel #1
0
        private void PopulateBookList()
        {
            List <Book> books = BookDb.GetAllBooks();

            BooksComboBox.DataSource    = books;
            BooksComboBox.DisplayMember = nameof(Book.Title);
        }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            Book b = new Book();

            b.ISBN  = "79123";
            b.Title = "Joe's Text Book";
            b.Price = 10;

            BookDb.AddBook(b);
            MessageBox.Show("Book added!");
        }