//Method to delete data from the database private void DeletetoolStripButton_Click(object sender, EventArgs e) { if (Idtextediter.Text == "") { MessageBox.Show("Please Insert Branch ID"); } else { BranchBiz branchBiz = new BranchBiz(); int deleteId = Convert.ToInt32(Idtextediter.Text); if (MessageBox.Show("Are you Sure you want to delete?", "Confirm deletion", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) { var result = branchBiz.Delete(deleteId); if (result.Status) { MessageBox.Show("Successfully Deleted"); clearbr(); } else { MessageBox.Show("Not Successfully Deleted." + result.Message); } } } }