コード例 #1
0
ファイル: DbReportData.cs プロジェクト: zhouyb1/BeiJing_MES
        //根据查询SQL,产生提供给报表生成需要的 XML 数据,字段值为空也产生数据
        public static void FullGenNodeXmlData(HttpResponse Response, string QuerySQL, bool ToCompress)
        {
            MyDbCommand    ReportDataCommand = new MyDbCommand(QuerySQL, ReportConn);
            MyDbDataReader ReportDataReader  = ReportDataCommand.ExecuteReader();
            string         Text = XMLReportData.FromDataReader(ReportDataReader);

            GridReportDataResponse.Response(Response, Text, ToCompress ? ResponseDataType.ZipBinary : ResponseDataType.PlainText);
        }
コード例 #2
0
ファイル: DbReportData.cs プロジェクト: zhouyb1/BeiJing_MES
        //获取 Count(*) SQL 查询到的数据行数。参数 QuerySQL 指定获取报表数据的查询SQL
        public static int BatchGetDataCount(string QuerySQL)
        {
            int Total = 0;

            MyDbCommand    ReportDataCommand = new MyDbCommand(QuerySQL, ReportConn);
            MyDbDataReader ReportDataReader  = ReportDataCommand.ExecuteReader();

            if (ReportDataReader.Read())
            {
                Total = ReportDataReader.GetInt32(0);
            }

            return(Total);
        }