private void butDelete_Click(object sender, System.EventArgs e) { //if(IsNew){ // DialogResult=DialogResult.Cancel; // return; //} ProcTPs.DeleteForTP(PlanCur.TreatPlanNum); try{ TreatPlans.Delete(PlanCur); } catch (ApplicationException ex) { MessageBox.Show(ex.Message); return; } TreatPlans.Delete(PlanCur); DialogResult = DialogResult.OK; }
private void butDelete_Click(object sender, System.EventArgs e) { //if(IsNew){ // DialogResult=DialogResult.Cancel; // return; //} ProcTPs.DeleteForTP(PlanCur.TreatPlanNum); try{ TreatPlans.Delete(PlanCur); } catch (ApplicationException ex) { MessageBox.Show(ex.Message); return; } SecurityLogs.MakeLogEntry(Permissions.TreatPlanEdit, PlanCur.PatNum, "Delete TP: " + PlanCur.DateTP.ToShortDateString()); DialogResult = DialogResult.OK; }
private void butDelete_Click(object sender, EventArgs e) { if (TreatPlanCur.TPStatus == TreatPlanStatus.Active) { MsgBox.Show(this, "Cannot delete active treatment plan."); //Should never happen. return; } if (TreatPlanCur.TreatPlanNum != 0) { try { TreatPlans.Delete(TreatPlanCur); } catch (Exception ex) { MessageBox.Show(ex.Message); return; } } DialogResult = DialogResult.OK; }