void view_onNoteCreated(object sender, NoteApp.Core.Model.Entity.Note e) { if (e.Notebook != null) { e.NotebookId = e.Notebook.Id; e.Notebook = null; } if (String.IsNullOrEmpty(e.Id)) { e.Id = e.NotebookId + e.created; } model.noteService.add(e); e.Notebook = model.bookService.get(e.NotebookId); }
void view_onNoteDeleted(object sender, NoteApp.Core.Model.Entity.Note e) { model.noteService.delete(e.Id); }
void view_onNoteUpdated(object sender, NoteApp.Core.Model.Entity.Note e) { e.Notebook = null; model.noteService.update(e); e.Notebook = model.bookService.get(e.NotebookId); }