Example #1
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);
     }
 }
Example #2
0
 private void butDelete_Click(object sender, System.EventArgs e)
 {
     //whether new or not
     if (!MsgBox.Show(this, true, "Delete Lab Case?"))
     {
         return;
     }
     try{
         LabCases.Delete(CaseCur.LabCaseNum);
         DialogResult = DialogResult.OK;
     }
     catch (Exception ex) {
         MessageBox.Show(ex.Message);
     }
 }
Example #3
0
 private void FormLabCaseEdit_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (DialogResult == DialogResult.OK)
     {
         return;
     }
     if (IsNew)
     {
         if (sheet == null)
         {
             LabCases.Delete(CaseCur.LabCaseNum);
         }
         else                  //user created and possibly printed a lab slip.  We can't let them delete this lab case
                               //lab cases are always created ahead of time, so no need to save here
         {
         }
     }
 }