예제 #1
0
        private void crystalReportViewer1_Load(object sender, EventArgs e)
        {
            ReporteRecibo abrir = new ReporteRecibo();

            abrir.SetDataSource(datos);
            ReciboViewer.ReportSource = abrir;
            ReciboViewer.Refresh();
        }
        public async Task <IActionResult> Recibo(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }
            var pago = await _context.Pagos
                       .Include(p => p.Alumno)
                       .FirstOrDefaultAsync(p => p.PagoId == id);

            if (pago == null)
            {
                return(NotFound());
            }
            ReporteRecibo recibo = new ReporteRecibo(_env);

            return(File(recibo.imprimirRecibo(pago), "application/pdf"));
        }