private void Delete(object sender, EventArgs args) { if (MessageBox.Show("Do you want to delete the customer?", "Delete", MessageBoxButtons.YesNo) == DialogResult.Yes) { mModel.Delete(); GoBack(); } }
private void btnDel_Click(object sender, EventArgs e) { if (WinFormUtil.Confirm("Do you want to delete the customer?", "Delete") == DialogResult.Yes) { mModel.Delete(); this.Close(); } }