private async void Bcapturar_Clicked(object sender, EventArgs e) { Extras.webServiceConnection ws = new Extras.webServiceConnection(this); string udid = DependencyService.Get <DependencyServices.IUDID>().getUDID(); Dictionary <string, string> location = DependencyService.Get <DependencyServices.IGetLocation>().getLocation(); Fugitivo.Capturado = true; Fugitivo.Foto = imagePath; Fugitivo.Lat = location["Lat"]; Fugitivo.Lon = location["Lon"]; int result = DB.updateItem(Fugitivo); string message = ws.connectPOST(udid); if (result == 1) { await DisplayAlert("Capturado", "El fugitivo " + Fugitivo.Name + " ha sido capturado\n" + message, "Aceptar"); } else { await DisplayAlert("Error", "Error al capturar el fugitivo", "Aceptar"); } DB.closeConnection(); MessagingCenter.Send <Page>(this, "Update"); await Navigation.PopAsync(); }
private void updateDB() { Extras.webServiceConnection ws = new Extras.webServiceConnection(this); ws.connectGET(); }
private async Task updateBDAsync() { Extras.webServiceConnection ws = new Extras.webServiceConnection(this); await ws.connectGET(); }