Example #1
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     if (!String.IsNullOrEmpty(txtID.Text))
     {
         try
         {
             UpdateBook form = new UpdateBook(int.Parse(txtID.Text));
             form.ShowDialog();
         }
         catch (Exception)
         {
             MessageBox.Show("Please Enter correct ISBN");
         }
     }
     else
     {
         MessageBox.Show("Please choose a Book!!!");
     }
 }
Example #2
0
        private void dgvBook_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            UpdateBook form = new UpdateBook(int.Parse(txtID.Text));

            form.ShowDialog();
        }