Ejemplo n.º 1
0
        /// <summary>
        /// 调试(返回替换变量、组装后的sql)
        /// </summary>
        /// <returns></returns>
        public ActionResult GetDebugSql()
        {
            string sql = "";
            //获得参数
            string code        = Request["code"].Trim();
            string queryParams = Request["queryParams"];//查询条件

            EasyMan.Dtos.ErrorInfo err = new EasyMan.Dtos.ErrorInfo();
            err.IsError = false;

            //取消获取报表的语句。原因:既然能进这个页面肯定是已具有code代码
            //var report = _reportAppService.GetReport(code);
            //执行sql语句
            try
            {
                sql = _reportAppService.GetDebugSql(code, queryParams, ref err);
                if (err.IsError)
                {
                    throw new Exception(err.Message);
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(Content(sql));
        }