Bajo Cambios 625

This commit is contained in:
Michael Robles
2024-02-03 06:25:18 -07:00
parent 664ed80cf2
commit 07b36fbb3c
10 changed files with 20 additions and 11 deletions
+2 -1
View File
@@ -1,10 +1,11 @@
{ {
"ExpandedNodes": [ "ExpandedNodes": [
"", "",
"\\Cuentas",
"\\database", "\\database",
"\\Principal", "\\Principal",
"\\Ventas" "\\Ventas"
], ],
"SelectedNode": "\\Solution.sln", "SelectedNode": "\\Cuentas\\cuentas.cs",
"PreviewInSolutionExplorer": false "PreviewInSolutionExplorer": false
} }
Binary file not shown.
Binary file not shown.
Binary file not shown.
+16 -8
View File
@@ -441,28 +441,36 @@ namespace compabetov2.database
return resumen; return resumen;
} }
public static List<Producto> conseguirProductosFiltrados(string nombreProducto) { public static List<Producto> conseguirProductosFiltrados(string nombreProducto)
{
List<Producto> productos = new List<Producto>(); List<Producto> productos = new List<Producto>();
SQLiteDataReader reader = DAO.conseguirProductosFiltradosDAO(nombreProducto); 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()) while (reader.Read())
{ {
Producto producto = new Producto( Producto producto = new Producto(
int.Parse(reader["idproducto"].ToString()), reader.GetInt32(idIndex),
reader["nombre"].ToString(), reader.GetString(nombreIndex),
reader["descripcion"].ToString(), reader.GetString(descripcionIndex),
decimal.Parse(reader["precio"].ToString()), reader.GetDecimal(precioIndex),
reader["img"].ToString(), reader.GetString(imgIndex),
int.Parse(reader["stock"].ToString()) reader.GetInt32(stockIndex)
); );
productos.Add(producto); productos.Add(producto);
} }
return productos; return productos;
} }
public static Dictionary<string, List<Envio>> conseguirEnvioMes(DateTime fecha) public static Dictionary<string, List<Envio>> conseguirEnvioMes(DateTime fecha)
{ {
Dictionary<string, List<Envio>> dic = new Dictionary<string, List<Envio>>(); Dictionary<string, List<Envio>> dic = new Dictionary<string, List<Envio>>();
Binary file not shown.
@@ -1 +1 @@
3f62af869539c2801b7da3577ef2feb00e7c32f1cefc777b57202fa5ad70cc96 0aeb254002a0ce305fc1196d5eb6afeb21b30aa751f3290ac831261142a98d95
Binary file not shown.
Binary file not shown.
Binary file not shown.