private void deleteBTN_Click(object sender, EventArgs e) { if (MetroMessageBox.Show(this, "Do you want to delete this record?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { return; } ServicingClass c = new ServicingClass(frm1, this); c.deleteservicingsched(tempid, tempcin); }