Ejemplo n.º 1
0
        public DataTable InformeVentas(string[] str)
        {
            string    proc = "spInformVentas";
            DataTable tabla;

            MySqlDataAdapter p  = new MySqlDataAdapter(proc, ConexionDB.AbrirConexion());
            DataTable        dt = new DataTable();

            p.SelectCommand.CommandType = CommandType.StoredProcedure;
            p.SelectCommand.Parameters.Add("@fromDate", MySqlDbType.Date).Value = Convert.ToDateTime(str[0]);
            p.SelectCommand.Parameters.Add("@toDate", MySqlDbType.Date).Value   = Convert.ToDateTime(str[1]);

            p.Fill(dt);
            tabla = dt;
            p.Dispose();

            ConexionDB.CerrarConexion();
            return(tabla);
        }