private void btnEdit_Click(object sender, EventArgs e) { Book myBook = (Book)lstBooks.SelectedItem; frmEdit myForm = new frmEdit(myBook, cwid, "edit"); if (myForm.ShowDialog() == DialogResult.OK) { } else { LoadList(); } }
private void btnNew_Click(object sender, EventArgs e) { Book myBook = new Book(); frmEdit myForm = new frmEdit(myBook, cwid, "new"); if (myForm.ShowDialog() == DialogResult.OK) { } else { LoadList(); } }