void startPicker() { Viajes aux = new Viajes(); int cantidad = RestService.CountTravels(); if (cantidad != 0) { for (int i = 0; i < cantidad; i++) { aux = RestService.getTravelAt(i); pickerRecorridos.Items.Add("" + aux.id); } } }
async void actualizaPicker() { try { Viajes aux = new Viajes(); int cantidad = RestService.CountTravels(); //pickerRecorridos.Items.Clear(); //for(int i= 0;i<cantidad;i++) aux = RestService.getTravelAt(cantidad - 1); pickerRecorridos.Items.Add("" + aux.id); pickerRecorridos.SelectedIndex = 0; } catch (Exception) { await DisplayAlert("Atención", "Error al actualizar la lista de vehiculos", "Ok"); } }