示例#1
0
        public IHttpActionResult GenerarReporteAdministrarCursos([FromUri] CursoByFiltersCursoQuery query)
        {
            query.VieneParaExcel = 1;
            var queryResult = _queryDispatcher.Dispatch <CursoByFiltersCursoQuery, CursoByFiltersCursoQueryResult>(query);

            ReporteConfigDto _config = ReportesConfiguracion.GetReporteConfig(TiposReporte.AdministrarCursos.Value);

            byte[] bytes = ReportViewerUtil.GenerateReport(_config, queryResult.CursosDto, null);
            return(GenerateExcelFromReportViewer(bytes, _config.OutputFileName + "." + _config.Format));
        }
示例#2
0
        public IHttpActionResult GetCursoByFilter([FromUri] CursoByFiltersCursoQuery query)
        {
            var queryResult = _queryDispatcher.Dispatch <CursoByFiltersCursoQuery, CursoByFiltersCursoQueryResult>(query);

            return(Ok(queryResult));
        }