Beispiel #1
0
 public frmInsertarLibroCompras(int idUser, int pkLibro)
 {
     InitializeComponent();
     this.Text     = "Actualizar Libro de Compras";
     user          = idUser;
     idLibro       = pkLibro;
     libro         = LibroComprasBLL.GetLibroComprasById(idLibro);
     txtMonth.Text = libro.txtMes;
     txtYear.Text  = libro.txtAño;
     cargarDatosTabla();
     gdDetalleLibroCompras.Refresh();
 }
Beispiel #2
0
        private void frmReporteLibroCompra_Load(object sender, EventArgs e)
        {
            ;
            // TODO: This line of code loads data into the 'detalleLibroComprasDS.DetalleLibroCompras' table. You can move, or remove it, as needed.
            libro = LibroComprasBLL.GetLibroComprasById(idLibro);
            List <DetalleLibroCompras> detalles = DetalleLibroComprasBLL.GetDetalleLibroComprasByIdLibro(libro.pkLibro);
            ReportDataSource           dt       = new ReportDataSource("LC", detalles);
            ReportParameter            pYear    = new ReportParameter("Year", libro.txtAño);
            ReportParameter            pMonth   = new ReportParameter("Month", libro.txtMes);

            this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { pYear });
            this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { pMonth });
            this.reportViewer1.LocalReport.DataSources.Clear();
            this.reportViewer1.LocalReport.DataSources.Add(dt);
            this.reportViewer1.RefreshReport();
        }