예제 #1
0
        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);
        }
예제 #2
0
 void view_onNoteDeleted(object sender, NoteApp.Core.Model.Entity.Note e)
 {
     model.noteService.delete(e.Id);
 }
예제 #3
0
 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);
 }