Пример #1
0
 private void DeleteButton_Click(object sender, RoutedEventArgs e)
 {
     if (eventId != 0)
     {
         EventDBContext.IntitalizeDB();
         EventDBContext.Delete(eventId);
         InitializeDataGrid();
         ClearAll();
         WindowSuccess success = new WindowSuccess();
         success.SetContent("Event Deleted Succefully");
         success.Show();
     }
     else
     {
         WindowError error = new WindowError();
         error.SetContent("Event Is Not Selected");
         error.Show();
     }
 }