示例#1
0
        private void DeleteTripTask(object param)
        {
            TripTask tripTask = (TripTask)param;

            _tripRepository.DeleteTripTask(tripTask.Id);
            TripTasks.Remove(tripTask);
        }
示例#2
0
        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);
                }
            }
        }