public void CargarDatos(ProveedoresBL proveedoresBL)
        {
            // var bindingSoure = new BindingSource();
            // bindingSoure.DataSource = proveedoresBL.ListadeProveedores;


            var bindingSource = new BindingSource();

            bindingSource.DataSource =
                from x in proveedoresBL.ListadeProveedores
                select new
            {
                Foto     = x.Foto,
                Id       = x.Id,
                Nombre   = x.Nombre,
                Telefono = x.Telefono,
            };

            var reporte = new ReportedeProveedores();

            reporte.SetDataSource(bindingSource);

            crystalReportViewer1.ReportSource = reporte;
            crystalReportViewer1.RefreshReport();
        }
Exemple #2
0
        public void cargarDatos(ProveedoresBL proveedoresBL)
        {
            var bindingSource = new BindingSource();

            bindingSource.DataSource =
                from pr in proveedoresBL.ListadeProveedores

                select new
            {
                Id       = pr.Id,
                Nombre   = pr.Nombre,
                Telefono = pr.Telefono,
            };

            var reporte = new ReportedeProveedores();

            reporte.SetDataSource(bindingSource);

            crystalReportViewer1.ReportSource = reporte;
            crystalReportViewer1.RefreshReport();
        }