private void DeleteNotification(long noteID) { ScheduledNotification schedulednotification = simpleNoteHelper.GetNotificationByNoteId(noteID); NotificationScheduler.DeleteScheduledNotification(schedulednotification.SchedulingId); simpleNoteHelper.DeleteNotificationByNoteId(noteID); }
public void DeleteNotification(long noteId) { ScheduledNotification schedulednotification = databaseHelper.GetNotificationByNoteId(noteId); NotificationScheduler.DeleteScheduledNotification(schedulednotification.SchedulingId); databaseHelper.DeleteNotificationByNoteId(noteId); }
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); }
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); }
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); }
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); }
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); }
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); }