diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json index 7bc366a..72f06a4 100644 --- a/.vs/VSWorkspaceState.json +++ b/.vs/VSWorkspaceState.json @@ -1,10 +1,11 @@ { "ExpandedNodes": [ "", + "\\Cuentas", "\\database", "\\Principal", "\\Ventas" ], - "SelectedNode": "\\Solution.sln", + "SelectedNode": "\\Cuentas\\cuentas.cs", "PreviewInSolutionExplorer": false } \ No newline at end of file diff --git a/.vs/compabetoOG/v17/.wsuo b/.vs/compabetoOG/v17/.wsuo index 84babba..857cf6a 100644 Binary files a/.vs/compabetoOG/v17/.wsuo and b/.vs/compabetoOG/v17/.wsuo differ diff --git a/bin/Debug/compabetov2.exe b/bin/Debug/compabetov2.exe index 9d161e8..114f5eb 100644 Binary files a/bin/Debug/compabetov2.exe and b/bin/Debug/compabetov2.exe differ diff --git a/bin/Debug/compabetov2.pdb b/bin/Debug/compabetov2.pdb index e83aba9..8f85e25 100644 Binary files a/bin/Debug/compabetov2.pdb and b/bin/Debug/compabetov2.pdb differ diff --git a/database/service.cs b/database/service.cs index bf92be7..4fb64c1 100644 --- a/database/service.cs +++ b/database/service.cs @@ -441,28 +441,36 @@ namespace compabetov2.database return resumen; } - public static List conseguirProductosFiltrados(string nombreProducto) { + public static List conseguirProductosFiltrados(string nombreProducto) + { List productos = new List(); 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> conseguirEnvioMes(DateTime fecha) { Dictionary> dic = new Dictionary>(); diff --git a/obj/Debug/compabetov2.csproj.AssemblyReference.cache b/obj/Debug/compabetov2.csproj.AssemblyReference.cache index e1562b1..9e7d08c 100644 Binary files a/obj/Debug/compabetov2.csproj.AssemblyReference.cache and b/obj/Debug/compabetov2.csproj.AssemblyReference.cache differ diff --git a/obj/Debug/compabetov2.csproj.CoreCompileInputs.cache b/obj/Debug/compabetov2.csproj.CoreCompileInputs.cache index f3a1c49..654a195 100644 --- a/obj/Debug/compabetov2.csproj.CoreCompileInputs.cache +++ b/obj/Debug/compabetov2.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -3f62af869539c2801b7da3577ef2feb00e7c32f1cefc777b57202fa5ad70cc96 +0aeb254002a0ce305fc1196d5eb6afeb21b30aa751f3290ac831261142a98d95 diff --git a/obj/Debug/compabetov2.csproj.GenerateResource.cache b/obj/Debug/compabetov2.csproj.GenerateResource.cache index ace18c5..96ec853 100644 Binary files a/obj/Debug/compabetov2.csproj.GenerateResource.cache and b/obj/Debug/compabetov2.csproj.GenerateResource.cache differ diff --git a/obj/Debug/compabetov2.exe b/obj/Debug/compabetov2.exe index 9d161e8..114f5eb 100644 Binary files a/obj/Debug/compabetov2.exe and b/obj/Debug/compabetov2.exe differ diff --git a/obj/Debug/compabetov2.pdb b/obj/Debug/compabetov2.pdb index e83aba9..8f85e25 100644 Binary files a/obj/Debug/compabetov2.pdb and b/obj/Debug/compabetov2.pdb differ