guardado hecho hasta ordenes de compra

This commit is contained in:
fedpo
2024-08-06 06:17:48 +01:00
parent 5b7ee8c6bc
commit d9b810b550
48 changed files with 592 additions and 252 deletions

View File

@@ -4,6 +4,29 @@ namespace Entidades
public class DetalleOrdenDeCompra: Detalle<Producto>
{
public int IdOrdenDeCompra { get; set; }
public Presupuesto presupuesto { get; set; }
public double MontoCU { get; set; }
public int IdPresupuesto
{
get
{
return presupuesto.Id;
}
}
public string NombreProducto
{
get
{
return Producto.Nombre;
}
}
public double SubTotal
{
get
{
return MontoCU * Cantidad;
}
}
}
}

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram MajorVersion="1" MinorVersion="1">
<Class Name="Entidades.Categoria">
<Position X="4" Y="1.75" Width="1.5" />
<Position X="2" Y="9.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAACAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Categoria.cs</FileName>
@@ -15,20 +15,19 @@
</TypeIdentifier>
</Class>
<Class Name="Entidades.Detalle&lt;T&gt;">
<Position X="10.25" Y="0.5" Width="1.5" />
<Position X="10.75" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAACAAEAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Detalle.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="Entidades.DetalleFactura">
<Position X="12.75" Y="2.25" Width="1.5" />
<InheritanceLine Type="Entidades.Detalle&lt;T&gt;" ManuallyRouted="true">
<Position X="12.5" Y="2.25" Width="1.5" />
<InheritanceLine Type="Entidades.Detalle&lt;T&gt;" ManuallyRouted="true" FixedFromPoint="true">
<Path>
<Point X="11" Y="1.988" />
<Point X="11" Y="2.365" />
<Point X="13.5" Y="2.365" />
<Point X="13.5" Y="2.25" />
<Point X="12.25" Y="1.375" />
<Point X="13.25" Y="1.375" />
<Point X="13.25" Y="2.25" />
</Path>
</InheritanceLine>
<TypeIdentifier>
@@ -38,20 +37,28 @@
</Class>
<Class Name="Entidades.DetalleOrdenDeCompra">
<Position X="10" Y="2.75" Width="2" />
<InheritanceLine Type="Entidades.Detalle&lt;T&gt;" ManuallyRouted="true" FixedFromPoint="true">
<Path>
<Point X="11.812" Y="1.988" />
<Point X="11.812" Y="2.365" />
<Point X="11" Y="2.365" />
<Point X="11" Y="2.75" />
</Path>
</InheritanceLine>
<TypeIdentifier>
<HashCode>AAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAA=</HashCode>
<HashCode>AAACAASAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAA=</HashCode>
<FileName>DetalleOrdenDeCompra.cs</FileName>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="presupuesto" />
</ShowAsAssociation>
</Class>
<Class Name="Entidades.DetallePresupuesto">
<Position X="6.25" Y="1.25" Width="1.75" />
<InheritanceLine Type="Entidades.Detalle&lt;T&gt;" FixedFromPoint="true">
<InheritanceLine Type="Entidades.Detalle&lt;T&gt;" ManuallyRouted="true" FixedFromPoint="true">
<Path>
<Point X="11" Y="1.988" />
<Point X="11" Y="2.155" />
<Point X="9.958" Y="2.155" Type="JumpStart" />
<Point X="9.792" Y="2.155" Type="JumpEnd" />
<Point X="8" Y="2.155" />
<Point X="10.75" Y="1.438" />
<Point X="8" Y="1.438" />
</Path>
</InheritanceLine>
<TypeIdentifier>
@@ -73,7 +80,13 @@
</ShowAsCollectionAssociation>
</Class>
<Class Name="Entidades.Lote">
<Position X="0.75" Y="1.75" Width="2" />
<Position X="2" Y="0.75" Width="2" />
<InheritanceLine Type="Entidades.Detalle&lt;T&gt;" FixedFromPoint="true">
<Path>
<Point X="10.75" Y="1" />
<Point X="4" Y="1" />
</Path>
</InheritanceLine>
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAEAAAAAAAAAAAAAABAAAAAAAAAAAAA=</HashCode>
<FileName>Lote.cs</FileName>
@@ -87,7 +100,7 @@
</MemberNameLabel>
</AssociationLine>
<TypeIdentifier>
<HashCode>AAACAAAAAAAQAAAAAAAAAAADBAABAAAAAAAAAAAAAAA=</HashCode>
<HashCode>AAACAAAAAAAQABAAAAAAAAADBAABAAAAAAAAAAAAAAA=</HashCode>
<FileName>OrdenDeCompra.cs</FileName>
</TypeIdentifier>
<ShowAsAssociation>
@@ -99,14 +112,6 @@
</Class>
<Class Name="Entidades.Presupuesto">
<Position X="7.25" Y="3.5" Width="1.5" />
<AssociationLine Name="Proveedor" Type="Entidades.Proveedor" ManuallyRouted="true" FixedFromPoint="true" FixedToPoint="true">
<Path>
<Point X="8" Y="6.017" />
<Point X="8" Y="5.689" />
<Point X="8.25" Y="5.689" />
<Point X="8.25" Y="6.75" />
</Path>
</AssociationLine>
<AssociationLine Name="detalles" Type="Entidades.DetallePresupuesto" FixedFromPoint="true" FixedToPoint="true">
<Path>
<Point X="7.25" Y="4.062" />
@@ -115,7 +120,7 @@
</Path>
</AssociationLine>
<TypeIdentifier>
<HashCode>AAACAAAAAAAQAAEAAAAAAAADBAADABAAAAAAAAAAAAA=</HashCode>
<HashCode>AAACAAAAAAAQAAEAAAAAAAADBAADABAAAAgAAAAAAAA=</HashCode>
<FileName>Presupuesto.cs</FileName>
</TypeIdentifier>
<ShowAsAssociation>
@@ -126,18 +131,19 @@
</ShowAsCollectionAssociation>
</Class>
<Class Name="Entidades.Producto">
<Position X="3" Y="4.25" Width="1.75" />
<Position X="4.25" Y="8.25" Width="1.75" />
<Members>
<Method Name="AñadirCategoria" Hidden="true" />
<Field Name="categorias" Hidden="true" />
<Method Name="EliminarCategoria" Hidden="true" />
<Method Name="MostrarCategorias" Hidden="true" />
</Members>
<AssociationLine Name="proveedores" Type="Entidades.Proveedor" ManuallyRouted="true" FixedFromPoint="true" FixedToPoint="true">
<AssociationLine Name="proveedores" Type="Entidades.Proveedor" ManuallyRouted="true" FixedFromPoint="true">
<Path>
<Point X="4.75" Y="6.138" />
<Point X="7.125" Y="6.138" />
<Point X="7.125" Y="6.75" />
<Point X="6" Y="8.375" />
<Point X="6.75" Y="8.375" />
<Point X="6.75" Y="8.375" />
<Point X="7" Y="8.375" />
</Path>
</AssociationLine>
<TypeIdentifier>
@@ -171,5 +177,35 @@
<Field Name="lotesDeProductosEntregados" />
</ShowAsCollectionAssociation>
</Class>
<Class Name="Entidades.ProductoNoPercedero">
<Position X="8.75" Y="8.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>ProductoNoPercedero.cs</FileName>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="TipoDeEnvase" />
</ShowAsAssociation>
</Class>
<Class Name="Entidades.ProductoPercedero">
<Position X="8.75" Y="10.25" Width="1.5" />
<InheritanceLine Type="Entidades.Producto" FixedFromPoint="true">
<Path>
<Point X="6" Y="10.25" />
<Point X="8.75" Y="10.25" />
</Path>
</InheritanceLine>
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAE=</HashCode>
<FileName>ProductoPercedero.cs</FileName>
</TypeIdentifier>
</Class>
<Enum Name="Entidades.EnvaseTipo">
<Position X="11" Y="8.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAIEAAIAAAA=</HashCode>
<FileName>EnvaseTipo.cs</FileName>
</TypeIdentifier>
</Enum>
<Font Name="Segoe UI" Size="9" />
</ClassDiagram>

View File

@@ -1,4 +1,5 @@
using System.Collections.ObjectModel;
using System.Security.Cryptography.X509Certificates;
namespace Entidades
{
@@ -24,5 +25,20 @@ namespace Entidades
{
return detalles.AsReadOnly();
}
public double MontoTotal
{
get
{
return detalles.Sum(x => x.SubTotal);
}
}
public string NombreProveedor
{
get
{
return Proveedor.Nombre;
}
}
}
}

View File

@@ -10,6 +10,13 @@ namespace Entidades
public bool Aceptado { get; set; }
public Proveedor Proveedor { get; set; }
public string ProveedorNombre
{
get
{
return Proveedor.Nombre;
}
}
private List<DetallePresupuesto> detalles = new List<DetallePresupuesto>();

View File

@@ -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\Desktop\final actual\Entidades\
build_property.ProjectDir = C:\Users\fedpo\Desktop\Final actual\Entidades\

View File

@@ -1,17 +1,17 @@
{
"format": 1,
"restore": {
"C:\\Users\\fedpo\\Desktop\\final actual\\Entidades\\Entidades.csproj": {}
"C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj": {}
},
"projects": {
"C:\\Users\\fedpo\\Desktop\\final actual\\Entidades\\Entidades.csproj": {
"C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\fedpo\\Desktop\\final actual\\Entidades\\Entidades.csproj",
"projectUniqueName": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj",
"projectName": "Entidades",
"projectPath": "C:\\Users\\fedpo\\Desktop\\final actual\\Entidades\\Entidades.csproj",
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj",
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
"outputPath": "C:\\Users\\fedpo\\Desktop\\final actual\\Entidades\\obj\\",
"outputPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",

View File

@@ -13,11 +13,11 @@
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\fedpo\\Desktop\\final actual\\Entidades\\Entidades.csproj",
"projectUniqueName": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj",
"projectName": "Entidades",
"projectPath": "C:\\Users\\fedpo\\Desktop\\final actual\\Entidades\\Entidades.csproj",
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj",
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
"outputPath": "C:\\Users\\fedpo\\Desktop\\final actual\\Entidades\\obj\\",
"outputPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",

View File

@@ -1,8 +1,8 @@
{
"version": 2,
"dgSpecHash": "0rUVXBZq1S9LPfJWu2rmlksDzLY8PGK0AVV6XPjlqD/aTZOh1QA3EYG1lVjYlV+GO913V9gTFygPWTJnvX11zA==",
"dgSpecHash": "/0GTyO6ckhdqO7zKMB1HLRdsMAWD7uaqWqeG9E3ixe4uSgyRj78n0jNxMGk/5CW97RRUL5P0Sy15/HFST15qhA==",
"success": true,
"projectFilePath": "C:\\Users\\fedpo\\Desktop\\final actual\\Entidades\\Entidades.csproj",
"projectFilePath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj",
"expectedPackageFiles": [],
"logs": []
}