public HttpResponseMessage ObtenerAcumuladoContingExcel(int anio1, int anio2, int valorK, string Nit, int idEmpresaUsuaria, int tipoContingenciaComparar) { HttpResponseMessage response = null; try { LNIndicadores logica = new LNIndicadores(); var archivo = logica.ObtenerExcelComparativo(anio1, anio2, valorK, Nit, idEmpresaUsuaria, tipoContingenciaComparar); if (archivo != null) { response = Request.CreateResponse <byte[]>(HttpStatusCode.OK, archivo); return(response); } else { response = Request.CreateResponse(HttpStatusCode.ExpectationFailed); return(response); } } catch (Exception ex) { response = Request.CreateResponse(HttpStatusCode.InternalServerError); return(response); } }
public HttpResponseMessage ObtenerIndicadoresPorPeriodoExcel(int anio, int valorK, string Nit, int idEmpresaUsuaria, int IdContingencia) { HttpResponseMessage response = null; try { LNIndicadores logica = new LNIndicadores(); var archivo = logica.IndicadoresPorPeriodoExcel(anio, valorK, Nit, idEmpresaUsuaria, IdContingencia); if (archivo != null) { response = Request.CreateResponse <byte[]>(HttpStatusCode.OK, archivo); return(response); } else { response = Request.CreateResponse(HttpStatusCode.ExpectationFailed); return(response); } } catch (Exception ex) { response = Request.CreateResponse(HttpStatusCode.InternalServerError); return(response); } }