Пример #1
0
        /// <summary>
        /// 查询code得到结果集
        /// </summary>
        /// <returns></returns>
        public ActionResult TbQueryList()
        {
            string result = "";
            //获得参数
            string code        = Request["code"].Trim();
            int    rows        = Convert.ToInt32(Request["rows"].Trim());
            int    page        = Convert.ToInt32(Request["page"].Trim());
            string queryParams = Request["queryParams"]; //查询条件
            string sidx        = Request["sidx"];        //排序条件
            string sord        = Request["sord"];        //最后个字段排序方式

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

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