コード例 #1
0
        private void BtnReturn_Click(object sender, EventArgs e)
        {
            Book myBook = (Book)BookList.SelectedItem;

            myBook.copies++;
            BookFile.SaveBook(myBook, cwid, "Edit");
            LoadList();
        }
コード例 #2
0
        private void BtnDelete_Click(object sender, EventArgs e)
        {
            Book         myBook       = (Book)BookList.SelectedItem;
            DialogResult dialogResult = MessageBox.Show("Are you sure you want to delete this?", "Delete", MessageBoxButtons.YesNo);

            if (dialogResult == DialogResult.Yes)
            {
                BookFile.DeleteBook(myBook, cwid);
                LoadList();
            }
        }
コード例 #3
0
 private void LoadList()
 {
     myBooks             = BookFile.GetAllBooks(cwid);
     BookList.DataSource = myBooks;
 }