예제 #1
0
 private void ActiveDesactiveButtonAddDriver()
 {
     if (RacesDB.getPilotsUnasigned(((CircuitDB)lsvCircuits.SelectedItem).Id).Count != 0)
     {
         btnAddDriver.IsEnabled = true;
     }
     else
     {
         btnAddDriver.IsEnabled = false;
     }
 }
예제 #2
0
 private void ActiveButtonCloseRound()
 {
     if (!CircuitDB.getClosedRace(((CircuitDB)lsvCircuits.SelectedItem).Id) &&
         RacesDB.getPilotsUnasigned(((CircuitDB)lsvCircuits.SelectedItem).Id).Count == 0)
     {
         btnCloseRound.IsEnabled = true;
     }
     else
     {
         btnCloseRound.IsEnabled = false;
     }
 }
예제 #3
0
        private void updateLists()
        {
            //Aixo ho faig per no perdre l'index al actualitzar la llista
            if ((CircuitDB)lsvCircuits.SelectedItem == null)
            {
                lsvCircuits.SelectedIndex = circuitSeleccionat;
            }

            dtgRoundRaces.ItemsSource          = RoundRacesDB.getRoundRaces(((CircuitDB)lsvCircuits.SelectedItem).Id);
            gdvPilotsUnasignedTeam.ItemsSource = RacesDB.getPilotsUnasigned(((CircuitDB)lsvCircuits.SelectedItem).Id);
            enableTemsPilot();
            netejarFormulari();
        }