cambios carlos
This commit is contained in:
@@ -1137,6 +1137,31 @@ namespace compabetov2.database
|
||||
}
|
||||
|
||||
|
||||
public static SQLiteDataReader filtrarVentaFechaMesDAO(DateTime fecha)
|
||||
{
|
||||
SQLiteDataReader reader = null;
|
||||
var db_conexion = new Conexion();
|
||||
try
|
||||
{
|
||||
SQLiteConnection conexion = db_conexion.get_connection();
|
||||
|
||||
conexion.Open();
|
||||
|
||||
string sql = "SELECT * FROM venta WHERE fecha LIKE '%@fecha%'";
|
||||
SQLiteCommand command = new SQLiteCommand(sql, conexion);
|
||||
command.Parameters.AddWithValue("@fecha", $"{fecha.Month}/{fecha.Year}");
|
||||
reader = command.ExecuteReader();
|
||||
|
||||
return reader;
|
||||
|
||||
}
|
||||
catch (SQLiteException ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message);
|
||||
return reader;
|
||||
}
|
||||
}
|
||||
|
||||
private static void crearDB()
|
||||
{
|
||||
var db_conexion = new Conexion();
|
||||
|
||||
Reference in New Issue
Block a user