Bajo Cambios 625
This commit is contained in:
+17
-9
@@ -441,28 +441,36 @@ namespace compabetov2.database
|
||||
return resumen;
|
||||
}
|
||||
|
||||
public static List<Producto> conseguirProductosFiltrados(string nombreProducto) {
|
||||
public static List<Producto> conseguirProductosFiltrados(string nombreProducto)
|
||||
{
|
||||
List<Producto> productos = new List<Producto>();
|
||||
SQLiteDataReader reader = DAO.conseguirProductosFiltradosDAO(nombreProducto);
|
||||
|
||||
int idIndex = reader.GetOrdinal("idproducto");
|
||||
int nombreIndex = reader.GetOrdinal("nombre");
|
||||
int descripcionIndex = reader.GetOrdinal("descripcion");
|
||||
int precioIndex = reader.GetOrdinal("precio");
|
||||
int imgIndex = reader.GetOrdinal("img");
|
||||
int stockIndex = reader.GetOrdinal("stock");
|
||||
|
||||
while (reader.Read())
|
||||
{
|
||||
Producto producto = new Producto(
|
||||
int.Parse(reader["idproducto"].ToString()),
|
||||
reader["nombre"].ToString(),
|
||||
reader["descripcion"].ToString(),
|
||||
decimal.Parse(reader["precio"].ToString()),
|
||||
reader["img"].ToString(),
|
||||
int.Parse(reader["stock"].ToString())
|
||||
);
|
||||
reader.GetInt32(idIndex),
|
||||
reader.GetString(nombreIndex),
|
||||
reader.GetString(descripcionIndex),
|
||||
reader.GetDecimal(precioIndex),
|
||||
reader.GetString(imgIndex),
|
||||
reader.GetInt32(stockIndex)
|
||||
);
|
||||
|
||||
|
||||
productos.Add(producto);
|
||||
}
|
||||
|
||||
return productos;
|
||||
}
|
||||
|
||||
|
||||
public static Dictionary<string, List<Envio>> conseguirEnvioMes(DateTime fecha)
|
||||
{
|
||||
Dictionary<string, List<Envio>> dic = new Dictionary<string, List<Envio>>();
|
||||
|
||||
Reference in New Issue
Block a user