protected void Report_Execution(object sender, DirectEventArgs e)
        {
            string formatoSalida = "";

            try
            {
                ReporteLogic reporteLogic = new ReporteLogic();

                List <reporte_hojas_de_liquidacion> ReporteDetalleDeHojasDeLiquidacionLst = reporteLogic.GetDetalleHojasDeLiquidacion
                                                                                                (this.f_SOCIOS_ID.Text,
                                                                                                string.IsNullOrEmpty(this.f_CLASIFICACIONES_CAFE_ID.Text) ? 0 : Convert.ToInt32(this.f_CLASIFICACIONES_CAFE_ID.Text),
                                                                                                this.f_FECHA.Text,
                                                                                                this.f_DATE_FROM.SelectedDate,
                                                                                                this.f_DATE_TO.SelectedDate);

                ReportDataSource datasourceDetalleDeHojasDeLiquidacion = new ReportDataSource("HojaDeLiquidacionDataSet", ReporteDetalleDeHojasDeLiquidacionLst);

                ReportParameterCollection reportParamCollection = new ReportParameterCollection();
                reportParamCollection.Add(new ReportParameter("parGroupBySocios", this.g_SOCIOS_ID.Checked.ToString()));
                reportParamCollection.Add(new ReportParameter("parGroupByClasificacionCafe", this.g_CLASIFICACIONES_CAFE_ID.Checked.ToString()));
                reportParamCollection.Add(new ReportParameter("parGroupByFecha", this.g_FECHA.Checked.ToString()));
                reportParamCollection.Add(new ReportParameter("parMostrarQuintales", this.p_QUINTALES.Checked.ToString()));

                formatoSalida = this.f_SALIDA_FORMATO.Text;

                string rdlPath = "~/resources/rdlcs/ReporteHojasDeLiquidacion.rdlc";

                this.CreateFileOutput("ReporteDeHojasDeLiquidacion", formatoSalida, rdlPath, datasourceDetalleDeHojasDeLiquidacion, reportParamCollection);
            }
            catch (Exception ex)
            {
                log.Fatal(string.Format("Error fatal al generar reporte. Formato de salida: {0}", formatoSalida), ex);
                throw;
            }
        }
        public ActionResult DownloadRelacionPropietario(Int32 EdificioId)
        {
            try
            {
                var          edificio     = context.Edificio.FirstOrDefault(x => x.EdificioId == EdificioId);
                ReporteLogic reporteLogic = new ReporteLogic();
                reporteLogic.Server  = Server;
                reporteLogic.context = context;

                MemoryStream outputMemoryStream = reporteLogic.GetReportRelacionPropietario(EdificioId, edificio.Nombre);
                //reporteLogic.GetReport(c, fechaEmision.Value, fechaVencimiento.Value, presupuestoMes, totalM2);

                //MemoryStream outputMemoryStream = reporteLogic.getFirstReport();
                if (outputMemoryStream == null)
                {
                    PostMessage(MessageType.Error, "Ocurrió un error. Por favor inténtelo más tarde");
                    return(RedirectToAction("LstDepartamento", new { EdificioId = EdificioId }));
                }

                return(File(outputMemoryStream, "application/octet-stream", "Relacion de Propietarios - " + edificio.Nombre + ".zip"));
            }
            catch (Exception ex)
            {
                PostMessage(MessageType.Error, "Ocurrió un error. Por favor inténtelo más tarde");
                return(RedirectToAction("LstDepartamento", new { EdificioId = EdificioId }));
            }
        }
Exemple #3
0
        protected void Report_Execution(object sender, DirectEventArgs e)
        {
            string formatoSalida = "";

            try
            {
                ReporteLogic reporteLogic = new ReporteLogic();

                int prestamos_id = string.IsNullOrEmpty(this.f_PRESTAMOS_ID.Text) ? 0 : Convert.ToInt32(this.f_PRESTAMOS_ID.Text);

                List <solicitud_prestamo> ReportePrestamosXSociosLst = reporteLogic.GetPrestamosXSocio
                                                                           (this.f_SOCIOS_ID.Text,
                                                                           prestamos_id);

                ReportDataSource datasourceMovimientoInventarioCafeSocios = new ReportDataSource("PrestamosXSocioDataSet", ReportePrestamosXSociosLst);


                ReportParameterCollection reportParamCollection = new ReportParameterCollection();
                reportParamCollection.Add(new ReportParameter("parGroupBySocios", this.g_SOCIOS_ID.Checked.ToString()));
                reportParamCollection.Add(new ReportParameter("parGroupByPrestamo", this.g_PRESTAMOS_ID.Checked.ToString()));

                formatoSalida = this.f_SALIDA_FORMATO.Text;

                string rdlPath = "~/resources/rdlcs/ReportePrestamosPorSocios.rdlc";

                this.CreateFileOutput("ReportePrestamosPorSocios", formatoSalida, rdlPath, datasourceMovimientoInventarioCafeSocios, reportParamCollection);
            }
            catch (Exception ex)
            {
                log.Fatal(string.Format("Error fatal al generar reporte. Formato de salida: {0}", formatoSalida), ex);
                throw;
            }
        }
Exemple #4
0
        public void cargarGrilla()
        {
            List <ReporteCurso> reporteCurso = new List <ReporteCurso>();
            ReporteLogic        repLog       = new ReporteLogic();

            reporteCurso = repLog.GetAllReporteCurso(Id_Curso);
            this.dgvReporteCurso.DataSource = reporteCurso;
        }
Exemple #5
0
        public void cargarGrilla()
        {
            List <ReportePlan> reportePlanes = new List <ReportePlan>();
            ReporteLogic       repLog        = new ReporteLogic();

            reportePlanes             = repLog.GetAllReportePlan();
            this.dgvPlanes.DataSource = reportePlanes;
        }
Exemple #6
0
        //Bajo el URL: https://localhost:44381/getReporte cualquiera registrado como admi puede obtener un reporte de: los platillos con mejor feedback,
        //los mas vendidos, los clientes mas fieles y los platillos que mas ganancias han dejado de entre los vendidos
        public HttpResponseMessage GetReporte()
        {
            ReporteLogic reporteBL = new ReporteLogic();
            Reporte      reporte   = reporteBL.GetReporte();


            return(Request.CreateResponse(HttpStatusCode.OK, reporte));
        }
Exemple #7
0
        protected void ReportViewer1_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
        {
            try
            {
                ReporteLogic rpt = new ReporteLogic();

                List <nota_detalle> detallesLst = rpt.GetNotasDetalle(NOTAS_ID);

                ReportDataSource dataSource = new ReportDataSource("NotasDetalleDataSet", detallesLst);
                e.DataSources.Add(dataSource);
            }
            catch (Exception ex)
            {
                log.Fatal("Error fatal al cargar subreporte de detalles de notas de peso.", ex);
                throw;
            }
        }
Exemple #8
0
        protected void ReportViewer1_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
        {
            try
            {
                ReporteLogic rpt = new ReporteLogic();

                List <beneficiario_x_socio> beneficiariosLst = rpt.GetBeneficiariosDeSocio(SOCIOS_ID);

                ReportDataSource dataSource = new ReportDataSource("BeneficiariosDataSet", beneficiariosLst);
                e.DataSources.Add(dataSource);
            }
            catch (Exception ex)
            {
                log.Fatal("Error fatal al cargar subreporte de beneficiarios de socio.", ex);
                throw;
            }
        }
Exemple #9
0
        protected void Report_Execution(object sender, DirectEventArgs e)
        {
            string formatoSalida = "";

            try
            {
                ReporteLogic reporteLogic = new ReporteLogic();

                List <reporte_movimientos_de_inventario_de_cafe_de_socios> ReporteMovimientosInventarioDeCafeDeSociosLst = reporteLogic.GetMovimientosInventarioDeCafeDeSocios
                                                                                                                               (this.f_SOCIOS_ID.Text,
                                                                                                                               string.IsNullOrEmpty(this.f_CLASIFICACIONES_CAFE_ID.Text) ? 0 : Convert.ToInt32(this.f_CLASIFICACIONES_CAFE_ID.Text),
                                                                                                                               this.f_DESCRIPCION.Text,
                                                                                                                               this.f_FECHA.Text,
                                                                                                                               this.f_DATE_FROM.SelectedDate,
                                                                                                                               this.f_DATE_TO.SelectedDate,
                                                                                                                               this.f_CREADO_POR.Text,
                                                                                                                               this.f_FECHA_CREACION.SelectedDate);

                ReportDataSource datasourceMovimientoInventarioCafeSocios = new ReportDataSource("MovimientosInventarioDeCafeDeSociosDataSet", ReporteMovimientosInventarioDeCafeDeSociosLst);

                ReportParameterCollection reportParamCollection = new ReportParameterCollection();
                reportParamCollection.Add(new ReportParameter("parGroupBySocios", this.g_SOCIOS_ID.Checked.ToString()));
                reportParamCollection.Add(new ReportParameter("parGroupByClasificacionCafe", this.g_CLASIFICACIONES_CAFE_ID.Checked.ToString()));
                reportParamCollection.Add(new ReportParameter("parGroupByDescripcion", this.g_DESCRIPCION.Checked.ToString()));
                reportParamCollection.Add(new ReportParameter("parGroupByFecha", this.g_FECHA.Checked.ToString()));
                reportParamCollection.Add(new ReportParameter("parGroupByCreadoPor", this.g_CREADO_POR.Checked.ToString()));
                reportParamCollection.Add(new ReportParameter("parGroupByFechaCreacion", this.g_FECHA_CREACION.Checked.ToString()));
                reportParamCollection.Add(new ReportParameter("parMostrarQuintales", this.p_QUINTALES.Checked.ToString()));

                formatoSalida = this.f_SALIDA_FORMATO.Text;

                string rdlPath = "~/resources/rdlcs/ReporteMovimientosDeInventarioDeCafeDeSocios.rdlc";

                this.CreateFileOutput("ReporteMovimientosInventarioDeCafeDeSocios", formatoSalida, rdlPath, datasourceMovimientoInventarioCafeSocios, reportParamCollection);
            }
            catch (Exception ex)
            {
                log.Fatal(string.Format("Error fatal al generar reporte. Formato de salida: {0}", formatoSalida), ex);
                throw;
            }
        }
        public ActionResult ExportPlanillaMensual(Int32 UnidadTiempoId, Int32 EdificioId)
        {
            try
            {
                ReporteLogic reportLogic = new ReporteLogic();
                reportLogic.Server  = Server;
                reportLogic.context = context;

                List <Planilla> lista        = context.Planilla.Where(x => x.UnidadTiempoId == UnidadTiempoId && x.Trabajador.EdificioId == EdificioId).ToList();
                UnidadTiempo    unidadTiempo = context.UnidadTiempo.Find(UnidadTiempoId);
                Edificio        edificio     = context.Edificio.Find(EdificioId);
                String          Titulo       = "REPORTE MENSUAL - " + edificio.Nombre + " - " + unidadTiempo.Descripcion;

                MemoryStream outputMemoryStream = reportLogic.GetReportMensual(Titulo, lista);
                return(File(outputMemoryStream, "application/vnd.ms-excel", Titulo + ".xls"));
            }
            catch (Exception ex)
            {
                PostMessage(MessageType.Error, "Ocurrió un error, por favor inténtelo más tarde");
                return(RedirectToAction("EditPlanilla", new { EdificioId = EdificioId, UnidadTiempoId = UnidadTiempoId }));
            }
        }
        protected void Report_Execution(object sender, DirectEventArgs e)
        {
            string formatoSalida = "";

            try
            {
                ReporteLogic reporteLogic = new ReporteLogic();

                List <reporte_detalle_de_aportaciones_por_socio> ReporteDetalleAportacionesXSocioLst = reporteLogic.GetDetalleAportacionesPorSocio
                                                                                                           (this.f_SOCIOS_ID.Text,
                                                                                                           this.f_DESCRIPCION.Text,
                                                                                                           this.f_FECHA.Text,
                                                                                                           this.f_DATE_FROM.SelectedDate,
                                                                                                           this.f_DATE_TO.SelectedDate,
                                                                                                           this.f_CREADO_POR.Text,
                                                                                                           this.f_FECHA_CREACION.SelectedDate);

                ReportDataSource datasourceDetalleAportacionesXSocio = new ReportDataSource("DetalleAportacionesPorSocioDataSet", ReporteDetalleAportacionesXSocioLst);

                ReportParameterCollection reportParamCollection = new ReportParameterCollection();
                reportParamCollection.Add(new ReportParameter("parGroupBySocios", this.g_SOCIOS_ID.Checked.ToString()));
                reportParamCollection.Add(new ReportParameter("parGroupByDescripcion", this.g_DESCRIPCION.Checked.ToString()));
                reportParamCollection.Add(new ReportParameter("parGroupByFecha", this.g_FECHA.Checked.ToString()));
                reportParamCollection.Add(new ReportParameter("parGroupByCreadoPor", this.g_CREADO_POR.Checked.ToString()));
                reportParamCollection.Add(new ReportParameter("parGroupByFechaCreacion", this.g_FECHA_CREACION.Checked.ToString()));

                formatoSalida = this.f_SALIDA_FORMATO.Text;

                string rdlPath = "~/resources/rdlcs/ReporteDetalleDeAportacionesPorSocio.rdlc";

                this.CreateFileOutput("ReporteDetalleAportacionesPorSocio", formatoSalida, rdlPath, datasourceDetalleAportacionesXSocio, reportParamCollection);
            }
            catch (Exception ex)
            {
                log.Fatal(string.Format("Error fatal al generar reporte. Formato de salida: {0}", formatoSalida), ex);
                throw;
            }
        }
        protected void ReportViewer1_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
        {
            try
            {
                ReporteLogic rpt = new ReporteLogic();

                List <referencia_x_solicitud> referenciasPersonalesLst = rpt.GetReferenciasXSolicitud(SOLICITUDES_ID, "Personal");
                List <referencia_x_solicitud> refrenciasComercialesLst = rpt.GetReferenciasXSolicitud(SOLICITUDES_ID, "Comercial");
                List <aval_x_solicitud>       avaleslst = rpt.GetAvalesXSolicitud(SOLICITUDES_ID);

                ReportDataSource dataSourceReferenciasPersonales  = new ReportDataSource("ReferenciasPersonalesDataSet", referenciasPersonalesLst);
                ReportDataSource dataSourceReferenciasComerciales = new ReportDataSource("ReferenciasComercialesDataSet", refrenciasComercialesLst);
                ReportDataSource dataSourceAvales = new ReportDataSource("AvalesDataSet", avaleslst);

                e.DataSources.Add(dataSourceReferenciasPersonales);
                e.DataSources.Add(dataSourceReferenciasComerciales);
                e.DataSources.Add(dataSourceAvales);
            }
            catch (Exception ex)
            {
                log.Fatal("Error fatal al cargar subreporte de referencias, avales de solicitud de prestamo.", ex);
                throw;
            }
        }