crud de variante en proceso

This commit is contained in:
Carlos Sandoval
2024-06-20 19:35:46 -06:00
parent 3671014cdc
commit ff714ef848
18 changed files with 354 additions and 71 deletions
+25
View File
@@ -1782,6 +1782,31 @@ namespace compabetov2.database
}
}
public static SQLiteDataReader conseguirVarianteDAO(int idProducto)
{
SQLiteDataReader reader = null;
var db_conexion = new Conexion();
try
{
SQLiteConnection conexion = db_conexion.get_connection();
conexion.Open();
string sql = "SELECT * FROM variantes WHERE fk_producto = @fk_producto";
SQLiteCommand command = new SQLiteCommand(sql, conexion);
command.Parameters.AddWithValue("@fk_producto", idProducto);
reader = command.ExecuteReader();
return reader;
}
catch (SQLiteException ex)
{
MessageBox.Show(ex.Message);
return reader;
}
}
public static SQLiteDataReader conseguirImportesDAO()
{
SQLiteDataReader reader = null;