private void ActiveDesactiveButtonAddDriver() { if (RacesDB.getPilotsUnasigned(((CircuitDB)lsvCircuits.SelectedItem).Id).Count != 0) { btnAddDriver.IsEnabled = true; } else { btnAddDriver.IsEnabled = false; } }
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; } }
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(); }