コード例 #1
0
ファイル: FormBooks.cs プロジェクト: tarishi3/C-Projects
        private void buttonDelete_Click(object sender, EventArgs e)
        {
            if (textBoxAuthor.Text == "" || textBoxTitle.Text == "")
            {
                MessageBox.Show("Cannot Delete.... Something went Wrong");
            }
            else
            {
                Books book = new Books();
                book.ISBN   = Convert.ToInt16(textBoxIsbn.Text);
                book.Title  = textBoxTitle.Text;
                book.Author = textBoxAuthor.Text;

                if (book.DeleteRecord(book))
                {
                    MessageBox.Show("The Selected Row is now Deleted......");
                }
                else
                {
                    MessageBox.Show("Something went wrong......");
                }
            }
            buttonRefresh_Click(sender, e);
        }