public void loadData(clsReporteLB[] Data, clsvwlibrodiario[] listaReporte) { try { this.DataSource = Data; frmlibrodiario f = new frmlibrodiario(); this.txtfechaini.Text = lbfechaini1.ToString() ; // Convert.ToString(f.lbfechaini1); this.txtfechafin.Text = lbfechafin1.ToString(); // Convert.ToString(f.lbfechaini1); f.gridControl1.DataSource = listaReporte; } catch (Exception ex) { } }
private void btnGenerar_Click_1(object sender, EventArgs e) { clsDatoLibroDiario clas = new clsDatoLibroDiario(); rptLibroDiario reprt = new rptLibroDiario(); clsReporteLB rpt = new clsReporteLB(); // Asigno la fecha para el reporte frmlibrodiario ld = new frmlibrodiario(); reprt.lbfechaini1 = lbfechaini1; reprt.lbfechafin1 = lbfechafin1; rpt.lista = clas.Consulta(lbfechaini1, lbfechafin1); List<clsReporteLB> listareport = new List<clsReporteLB>(); listareport.Add(rpt); reprt.loadData(listareport.ToArray(), rpt.lista.ToArray()); reprt.ShowPreview(); }
private void btnGenerar_Click(object sender, EventArgs e) { if (rdlibrodiario.Checked) { frmlibrodiario ld = new frmlibrodiario(); ld.lbfechaini1 = this.dateDesde.DateTime.Date; //dateDesde.DateTime.Date; ld.lbfechafin1 = this.dateHasta.DateTime.Date; ld.ShowDialog(); } else { frmEstadoResultado frm = new frmEstadoResultado(); frm.ShowDialog(); } }