private void BtnAddTournament_Click(object sender, RoutedEventArgs e) { AddTournament addtournament = new AddTournament(); this.Opacity = 0.3; Filter(); addtournament.ShowDialog(); Filter(); this.Opacity = 1; }
private void BtnEditTournament_Click(object sender, RoutedEventArgs e) { try { if (ListViewTournaments.SelectedItem is Tournament tournament) { VarIdTournament = (int)tournament.IdTournament; AddTournament addtournament = new AddTournament(ListViewTournaments.SelectedItem as Tournament); this.Opacity = 0.3; Filter(); addtournament.ShowDialog(); Filter(); this.Opacity = 1; } else { MessageBox.Show("You did not select tournament", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } } catch { MessageBox.Show("Error", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } }
public async Task <IActionResult> Post(AddTournament tournament) { await _busPublisher.Send(tournament); return(Ok()); }