private void deleteBtn_Click(object sender, EventArgs e) { using (UtilityData ut = new UtilityData(true)) { ut.ID = ID; if (MessageView.ShowQuestionMsg("Delete Details of '" + nameTextBoxX.Text + "'") == DialogResult.OK) { ut.Delete(); clear(); MessageView.ShowMsg("Sucessfully Deleted"); } } }