private void btnUpdate_Click(object sender, EventArgs e)
 {
     if (txtISBN.Text.Equals("") || txtTitle.Text.Equals("") || txtDescreption.Text.Equals("") || txtISBN.Text.Equals("") || txtBookName.Text.Equals(""))
     {
         MessageBox.Show("These are requried field please fill");
     }
     else
     {
         Book book = new Book(txtTitle.Text, cmboCategory.Text, txtDescreption.Text, txtISBN.Text,
                              Convert.ToInt32(numQty.Value), txtBookName.Text);
         if (DBConnection.updateBook(book))
         {
             MessageBox.Show("Book is updated succesfully");
         }
         else
         {
             MessageBox.Show("Please try again later");
         }
     }
 }
Beispiel #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            Book book = new Book(txtTitle.Text, cmboCategory.Text, txtDescription.Text, txtBookID.Text, Convert.ToInt32(numQty.Value), txtName.Text);

            DBConnection.updateBook(book);
        }