public ContentResult GetData(int page, int rows) { var funame = Request.QueryString["funame"]; var tblname = Request.QueryString["tablename"]; var output = SqliteReadTable.read(funame, tblname, page, rows); //用Content的方式把Json 字符串返回,否则双引号会被转义 return(Content(output, "text/html")); }
//查询RFC函数列表 public ContentResult getFuncList(string funcname) { try { var output = SqliteReadTable.GetRFCList(targetSystem, funcname); if (string.IsNullOrEmpty(output)) { if (funcname.Length >= 3) { SAPFunction.GetRFCfunctionListAndSaveToDb(targetSystem, funcname); output = SqliteReadTable.GetRFCList(targetSystem, funcname); } } // output = "{" + output + "}"; return(Content(output, "text/html")); } catch (Exception ex) { var message = JsonConvert.SerializeObject(ex.Message); message = "{error:" + message + "}"; return(Content(message, "text/html")); } }