Ejemplo n.º 1
0
        private void BtnAddTournament_Click(object sender, RoutedEventArgs e)
        {
            AddTournament addtournament = new AddTournament();

            this.Opacity = 0.3;
            Filter();
            addtournament.ShowDialog();
            Filter();
            this.Opacity = 1;
        }
Ejemplo n.º 2
0
 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);
     }
 }
Ejemplo n.º 3
0
        public async Task <IActionResult> Post(AddTournament tournament)
        {
            await _busPublisher.Send(tournament);

            return(Ok());
        }