Example #1
0
        public ExportDataResult ExportSingleQueryOutput(ExportQuery exportQuery, ExportFileOptions exportFileOptions)
        {
            ExportDataResult exportResult = new ExportDataResult(exportQuery, null);

            // Log that validation has passed
            ExportDataTable _ExportDataTable = new ExportDataTable();

            _ExportDataTable.Table = SQLHelper.ExecuteDataTable(this.SQLConnectionString, exportQuery.SQLCommandText, out Exception outEx);

            exportResult.ExportError = outEx;
            // throw exception if we got one from SQL layer
            if (outEx == null)
            {
                // create a file and export it
                exportResult.ExportedFiles = CreateFiles(_ExportDataTable, exportQuery, exportFileOptions);
            }

            //ExportFileInfoList exportFileInfoList = new ExportFileInfoList(this.StagingUri, totalRows, export, exportFileOptions);
            return(exportResult);
        }
Example #2
0
 public ExportDataResult(ExportQuery exportQuery, ExportFileInfoList exportFileInfoList = null)
 {
     this.ExportedQuery = exportQuery ?? throw new ArgumentNullException("exportQuery", "Please provide a Query that was exported.");
     this.ExportedFiles = exportFileInfoList;
 }