private void metroButton2_Click(object sender, EventArgs e) { if (metroTextBoxPhoneNo.Text != "") { bool bx = u.DeletePatient(metroTextBoxPhoneNo.Text); if (bx == false) { MetroFramework.MetroMessageBox.Show(this, "Failed!"); } else { MetroFramework.MetroMessageBox.Show(this, "Deleted."); } } else { MetroFramework.MetroMessageBox.Show(this, "Please Enter Phone No."); } }