Beispiel #1
0
 private void editToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         int        idnumber = Convert.ToInt32(dgvdata.Rows[dgvdata.SelectedRows[0].Index].Cells[0].Value);
         InsertBook ins      = new InsertBook(idnumber);
         ins.ShowDialog();
     }
     catch (ArgumentOutOfRangeException)
     {
         MessageBox.Show("Please Select the Rows In The DataGridView And Then Try To Edit The Rows", "Warning !!!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     catch
     {
         MessageBox.Show("unknown problem", "Warning !!!", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Beispiel #2
0
        private void btnadd_Click(object sender, EventArgs e)
        {
            InsertBook insb = new InsertBook();

            insb.ShowDialog();
        }