/// <summary> /// 添加子节点或父节点 /// </summary> /// <param name="author"></param> /// <returns></returns> public ActionResult AddParentOrChildAuthor(Author author) { JsonResultData <string> resultdata = new JsonResultData <string>(); try { int result = authorservice.AddParentOrChildAuthor(author); if (result == 0) { resultdata.Code = 0; resultdata.Data = "添加失败!"; } else { resultdata.Code = 1; resultdata.Data = "添加成功!"; } } catch (Exception ex) { resultdata.Msg = ex.Message; } return(Json(resultdata, JsonRequestBehavior.AllowGet)); }