private void btnnew_Click(object sender, EventArgs e) { Book myBook = new Book(); frmedit myForm = new frmedit(myBook, "new", cwid); if (myForm.ShowDialog() == DialogResult.OK) { } else { LoadList(); } }
private void btnedit_Click(object sender, EventArgs e) { Book myBook = (Book)lstbooks.SelectedItem; frmedit myForm = new frmedit(myBook, "edit", cwid); if (myForm.ShowDialog() == DialogResult.OK) { } else { LoadList(); } }