private void butDelete_Click(object sender, System.EventArgs e) { if (IsNew) { DialogResult = DialogResult.Cancel; return; } if (MessageBox.Show(Lan.g(this, "Delete Prescription?"), "", MessageBoxButtons.OKCancel) != DialogResult.OK) { return; } RxPats.Delete(RxPatCur.RxNum); DialogResult = DialogResult.OK; }
private void butDelete_Click(object sender, System.EventArgs e) { if (IsNew) { DialogResult = DialogResult.Cancel; return; } if (MessageBox.Show(Lan.g(this, "Delete Prescription?"), "", MessageBoxButtons.OKCancel) != DialogResult.OK) { return; } SecurityLogs.MakeLogEntry(Permissions.RxEdit, RxPatCur.PatNum, "FROM(" + _rxPatOld.RxDate.ToShortDateString() + "," + _rxPatOld.Drug + "," + _rxPatOld.ProvNum + "," + _rxPatOld.Disp + "," + _rxPatOld.Refills + ")" + "\r\nTO('deleted')", RxPatCur.RxNum, _rxPatOld.DateTStamp); RxPats.Delete(RxPatCur.RxNum); DialogResult = DialogResult.OK; }