Exemplo n.º 1
0
 private void butDelete_Click(object sender, EventArgs e)
 {
     if (SheetCur.IsNew)
     {
         DialogResult = DialogResult.Cancel;
         return;
     }
     if (!MsgBox.Show(this, true, "Delete?"))
     {
         return;
     }
     Sheets.DeleteObject(SheetCur.SheetNum);
     SecurityLogs.MakeLogEntry(Permissions.SheetEdit, SheetCur.PatNum, SheetCur.Description + " deleted from " + SheetCur.DateTimeSheet.ToShortDateString());
     DialogResult = DialogResult.OK;
 }
Exemplo n.º 2
0
 private void FormLabCaseEdit_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (DialogResult == DialogResult.OK)
     {
         return;
     }
     if (IsNew)
     {
         if (sheet != null)
         {
             Sheets.DeleteObject(sheet.SheetNum);
         }
         LabCases.Delete(CaseCur.LabCaseNum);
     }
 }