Ejemplo n.º 1
0
        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));
                }
            }
        }