예제 #1
0
        } //End Cell Click

        //Remove
        private void btnRemove_Click(object sender, EventArgs e)
        {
            //Dereg Book
            //Instance of Books
            Books aBook = new Books();

            //Retrieve details from this book item from DB
            aBook.getBook(Convert.ToInt32(grdBookList.Rows[grdBookList.CurrentCell.RowIndex].Cells[0].Value));

            aBook.rmvBook();

            //Display Confirmation Message
            MessageBox.Show("Book " + txtBookID.Text + " Removed", "Confirmation", MessageBoxButtons.OK, MessageBoxIcon.Information);

            //Reset UI
            grpBookInfo.Visible = false;
            grdBookList.Visible = false;
            txtSTitle.Text      = "";
            txtSTitle.Focus();
        } //End Remove