private async void OpenTrip(Trip trip) { try { await Navigator.PushAsync<ItinerariesViewModel>(vm => vm.Trip = trip); } catch (Exception ex) { ReportError(ex); } }
private async void DeleteTrip(Trip trip) { try { await DataStore.RemoveTrip(trip); Trips.Remove(trip); } catch (Exception ex) { ReportError(ex); } }
protected override void Done() { if (_end <= _start) { ReportMessage("Start must precede End", "Time travel is not supported"); return; } Result = ModalResult.Done; _trip = new Trip { Name = _name, Start = _start, End = _end }; Navigator.PopModalAsync(); }
public Task UpdateTrip(Trip trip) { return Connection.UpdateAsync(trip); }
public Task RemoveTrip(Trip trip) { return Connection.DeleteAsync(trip); }
public async Task<IList<Itinerary>> GetItineraries(Trip trip) { return await Connection.Table<Itinerary>().Where(i => i.TripID == trip.ID).ToListAsync().ConfigureAwait(false); }
public Task AddTrip(Trip trip) { return Connection.InsertAsync(trip); }