コード例 #1
0
        private void deleteBookButton_Click(object sender, EventArgs e)//删除书籍
        {
            Book book = bookBindingSource.Current as Book;

            if (book == null)
            {
                MessageBox.Show("请选择一本书进行操作!");
                return;
            }
            BookShelfService.RemoveBooks(book.BookId);
            shelfBindingSource.DataSource = BookShelfService.GetAllShelfs();
        }