示例#1
0
        /// <summary>
        /// Checks if a book has been selected and then shows bookcopies by book.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSelectCopy_Click(object sender, EventArgs e)
        {
            Book book = lbBooks.SelectedItem as Book;

            if (lbBooks.SelectedIndex == -1)
            {
                MessageBox.Show("Please choose a book.");
            }
            else
            {
                ShowAllCopies(copyService.ByBook(book.Id), lbIndCopy);
            }
        }