Пример #1
0
        private void consultar(object sender, EventArgs e)
        {
            helpers ayudante = new helpers();

            if (!ayudante.esFechaValida(txtFecha.Text))
            {
                MessageBox.Show("Fecha invalida!");
                return;
            }
            string sql = @"SELECT idFactura, importeTotal, ROUND(importeTotal * 0.21, 2) as idEmpleado, 
            ROUND(importeTotal * 0.79, 2) as tipoPago FROM ventas WHERE CONVERT(DATE, fechaHora) = '" + ayudante.insertarFechaConFormato(txtFecha.Text) + "';";

            ayudante.cargarReporte(sql, "DataSet1", informeDiarioGanan);
        }