diff --git a/.vs/Final_OOP/FileContentIndex/228732c3-1d04-46bb-885d-bec5ac443d7f.vsidx b/.vs/Final_OOP/FileContentIndex/228732c3-1d04-46bb-885d-bec5ac443d7f.vsidx new file mode 100644 index 0000000..f33d7a6 Binary files /dev/null and b/.vs/Final_OOP/FileContentIndex/228732c3-1d04-46bb-885d-bec5ac443d7f.vsidx differ diff --git a/.vs/Final_OOP/FileContentIndex/649aa213-d949-4f6c-9273-39a72487e001.vsidx b/.vs/Final_OOP/FileContentIndex/649aa213-d949-4f6c-9273-39a72487e001.vsidx new file mode 100644 index 0000000..ebc844d Binary files /dev/null and b/.vs/Final_OOP/FileContentIndex/649aa213-d949-4f6c-9273-39a72487e001.vsidx differ diff --git a/.vs/Final_OOP/FileContentIndex/e87bd5af-5791-49a4-9c50-ab16be9ac1ea.vsidx b/.vs/Final_OOP/FileContentIndex/e87bd5af-5791-49a4-9c50-ab16be9ac1ea.vsidx new file mode 100644 index 0000000..b5adf51 Binary files /dev/null and b/.vs/Final_OOP/FileContentIndex/e87bd5af-5791-49a4-9c50-ab16be9ac1ea.vsidx differ diff --git a/.vs/Final_OOP/v17/.suo b/.vs/Final_OOP/v17/.suo index f0af9c5..a8091fa 100644 Binary files a/.vs/Final_OOP/v17/.suo and b/.vs/Final_OOP/v17/.suo differ diff --git a/.vs/verdadero/v17/.wsuo b/.vs/verdadero/v17/.wsuo new file mode 100644 index 0000000..fa73f81 Binary files /dev/null and b/.vs/verdadero/v17/.wsuo differ diff --git a/Controladora/obj/Debug/net6.0/Controladora.GeneratedMSBuildEditorConfig.editorconfig b/Controladora/obj/Debug/net6.0/Controladora.GeneratedMSBuildEditorConfig.editorconfig index 6a8dc92..4acf485 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\Nacho\Source\Repos\Final_OOP\Controladora\ +build_property.ProjectDir = C:\Users\Nacho\Desktop\verdadero\Controladora\ diff --git a/Controladora/obj/Debug/net6.0/Controladora.assets.cache b/Controladora/obj/Debug/net6.0/Controladora.assets.cache index b15baad..c2e4b4a 100644 Binary files a/Controladora/obj/Debug/net6.0/Controladora.assets.cache and b/Controladora/obj/Debug/net6.0/Controladora.assets.cache differ diff --git a/Entidades/Factura.cs b/Entidades/Factura.cs index d153b74..5928614 100644 --- a/Entidades/Factura.cs +++ b/Entidades/Factura.cs @@ -18,11 +18,11 @@ namespace Entidades public ReadOnlyCollection MostrarDetalles() { - + return detalles.AsReadOnly(); } public void AñadirDetalle(DetalleFactura detalle) { - + detalles.Add(detalle); } public void ModificarDetalle(DetalleFactura detalle) @@ -32,7 +32,11 @@ namespace Entidades public void EliminarDetalle(DetalleFactura detalle) { - + var aeliminar = detalles.Find(x => x.Id == detalle.Id); + if (aeliminar != null) + { + detalles.Remove(aeliminar); + } } } diff --git a/Entidades/OrdenDeCompra.cs b/Entidades/OrdenDeCompra.cs index 8a77dab..9860fe5 100644 --- a/Entidades/OrdenDeCompra.cs +++ b/Entidades/OrdenDeCompra.cs @@ -9,7 +9,11 @@ namespace Entidades { public class OrdenDeCompra { - public int Id { get; set; } + public OrdenDeCompra() + { + Productos = new List(); + } + public int Id { get; set; } private List Productos { get; set; } @@ -17,12 +21,12 @@ namespace Entidades public ReadOnlyCollection MostrarDetalles() { - + return Productos.AsReadOnly(); } public void AñadirDetalle(DetalleOrdenDeCompra detalle) { - + Productos.Add(detalle); } public void ModificarDetalle(DetalleOrdenDeCompra detalle) @@ -32,7 +36,11 @@ namespace Entidades public void EliminarDetalle(DetalleOrdenDeCompra detalle) { - + var aeliminar = Productos.Find(x => x.Id == detalle.Id); + if (aeliminar != null) + { + Productos.Remove(aeliminar); + } } } } diff --git a/Entidades/PedidoDePresupuesto.cs b/Entidades/PedidoDePresupuesto.cs index be503bc..6d31df8 100644 --- a/Entidades/PedidoDePresupuesto.cs +++ b/Entidades/PedidoDePresupuesto.cs @@ -23,20 +23,8 @@ namespace Entidades public void AñadirDetalle(DetallePedido detalle) { - { - - try - { - detallesPedidos.Add(detalle); - - } - catch (Exception) - { + detallesPedidos.Add(detalle); - throw; - } - - } } public ReadOnlyCollection MostrarDetalles() diff --git a/Entidades/obj/Debug/net6.0/Entidades.GeneratedMSBuildEditorConfig.editorconfig b/Entidades/obj/Debug/net6.0/Entidades.GeneratedMSBuildEditorConfig.editorconfig index 02b5b6b..a03b310 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\Nacho\source\repos\Final_OOP\Entidades\ +build_property.ProjectDir = C:\Users\Nacho\Desktop\verdadero\Entidades\ diff --git a/Entidades/obj/Debug/net6.0/Entidades.assets.cache b/Entidades/obj/Debug/net6.0/Entidades.assets.cache index 7581549..a8c056a 100644 Binary files a/Entidades/obj/Debug/net6.0/Entidades.assets.cache and b/Entidades/obj/Debug/net6.0/Entidades.assets.cache differ diff --git a/Modelo/obj/Debug/net6.0/Modelo.GeneratedMSBuildEditorConfig.editorconfig b/Modelo/obj/Debug/net6.0/Modelo.GeneratedMSBuildEditorConfig.editorconfig index 9245cf1..83104bd 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\Nacho\Source\Repos\Final_OOP\Modelo\ +build_property.ProjectDir = C:\Users\Nacho\Desktop\verdadero\Modelo\ diff --git a/Modelo/obj/Debug/net6.0/Modelo.assets.cache b/Modelo/obj/Debug/net6.0/Modelo.assets.cache index 40be5fb..5aa3d15 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/Vista/Form1.resx b/Vista/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Vista/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/obj/Debug/net6.0-windows/Vista.GeneratedMSBuildEditorConfig.editorconfig b/Vista/obj/Debug/net6.0-windows/Vista.GeneratedMSBuildEditorConfig.editorconfig index f256562..5c5d4c4 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\Nacho\Source\Repos\Final_OOP\Vista\ +build_property.ProjectDir = C:\Users\Nacho\Desktop\verdadero\Vista\ diff --git a/Vista/obj/Debug/net6.0-windows/Vista.assets.cache b/Vista/obj/Debug/net6.0-windows/Vista.assets.cache index 2371bfc..d7a9c70 100644 Binary files a/Vista/obj/Debug/net6.0-windows/Vista.assets.cache and b/Vista/obj/Debug/net6.0-windows/Vista.assets.cache differ diff --git a/Vista/obj/Debug/net6.0-windows/Vista.designer.deps.json b/Vista/obj/Debug/net6.0-windows/Vista.designer.deps.json new file mode 100644 index 0000000..706cdfa --- /dev/null +++ b/Vista/obj/Debug/net6.0-windows/Vista.designer.deps.json @@ -0,0 +1,11 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v6.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v6.0": {} + }, + "libraries": {} +} \ No newline at end of file diff --git a/Vista/obj/Debug/net6.0-windows/Vista.designer.runtimeconfig.json b/Vista/obj/Debug/net6.0-windows/Vista.designer.runtimeconfig.json new file mode 100644 index 0000000..a0cf75f --- /dev/null +++ b/Vista/obj/Debug/net6.0-windows/Vista.designer.runtimeconfig.json @@ -0,0 +1,23 @@ +{ + "runtimeOptions": { + "tfm": "net6.0", + "frameworks": [ + { + "name": "Microsoft.NETCore.App", + "version": "6.0.0" + }, + { + "name": "Microsoft.WindowsDesktop.App", + "version": "6.0.0" + } + ], + "additionalProbingPaths": [ + "C:\\Users\\Nacho\\.dotnet\\store\\|arch|\\|tfm|", + "C:\\Users\\Nacho\\.nuget\\packages", + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configProperties": { + "Microsoft.NETCore.DotNetHostPolicy.SetAppPaths": true + } + } +} \ No newline at end of file