示例#1
0
        public virtual PaginatedContentResult ProcessQuery(string requestId)
        {
            LazyInit();

            ValidateRequest(requestId);

            PrepareToGetData();

            var dataProvider = new AQSGetDataFromDatabase(_baseDao, _clearMetadataBeforeRun, _startDate, _endDate, _siteId,
                                                          _countyCode, _commaSeparatedActionCodes, !_includeRawResultsOnly,
                                                          _filterByImportedDate);

            AirQualitySubmissionType data = dataProvider.GetAirQualityData(this);

            data.Version = _aqsSchemaVersionType;

            AppendAuditLogEvent("Generating serialized xml results for query");

            _dataFilePath = AddExchangeDocumentHeader(data, true, _dataRequest.TransactionId);

            PaginatedContentResult result =
                new PaginatedContentResult(_dataRequest.RowIndex, _dataRequest.MaxRowCount, true, CommonContentType.ZIP,
                                           File.ReadAllBytes(_dataFilePath));

            return(result);
        }
示例#2
0
        public virtual void ProcessSolicit(string requestId)
        {
            LazyInit();

            ValidateRequest(requestId);

            PrepareToGetData();

            var dataProvider = new AQSGetDataFromDatabase(_baseDao, _clearMetadataBeforeRun, _startDate, _endDate, _siteId,
                                                          _countyCode, _commaSeparatedActionCodes, !_includeRawResultsOnly,
                                                          _filterByImportedDate);

            AirQualitySubmissionType data = dataProvider.GetAirQualityData(this);

            data.Version = _aqsSchemaVersionType;

            AppendAuditLogEvent("Generating submission file from results");

            _dataFilePath = AddExchangeDocumentHeader(data, true, _dataRequest.TransactionId);
        }