public static int CreateNotebook(string username, string userpass, string notebookname, string notebookpass) { var notebookcreateinput = new NotebookCreateInput() { UserName = username, UserPass = userpass, NotebookName = notebookname, NotebookPass = notebookpass, }; var output = notebookmodule.OnNotebookCreate(JsonConvert.SerializeObject(notebookcreateinput)); var notebookcreateoutput = JsonConvert.DeserializeObject<NotebookCreateOutput>(output); return notebookcreateoutput.NotebookId; }
public static bool NotebookCreate(string username, string userpass, string notebookname, string notebookpass, ref int id) { var input = new NotebookCreateInput() { UserName = username, UserPass = userpass, NotebookName = notebookname, NotebookPass = notebookpass, }; var json = JsonConvert.SerializeObject(input); var output = HttpReader.HttpPost(ApiDef.NotebookCreate, json); var result = JsonConvert.DeserializeObject<NotebookCreateOutput>(output); var issuccess = ResultStatus.IsSuccess(result.ResultStatus); if (issuccess) { id = result.NotebookId; } return issuccess; }