示例#1
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     using (Form_AddBook form = new Form_AddBook(this, curRowIndex))
     {
         form.ShowDialog();
         PopulateDataGrid();
     }
 }
示例#2
0
 private void btnAddNewBook_Click(object sender, EventArgs e)
 {
     using (Form_AddBook form = new Form_AddBook(this, -1)) //pass index -1 to add new book instead of edit
     {
         form.ShowDialog();
         PopulateDataGrid();
     }
 }