private void buttonDeleteAuthor_Click(object sender, EventArgs e) { if (IsValidAuthorData()) { DialogResult ans = MessageBox.Show("Do you really want to delete this Author?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Information); if (ans == DialogResult.Yes) { AuthorDA.Delete(Convert.ToInt32(textBoxAuthorID.Text)); MessageBox.Show("Author record has been deleted successfully", "Confirmation"); ClearAll(); textBoxAuthorID.Enabled = true; } } }
//Delete private void buttonAutDel_Click(object sender, EventArgs e) { DialogResult ans = MessageBox.Show("Are you sure you want to delete the Author information?", "Delete Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Information); if (ans == DialogResult.Yes) { if (BookDA.SearchAuthor(Convert.ToInt32(textBoxAutID.Text)) != null) { MessageBox.Show("This author has one or more books registered in the inventory, please be sure that there are no books by this author before deleting it!", "ALERT!"); return; } AuthorDA.Delete(Convert.ToInt32(textBoxAutID.Text)); AuthorDA.ListAuthors(listViewAuthor); UpdateComboBoxes(); } }
private void buttonDeleteAuthor_Click(object sender, EventArgs e) { AuthorDA.Delete(Convert.ToInt32(textBoxAuthorId.Text)); MessageBox.Show("Author has been deleted successfully from the database", "Confirmation"); }
private void buttonDeleteauthor_Click(object sender, EventArgs e) { AuthorDA.Delete(Convert.ToInt32(textBoxAuthorID.Text)); MessageBox.Show(" Author record has been deleted successfully", "Confirmation"); ClearAll3(); }
public void Delete(int id) { authorDA.Delete(id); }
private void btn_Delete_Click(object sender, EventArgs e) { AuthorDA.Delete(Convert.ToInt32(txt_input.Text)); MessageBox.Show("Student data has beeen deleted", "DONE"); }