예제 #1
0
 private void btnRemoveVacation_Click(object sender, EventArgs e)
 {
     try
     {
         if (DevExpress.XtraEditors.XtraMessageBox.Show(this.LookAndFeel, "Bent u zeker dat u het verlof wilt verwijderen", "Verwijderen?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question,
                                                        MessageBoxDefaultButton.Button3) == DialogResult.Yes)
         {
             TIS.Model.Internal.Vacation vacation = (TIS.Model.Internal.Vacation)gdvVacation.GetRow(this.gdvVacation.FocusedRowHandle);
             vacation.Delete();
             Uow.CommitChanges();
             _vacations.Remove(vacation);
             gdvVacation.RefreshData();
             //_vacationBL.Remove(vacation);
             //_tasks.Remove(task);
             //gdcTask.Refresh();
         }
     }
     catch (System.Exception exception1)
     {
         System.Exception thisException = exception1;
         Management.ShowException(thisException);
     }
 }