Example #1
0
 private void DeleteReminder(Reminder ReminderToDelete)
 {
     StoredProcedures.DeleteReminder(ReminderToDelete.ReminderID);
     // cancel the scheduled notification for the reminder
     AlarmAndReminderHelper.UnscheduleReminder(ReminderToDelete);
     // clear the list of reminders and re-populate them
     this.Reminders.Clear();
     this.Reminders.AddRange(GetRemindersFromDatabase());
     this.PopulateScreenWithReminders();
 }
Example #2
0
        private void DeleteLatestReminder()
        {
            // get the latest reminder from the database, since we need to cancel the scheduled toast for it
            Reminder latestReminder = StoredProcedures.QueryLatestReminder();

            AlarmAndReminderHelper.UnscheduleReminder(latestReminder);
            StoredProcedures.DeleteLatestReminder();
            // if we have a dynamic area, remove the children from it
            if (this.DynamicArea != null)
            {
                this.ShowMessage($"Deleted reminder {latestReminder.Title}");
            }
        }