public static bool NoteCreate(int notebookid, string notebookpass, string notename, int type, string notedate, ref int noteid) { var input = new NoteCreateInput() { NotebookId = notebookid, NotebookPass = notebookpass, NoteName = notename, NoteType = type, NoteData = notedate, }; var json = JsonConvert.SerializeObject(input); string output = null; try { output = HttpReader.HttpPost(ApiDef.NoteCreate, json); } catch (AggregateException) { return(false); } var result = JsonConvert.DeserializeObject <NoteCreateOutput>(output); var issuccess = ResultStatus.IsSuccess(result.ResultStatus); if (issuccess) { noteid = result.NoteId; } return(issuccess); }
public static int CreateNote(int notebookid, string notebookpass, string notename, int type, string notedate) { var notecreateinput = new NoteCreateInput() { NotebookId = notebookid, NotebookPass = notebookpass, NoteName = notename, NoteType = type, NoteData = notedate, }; var output = notemodule.OnNoteCreate(JsonConvert.SerializeObject(notecreateinput)); var usercreateoutput = JsonConvert.DeserializeObject <NoteCreateOutput>(output); return(usercreateoutput.NoteId); }