private void CompleteC(object obj)
        {
            int id = int.Parse(obj.ToString());

            this.reminderService.SetCompleted(id);
            Reminders.Remove(Reminders.Where(x => x.Id == id).FirstOrDefault());
            NotifyRemindersChanged();
        }
        private void DeleteC(object obj)
        {
            MessageBoxResult question = MessageBox.Show("Искате ли да изтриете това напомняне?", "Изтриване", MessageBoxButton.YesNoCancel, MessageBoxImage.Question);

            if (question == MessageBoxResult.Yes)
            {
                int id = int.Parse(obj.ToString());
                this.reminderService.Remove(id);
                Reminders.Remove(Reminders.Where(x => x.Id == id).FirstOrDefault());
                NotifyRemindersChanged();
            }
        }
Ejemplo n.º 3
0
 public List <Reminder> GetActiveReminders()
 {
     return(Reminders.Where(r => r.Status == ReminderStatus.Activated).ToList());
 }