diff --git a/Controladora/ControladoraFacturas.cs b/Controladora/ControladoraFacturas.cs index ce68e52..201339a 100644 --- a/Controladora/ControladoraFacturas.cs +++ b/Controladora/ControladoraFacturas.cs @@ -57,6 +57,14 @@ namespace Controladora { return RepositorioFactura.Instance.Listar(); } + + public ReadOnlyCollection ListarDetallesFactura(Factura factura) + { + Factura facturaalistar = ControladoraFacturas.Instance.Listar().First(x => x.Id == factura.Id); + if (facturaalistar == null) return new ReadOnlyCollection(new List()); + return facturaalistar.MostrarDetalles(); + + } } } \ No newline at end of file diff --git a/Controladora/ControladoraLotes.cs b/Controladora/ControladoraLotes.cs index 54a1021..0b2c555 100644 --- a/Controladora/ControladoraLotes.cs +++ b/Controladora/ControladoraLotes.cs @@ -65,30 +65,7 @@ namespace Controladora } } - public string EliminarPorFacturaId(int facturaId) - { - try - { - var lotes = RepositorioLote.Instance.Listar(); - var lotesAEliminar = lotes.Where(lote => lote.Id == facturaId).ToList(); - - foreach (var lote in lotesAEliminar) - { - RepositorioLote.Instance.Del(lote); - } - - return lotesAEliminar.Any() ? - $"Los Lotes asociados a la Factura con el ID {facturaId} se eliminaron correctamente" : - $"No se encontraron Lotes asociados a la Factura con el ID {facturaId}"; - } - catch (Exception ex) - { - // Captura cualquier excepción no prevista - return $"Ocurrió un error inesperado: {ex.Message}"; - } - } - - public ReadOnlyCollection ListarPorFacturaId(int facturaId) + /*public ReadOnlyCollection ListarPorFacturaId(int facturaId) { try { @@ -101,7 +78,7 @@ namespace Controladora // Captura cualquier excepción no prevista throw new InvalidOperationException($"Ocurrió un error inesperado: {ex.Message}"); } - } + }*/ public ReadOnlyCollection Listar() { diff --git a/Controladora/bin/Debug/net6.0/Controladora.dll b/Controladora/bin/Debug/net6.0/Controladora.dll index 4f73da0..391c6d4 100644 Binary files a/Controladora/bin/Debug/net6.0/Controladora.dll and b/Controladora/bin/Debug/net6.0/Controladora.dll differ diff --git a/Controladora/bin/Debug/net6.0/Controladora.pdb b/Controladora/bin/Debug/net6.0/Controladora.pdb index 3f9a0d6..3e1ed65 100644 Binary files a/Controladora/bin/Debug/net6.0/Controladora.pdb and b/Controladora/bin/Debug/net6.0/Controladora.pdb differ diff --git a/Controladora/obj/Controladora.csproj.nuget.dgspec.json b/Controladora/obj/Controladora.csproj.nuget.dgspec.json index e677889..555d08f 100644 --- a/Controladora/obj/Controladora.csproj.nuget.dgspec.json +++ b/Controladora/obj/Controladora.csproj.nuget.dgspec.json @@ -1,17 +1,17 @@ { "format": 1, "restore": { - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Controladora\\Controladora.csproj": {} + "C:\\Users\\fedpo\\Downloads\\final actual\\Controladora\\Controladora.csproj": {} }, "projects": { - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Controladora\\Controladora.csproj": { + "C:\\Users\\fedpo\\Downloads\\final actual\\Controladora\\Controladora.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Controladora\\Controladora.csproj", + "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\Controladora\\Controladora.csproj", "projectName": "Controladora", - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Controladora\\Controladora.csproj", + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Controladora\\Controladora.csproj", "packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\", - "outputPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Controladora\\obj\\", + "outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Controladora\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config", @@ -29,11 +29,11 @@ "net6.0": { "targetAlias": "net6.0", "projectReferences": { - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj": { - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj" + "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj": { + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj" }, - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\Modelo.csproj": { - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\Modelo.csproj" + "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\Modelo.csproj": { + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\Modelo.csproj" } } } @@ -67,14 +67,14 @@ } } }, - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj": { + "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj", + "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj", "projectName": "Entidades", - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj", + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj", "packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\", - "outputPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\obj\\", + "outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config", @@ -123,14 +123,14 @@ } } }, - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\Modelo.csproj": { + "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\Modelo.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\Modelo.csproj", + "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\Modelo.csproj", "projectName": "Modelo", - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\Modelo.csproj", + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\Modelo.csproj", "packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\", - "outputPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\obj\\", + "outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config", @@ -148,8 +148,8 @@ "net6.0": { "targetAlias": "net6.0", "projectReferences": { - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj": { - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj" + "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj": { + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj" } } } diff --git a/Controladora/obj/Debug/net6.0/Controladora.GeneratedMSBuildEditorConfig.editorconfig b/Controladora/obj/Debug/net6.0/Controladora.GeneratedMSBuildEditorConfig.editorconfig index 3ee8080..39bf8ec 100644 --- a/Controladora/obj/Debug/net6.0/Controladora.GeneratedMSBuildEditorConfig.editorconfig +++ b/Controladora/obj/Debug/net6.0/Controladora.GeneratedMSBuildEditorConfig.editorconfig @@ -8,4 +8,4 @@ build_property.PlatformNeutralAssembly = build_property.EnforceExtendedAnalyzerRules = build_property._SupportedPlatformList = Linux,macOS,Windows build_property.RootNamespace = Controladora -build_property.ProjectDir = C:\Users\fedpo\Downloads\Final actual(2)\Final actual\Controladora\ +build_property.ProjectDir = C:\Users\fedpo\Downloads\final actual\Controladora\ diff --git a/Controladora/obj/Debug/net6.0/Controladora.csproj.CoreCompileInputs.cache b/Controladora/obj/Debug/net6.0/Controladora.csproj.CoreCompileInputs.cache index 335fac5..48e865e 100644 --- a/Controladora/obj/Debug/net6.0/Controladora.csproj.CoreCompileInputs.cache +++ b/Controladora/obj/Debug/net6.0/Controladora.csproj.CoreCompileInputs.cache @@ -1,5 +1 @@ -<<<<<<< HEAD -07cbdde4e47ec2d3a6db548797ff84a15aa08946633217fe5ed64773b3cc8491 -======= -39c8634b9e930bb7c3ea67187f4543b71aaf8be2 ->>>>>>> 82ef086a3b4ba88ace772a05870081eea1cebbf9 +dba3ec7c7a0b4bd2c09ad0be4ae57d8a36772676 diff --git a/Controladora/obj/Debug/net6.0/Controladora.csproj.FileListAbsolute.txt b/Controladora/obj/Debug/net6.0/Controladora.csproj.FileListAbsolute.txt index 239e0ea..c65b434 100644 --- a/Controladora/obj/Debug/net6.0/Controladora.csproj.FileListAbsolute.txt +++ b/Controladora/obj/Debug/net6.0/Controladora.csproj.FileListAbsolute.txt @@ -32,3 +32,20 @@ C:\Users\Nacho\Desktop\Final actual\Controladora\obj\Debug\net6.0\Controladora.d C:\Users\Nacho\Desktop\Final actual\Controladora\obj\Debug\net6.0\refint\Controladora.dll C:\Users\Nacho\Desktop\Final actual\Controladora\obj\Debug\net6.0\Controladora.pdb C:\Users\Nacho\Desktop\Final actual\Controladora\obj\Debug\net6.0\ref\Controladora.dll +C:\Users\fedpo\Downloads\final actual\Controladora\bin\Debug\net6.0\Controladora.deps.json +C:\Users\fedpo\Downloads\final actual\Controladora\bin\Debug\net6.0\Controladora.dll +C:\Users\fedpo\Downloads\final actual\Controladora\bin\Debug\net6.0\Controladora.pdb +C:\Users\fedpo\Downloads\final actual\Controladora\bin\Debug\net6.0\Entidades.dll +C:\Users\fedpo\Downloads\final actual\Controladora\bin\Debug\net6.0\Modelo.dll +C:\Users\fedpo\Downloads\final actual\Controladora\bin\Debug\net6.0\Modelo.pdb +C:\Users\fedpo\Downloads\final actual\Controladora\bin\Debug\net6.0\Entidades.pdb +C:\Users\fedpo\Downloads\final actual\Controladora\obj\Debug\net6.0\Controladora.csproj.AssemblyReference.cache +C:\Users\fedpo\Downloads\final actual\Controladora\obj\Debug\net6.0\Controladora.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\fedpo\Downloads\final actual\Controladora\obj\Debug\net6.0\Controladora.AssemblyInfoInputs.cache +C:\Users\fedpo\Downloads\final actual\Controladora\obj\Debug\net6.0\Controladora.AssemblyInfo.cs +C:\Users\fedpo\Downloads\final actual\Controladora\obj\Debug\net6.0\Controladora.csproj.CoreCompileInputs.cache +C:\Users\fedpo\Downloads\final actual\Controladora\obj\Debug\net6.0\Controladora.csproj.CopyComplete +C:\Users\fedpo\Downloads\final actual\Controladora\obj\Debug\net6.0\Controladora.dll +C:\Users\fedpo\Downloads\final actual\Controladora\obj\Debug\net6.0\refint\Controladora.dll +C:\Users\fedpo\Downloads\final actual\Controladora\obj\Debug\net6.0\Controladora.pdb +C:\Users\fedpo\Downloads\final actual\Controladora\obj\Debug\net6.0\ref\Controladora.dll diff --git a/Controladora/obj/Debug/net6.0/Controladora.dll b/Controladora/obj/Debug/net6.0/Controladora.dll index 4f73da0..391c6d4 100644 Binary files a/Controladora/obj/Debug/net6.0/Controladora.dll and b/Controladora/obj/Debug/net6.0/Controladora.dll differ diff --git a/Controladora/obj/Debug/net6.0/Controladora.pdb b/Controladora/obj/Debug/net6.0/Controladora.pdb index 3f9a0d6..3e1ed65 100644 Binary files a/Controladora/obj/Debug/net6.0/Controladora.pdb and b/Controladora/obj/Debug/net6.0/Controladora.pdb differ diff --git a/Controladora/obj/Debug/net6.0/ref/Controladora.dll b/Controladora/obj/Debug/net6.0/ref/Controladora.dll index 3bfc6be..f46256e 100644 Binary files a/Controladora/obj/Debug/net6.0/ref/Controladora.dll and b/Controladora/obj/Debug/net6.0/ref/Controladora.dll differ diff --git a/Controladora/obj/Debug/net6.0/refint/Controladora.dll b/Controladora/obj/Debug/net6.0/refint/Controladora.dll index 3bfc6be..f46256e 100644 Binary files a/Controladora/obj/Debug/net6.0/refint/Controladora.dll and b/Controladora/obj/Debug/net6.0/refint/Controladora.dll differ diff --git a/Controladora/obj/project.assets.json b/Controladora/obj/project.assets.json index cef4dc2..cbea9f0 100644 --- a/Controladora/obj/project.assets.json +++ b/Controladora/obj/project.assets.json @@ -51,11 +51,11 @@ "project": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Controladora\\Controladora.csproj", + "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\Controladora\\Controladora.csproj", "projectName": "Controladora", - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Controladora\\Controladora.csproj", + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Controladora\\Controladora.csproj", "packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\", - "outputPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Controladora\\obj\\", + "outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Controladora\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config", @@ -73,11 +73,11 @@ "net6.0": { "targetAlias": "net6.0", "projectReferences": { - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj": { - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj" + "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj": { + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj" }, - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\Modelo.csproj": { - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\Modelo.csproj" + "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\Modelo.csproj": { + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\Modelo.csproj" } } } diff --git a/Controladora/obj/project.nuget.cache b/Controladora/obj/project.nuget.cache index a7e431f..39f006d 100644 --- a/Controladora/obj/project.nuget.cache +++ b/Controladora/obj/project.nuget.cache @@ -1,8 +1,8 @@ { "version": 2, - "dgSpecHash": "r6yZkn7vz8/vk90IKpsbux5MO0+aB5kxgPItYHl5ZJHIUAUs/bsNzJEgYyHcVZOte6JF54JInW9sHlpZnQcQMQ==", + "dgSpecHash": "IpwbiXL3dRwH5wx4tbGN8sdWb7j6j3mIXiyS0Hjs/qZK1voDpRMu2YLROEx5AIgE25tapPlkUXWChBlhRVT26A==", "success": true, - "projectFilePath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Controladora\\Controladora.csproj", + "projectFilePath": "C:\\Users\\fedpo\\Downloads\\final actual\\Controladora\\Controladora.csproj", "expectedPackageFiles": [], "logs": [] } \ No newline at end of file diff --git a/Entidades/DetalleFactura.cs b/Entidades/DetalleFactura.cs index 5f68ebb..d0092bc 100644 --- a/Entidades/DetalleFactura.cs +++ b/Entidades/DetalleFactura.cs @@ -4,7 +4,6 @@ namespace Entidades public class DetalleFactura: Detalle { public int IdFactura { get; set; } - public double PrecioUnitario { get; set; } public double Subtotal { get; set; } } } diff --git a/Entidades/Lote.cs b/Entidades/Lote.cs index 6735959..7e24699 100644 --- a/Entidades/Lote.cs +++ b/Entidades/Lote.cs @@ -8,18 +8,6 @@ namespace Entidades public Producto Producto { get; set; } public long CantidadDeProductos { get; set; } public bool Habilitado { get; set; } - public string NombreProducto - { - get { return Producto?.Nombre ?? string.Empty; } - } - public double PrecioUnitario - { - get { return Producto?.Precio ?? 0; } - } - public double Subtotal - { - get { return PrecioUnitario * CantidadDeProductos; } - } } } diff --git a/Entidades/obj/Debug/net6.0/Entidades.GeneratedMSBuildEditorConfig.editorconfig b/Entidades/obj/Debug/net6.0/Entidades.GeneratedMSBuildEditorConfig.editorconfig index 83e01be..5f1d49f 100644 --- a/Entidades/obj/Debug/net6.0/Entidades.GeneratedMSBuildEditorConfig.editorconfig +++ b/Entidades/obj/Debug/net6.0/Entidades.GeneratedMSBuildEditorConfig.editorconfig @@ -8,4 +8,4 @@ build_property.PlatformNeutralAssembly = build_property.EnforceExtendedAnalyzerRules = build_property._SupportedPlatformList = Linux,macOS,Windows build_property.RootNamespace = Entidades -build_property.ProjectDir = C:\Users\fedpo\Downloads\Final actual(2)\Final actual\Entidades\ +build_property.ProjectDir = C:\Users\fedpo\Downloads\final actual\Entidades\ diff --git a/Entidades/obj/Entidades.csproj.nuget.dgspec.json b/Entidades/obj/Entidades.csproj.nuget.dgspec.json index e278a62..e87df46 100644 --- a/Entidades/obj/Entidades.csproj.nuget.dgspec.json +++ b/Entidades/obj/Entidades.csproj.nuget.dgspec.json @@ -1,17 +1,17 @@ { "format": 1, "restore": { - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj": {} + "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj": {} }, "projects": { - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj": { + "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj", + "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj", "projectName": "Entidades", - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj", + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj", "packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\", - "outputPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\obj\\", + "outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config", diff --git a/Entidades/obj/project.assets.json b/Entidades/obj/project.assets.json index 0a64f5d..9da4e60 100644 --- a/Entidades/obj/project.assets.json +++ b/Entidades/obj/project.assets.json @@ -13,11 +13,11 @@ "project": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj", + "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj", "projectName": "Entidades", - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj", + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj", "packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\", - "outputPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\obj\\", + "outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config", diff --git a/Entidades/obj/project.nuget.cache b/Entidades/obj/project.nuget.cache index 8074281..1de9045 100644 --- a/Entidades/obj/project.nuget.cache +++ b/Entidades/obj/project.nuget.cache @@ -1,8 +1,8 @@ { "version": 2, - "dgSpecHash": "vCw9TkU23iJeVGdgwKLwcggjjvRCnx4IVmqtdUC1cx6S4CwC+/lso1ry576JGcrpGs6Tvfs4jnEYWVDgrNS9aA==", + "dgSpecHash": "JjmZ/x9rvI6DKcp6sqA/2XwtSHr6XeI0O0c8c5GAHxMcNMVKoIzQeSSZe+awvwhJFTb+hDsL4RbtngW8O8CFow==", "success": true, - "projectFilePath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj", + "projectFilePath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj", "expectedPackageFiles": [], "logs": [] } \ No newline at end of file diff --git a/Informes/bin/Debug/net6.0/Entidades.dll b/Informes/bin/Debug/net6.0/Entidades.dll index 30c6233..50ca90c 100644 Binary files a/Informes/bin/Debug/net6.0/Entidades.dll and b/Informes/bin/Debug/net6.0/Entidades.dll differ diff --git a/Informes/bin/Debug/net6.0/Entidades.pdb b/Informes/bin/Debug/net6.0/Entidades.pdb index b09e376..cc3ebba 100644 Binary files a/Informes/bin/Debug/net6.0/Entidades.pdb and b/Informes/bin/Debug/net6.0/Entidades.pdb differ diff --git a/Informes/bin/Debug/net6.0/Informes.dll b/Informes/bin/Debug/net6.0/Informes.dll index 8e706b3..4031947 100644 Binary files a/Informes/bin/Debug/net6.0/Informes.dll and b/Informes/bin/Debug/net6.0/Informes.dll differ diff --git a/Informes/bin/Debug/net6.0/Informes.pdb b/Informes/bin/Debug/net6.0/Informes.pdb index 8ba9ac3..beeb1a0 100644 Binary files a/Informes/bin/Debug/net6.0/Informes.pdb and b/Informes/bin/Debug/net6.0/Informes.pdb differ diff --git a/Informes/obj/Debug/net6.0/Informes.GeneratedMSBuildEditorConfig.editorconfig b/Informes/obj/Debug/net6.0/Informes.GeneratedMSBuildEditorConfig.editorconfig index e8f15c7..55f0a0b 100644 --- a/Informes/obj/Debug/net6.0/Informes.GeneratedMSBuildEditorConfig.editorconfig +++ b/Informes/obj/Debug/net6.0/Informes.GeneratedMSBuildEditorConfig.editorconfig @@ -8,4 +8,4 @@ build_property.PlatformNeutralAssembly = build_property.EnforceExtendedAnalyzerRules = build_property._SupportedPlatformList = Linux,macOS,Windows build_property.RootNamespace = Informes -build_property.ProjectDir = C:\Users\fedpo\Downloads\Final actual(2)\Final actual\Informes\ +build_property.ProjectDir = C:\Users\fedpo\Downloads\final actual\Informes\ diff --git a/Informes/obj/Debug/net6.0/Informes.assets.cache b/Informes/obj/Debug/net6.0/Informes.assets.cache index 0a5a102..6fc1d9d 100644 Binary files a/Informes/obj/Debug/net6.0/Informes.assets.cache and b/Informes/obj/Debug/net6.0/Informes.assets.cache differ diff --git a/Informes/obj/Debug/net6.0/Informes.csproj.AssemblyReference.cache b/Informes/obj/Debug/net6.0/Informes.csproj.AssemblyReference.cache index 1e9a4f7..2e16751 100644 Binary files a/Informes/obj/Debug/net6.0/Informes.csproj.AssemblyReference.cache and b/Informes/obj/Debug/net6.0/Informes.csproj.AssemblyReference.cache differ diff --git a/Informes/obj/Debug/net6.0/Informes.csproj.CoreCompileInputs.cache b/Informes/obj/Debug/net6.0/Informes.csproj.CoreCompileInputs.cache index 6fd4bdd..dec29c7 100644 --- a/Informes/obj/Debug/net6.0/Informes.csproj.CoreCompileInputs.cache +++ b/Informes/obj/Debug/net6.0/Informes.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -3fd66116ceaea5e07433507fe6494c4f357d71a3a526da0eea8f6d1df7fb86c5 +32b22c0691397986a9530089854cd0f201093600 diff --git a/Informes/obj/Debug/net6.0/Informes.csproj.FileListAbsolute.txt b/Informes/obj/Debug/net6.0/Informes.csproj.FileListAbsolute.txt index 110e243..f4b68f0 100644 --- a/Informes/obj/Debug/net6.0/Informes.csproj.FileListAbsolute.txt +++ b/Informes/obj/Debug/net6.0/Informes.csproj.FileListAbsolute.txt @@ -28,3 +28,18 @@ C:\Users\Nacho\Desktop\Final actual\Informes\obj\Debug\net6.0\Informes.dll C:\Users\Nacho\Desktop\Final actual\Informes\obj\Debug\net6.0\refint\Informes.dll C:\Users\Nacho\Desktop\Final actual\Informes\obj\Debug\net6.0\Informes.pdb C:\Users\Nacho\Desktop\Final actual\Informes\obj\Debug\net6.0\ref\Informes.dll +C:\Users\fedpo\Downloads\final actual\Informes\bin\Debug\net6.0\Informes.deps.json +C:\Users\fedpo\Downloads\final actual\Informes\bin\Debug\net6.0\Informes.dll +C:\Users\fedpo\Downloads\final actual\Informes\bin\Debug\net6.0\Informes.pdb +C:\Users\fedpo\Downloads\final actual\Informes\bin\Debug\net6.0\Entidades.dll +C:\Users\fedpo\Downloads\final actual\Informes\bin\Debug\net6.0\Entidades.pdb +C:\Users\fedpo\Downloads\final actual\Informes\obj\Debug\net6.0\Informes.csproj.AssemblyReference.cache +C:\Users\fedpo\Downloads\final actual\Informes\obj\Debug\net6.0\Informes.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\fedpo\Downloads\final actual\Informes\obj\Debug\net6.0\Informes.AssemblyInfoInputs.cache +C:\Users\fedpo\Downloads\final actual\Informes\obj\Debug\net6.0\Informes.AssemblyInfo.cs +C:\Users\fedpo\Downloads\final actual\Informes\obj\Debug\net6.0\Informes.csproj.CoreCompileInputs.cache +C:\Users\fedpo\Downloads\final actual\Informes\obj\Debug\net6.0\Informes.csproj.CopyComplete +C:\Users\fedpo\Downloads\final actual\Informes\obj\Debug\net6.0\Informes.dll +C:\Users\fedpo\Downloads\final actual\Informes\obj\Debug\net6.0\refint\Informes.dll +C:\Users\fedpo\Downloads\final actual\Informes\obj\Debug\net6.0\Informes.pdb +C:\Users\fedpo\Downloads\final actual\Informes\obj\Debug\net6.0\ref\Informes.dll diff --git a/Informes/obj/Debug/net6.0/Informes.dll b/Informes/obj/Debug/net6.0/Informes.dll index 8e706b3..4031947 100644 Binary files a/Informes/obj/Debug/net6.0/Informes.dll and b/Informes/obj/Debug/net6.0/Informes.dll differ diff --git a/Informes/obj/Debug/net6.0/Informes.pdb b/Informes/obj/Debug/net6.0/Informes.pdb index 8ba9ac3..beeb1a0 100644 Binary files a/Informes/obj/Debug/net6.0/Informes.pdb and b/Informes/obj/Debug/net6.0/Informes.pdb differ diff --git a/Informes/obj/Debug/net6.0/ref/Informes.dll b/Informes/obj/Debug/net6.0/ref/Informes.dll index 3cd584e..c627a33 100644 Binary files a/Informes/obj/Debug/net6.0/ref/Informes.dll and b/Informes/obj/Debug/net6.0/ref/Informes.dll differ diff --git a/Informes/obj/Debug/net6.0/refint/Informes.dll b/Informes/obj/Debug/net6.0/refint/Informes.dll index 3cd584e..c627a33 100644 Binary files a/Informes/obj/Debug/net6.0/refint/Informes.dll and b/Informes/obj/Debug/net6.0/refint/Informes.dll differ diff --git a/Informes/obj/Informes.csproj.nuget.dgspec.json b/Informes/obj/Informes.csproj.nuget.dgspec.json index 9d73e69..88a5477 100644 --- a/Informes/obj/Informes.csproj.nuget.dgspec.json +++ b/Informes/obj/Informes.csproj.nuget.dgspec.json @@ -1,17 +1,17 @@ { "format": 1, "restore": { - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Informes\\Informes.csproj": {} + "C:\\Users\\fedpo\\Downloads\\final actual\\Informes\\Informes.csproj": {} }, "projects": { - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj": { + "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj", + "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj", "projectName": "Entidades", - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj", + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj", "packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\", - "outputPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\obj\\", + "outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config", @@ -60,14 +60,14 @@ } } }, - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Informes\\Informes.csproj": { + "C:\\Users\\fedpo\\Downloads\\final actual\\Informes\\Informes.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Informes\\Informes.csproj", + "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\Informes\\Informes.csproj", "projectName": "Informes", - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Informes\\Informes.csproj", + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Informes\\Informes.csproj", "packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\", - "outputPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Informes\\obj\\", + "outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Informes\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config", @@ -85,8 +85,8 @@ "net6.0": { "targetAlias": "net6.0", "projectReferences": { - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj": { - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj" + "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj": { + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj" } } } diff --git a/Informes/obj/project.assets.json b/Informes/obj/project.assets.json index 6045869..53552aa 100644 --- a/Informes/obj/project.assets.json +++ b/Informes/obj/project.assets.json @@ -32,11 +32,11 @@ "project": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Informes\\Informes.csproj", + "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\Informes\\Informes.csproj", "projectName": "Informes", - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Informes\\Informes.csproj", + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Informes\\Informes.csproj", "packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\", - "outputPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Informes\\obj\\", + "outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Informes\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config", @@ -54,8 +54,8 @@ "net6.0": { "targetAlias": "net6.0", "projectReferences": { - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj": { - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj" + "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj": { + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj" } } } diff --git a/Informes/obj/project.nuget.cache b/Informes/obj/project.nuget.cache index 376e547..6632485 100644 --- a/Informes/obj/project.nuget.cache +++ b/Informes/obj/project.nuget.cache @@ -1,8 +1,8 @@ { "version": 2, - "dgSpecHash": "wSRUDPAOADbuzfBaccmKkWkxTPKcGjNIB8Bpaz2yc1b+hR10rBbeJ6qupMQnFD6UaiKUQHlyxseEoFUSlbM17A==", + "dgSpecHash": "iKJAdqV1q/kMNu72oEWf+wTcoFyU56YA7P8rCel2LyJMylEEsdJ3zg2KDcBSbSFYhociP4Acc3XZ4KiTT60MbQ==", "success": true, - "projectFilePath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Informes\\Informes.csproj", + "projectFilePath": "C:\\Users\\fedpo\\Downloads\\final actual\\Informes\\Informes.csproj", "expectedPackageFiles": [], "logs": [] } \ No newline at end of file diff --git a/Modelo/obj/Debug/net6.0/Modelo.GeneratedMSBuildEditorConfig.editorconfig b/Modelo/obj/Debug/net6.0/Modelo.GeneratedMSBuildEditorConfig.editorconfig index ba45bde..d520579 100644 --- a/Modelo/obj/Debug/net6.0/Modelo.GeneratedMSBuildEditorConfig.editorconfig +++ b/Modelo/obj/Debug/net6.0/Modelo.GeneratedMSBuildEditorConfig.editorconfig @@ -8,4 +8,4 @@ build_property.PlatformNeutralAssembly = build_property.EnforceExtendedAnalyzerRules = build_property._SupportedPlatformList = Linux,macOS,Windows build_property.RootNamespace = Modelo -build_property.ProjectDir = C:\Users\fedpo\Downloads\Final actual(2)\Final actual\Modelo\ +build_property.ProjectDir = C:\Users\fedpo\Downloads\final actual\Modelo\ diff --git a/Modelo/obj/Debug/net6.0/Modelo.assets.cache b/Modelo/obj/Debug/net6.0/Modelo.assets.cache index 67b8f2b..2d291db 100644 Binary files a/Modelo/obj/Debug/net6.0/Modelo.assets.cache and b/Modelo/obj/Debug/net6.0/Modelo.assets.cache differ diff --git a/Modelo/obj/Modelo.csproj.nuget.dgspec.json b/Modelo/obj/Modelo.csproj.nuget.dgspec.json index fde54d2..8b06ce7 100644 --- a/Modelo/obj/Modelo.csproj.nuget.dgspec.json +++ b/Modelo/obj/Modelo.csproj.nuget.dgspec.json @@ -1,17 +1,17 @@ { "format": 1, "restore": { - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\Modelo.csproj": {} + "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\Modelo.csproj": {} }, "projects": { - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj": { + "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj", + "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj", "projectName": "Entidades", - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj", + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj", "packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\", - "outputPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\obj\\", + "outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config", @@ -60,14 +60,14 @@ } } }, - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\Modelo.csproj": { + "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\Modelo.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\Modelo.csproj", + "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\Modelo.csproj", "projectName": "Modelo", - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\Modelo.csproj", + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\Modelo.csproj", "packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\", - "outputPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\obj\\", + "outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config", @@ -85,8 +85,8 @@ "net6.0": { "targetAlias": "net6.0", "projectReferences": { - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj": { - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj" + "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj": { + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj" } } } diff --git a/Modelo/obj/project.assets.json b/Modelo/obj/project.assets.json index 045490c..c9df55c 100644 --- a/Modelo/obj/project.assets.json +++ b/Modelo/obj/project.assets.json @@ -32,11 +32,11 @@ "project": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\Modelo.csproj", + "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\Modelo.csproj", "projectName": "Modelo", - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\Modelo.csproj", + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\Modelo.csproj", "packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\", - "outputPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\obj\\", + "outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config", @@ -54,8 +54,8 @@ "net6.0": { "targetAlias": "net6.0", "projectReferences": { - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj": { - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj" + "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj": { + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj" } } } diff --git a/Modelo/obj/project.nuget.cache b/Modelo/obj/project.nuget.cache index ee1a1aa..3c522b2 100644 --- a/Modelo/obj/project.nuget.cache +++ b/Modelo/obj/project.nuget.cache @@ -1,8 +1,8 @@ { "version": 2, - "dgSpecHash": "gEY07P7prGCYVR0m9ujCWDU4VIm7roMDseNKc2YK6GTpNG+hy+RKyuu6ewyYVPxE4rRuW4p/7q2JBw4Oa4TZHw==", + "dgSpecHash": "+dSzN8HQCE/7+A8WiGWZUevsFyBg+RjmhJtwnva8KQTR/8cIYqrYcGitnOradj5OOEtIzia0uezPEUiSGR+5rw==", "success": true, - "projectFilePath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\Modelo.csproj", + "projectFilePath": "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\Modelo.csproj", "expectedPackageFiles": [], "logs": [] } \ No newline at end of file diff --git a/Vista/FrmFactura.Designer.cs b/Vista/FrmFactura.Designer.cs index 539d852..ef58e64 100644 --- a/Vista/FrmFactura.Designer.cs +++ b/Vista/FrmFactura.Designer.cs @@ -28,8 +28,8 @@ /// private void InitializeComponent() { - button1 = new Button(); - button2 = new Button(); + btnAceptar = new Button(); + btnCancelar = new Button(); numid = new NumericUpDown(); label1 = new Label(); numtotal = new NumericUpDown(); @@ -38,41 +38,44 @@ label3 = new Label(); label4 = new Label(); cmbCliente = new ComboBox(); - dataGridView1 = new DataGridView(); - dataGridView2 = new DataGridView(); - numericUpDown1 = new NumericUpDown(); + dgvProductos = new DataGridView(); + dgvDetalles = new DataGridView(); + numCantidad = new NumericUpDown(); Unidades = new Label(); - button3 = new Button(); + btnAddDetalle = new Button(); + label5 = new Label(); + label6 = new Label(); + btnEliminar = new Button(); ((System.ComponentModel.ISupportInitialize)numid).BeginInit(); ((System.ComponentModel.ISupportInitialize)numtotal).BeginInit(); - ((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)dataGridView2).BeginInit(); - ((System.ComponentModel.ISupportInitialize)numericUpDown1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)dgvProductos).BeginInit(); + ((System.ComponentModel.ISupportInitialize)dgvDetalles).BeginInit(); + ((System.ComponentModel.ISupportInitialize)numCantidad).BeginInit(); SuspendLayout(); // - // button1 + // btnAceptar // - button1.Location = new Point(12, 367); - button1.Name = "button1"; - button1.Size = new Size(113, 46); - button1.TabIndex = 0; - button1.Text = "Aceptar"; - button1.UseVisualStyleBackColor = true; - button1.Click += button1_Click; + btnAceptar.Location = new Point(12, 395); + btnAceptar.Name = "btnAceptar"; + btnAceptar.Size = new Size(82, 26); + btnAceptar.TabIndex = 0; + btnAceptar.Text = "Aceptar"; + btnAceptar.UseVisualStyleBackColor = true; + btnAceptar.Click += btnAceptar_Click; // - // button2 + // btnCancelar // - button2.Location = new Point(172, 367); - button2.Name = "button2"; - button2.Size = new Size(115, 46); - button2.TabIndex = 1; - button2.Text = "Cancelar"; - button2.UseVisualStyleBackColor = true; - button2.Click += button2_Click; + btnCancelar.Location = new Point(873, 395); + btnCancelar.Name = "btnCancelar"; + btnCancelar.Size = new Size(80, 26); + btnCancelar.TabIndex = 1; + btnCancelar.Text = "Cancelar"; + btnCancelar.UseVisualStyleBackColor = true; + btnCancelar.Click += btnCerrar_Click; // // numid // - numid.Location = new Point(97, 26); + numid.Location = new Point(60, 14); numid.Maximum = new decimal(new int[] { 1215752191, 23, 0, 0 }); numid.Name = "numid"; numid.Size = new Size(120, 23); @@ -81,7 +84,7 @@ // label1 // label1.AutoSize = true; - label1.Location = new Point(69, 34); + label1.Location = new Point(32, 22); label1.Name = "label1"; label1.Size = new Size(18, 15); label1.TabIndex = 3; @@ -90,7 +93,7 @@ // numtotal // numtotal.Enabled = false; - numtotal.Location = new Point(97, 57); + numtotal.Location = new Point(60, 45); numtotal.Maximum = new decimal(new int[] { 1215752191, 23, 0, 0 }); numtotal.Name = "numtotal"; numtotal.ReadOnly = true; @@ -100,7 +103,7 @@ // label2 // label2.AutoSize = true; - label2.Location = new Point(59, 65); + label2.Location = new Point(22, 53); label2.Name = "label2"; label2.Size = new Size(32, 15); label2.TabIndex = 5; @@ -108,16 +111,15 @@ // // datepick // - datepick.Location = new Point(97, 88); + datepick.Location = new Point(60, 76); datepick.Name = "datepick"; datepick.Size = new Size(120, 23); datepick.TabIndex = 6; - datepick.ValueChanged += datepick_ValueChanged; // // label3 // label3.AutoSize = true; - label3.Location = new Point(49, 94); + label3.Location = new Point(12, 82); label3.Name = "label3"; label3.Size = new Size(38, 15); label3.TabIndex = 7; @@ -126,7 +128,7 @@ // label4 // label4.AutoSize = true; - label4.Location = new Point(49, 124); + label4.Location = new Point(12, 112); label4.Name = "label4"; label4.Size = new Size(44, 15); label4.TabIndex = 8; @@ -136,69 +138,106 @@ // cmbCliente.DropDownStyle = ComboBoxStyle.DropDownList; cmbCliente.FormattingEnabled = true; - cmbCliente.Location = new Point(99, 121); + cmbCliente.Location = new Point(62, 109); cmbCliente.Name = "cmbCliente"; cmbCliente.Size = new Size(121, 23); cmbCliente.TabIndex = 10; // - // dataGridView1 + // dgvProductos // - dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; - dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridView1.Location = new Point(290, 12); - dataGridView1.Name = "dataGridView1"; - dataGridView1.RowTemplate.Height = 25; - dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect; - dataGridView1.Size = new Size(324, 318); - dataGridView1.TabIndex = 11; + dgvProductos.AllowUserToAddRows = false; + dgvProductos.AllowUserToDeleteRows = false; + dgvProductos.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + dgvProductos.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; + dgvProductos.EditMode = DataGridViewEditMode.EditProgrammatically; + dgvProductos.Location = new Point(237, 30); + dgvProductos.Name = "dgvProductos"; + dgvProductos.RowTemplate.Height = 25; + dgvProductos.SelectionMode = DataGridViewSelectionMode.FullRowSelect; + dgvProductos.Size = new Size(350, 318); + dgvProductos.TabIndex = 11; // - // dataGridView2 + // dgvDetalles // - dataGridView2.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; - dataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridView2.Location = new Point(674, 12); - dataGridView2.Name = "dataGridView2"; - dataGridView2.RowTemplate.Height = 25; - dataGridView2.SelectionMode = DataGridViewSelectionMode.FullRowSelect; - dataGridView2.Size = new Size(290, 336); - dataGridView2.TabIndex = 12; + dgvDetalles.AllowUserToAddRows = false; + dgvDetalles.AllowUserToDeleteRows = false; + dgvDetalles.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + dgvDetalles.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; + dgvDetalles.EditMode = DataGridViewEditMode.EditProgrammatically; + dgvDetalles.Location = new Point(593, 30); + dgvDetalles.Name = "dgvDetalles"; + dgvDetalles.RowTemplate.Height = 25; + dgvDetalles.SelectionMode = DataGridViewSelectionMode.FullRowSelect; + dgvDetalles.Size = new Size(360, 318); + dgvDetalles.TabIndex = 12; // - // numericUpDown1 + // numCantidad // - numericUpDown1.Location = new Point(494, 359); - numericUpDown1.Name = "numericUpDown1"; - numericUpDown1.Size = new Size(120, 23); - numericUpDown1.TabIndex = 13; + numCantidad.Location = new Point(309, 354); + numCantidad.Name = "numCantidad"; + numCantidad.Size = new Size(120, 23); + numCantidad.TabIndex = 13; // // Unidades // Unidades.AutoSize = true; - Unidades.Location = new Point(420, 367); + Unidades.Location = new Point(235, 362); Unidades.Name = "Unidades"; Unidades.Size = new Size(56, 15); Unidades.TabIndex = 14; Unidades.Text = "Unidades"; // - // button3 + // btnAddDetalle // - button3.Location = new Point(420, 390); - button3.Name = "button3"; - button3.Size = new Size(194, 36); - button3.TabIndex = 15; - button3.Text = "Añadir"; - button3.UseVisualStyleBackColor = true; - button3.Click += button3_Click; + btnAddDetalle.Location = new Point(235, 385); + btnAddDetalle.Name = "btnAddDetalle"; + btnAddDetalle.Size = new Size(80, 31); + btnAddDetalle.TabIndex = 15; + btnAddDetalle.Text = "Añadir"; + btnAddDetalle.UseVisualStyleBackColor = true; + btnAddDetalle.Click += btnAddDetalle_Click; + // + // label5 + // + label5.AutoSize = true; + label5.Location = new Point(593, 9); + label5.Name = "label5"; + label5.Size = new Size(48, 15); + label5.TabIndex = 16; + label5.Text = "Detalles"; + // + // label6 + // + label6.AutoSize = true; + label6.Location = new Point(237, 5); + label6.Name = "label6"; + label6.Size = new Size(61, 15); + label6.TabIndex = 17; + label6.Text = "Productos"; + // + // btnEliminar + // + btnEliminar.Location = new Point(321, 385); + btnEliminar.Name = "btnEliminar"; + btnEliminar.Size = new Size(80, 31); + btnEliminar.TabIndex = 18; + btnEliminar.Text = "Eliminar"; + btnEliminar.UseVisualStyleBackColor = true; + btnEliminar.Click += btnEliminar_Click; // // FrmFactura // AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(976, 450); - Controls.Add(button3); + ClientSize = new Size(965, 428); + Controls.Add(btnEliminar); + Controls.Add(label6); + Controls.Add(label5); + Controls.Add(btnAddDetalle); Controls.Add(Unidades); - Controls.Add(numericUpDown1); - Controls.Add(dataGridView2); - Controls.Add(dataGridView1); + Controls.Add(numCantidad); + Controls.Add(dgvDetalles); + Controls.Add(dgvProductos); Controls.Add(cmbCliente); Controls.Add(label4); Controls.Add(label3); @@ -207,23 +246,23 @@ Controls.Add(numtotal); Controls.Add(label1); Controls.Add(numid); - Controls.Add(button2); - Controls.Add(button1); + Controls.Add(btnCancelar); + Controls.Add(btnAceptar); Name = "FrmFactura"; - Text = "Form1"; + Text = "Agregar Factura"; ((System.ComponentModel.ISupportInitialize)numid).EndInit(); ((System.ComponentModel.ISupportInitialize)numtotal).EndInit(); - ((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit(); - ((System.ComponentModel.ISupportInitialize)dataGridView2).EndInit(); - ((System.ComponentModel.ISupportInitialize)numericUpDown1).EndInit(); + ((System.ComponentModel.ISupportInitialize)dgvProductos).EndInit(); + ((System.ComponentModel.ISupportInitialize)dgvDetalles).EndInit(); + ((System.ComponentModel.ISupportInitialize)numCantidad).EndInit(); ResumeLayout(false); PerformLayout(); } #endregion - private Button button1; - private Button button2; + private Button btnAceptar; + private Button btnCancelar; private NumericUpDown numid; private Label label1; private NumericUpDown numtotal; @@ -232,10 +271,13 @@ private Label label3; private Label label4; private ComboBox cmbCliente; - private DataGridView dataGridView1; - private DataGridView dataGridView2; - private NumericUpDown numericUpDown1; + private DataGridView dgvProductos; + private DataGridView dgvDetalles; + private NumericUpDown numCantidad; private Label Unidades; - private Button button3; + private Button btnAddDetalle; + private Label label5; + private Label label6; + private Button btnEliminar; } } \ No newline at end of file diff --git a/Vista/FrmFactura.cs b/Vista/FrmFactura.cs index a7e74ce..c85710d 100644 --- a/Vista/FrmFactura.cs +++ b/Vista/FrmFactura.cs @@ -1,6 +1,5 @@ using Controladora; using Entidades; -using Modelo; using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -16,134 +15,76 @@ namespace Vista { public partial class FrmFactura : Form { - private Factura factura; - private Cliente clienteSeleccionado; - private List carrito; // Lista para almacenar los lotes en el carrito - - public FrmFactura(Factura? factura = null) + private Factura factura = new Factura(); + private int detalleid; + public FrmFactura() { InitializeComponent(); - ConfigurarDataGridView(); - ConfigurarDataGridViewCarrito(); // Nueva configuración del DataGridView para el carrito ActualizarGrilla(); - CargarClientes(); - carrito = new List(); // Inicializar la lista del carrito - - cmbCliente.SelectedIndexChanged += comboBox1_SelectedIndexChanged; - - // Para el primer control NumericUpDown - numid.Maximum = int.MaxValue; // Esto permitirá IDs muy grandes - - // Para el segundo control NumericUpDown - numtotal.Maximum = decimal.MaxValue; // Esto permitirá totales muy grandes - numtotal.Enabled = false; // Deshabilitar el control para que no se pueda modificar - - // Configurar NumericUpDown para unidades - numericUpDown1.Maximum = int.MaxValue; // Configurar el máximo valor permitido + CargarDatos(); cmbCliente.DisplayMember = "Cliente"; cmbCliente.SelectedIndex = -1; - - if (factura != null) - { - this.factura = factura; - this.Text = "Modificar Factura"; - CargarDatos(); - } - else - { - this.Text = "Agregar Factura"; - } } - private void ConfigurarDataGridView() + private void ActualizarGrilla() { - dataGridView1.AutoGenerateColumns = false; + dgvProductos.DataSource = null; + dgvProductos.DataSource = ControladoraProductos.Instance.Listar(); + + dgvDetalles.AutoGenerateColumns = false; // Definir las columnas manualmente - dataGridView1.Columns.Add(new DataGridViewTextBoxColumn + dgvDetalles.Columns.Add(new DataGridViewTextBoxColumn { - DataPropertyName = "Id", - HeaderText = "ID", + DataPropertyName = "Id", // Usa la propiedad NombreProducto + HeaderText = "Id", Name = "Id" }); - dataGridView1.Columns.Add(new DataGridViewTextBoxColumn + dgvDetalles.Columns.Add(new DataGridViewTextBoxColumn { - DataPropertyName = "Nombre", - HeaderText = "Nombre", - Name = "Nombre" - }); - dataGridView1.Columns.Add(new DataGridViewTextBoxColumn - { - DataPropertyName = "Precio", - HeaderText = "Precio", - Name = "Precio" - }); - } - - private void ConfigurarDataGridViewCarrito() - { - dataGridView2.AutoGenerateColumns = false; - - // Definir las columnas manualmente - dataGridView2.Columns.Add(new DataGridViewTextBoxColumn - { - DataPropertyName = "NombreProducto", // Usa la propiedad NombreProducto + DataPropertyName = "Producto", // Usa la propiedad NombreProducto HeaderText = "Producto", Name = "Producto" }); - dataGridView2.Columns.Add(new DataGridViewTextBoxColumn + dgvDetalles.Columns.Add(new DataGridViewTextBoxColumn { DataPropertyName = "CantidadDeProductos", HeaderText = "Cantidad", Name = "CantidadDeProductos" }); + dgvDetalles.Columns.Add(new DataGridViewTextBoxColumn + { + DataPropertyName = "PrecioUnitario", + HeaderText = "PrecioUnitario" + }); + dgvDetalles.Columns.Add(new DataGridViewTextBoxColumn + { + DataPropertyName = "Subtotal", + HeaderText = "Subtotal" + }); - // Asignar la lista de lotes al DataGridView - dataGridView2.DataSource = carrito; - } - - - private void ActualizarGrilla() - { - dataGridView1.DataSource = null; - dataGridView1.DataSource = ControladoraProductos.Instance.Listar(); - } - - private void CargarClientes() - { - // Obtener la lista de clientes desde el repositorio - ReadOnlyCollection clientes = RepositorioClientes.Instance.Listar(); - - // Asignar la lista de clientes como origen de datos para el ComboBox - cmbCliente.DataSource = clientes; - - // Establecer la propiedad para mostrar el nombre del cliente en el ComboBox - cmbCliente.DisplayMember = "NombreCompleto"; - } - - private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) - { - clienteSeleccionado = (Cliente)cmbCliente.SelectedItem; } private void CargarDatos() { - numid.Value = factura.Id; - numtotal.Value = (decimal)factura.Total; - datepick.Value = factura.Fecha; + // Asignar la lista de clientes como origen de datos para el ComboBox + cmbCliente.DataSource = ControladoraClientes.Instance.Listar(); - // Asignar el cliente seleccionado en el ComboBox - if (factura.Cliente != null) - { - cmbCliente.SelectedItem = factura.Cliente; - } + // Establecer la propiedad para mostrar el nombre del cliente en el ComboBox + cmbCliente.DisplayMember = "NombreCompleto"; + + var listdetalle = ControladoraFacturas.Instance.Listar(); + numid.Value = (listdetalle.Count > 0) ? + listdetalle.Max(x => x.Id + 1) : + 0; + + numid.Enabled = false; // Deshabilitar el control para que no se pueda modificar + + numtotal.Enabled = false; // Deshabilitar el control para que no se pueda modificar // Recuperar los lotes asociados a la factura y actualizar el DataGridView - carrito = ControladoraLotes.Instance.ListarPorFacturaId(factura.Id).ToList() ?? new List(); - - dataGridView2.DataSource = null; - dataGridView2.DataSource = carrito; + // var listaDetalles = ControladoraFacturas.Instance.ListarDetallesFactura(factura); // Actualizar el total ActualizarTotal(); @@ -153,9 +94,9 @@ namespace Vista { // Recalcular el total de la factura decimal total = 0; - foreach (var lote in carrito) + foreach (var detalle in factura.MostrarDetalles()) { - total += (decimal)(lote.Producto.Precio * lote.CantidadDeProductos); + total += (decimal)(detalle.Producto.Precio * detalle.Cantidad); } numtotal.Value = total; } @@ -165,7 +106,7 @@ namespace Vista string devolucion = ""; if (string.IsNullOrEmpty(numid.Text)) devolucion += "El ID no puede ser nulo o vacío\n"; - if (clienteSeleccionado == null) devolucion += "Debe seleccionar un cliente\n"; + if (cmbCliente.SelectedIndex == -1) devolucion += "Debe seleccionar un cliente\n"; if (devolucion == "") { @@ -178,153 +119,120 @@ namespace Vista } } - private void button1_Click(object sender, EventArgs e) + private void btnAceptar_Click(object sender, EventArgs e) { // Validar los datos antes de continuar if (ValidarDatos()) { - try + factura.Total = Convert.ToDouble(numtotal.Value); + factura.Fecha = datepick.Value; + factura.Id = Convert.ToInt32(numid.Value); + factura.Cliente = ControladoraClientes.Instance.Listar().First(x => x.NombreCompleto == cmbCliente.SelectedValue.ToString()); + + string mensaje = ControladoraFacturas.Instance.Añadir(factura); + MessageBox.Show(mensaje, "Información", MessageBoxButtons.OK, MessageBoxIcon.Information); + Close(); + } + } + + private void btnAddDetalle_Click(object sender, EventArgs e) + { + // Validar los datos antes de crear el detalle + if (ValidarDatosdetalle()) return; + if (dgvProductos.SelectedRows.Count > 0) + { + foreach (DataGridViewRow selectedRow in dgvProductos.SelectedRows) { - // Verificar si la ID de la factura ya está en uso - if (RepositorioFactura.Instance.ExistePorId((int)numid.Value) && factura == null) + Producto producto = (Producto)selectedRow.DataBoundItem; + var checkcolicion = factura.MostrarDetalles().Count(x => x.Producto.Id == producto.Id); + if (checkcolicion != 0) { - MessageBox.Show("La ID de la factura ya está en uso. Por favor, elija una ID diferente.", "ID en Uso", MessageBoxButtons.OK, MessageBoxIcon.Warning); + MessageBox.Show("El Producto ya fue cargado"); return; } - if (factura == null) + factura.AñadirDetalle(new DetalleFactura { - // Crear una nueva factura con los datos proporcionados - factura = new Factura - { - Id = (int)numid.Value, - Total = (double)numtotal.Value, - Fecha = datepick.Value, - Cliente = (Cliente)cmbCliente.SelectedItem - }; - // Agregar la factura a la colección - ControladoraFacturas.Instance.Añadir(factura); - - // Guardar los lotes asociados a la factura - foreach (var lote in carrito) - { - lote.Id = factura.Id; // Usar la ID de la factura - lote.Fecha = factura.Fecha; // Usar la fecha de la factura - ControladoraLotes.Instance.Añadir(lote); - } - } - else - { - // Actualizar los datos de la factura existente - factura.Id = (int)numid.Value; - factura.Total = (double)numtotal.Value; - factura.Fecha = datepick.Value; - factura.Cliente = (Cliente)cmbCliente.SelectedItem; - // Modificar la factura en la colección - ControladoraFacturas.Instance.Modificar(factura); - - // Actualizar los lotes asociados a la factura - ControladoraLotes.Instance.EliminarPorFacturaId(factura.Id); // Eliminar lotes antiguos - foreach (var lote in carrito) - { - lote.Id = factura.Id; // Usar la ID de la factura - lote.Fecha = factura.Fecha; // Usar la fecha de la factura - ControladoraLotes.Instance.Añadir(lote); - } - } - MessageBox.Show("Operación realizada con éxito", "Información", MessageBoxButtons.OK, MessageBoxIcon.Information); - Close(); - } - catch (InvalidOperationException ex) - { - MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - catch (Exception ex) - { - // Captura cualquier otra excepción que pueda ocurrir - MessageBox.Show("Ocurrió un error inesperado: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + Id = int.Parse(detalleid++.ToString()), + Cantidad = (int)numCantidad.Value, + IdFactura = factura.Id, + Producto = ControladoraProductos.Instance.Listar().First(x => x.Id == producto.Id), + Subtotal = producto.Precio * Convert.ToInt32(numCantidad.Value), + }); + ActualizarGrillaDetalles(); } } } - - - private void button2_Click(object sender, EventArgs e) + private void ActualizarGrillaDetalles() { - this.Close(); - } - - - - private void button3_Click(object sender, EventArgs e) - { - // Validar los datos antes de crear el lote - if (ValidarDatos() && ValidarDatosLote()) + var detalles = factura.MostrarDetalles(); + dgvDetalles.DataSource = null; + if (detalles.Any()) { - // Verifica si hay una fila seleccionada en el DataGridView - if (dataGridView1.CurrentRow != null) + var loteDatos = detalles.Select(detalle => new { - // Deshabilitar los controles para ID, fecha, y cliente - numid.Enabled = false; - datepick.Enabled = false; - cmbCliente.Enabled = false; + Id = detalle.Id, + Producto = detalle.Producto.Nombre, + CantidadDeProductos = detalle.Cantidad, + Subtotal = detalle.Subtotal, + PrecioUnitario = detalle.Producto.Precio, + }).ToList(); - // Crear un nuevo lote con los datos proporcionados - var lote = new Lote - { - Id = (int)numid.Value, // Usar la misma ID que la de la factura - Fecha = datepick.Value, // Usar la misma fecha que la de la factura - Producto = (Producto)dataGridView1.CurrentRow.DataBoundItem, - CantidadDeProductos = (long)numericUpDown1.Value, // Usar el valor de unidades del NumericUpDown - Habilitado = true // Asignar un valor por defecto o según tus necesidades - }; - - // Añadir el lote al carrito - carrito.Add(lote); - - // Actualizar el total de la factura - ActualizarTotal(); - - // Actualizar el DataGridView para reflejar los cambios - dataGridView2.DataSource = null; - dataGridView2.DataSource = carrito; - } - else - { - // Mostrar un mensaje si no se ha seleccionado ninguna fila - MessageBox.Show("Por favor, seleccione un producto en el carrito antes de añadir.", "Selección Requerida", MessageBoxButtons.OK, MessageBoxIcon.Warning); - } + dgvDetalles.DataSource = loteDatos; + numtotal.Value = (Decimal)loteDatos.Sum(x => x.Subtotal); } } - - // Función actualizada para validar los datos del lote - private bool ValidarDatosLote() + // metodo para validar los datos del detalle + private bool ValidarDatosdetalle() { string devolucion = ""; // Validar la selección del producto - if (dataGridView1.CurrentRow == null) + if (dgvProductos.CurrentRow == null) devolucion += "Debe seleccionar un producto para añadir al lote\n"; // Validar la cantidad de productos - if (numericUpDown1.Value <= 0) + if (numCantidad.Value <= 0) devolucion += "La cantidad de productos debe ser mayor que cero\n"; if (devolucion == "") { - return true; + return false; } else { MessageBox.Show(devolucion, "Errores de Validación", MessageBoxButtons.OK, MessageBoxIcon.Warning); - return false; + return true; } } - private void datepick_ValueChanged(object sender, EventArgs e) + private void btnCerrar_Click(object sender, EventArgs e) { + this.Close(); + } + private void btnEliminar_Click(object sender, EventArgs e) + { + if (dgvDetalles.SelectedRows.Count > 0) + { + foreach (DataGridViewRow selectedRow in dgvDetalles.SelectedRows) + { + DetalleFactura det = new DetalleFactura + { + Id = Convert.ToInt32(selectedRow.Cells["Id"].Value), + }; + var detalleAborrar = factura.MostrarDetalles().First(x => x.Id == det.Id); + factura.EliminarDetalle(detalleAborrar); + ActualizarGrillaDetalles(); + detalleid--; + } + } + else + { + MessageBox.Show("Por favor, selecciona una fila para eliminar Proveedor del producto."); + } } } } \ No newline at end of file diff --git a/Vista/FrmFactura.resx b/Vista/FrmFactura.resx index af32865..a395bff 100644 --- a/Vista/FrmFactura.resx +++ b/Vista/FrmFactura.resx @@ -18,7 +18,7 @@ System.Resources.ResXResourceReader, System.Windows.Forms, ... System.Resources.ResXResourceWriter, System.Windows.Forms, ... this is my long stringthis is a comment - Blue + Blue [base64 mime encoded serialized .NET Framework object] diff --git a/Vista/FrmFacturas.Designer.cs b/Vista/FrmFacturas.Designer.cs index 21766e3..f58664a 100644 --- a/Vista/FrmFacturas.Designer.cs +++ b/Vista/FrmFacturas.Designer.cs @@ -29,18 +29,22 @@ private void InitializeComponent() { groupBox1 = new GroupBox(); - dataGridView2 = new DataGridView(); - dataGridView1 = new DataGridView(); + label2 = new Label(); + label1 = new Label(); + dgvDetalles = new DataGridView(); + dgvFacturas = new DataGridView(); BtnAdd = new Button(); groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)dataGridView2).BeginInit(); - ((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)dgvDetalles).BeginInit(); + ((System.ComponentModel.ISupportInitialize)dgvFacturas).BeginInit(); SuspendLayout(); // // groupBox1 // - groupBox1.Controls.Add(dataGridView2); - groupBox1.Controls.Add(dataGridView1); + groupBox1.Controls.Add(label2); + groupBox1.Controls.Add(label1); + groupBox1.Controls.Add(dgvDetalles); + groupBox1.Controls.Add(dgvFacturas); groupBox1.Controls.Add(BtnAdd); groupBox1.Location = new Point(12, 12); groupBox1.Name = "groupBox1"; @@ -48,34 +52,57 @@ groupBox1.TabIndex = 5; groupBox1.TabStop = false; // - // dataGridView2 + // label2 // - dataGridView2.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; - dataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridView2.Location = new Point(623, 0); - dataGridView2.Name = "dataGridView2"; - dataGridView2.RowTemplate.Height = 25; - dataGridView2.SelectionMode = DataGridViewSelectionMode.FullRowSelect; - dataGridView2.Size = new Size(384, 426); - dataGridView2.TabIndex = 4; + label2.AutoSize = true; + label2.Location = new Point(6, 19); + label2.Name = "label2"; + label2.Size = new Size(46, 15); + label2.TabIndex = 6; + label2.Text = "Factura"; // - // dataGridView1 + // label1 // - dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; - dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridView1.Location = new Point(6, 16); - dataGridView1.Name = "dataGridView1"; - dataGridView1.RowTemplate.Height = 25; - dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect; - dataGridView1.Size = new Size(508, 241); - dataGridView1.TabIndex = 3; - dataGridView1.CellBorderStyleChanged += dataGridView1_CellBorderStyleChanged; - dataGridView1.CellClick += dataGridView1_CellClick; - dataGridView1.CellContentClick += dataGridView1_CellContentClick; + label1.AutoSize = true; + label1.Location = new Point(520, 19); + label1.Name = "label1"; + label1.Size = new Size(48, 15); + label1.TabIndex = 5; + label1.Text = "Detalles"; + // + // dgvDetalles + // + dgvDetalles.AllowUserToAddRows = false; + dgvDetalles.AllowUserToDeleteRows = false; + dgvDetalles.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + dgvDetalles.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; + dgvDetalles.EditMode = DataGridViewEditMode.EditProgrammatically; + dgvDetalles.ImeMode = ImeMode.On; + dgvDetalles.Location = new Point(520, 40); + dgvDetalles.Name = "dgvDetalles"; + dgvDetalles.RowTemplate.Height = 25; + dgvDetalles.SelectionMode = DataGridViewSelectionMode.FullRowSelect; + dgvDetalles.Size = new Size(384, 241); + dgvDetalles.TabIndex = 4; + // + // dgvFacturas + // + dgvFacturas.AllowUserToAddRows = false; + dgvFacturas.AllowUserToDeleteRows = false; + dgvFacturas.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + dgvFacturas.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; + dgvFacturas.EditMode = DataGridViewEditMode.EditProgrammatically; + dgvFacturas.Location = new Point(6, 40); + dgvFacturas.Name = "dgvFacturas"; + dgvFacturas.RowTemplate.Height = 25; + dgvFacturas.SelectionMode = DataGridViewSelectionMode.FullRowSelect; + dgvFacturas.Size = new Size(508, 241); + dgvFacturas.TabIndex = 3; + dgvFacturas.CellClick += dgvFacturas_CellClick; // // BtnAdd // - BtnAdd.Location = new Point(6, 299); + BtnAdd.Location = new Point(6, 287); BtnAdd.Name = "BtnAdd"; BtnAdd.Size = new Size(75, 23); BtnAdd.TabIndex = 0; @@ -93,16 +120,19 @@ Text = "Ventas"; WindowState = FormWindowState.Maximized; groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)dataGridView2).EndInit(); - ((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit(); + groupBox1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)dgvDetalles).EndInit(); + ((System.ComponentModel.ISupportInitialize)dgvFacturas).EndInit(); ResumeLayout(false); } #endregion private GroupBox groupBox1; - private DataGridView dataGridView1; + private DataGridView dgvFacturas; private Button BtnAdd; - private DataGridView dataGridView2; + private DataGridView dgvDetalles; + private Label label2; + private Label label1; } } \ No newline at end of file diff --git a/Vista/FrmFacturas.cs b/Vista/FrmFacturas.cs index a4661d2..b38a55a 100644 --- a/Vista/FrmFacturas.cs +++ b/Vista/FrmFacturas.cs @@ -10,14 +10,13 @@ namespace Vista public FrmFacturas() { InitializeComponent(); + ConfigurarDataGridViewDetalle(); ActualizarGrilla(); - dataGridView1.CellClick += dataGridView1_CellClick; - ConfigurarDataGridView2(); } private void ActualizarGrilla() { - dataGridView1.DataSource = null; - dataGridView1.DataSource = ControladoraFacturas.Instance.Listar(); + dgvFacturas.DataSource = null; + dgvFacturas.DataSource = ControladoraFacturas.Instance.Listar(); } private void BtnAdd_Click(object sender, EventArgs e) { @@ -26,64 +25,60 @@ namespace Vista ActualizarGrilla(); } - private void dataGridView1_CellBorderStyleChanged(object sender, EventArgs e) + private void ConfigurarDataGridViewDetalle() { - - } - - private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - - } - private void ConfigurarDataGridView2() - { - dataGridView2.AutoGenerateColumns = false; - dataGridView2.Columns.Add(new DataGridViewTextBoxColumn + dgvDetalles.AutoGenerateColumns = false; + dgvDetalles.Columns.Add(new DataGridViewTextBoxColumn { DataPropertyName = "Producto", - HeaderText = "Producto" + HeaderText = "Producto", + Name = "Producto" }); - dataGridView2.Columns.Add(new DataGridViewTextBoxColumn + dgvDetalles.Columns.Add(new DataGridViewTextBoxColumn { DataPropertyName = "Cantidad", - HeaderText = "Cantidad" + HeaderText = "Cantidad", + Name = "Cantidad" + }); - - dataGridView2.Columns.Add(new DataGridViewTextBoxColumn + dgvDetalles.Columns.Add(new DataGridViewTextBoxColumn { DataPropertyName = "PrecioUnitario", - HeaderText = "PrecioUnitariod" + HeaderText = "PrecioUnitario", + Name = "PrecioUnitario" }); - dataGridView2.Columns.Add(new DataGridViewTextBoxColumn + dgvDetalles.Columns.Add(new DataGridViewTextBoxColumn { DataPropertyName = "Subtotal", - HeaderText = "Subtotal" + HeaderText = "Subtotal", + Name = "Subtotal" }); } - private void ActualizarGrillaLotes(ReadOnlyCollection lotes) + private void ActualizarGrillaDetalles(ReadOnlyCollection detalles) { - dataGridView2.DataSource = null; - if (lotes.Any()) + dgvDetalles.DataSource = null; + if (detalles.Any()) { - var loteDatos = lotes.Select(lote => new + var loteDatos = detalles.Select(detalle => new { - Producto = lote.NombreProducto, - Cantidad = lote.CantidadDeProductos, - Subtotal = lote.Subtotal, - PrecioUnitario = lote.PrecioUnitario, + Producto = detalle.Producto.Nombre, + Cantidad = detalle.Cantidad, + Subtotal = detalle.Subtotal, + PrecioUnitario = detalle.Producto.Precio, }).ToList(); - dataGridView2.DataSource = loteDatos; + dgvDetalles.DataSource = loteDatos; } } - private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) + private void dgvFacturas_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { - var selectedFactura = (Factura)dataGridView1.Rows[e.RowIndex].DataBoundItem; - var lotes = ControladoraLotes.Instance.ListarPorFacturaId(selectedFactura.Id); - ActualizarGrillaLotes(lotes); + var selectedFactura = (Factura)dgvFacturas.Rows[e.RowIndex].DataBoundItem; + var detalles = ControladoraFacturas.Instance.ListarDetallesFactura(selectedFactura); + ActualizarGrillaDetalles(detalles); } } + } } diff --git a/Vista/FrmFacturas.resx b/Vista/FrmFacturas.resx index af32865..a395bff 100644 --- a/Vista/FrmFacturas.resx +++ b/Vista/FrmFacturas.resx @@ -18,7 +18,7 @@ System.Resources.ResXResourceReader, System.Windows.Forms, ... System.Resources.ResXResourceWriter, System.Windows.Forms, ... this is my long stringthis is a comment - Blue + Blue [base64 mime encoded serialized .NET Framework object] diff --git a/Vista/FrmProducto.Designer.cs b/Vista/FrmProducto.Designer.cs index f53fcf0..ac2a130 100644 --- a/Vista/FrmProducto.Designer.cs +++ b/Vista/FrmProducto.Designer.cs @@ -33,11 +33,11 @@ label3 = new Label(); label4 = new Label(); label5 = new Label(); - numericUpDown1 = new NumericUpDown(); - textBox1 = new TextBox(); - numericUpDown2 = new NumericUpDown(); - checkBox1 = new CheckBox(); - comboBox1 = new ComboBox(); + numId = new NumericUpDown(); + txtNombre = new TextBox(); + numPrecio = new NumericUpDown(); + checkHabilitado = new CheckBox(); + cmbCategoria = new ComboBox(); btnacept = new Button(); btncancel = new Button(); label6 = new Label(); @@ -46,8 +46,8 @@ dgvProveedor = new DataGridView(); btnaddProveedor = new Button(); btnrmProveedor = new Button(); - ((System.ComponentModel.ISupportInitialize)numericUpDown1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)numericUpDown2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)numId).BeginInit(); + ((System.ComponentModel.ISupportInitialize)numPrecio).BeginInit(); ((System.ComponentModel.ISupportInitialize)dgvProveedorAñadido).BeginInit(); ((System.ComponentModel.ISupportInitialize)dgvProveedor).BeginInit(); SuspendLayout(); @@ -97,47 +97,46 @@ label5.TabIndex = 4; label5.Text = "Categoria"; // - // numericUpDown1 + // numId // - numericUpDown1.Location = new Point(70, 12); - numericUpDown1.Maximum = new decimal(new int[] { 1215752191, 23, 0, 0 }); - numericUpDown1.Name = "numericUpDown1"; - numericUpDown1.Size = new Size(120, 23); - numericUpDown1.TabIndex = 5; + numId.Location = new Point(70, 12); + numId.Maximum = new decimal(new int[] { 1215752191, 23, 0, 0 }); + numId.Name = "numId"; + numId.Size = new Size(120, 23); + numId.TabIndex = 5; // - // textBox1 + // txtNombre // - textBox1.Location = new Point(71, 40); - textBox1.Name = "textBox1"; - textBox1.Size = new Size(120, 23); - textBox1.TabIndex = 6; + txtNombre.Location = new Point(71, 40); + txtNombre.Name = "txtNombre"; + txtNombre.Size = new Size(120, 23); + txtNombre.TabIndex = 6; // - // numericUpDown2 + // numPrecio // - numericUpDown2.Location = new Point(71, 72); - numericUpDown2.Maximum = new decimal(new int[] { 100000000, 0, 0, 0 }); - numericUpDown2.Name = "numericUpDown2"; - numericUpDown2.Size = new Size(120, 23); - numericUpDown2.TabIndex = 7; + numPrecio.Location = new Point(71, 72); + numPrecio.Maximum = new decimal(new int[] { 100000000, 0, 0, 0 }); + numPrecio.Name = "numPrecio"; + numPrecio.Size = new Size(120, 23); + numPrecio.TabIndex = 7; // - // checkBox1 + // checkHabilitado // - checkBox1.AutoSize = true; - checkBox1.Location = new Point(71, 112); - checkBox1.Name = "checkBox1"; - checkBox1.Size = new Size(15, 14); - checkBox1.TabIndex = 8; - checkBox1.UseVisualStyleBackColor = true; + checkHabilitado.AutoSize = true; + checkHabilitado.Location = new Point(71, 112); + checkHabilitado.Name = "checkHabilitado"; + checkHabilitado.Size = new Size(15, 14); + checkHabilitado.TabIndex = 8; + checkHabilitado.UseVisualStyleBackColor = true; // - // comboBox1 + // cmbCategoria // - comboBox1.DropDownStyle = ComboBoxStyle.DropDownList; - comboBox1.FormattingEnabled = true; - comboBox1.Location = new Point(70, 134); - comboBox1.Name = "comboBox1"; - comboBox1.Size = new Size(121, 23); - comboBox1.TabIndex = 9; - comboBox1.SelectedIndexChanged += comboBox1_SelectedIndexChanged; + cmbCategoria.DropDownStyle = ComboBoxStyle.DropDownList; + cmbCategoria.FormattingEnabled = true; + cmbCategoria.Location = new Point(70, 134); + cmbCategoria.Name = "cmbCategoria"; + cmbCategoria.Size = new Size(121, 23); + cmbCategoria.TabIndex = 9; // // btnacept // @@ -147,7 +146,7 @@ btnacept.TabIndex = 10; btnacept.Text = "Aceptar"; btnacept.UseVisualStyleBackColor = true; - btnacept.Click += button1_Click; + btnacept.Click += btnacept_Click; // // btncancel // @@ -157,7 +156,7 @@ btncancel.TabIndex = 11; btncancel.Text = "Cancelar"; btncancel.UseVisualStyleBackColor = true; - btncancel.Click += button2_Click; + btncancel.Click += btnCerrar; // // label6 // @@ -235,11 +234,11 @@ Controls.Add(label6); Controls.Add(btncancel); Controls.Add(btnacept); - Controls.Add(comboBox1); - Controls.Add(checkBox1); - Controls.Add(numericUpDown2); - Controls.Add(textBox1); - Controls.Add(numericUpDown1); + Controls.Add(cmbCategoria); + Controls.Add(checkHabilitado); + Controls.Add(numPrecio); + Controls.Add(txtNombre); + Controls.Add(numId); Controls.Add(label5); Controls.Add(label4); Controls.Add(label3); @@ -247,8 +246,8 @@ Controls.Add(label1); Name = "FrmProducto"; Text = "Producto"; - ((System.ComponentModel.ISupportInitialize)numericUpDown1).EndInit(); - ((System.ComponentModel.ISupportInitialize)numericUpDown2).EndInit(); + ((System.ComponentModel.ISupportInitialize)numId).EndInit(); + ((System.ComponentModel.ISupportInitialize)numPrecio).EndInit(); ((System.ComponentModel.ISupportInitialize)dgvProveedorAñadido).EndInit(); ((System.ComponentModel.ISupportInitialize)dgvProveedor).EndInit(); ResumeLayout(false); @@ -262,11 +261,11 @@ private Label label3; private Label label4; private Label label5; - private NumericUpDown numericUpDown1; - private TextBox textBox1; - private NumericUpDown numericUpDown2; - private CheckBox checkBox1; - private ComboBox comboBox1; + private NumericUpDown numId; + private TextBox txtNombre; + private NumericUpDown numPrecio; + private CheckBox checkHabilitado; + private ComboBox cmbCategoria; private Button btnacept; private Button btncancel; private Label label6; diff --git a/Vista/FrmProducto.cs b/Vista/FrmProducto.cs index 4565a97..a96c514 100644 --- a/Vista/FrmProducto.cs +++ b/Vista/FrmProducto.cs @@ -16,43 +16,44 @@ namespace Vista public partial class FrmProducto : Form { private Producto nuevoproducto = new Producto(); - private Producto _producto; - private bool _esModificacion; - - public FrmProducto() + private bool mod = false; + public FrmProducto(Producto? producto = null) { InitializeComponent(); CargarCategorias(); CargarTabla(); + if (producto != null) + { + nuevoproducto = producto; + mod = true; + InicializarFormulario(); + } } - public FrmProducto(Producto producto = null, bool esModificacion = false) - { - InitializeComponent(); - _producto = producto ?? new Producto(); - _esModificacion = esModificacion; - CargarCategorias(); - CargarTabla(); - InicializarFormulario(); - } + private void InicializarFormulario() { - if (_esModificacion && _producto != null) - { - numericUpDown1.Value = _producto.Id; - numericUpDown1.Enabled = false; - textBox1.Text = _producto.Nombre; - numericUpDown2.Value = (decimal)_producto.Precio; - checkBox1.Checked = _producto.Habilitado; - comboBox1.SelectedValue = _producto.Categoria.Id; - dgvProveedorAñadido.DataSource = _producto.ListarProveedores(); - } + numId.Value = nuevoproducto.Id; + numId.Enabled = false; + txtNombre.Text = nuevoproducto.Nombre; + numPrecio.Value = (decimal)nuevoproducto.Precio; + checkHabilitado.Checked = nuevoproducto.Habilitado; + cmbCategoria.SelectedValue = nuevoproducto.Categoria.Id; + dgvProveedorAñadido.DataSource = nuevoproducto.ListarProveedores(); + } private void CargarTabla() { dgvProveedor.DataSource = null; dgvProveedor.DataSource = ControladoraProveedores.Instance.Listar(); + if (mod) + { + foreach (Proveedor prov in ControladoraProductos.Instance.ListarProveedores(nuevoproducto)) + { + nuevoproducto.AñadirProveedor(prov); + } + } } private void CargarCategorias() @@ -61,58 +62,37 @@ namespace Vista var categorias = ControladoraCategorias.Instance.Listar(); // Configurar el ComboBox para categorías - comboBox1.DisplayMember = "Descripcion"; // Mostrar la propiedad Descripcion - comboBox1.ValueMember = "Id"; // Usar la propiedad Id como valor + cmbCategoria.DisplayMember = "Descripcion"; // Mostrar la propiedad Descripcion + cmbCategoria.ValueMember = "Id"; // Usar la propiedad Id como valor // Asignar la lista de categorías al ComboBox - comboBox1.DataSource = categorias; + cmbCategoria.DataSource = categorias; } - private void CargarDatosProducto() - { - if (_producto != null) - { - numericUpDown1.Value = _producto.Id; - textBox1.Text = _producto.Nombre; - numericUpDown2.Value = Convert.ToDecimal(_producto.Precio); - checkBox1.Checked = _producto.Habilitado; - comboBox1.SelectedItem = _producto.Categoria; - - if (_esModificacion) - { - numericUpDown1.Enabled = false; // Bloquear el ID - } - } - } private bool ValidarDatos() { string devolucion = ""; // Validar Nombre - if (string.IsNullOrEmpty(textBox1.Text)) - { - devolucion += "El nombre del producto no puede estar vacío.\n"; - } - else if (textBox1.Text.Length > 100) // Limite de caracteres - { - devolucion += "El nombre del producto no puede superar los 100 caracteres.\n"; - } + if (string.IsNullOrEmpty(txtNombre.Text)) { devolucion += "El nombre del producto no puede estar vacío.\n"; } + if (txtNombre.Text.Length > 100) { devolucion += "El nombre del producto no puede superar los 100 caracteres.\n"; } + if (numId.Value <= 0) { devolucion += "NO es un cuit válido"; }; // Validar Precio - if (numericUpDown2.Value <= 0) + if (numPrecio.Value <= 0) { devolucion += "El precio debe ser mayor a cero.\n"; } // Validar ID (Si es necesario) - if (!_esModificacion && ControladoraProductos.Instance.Listar().Any(p => p.Id == (int)numericUpDown1.Value)) + if (!mod && ControladoraProductos.Instance.Listar().Any(p => p.Id == (int)numId.Value)) { devolucion += "Ya existe un producto con el mismo ID.\n"; } // Validar Categoría Seleccionada - if (comboBox1.SelectedItem == null) + if (cmbCategoria.SelectedItem == null) { devolucion += "Debe seleccionar una categoría.\n"; } @@ -128,24 +108,24 @@ namespace Vista } } - private void button1_Click(object sender, EventArgs e) + private void btnacept_Click(object sender, EventArgs e) { if (ValidarDatos()) { - _producto.Nombre = textBox1.Text; - _producto.Precio = (double)numericUpDown2.Value; - _producto.Habilitado = checkBox1.Checked; - _producto.Categoria = (Categoria)comboBox1.SelectedItem; + nuevoproducto.Nombre = txtNombre.Text; + nuevoproducto.Precio = (double)numPrecio.Value; + nuevoproducto.Habilitado = checkHabilitado.Checked; + nuevoproducto.Categoria = (Categoria)cmbCategoria.SelectedItem; string mensaje; - if (_esModificacion) + if (mod) { - mensaje = ControladoraProductos.Instance.Modificar(_producto); + mensaje = ControladoraProductos.Instance.Modificar(nuevoproducto); } else { - _producto.Id = (int)numericUpDown1.Value; - mensaje = ControladoraProductos.Instance.Añadir(_producto); + nuevoproducto.Id = (int)numId.Value; + mensaje = ControladoraProductos.Instance.Añadir(nuevoproducto); } MessageBox.Show(mensaje, "Información", MessageBoxButtons.OK, MessageBoxIcon.Information); @@ -153,7 +133,7 @@ namespace Vista } } - private void button2_Click(object sender, EventArgs e) + private void btnCerrar(object sender, EventArgs e) { this.Close(); } @@ -172,9 +152,15 @@ namespace Vista foreach (DataGridViewRow selectedRow in dgvProveedor.SelectedRows) { Proveedor proveedor = (Proveedor)selectedRow.DataBoundItem; - _producto.AñadirProveedor(proveedor); + var checkcolicion = nuevoproducto.ListarProveedores().Contains(proveedor); + if (checkcolicion) + { + MessageBox.Show("El proveedor ya fue cargado"); + return; + } + nuevoproducto.AñadirProveedor(proveedor); dgvProveedorAñadido.DataSource = null; - dgvProveedorAñadido.DataSource = _producto.ListarProveedores(); + dgvProveedorAñadido.DataSource = nuevoproducto.ListarProveedores(); } } else @@ -197,9 +183,9 @@ namespace Vista foreach (DataGridViewRow selectedRow in dgvProveedorAñadido.SelectedRows) { Proveedor proveedor = (Proveedor)selectedRow.DataBoundItem; - dgvProveedorAñadido.Rows.Remove(selectedRow); - Proveedor proveedoreliminar = _producto.ListarProveedores().FirstOrDefault(x => x.Cuit == proveedor.Cuit); - _producto.EliminarProveedor(proveedoreliminar); + nuevoproducto.EliminarProveedor(proveedor); + dgvProveedorAñadido.DataSource = null; + dgvProveedorAñadido.DataSource = nuevoproducto.ListarProveedores(); } } else @@ -212,5 +198,6 @@ namespace Vista MessageBox.Show($"Error al eliminar proveedor: {ex.Message}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } - } + +} } diff --git a/Vista/FrmProductoMod.Designer.cs b/Vista/FrmProductoMod.Designer.cs deleted file mode 100644 index 43b7527..0000000 --- a/Vista/FrmProductoMod.Designer.cs +++ /dev/null @@ -1,45 +0,0 @@ -namespace Vista -{ - partial class FrmProductoMod - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - SuspendLayout(); - // - // FrmProductoMod - // - AutoScaleDimensions = new SizeF(7F, 15F); - AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(654, 299); - Name = "FrmProductoMod"; - Text = "Form1"; - ResumeLayout(false); - } - - #endregion - } -} \ No newline at end of file diff --git a/Vista/FrmProductoMod.cs b/Vista/FrmProductoMod.cs deleted file mode 100644 index 2a1aebb..0000000 --- a/Vista/FrmProductoMod.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace Vista -{ - public partial class FrmProductoMod : Form - { - public FrmProductoMod() - { - InitializeComponent(); - } - } -} diff --git a/Vista/FrmProductoMod.resx b/Vista/FrmProductoMod.resx deleted file mode 100644 index af32865..0000000 --- a/Vista/FrmProductoMod.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Vista/FrmProductos.Designer.cs b/Vista/FrmProductos.Designer.cs index af2f4f9..201e21f 100644 --- a/Vista/FrmProductos.Designer.cs +++ b/Vista/FrmProductos.Designer.cs @@ -29,7 +29,7 @@ private void InitializeComponent() { groupBox1 = new GroupBox(); - button2 = new Button(); + btnModificar = new Button(); label3 = new Label(); dgvProveedores = new DataGridView(); label2 = new Label(); @@ -47,7 +47,7 @@ // // groupBox1 // - groupBox1.Controls.Add(button2); + groupBox1.Controls.Add(btnModificar); groupBox1.Controls.Add(label3); groupBox1.Controls.Add(dgvProveedores); groupBox1.Controls.Add(label2); @@ -60,15 +60,15 @@ groupBox1.TabIndex = 5; groupBox1.TabStop = false; // - // button2 + // btnModificar // - button2.Location = new Point(87, 263); - button2.Name = "button2"; - button2.Size = new Size(75, 23); - button2.TabIndex = 11; - button2.Text = "Modificar"; - button2.UseVisualStyleBackColor = true; - button2.Click += button2_Click; + btnModificar.Location = new Point(87, 263); + btnModificar.Name = "btnModificar"; + btnModificar.Size = new Size(75, 23); + btnModificar.TabIndex = 11; + btnModificar.Text = "Modificar"; + btnModificar.UseVisualStyleBackColor = true; + btnModificar.Click += btnModificar_Click; // // label3 // @@ -195,6 +195,6 @@ private Label label1; private DataGridView dgvProveedores; private Label label3; - private Button button2; + private Button btnModificar; } } \ No newline at end of file diff --git a/Vista/FrmProductos.cs b/Vista/FrmProductos.cs index 88f8891..b96419e 100644 --- a/Vista/FrmProductos.cs +++ b/Vista/FrmProductos.cs @@ -34,7 +34,7 @@ namespace Vista var colId = new DataGridViewTextBoxColumn { DataPropertyName = "Id", - HeaderText = "ID", + HeaderText = "Id", Name = "Id" }; @@ -82,15 +82,6 @@ namespace Vista var categorias = ControladoraCategorias.Instance.Listar(); dgvCategorias.DataSource = categorias; - if (dgvProductos.SelectedRows.Count > 0) - { - Producto producto = new Producto - { - Id = int.Parse(dgvProductos.SelectedRows[0].Cells["Id"].Value.ToString()), - }; - dgvProveedores.DataSource = ControladoraProductos.Instance.ListarProveedores(producto); - } - // Obtener la lista de productos y proyectar los datos var productos = ControladoraProductos.Instance.Listar() .Select(p => new @@ -166,18 +157,10 @@ namespace Vista private void dgvProductos_CellClick(object sender, DataGridViewCellEventArgs e) { if (dgvProductos.SelectedRows.Count == 0) return; - - if (dgvProductos.SelectedRows.Count > 0) - { - Producto producto = new Producto - { - Id = Convert.ToInt32(dgvProductos.SelectedRows[0].Cells["Id"].Value.ToString()), - }; - dgvProveedores.DataSource = ControladoraProductos.Instance.ListarProveedores(producto); - } + ActualizarGrillaProveedores(); } - private void button2_Click(object sender, EventArgs e) + private void btnModificar_Click(object sender, EventArgs e) { if (dgvProductos.SelectedRows.Count < 1) { @@ -185,18 +168,34 @@ namespace Vista return; } - Producto producto = new Producto() + Producto producto = new Producto { Id = Convert.ToInt32(dgvProductos.SelectedRows[0].Cells["Id"].Value), - Nombre = dgvProductos.SelectedRows[0].Cells["Nombre"].Value.ToString(), - Precio = Convert.ToInt32(dgvProductos.SelectedRows[0].Cells["Precio"].Value), + Nombre = dgvProductos.SelectedRows[0].Cells["Nombre"].Value as String, + Precio = Convert.ToDouble(dgvProductos.SelectedRows[0].Cells["Precio"].Value), Habilitado = Convert.ToBoolean(dgvProductos.SelectedRows[0].Cells["Habilitado"].Value), Categoria = ControladoraCategorias.Instance.Listar().FirstOrDefault(c => c.Descripcion == dgvProductos.SelectedRows[0].Cells["Categoria"].Value.ToString()) }; + foreach (Proveedor prov in ControladoraProductos.Instance.ListarProveedores(producto)) + { + producto.AñadirProveedor(prov); + } - var formModificar = new FrmProducto(producto, true); + var formModificar = new FrmProducto(producto); formModificar.ShowDialog(); ActualizarGrilla(); + ActualizarGrillaProveedores(); + } + private void ActualizarGrillaProveedores() + { + if (dgvProductos.SelectedRows.Count > 0) + { + Producto producto = new Producto + { + Id = Convert.ToInt32(dgvProductos.SelectedRows[0].Cells["Id"].Value), + }; + dgvProveedores.DataSource = ControladoraProductos.Instance.ListarProveedores(producto); + } } } } diff --git a/Vista/FrmProductos.resx b/Vista/FrmProductos.resx index af32865..a395bff 100644 --- a/Vista/FrmProductos.resx +++ b/Vista/FrmProductos.resx @@ -18,7 +18,7 @@ System.Resources.ResXResourceReader, System.Windows.Forms, ... System.Resources.ResXResourceWriter, System.Windows.Forms, ... this is my long stringthis is a comment - Blue + Blue [base64 mime encoded serialized .NET Framework object] diff --git a/Vista/FrmProveedor.cs b/Vista/FrmProveedor.cs index 7d5f231..d8e33ae 100644 --- a/Vista/FrmProveedor.cs +++ b/Vista/FrmProveedor.cs @@ -48,6 +48,7 @@ namespace Vista if (string.IsNullOrEmpty(txtSocial.Text)) devolucion += "La razon social no puede ser nulo o vacio\n"; if (txtSocial.Text.Length > 50) devolucion += "La razon social no puede superar los 50 chars\n"; if (string.IsNullOrEmpty(txtNombre.Text)) devolucion += "El Nombre no puede ser nulo o vacio\n"; + if (numCuit.Value <= 0) { devolucion += "NO es un cuit válido"; }; if (devolucion == "") { diff --git a/Vista/Vista.csproj.user b/Vista/Vista.csproj.user index 3260701..23c81a0 100644 --- a/Vista/Vista.csproj.user +++ b/Vista/Vista.csproj.user @@ -8,9 +8,6 @@ Form - - Form - Form diff --git a/Vista/obj/Debug/net6.0-windows/Vista.GeneratedMSBuildEditorConfig.editorconfig b/Vista/obj/Debug/net6.0-windows/Vista.GeneratedMSBuildEditorConfig.editorconfig index b36d789..06bf663 100644 --- a/Vista/obj/Debug/net6.0-windows/Vista.GeneratedMSBuildEditorConfig.editorconfig +++ b/Vista/obj/Debug/net6.0-windows/Vista.GeneratedMSBuildEditorConfig.editorconfig @@ -14,4 +14,4 @@ build_property.PlatformNeutralAssembly = build_property.EnforceExtendedAnalyzerRules = build_property._SupportedPlatformList = Linux,macOS,Windows build_property.RootNamespace = Vista -build_property.ProjectDir = C:\Users\fedpo\Downloads\Final actual(2)\Final actual\Vista\ +build_property.ProjectDir = C:\Users\fedpo\Downloads\final actual\Vista\ diff --git a/Vista/obj/Vista.csproj.nuget.dgspec.json b/Vista/obj/Vista.csproj.nuget.dgspec.json index fe78551..87aad7e 100644 --- a/Vista/obj/Vista.csproj.nuget.dgspec.json +++ b/Vista/obj/Vista.csproj.nuget.dgspec.json @@ -1,17 +1,17 @@ { "format": 1, "restore": { - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Vista\\Vista.csproj": {} + "C:\\Users\\fedpo\\Downloads\\final actual\\Vista\\Vista.csproj": {} }, "projects": { - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Controladora\\Controladora.csproj": { + "C:\\Users\\fedpo\\Downloads\\final actual\\Controladora\\Controladora.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Controladora\\Controladora.csproj", + "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\Controladora\\Controladora.csproj", "projectName": "Controladora", - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Controladora\\Controladora.csproj", + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Controladora\\Controladora.csproj", "packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\", - "outputPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Controladora\\obj\\", + "outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Controladora\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config", @@ -29,11 +29,11 @@ "net6.0": { "targetAlias": "net6.0", "projectReferences": { - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj": { - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj" + "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj": { + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj" }, - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\Modelo.csproj": { - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\Modelo.csproj" + "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\Modelo.csproj": { + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\Modelo.csproj" } } } @@ -67,14 +67,14 @@ } } }, - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj": { + "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj", + "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj", "projectName": "Entidades", - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj", + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj", "packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\", - "outputPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\obj\\", + "outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config", @@ -123,14 +123,14 @@ } } }, - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Informes\\Informes.csproj": { + "C:\\Users\\fedpo\\Downloads\\final actual\\Informes\\Informes.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Informes\\Informes.csproj", + "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\Informes\\Informes.csproj", "projectName": "Informes", - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Informes\\Informes.csproj", + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Informes\\Informes.csproj", "packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\", - "outputPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Informes\\obj\\", + "outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Informes\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config", @@ -148,8 +148,8 @@ "net6.0": { "targetAlias": "net6.0", "projectReferences": { - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj": { - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj" + "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj": { + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj" } } } @@ -183,14 +183,14 @@ } } }, - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\Modelo.csproj": { + "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\Modelo.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\Modelo.csproj", + "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\Modelo.csproj", "projectName": "Modelo", - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\Modelo.csproj", + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\Modelo.csproj", "packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\", - "outputPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Modelo\\obj\\", + "outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Modelo\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config", @@ -208,8 +208,8 @@ "net6.0": { "targetAlias": "net6.0", "projectReferences": { - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj": { - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj" + "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj": { + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj" } } } @@ -243,14 +243,14 @@ } } }, - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Vista\\Vista.csproj": { + "C:\\Users\\fedpo\\Downloads\\final actual\\Vista\\Vista.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Vista\\Vista.csproj", + "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\Vista\\Vista.csproj", "projectName": "Vista", - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Vista\\Vista.csproj", + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Vista\\Vista.csproj", "packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\", - "outputPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Vista\\obj\\", + "outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Vista\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config", @@ -268,14 +268,14 @@ "net6.0-windows7.0": { "targetAlias": "net6.0-windows", "projectReferences": { - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Controladora\\Controladora.csproj": { - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Controladora\\Controladora.csproj" + "C:\\Users\\fedpo\\Downloads\\final actual\\Controladora\\Controladora.csproj": { + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Controladora\\Controladora.csproj" }, - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj": { - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj" + "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj": { + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj" }, - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Informes\\Informes.csproj": { - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Informes\\Informes.csproj" + "C:\\Users\\fedpo\\Downloads\\final actual\\Informes\\Informes.csproj": { + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Informes\\Informes.csproj" } } } diff --git a/Vista/obj/project.assets.json b/Vista/obj/project.assets.json index f31ce4c..c64ee7e 100644 --- a/Vista/obj/project.assets.json +++ b/Vista/obj/project.assets.json @@ -89,11 +89,11 @@ "project": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Vista\\Vista.csproj", + "projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\Vista\\Vista.csproj", "projectName": "Vista", - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Vista\\Vista.csproj", + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Vista\\Vista.csproj", "packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\", - "outputPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Vista\\obj\\", + "outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Vista\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config", @@ -111,14 +111,14 @@ "net6.0-windows7.0": { "targetAlias": "net6.0-windows", "projectReferences": { - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Controladora\\Controladora.csproj": { - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Controladora\\Controladora.csproj" + "C:\\Users\\fedpo\\Downloads\\final actual\\Controladora\\Controladora.csproj": { + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Controladora\\Controladora.csproj" }, - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj": { - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Entidades\\Entidades.csproj" + "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj": { + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj" }, - "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Informes\\Informes.csproj": { - "projectPath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Informes\\Informes.csproj" + "C:\\Users\\fedpo\\Downloads\\final actual\\Informes\\Informes.csproj": { + "projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\Informes\\Informes.csproj" } } } diff --git a/Vista/obj/project.nuget.cache b/Vista/obj/project.nuget.cache index a917d4f..dd7b274 100644 --- a/Vista/obj/project.nuget.cache +++ b/Vista/obj/project.nuget.cache @@ -1,8 +1,8 @@ { "version": 2, - "dgSpecHash": "9xoX6uTcIEHTfvrkxbiNwJryG4RwhPq70t4kNMVhRSGHltn2QOmFl8cQl5qjiBimTD2Zuo2MWeKOifxctKIbdg==", + "dgSpecHash": "u13WwQGaPCePxL1JyQkpyhXuHxLQ97k9ktwi/o+F5Yk11GsR1/fPqs1rMKxJn/R3EX1AhoyxsvvOwv1MhGTPhQ==", "success": true, - "projectFilePath": "C:\\Users\\fedpo\\Downloads\\Final actual(2)\\Final actual\\Vista\\Vista.csproj", + "projectFilePath": "C:\\Users\\fedpo\\Downloads\\final actual\\Vista\\Vista.csproj", "expectedPackageFiles": [], "logs": [] } \ No newline at end of file