private void Filtrarbutton_Click(object sender, EventArgs e) { if (filtroComboBox.SelectedIndex == 0) { VentasdataGridView.DataSource = VentasBLL.GetLista(); } if (ValidarFiltrar()) { if (filtroComboBox.SelectedIndex == 1) { VentasdataGridView.DataSource = VentasBLL.GetLista(DesdeDateTimePicker.Value, HastadateTimePicker.Value); } if (filtroComboBox.SelectedIndex == 2) { VentasdataGridView.DataSource = VentasBLL.GetListaTipo(Utilidades.StringToInt(filtroTextBox.Text)); } if (filtroComboBox.SelectedIndex == 3) { VentasdataGridView.DataSource = VentasBLL.GetLista(Utilidades.StringToInt(filtroTextBox.Text)); } if (filtroComboBox.SelectedIndex == 4) { VentasdataGridView.DataSource = VentasBLL.GetListaDetalle(Utilidades.StringToInt(filtroComboBox.Text)); } } }
private void VentasReportViewer_Load(object sender, EventArgs e) { VentasRptViewer.Reset(); VentasRptViewer.ProcessingMode = ProcessingMode.Local; VentasRptViewer.LocalReport.ReportPath = @"E:\aplicada 1\ProyectoFinal\ProyectoFinal\ProyectoFinal\Reporte\ReporteVentas.rdlc"; ReportDataSource source = new ReportDataSource("DataSetVentas", VentasBLL.GetLista()); VentasRptViewer.LocalReport.DataSources.Add(source); this.VentasRptViewer.RefreshReport(); }
private void GuardarButton_Click(object sender, EventArgs e) { if (Validacion()) { LlenarClases(vent); if (VentasBLL.GetLista(Utilidades.StringToInt(ventaIdTextBox.Text)).Count() == 0) { VentasBLL.Insertar(vent); MessageBox.Show("Se guardo la venta realizada"); limpiar(); } else { VentasBLL.Modificar(Utilidades.StringToInt(ventaIdTextBox.Text), vent); MessageBox.Show("Se modifico la venta"); limpiar(); } } }
public void GetListaTest1() { Assert.IsNotNull(VentasBLL.GetLista().Count > 0); }