示例#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);
 }