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();
        }
Ejemplo n.º 2
0
 public void RemoveReminder(Reminder reminder)
 {
     try
     {
         Database.Remove <Reminder>(Reminder.DocumentName(reminder.GuildId, reminder.ReminderNumber));
         Reminders.Remove(reminder);
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
     }
 }
        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.º 4
0
        private async void HandleDelete(Reminder reminder)
        {
            await App.Database.DeleteNoteAsync(reminder);

            Reminders.Remove(reminder);
        }
Ejemplo n.º 5
0
 public void Delete(Reminder reminder)
 {
     Reminders.Remove(reminder);
 }
 async Task DeleteReminder(Reminder reminder)
 {
     Reminders.Remove(reminder);
     await ReminderDataStore.DeleteModelAsync(reminder);
 }