Ejemplo n.º 1
0
        private void DeleteNotification(long noteID)
        {
            ScheduledNotification schedulednotification = simpleNoteHelper.GetNotificationByNoteId(noteID);

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

            NotificationScheduler.DeleteScheduledNotification(schedulednotification.SchedulingId);
            databaseHelper.DeleteNotificationByNoteId(noteId);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }