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; }