private void BtnAdminDelete_Click(object sender, EventArgs e) { if (!ChkBoxDelete.Checked) { MessageBox.Show("please check the delete user check box."); } else { //bool result = userLogic.deleteUser(user.Id); bool result = dtFunc.getBool(ws.deleteUser(user.Id)); if (result) { MessageBox.Show("user deleted successfully"); //return to main menu Form mainform = Application.OpenForms["MainMenu"]; mainform.Show(); this.Close(); } else { MessageBox.Show("db returned false their was an error."); } } }