Beispiel #1
0
 private void FormApptViewEdit_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (DialogResult == DialogResult.OK)
     {
         return;
     }
     if (IsNew)
     {
         ApptViewItems.DeleteAllForView(ApptViewCur);
         ApptViews.Delete(ApptViewCur);
     }
 }
Beispiel #2
0
 private void butDelete_Click(object sender, System.EventArgs e)
 {
     //this does mess up the item orders a little, but missing numbers don't actually hurt anything.
     if (MessageBox.Show(Lan.g(this, "Delete this category?"), "", MessageBoxButtons.OKCancel)
         != DialogResult.OK)
     {
         return;
     }
     ApptViewItems.DeleteAllForView(ApptViewCur);
     ApptViews.Delete(ApptViewCur);
     DialogResult = DialogResult.OK;
 }