Exemple #1
0
 private void eventsListBox_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
 {
     ListPage.playersListView.ItemsSource           = PlayersHelper.EventSelectionChangedPlayers(eventsListBox.SelectedItem as Event);
     ListPage.tournamentPlayersListView.ItemsSource =
         TornamentPlayersHelper.EventSelectionChangedTournament(eventsListBox.SelectedItem as Event);
     DrawsPage.EventChangedDrawing();
     ListPage.cmbBoxCategory.SelectedIndex = ListPage.cmbBoxCategory.Items.Count - 1;
 }
Exemple #2
0
 private void DeleteDraw_OnClick(object sender, RoutedEventArgs e)
 {
     try
     {
         if ((eventsListBox.SelectedItem as Event).IsDrawFormed == true)
         {
             var eventId = (eventsListBox.SelectedItem as Event).EventId;
             Context.GamesTournaments.Where(p => p.EventId == eventId).Load();
             foreach (var gamesTournament in Context.GamesTournaments.Where(p => p.EventId == eventId).ToList())
             {
                 Context.GamesTournaments.Local.Remove(gamesTournament);
             }
             (eventsListBox.SelectedItem as Event).IsDrawFormed = false;
             DrawsPage.EventChangedDrawing();
         }
         Context.SaveChanges();
     }
     catch
     {
         MessageBox.Show("Не выбрано событие!", "Выбор события", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
Exemple #3
0
 private void Setki_OnClick(object sender, RoutedEventArgs e)
 {
     changerFrame.Navigate(DrawsPage);
     DrawsPage.EventChangedDrawing();
 }