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(); }
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(); } }
private async void HandleDelete(Reminder reminder) { await App.Database.DeleteNoteAsync(reminder); Reminders.Remove(reminder); }
public void Delete(Reminder reminder) { Reminders.Remove(reminder); }
async Task DeleteReminder(Reminder reminder) { Reminders.Remove(reminder); await ReminderDataStore.DeleteModelAsync(reminder); }