crud de variante en proceso
This commit is contained in:
@@ -574,6 +574,35 @@ namespace compabetov2.database
|
||||
return variantes;
|
||||
}
|
||||
|
||||
public static List<Variante> conseguirVariante(int idProducto)
|
||||
{
|
||||
List<Variante> variantes = new List<Variante>();
|
||||
SQLiteDataReader reader = DAO.conseguirVarianteDAO(idProducto);
|
||||
|
||||
while (reader.Read())
|
||||
{
|
||||
int idVariante = (int)reader.GetInt64(0);
|
||||
string nombre = reader.GetString(1);
|
||||
decimal precio = reader.GetDecimal(2);
|
||||
int cantidad = (int)reader.GetInt64(3);
|
||||
string img = reader.GetString(4);
|
||||
int fkProducto = (int)reader.GetInt64(5);
|
||||
decimal precioCompra = reader.GetDecimal(6);
|
||||
|
||||
variantes.Add(new Variante(
|
||||
idVariante,
|
||||
nombre,
|
||||
precio,
|
||||
cantidad,
|
||||
img,
|
||||
fkProducto,
|
||||
precioCompra
|
||||
));
|
||||
}
|
||||
|
||||
return variantes;
|
||||
}
|
||||
|
||||
public static List<ImporteModel> conseguirImportes()
|
||||
{
|
||||
List<ImporteModel> importes = new List<ImporteModel>();
|
||||
|
||||
Reference in New Issue
Block a user