private void DeleteTripTask(object param) { TripTask tripTask = (TripTask)param; _tripRepository.DeleteTripTask(tripTask.Id); TripTasks.Remove(tripTask); }
private async void AddTripTask() { AddTripTaskDialog dialog = new AddTripTaskDialog(); ContentDialogResult result = await dialog.ShowAsync(); if (result == ContentDialogResult.Primary) { if (!String.IsNullOrEmpty(dialog.Description)) { TripTask tripTask = new TripTask(dialog.Description, false); int tripTaskId = await _tripRepository.AddTripTask(Trip.Id, tripTask); tripTask.Id = tripTaskId; TripTasks.Add(tripTask); } } }
private void SaveTasks() { _tripRepository.UpdateTripTasks(TripTasks.ToList()); }