private void butDelete_Click(object sender, EventArgs e) { if (AllergyCur.IsNew) { DialogResult = DialogResult.Cancel; return; } if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "Delete?")) { return; } Allergies.Delete(AllergyCur.AllergyNum); DialogResult = DialogResult.OK; }
private void butDelete_Click(object sender, EventArgs e) { if (AllergyCur.IsNew) { DialogResult = DialogResult.Cancel; return; } if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "Delete?")) { return; } Allergies.Delete(AllergyCur.AllergyNum); SecurityLogs.MakeLogEntry(Permissions.PatAllergyListEdit, AllergyCur.PatNum, AllergyDefs.GetDescription(AllergyCur.AllergyDefNum) + " deleted"); DialogResult = DialogResult.OK; }