Example #1
0
        private async Task DeleteSelectedScheduleDay(object obj)
        {
            if (SelectedSchedule != null)
            {
                await _scheduleService.ChangeSchedulesStatusToCanceled(SelectedSchedule.Id);

                _schedules.Remove(SelectedSchedule);

                SchedulesCollectionView.Refresh();
            }
        }
Example #2
0
        private void LoadSchedule()
        {
            _scheduleService.GetSchedulesInSpecifiedDateRangeByDoctorId(_selectedDoctor.Id, _dateFrom, _dateTo).ContinueWith(task =>
            {
                if (task.Exception == null)
                {
                    _schedules.Clear();
                    foreach (var schedule in task.Result)
                    {
                        _schedules.Add(schedule);
                    }

                    System.Windows.Application.Current.Dispatcher.Invoke(new Action(() => SchedulesCollectionView.Refresh()));
                }
            });
        }