Пример #1
0
 private void DeleteAlarm(Alarm AlarmToDelete)
 {
     StoredProcedures.DeleteAlarm(AlarmToDelete.AlarmID);
     // unschedule the alarm as well
     AlarmAndReminderHelper.UnscheduleAlarm(AlarmToDelete);
     // clear the list of reminders and re-populate them
     this.Alarms.Clear();
     this.Alarms.AddRange(GetAlarmsFromDatabase());
     this.PopulateScreenWithAlarms();
 }
Пример #2
0
        private void DeleteLatestAlarm()
        {
            // we need to unschedule the alarm toast
            Alarm latestAlarm = StoredProcedures.QueryLatestAlarm();

            AlarmAndReminderHelper.UnscheduleAlarm(latestAlarm);
            StoredProcedures.DeleteLatestAlarm();
            // if we have a dynamic area, remove the children from it
            if (this.DynamicArea != null)
            {
                this.ShowMessage("Alarm deleted.");
            }
        }