private void ActiveDesactiveButtonDeleteDriver() { if (RoundRacesDB.getRoundRaces(((CircuitDB)lsvCircuits.SelectedItem).Id).Count > 0) { deleteDriver.IsEnabled = true; } else { deleteDriver.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(); }