private void butDelete_Click(object sender, EventArgs e) { if (IsNew) { DialogResult = DialogResult.Cancel; return; } if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "Delete?")) { return; } PhoneEmpDefaults.Delete(PedCur.EmployeeNum); DialogResult = DialogResult.OK; }