예제 #1
0
        private void DeleteNotification(long noteID)
        {
            ScheduledNotification schedulednotification = simpleNoteHelper.GetNotificationByNoteId(noteID);

            NotificationScheduler.DeleteScheduledNotification(schedulednotification.SchedulingId);
            simpleNoteHelper.DeleteNotificationByNoteId(noteID);
        }
예제 #2
0
        public void DeleteNotification(long noteId)
        {
            ScheduledNotification schedulednotification = databaseHelper.GetNotificationByNoteId(noteId);

            NotificationScheduler.DeleteScheduledNotification(schedulednotification.SchedulingId);
            databaseHelper.DeleteNotificationByNoteId(noteId);
        }
예제 #3
0
        public void UpdateNote(long id, string title, string content)
        {
            ScheduledNotification notification;

            if ((notification = simpleNoteHelper.GetNotificationByNoteId(id)) != null)
            {
                Debug.WriteLine("Deleting scheduled notification");
                NotificationScheduler.DeleteScheduledNotification(notification.SchedulingId);
            }
            simpleNoteHelper.UpdateNoteAndDeleteNotification(id, title, content);
        }
예제 #4
0
        public void UpdateNote(long id, string title, ObservableCollection <TodoNote.TodoEntry> entries)
        {
            ScheduledNotification notification;

            if ((notification = databaseHelper.GetNotificationByNoteId(id)) != null)
            {
                Debug.WriteLine("Deleting scheduled notification");
                NotificationScheduler.DeleteScheduledNotification(notification.SchedulingId);
            }
            databaseHelper.UpdateNoteAndDeleteNotification(id, title, entries);
        }
예제 #5
0
        public void DeleteNote(long id)
        {
            ScheduledNotification notification;

            if ((notification = databaseHelper.GetNotificationByNoteId(id)) != null)
            {
                Debug.WriteLine("Deleting scheduled notification");
                NotificationScheduler.DeleteScheduledNotification(notification.SchedulingId);
            }
            databaseHelper.DeleteNote(id);
        }
예제 #6
0
        public void UpdateNoteAndNotification(long id, string title, string content, string notificationTitle, DateTimeOffset dateTime)
        {
            ScheduledNotification notification;

            if ((notification = simpleNoteHelper.GetNotificationByNoteId(id)) != null)
            {
                Debug.WriteLine("Deleting scheduled notification");
                NotificationScheduler.DeleteScheduledNotification(notification.SchedulingId);
            }
            string notificationId = ScheduleNotification(notificationTitle, dateTime);

            simpleNoteHelper.UpdateNoteAndNotification(id, title, content, notificationId, dateTime);
        }
예제 #7
0
        public void UpdateNote(long id, string title, string photoPath, string content)
        {
            PhotoNote             photoNote    = databaseHelper.GetNoteById(id) as PhotoNote;
            ScheduledNotification notification = photoNote.ScheduledNotification;

            if (notification != null)
            {
                Debug.WriteLine("Deleting scheduled notification");
                NotificationScheduler.DeleteScheduledNotification(notification.SchedulingId);
            }
            if (photoNote.PhotoPath != photoPath)
            {
                DeleteImageFromLocalFolder(photoNote.PhotoPath);
            }
            databaseHelper.UpdateNoteAndDeleteNotification(id, title, content, photoPath);
        }
예제 #8
0
        public void UpdateNoteAndNotification(long id, string title, string photoPath, string content, string notificationTitle, DateTimeOffset dateTime)
        {
            ScheduledNotification notification;

            if ((notification = databaseHelper.GetNotificationByNoteId(id)) != null)
            {
                Debug.WriteLine("Deleting scheduled notification");
                NotificationScheduler.DeleteScheduledNotification(notification.SchedulingId);
            }
            PhotoNote photoNote = databaseHelper.GetNoteById(id) as PhotoNote;

            if (photoNote.PhotoPath != photoPath)
            {
                DeleteImageFromLocalFolder(photoNote.PhotoPath);
            }
            string schedulingId = ScheduleNotification(notificationTitle, dateTime);

            databaseHelper.UpdateNoteAndNotification(id, title, content, photoPath, schedulingId, dateTime);
        }