コード例 #1
0
        public async Task DeleteEntrieAsync()
        {
            if (SelectedEntrie == null)
            {
                return;
            }

            await _calendarRepository.RemoveEntrieAsync(SelectedEntrie);

            CalendarEntries.Remove(SelectedEntrie);
            SelectedEntrie = CalendarEntries.FirstOrDefault();
        }
コード例 #2
0
        public async Task OnChangeAsync(CalendarEntrie calendarEntrie)
        {
            var item = await _calendarRepository.UpdateEntrieAsync(calendarEntrie);

            var oldValue = CalendarEntries.FirstOrDefault(x => x.Id == calendarEntrie.Id);

            if (oldValue != null)
            {
                oldValue = item;
            }

            NotifyOfPropertyChange(() => CalendarEntries);
        }