por ahora todo menos orden de compra y remito

This commit is contained in:
fedpo
2024-08-05 20:27:50 +01:00
parent 51cffafb9f
commit 8e394af47a
73 changed files with 881 additions and 426 deletions

View File

@@ -1,9 +1,13 @@
namespace Entidades
using System.ComponentModel;
namespace Entidades
{
public class Detalle <T> where T:Producto
{
public int Id { get; set; }
public int Cantidad { get; set; }
public T Producto { get; set; }
}

View File

@@ -1,8 +1,25 @@

using System.ComponentModel;
namespace Entidades
{
public class DetallePresupuesto: Detalle<Producto>
{
public int IdPresupuesto { get; set; }
public double MontoCUPropuesto { get; set; }
public string NombreDelProducto {
get
{
return Producto.Nombre;
}
}
public double Subtotal {
get
{
return MontoCUPropuesto * Cantidad;
}
}
}
}

149
Entidades/Entidades.cd Normal file
View File

@@ -0,0 +1,149 @@
<?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" />
<TypeIdentifier>
<HashCode>AAACAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Categoria.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="Entidades.Cliente">
<Position X="14.5" Y="0.5" Width="1.75" />
<TypeIdentifier>
<HashCode>AAAAQAAAAAAAAAAEACAAgABAAIAAABAAAAAAAAAAAAA=</HashCode>
<FileName>Cliente.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="Entidades.Detalle&lt;T&gt;" Collapsed="true">
<Position X="9.75" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAACAAEAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Detalle.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="Entidades.DetalleFactura">
<Position X="12" Y="1.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAEAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>DetalleFactura.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="Entidades.DetalleOrdenDeCompra">
<Position X="9.5" Y="1.75" Width="2" />
<TypeIdentifier>
<HashCode>AAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>DetalleOrdenDeCompra.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="Entidades.DetallePresupuesto">
<Position X="7.5" Y="0.75" Width="1.75" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAEAAAAAAAAEAAAQABAAAAAAAAAAAAAAAA=</HashCode>
<FileName>DetallePresupuesto.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="Entidades.Factura">
<Position X="14.75" Y="4.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAACAAAAAAAQAAEAAACAAAACBAABQAAAAAAAAAAAAAA=</HashCode>
<FileName>Factura.cs</FileName>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="Cliente" />
</ShowAsAssociation>
<ShowAsCollectionAssociation>
<Field Name="detalles" />
</ShowAsCollectionAssociation>
</Class>
<Class Name="Entidades.Lote">
<Position X="0.75" Y="1.75" Width="2" />
<TypeIdentifier>
<HashCode>AAACAAAAAAAAAAEAQABAAAAAAAAAABAAAAAAAAAAAAA=</HashCode>
<FileName>Lote.cs</FileName>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="Producto" />
</ShowAsAssociation>
</Class>
<Class Name="Entidades.OrdenDeCompra">
<Position X="9.75" Y="3.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAACAACAAAAQAAAAAAAAAAADBAABAAAAAAAAAAAAAAA=</HashCode>
<FileName>OrdenDeCompra.cs</FileName>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="Proveedor" />
<Property Name="presupuesto" />
</ShowAsAssociation>
<ShowAsCollectionAssociation>
<Field Name="detalles" />
</ShowAsCollectionAssociation>
</Class>
<Class Name="Entidades.Presupuesto">
<Position X="6.25" Y="2.75" Width="1.5" />
<AssociationLine Name="Proveedor" Type="Entidades.Proveedor" ManuallyRouted="true" FixedFromPoint="true" FixedToPoint="true">
<Path>
<Point X="7" Y="5.267" />
<Point X="7" Y="5.689" />
<Point X="8.25" Y="5.689" />
<Point X="8.25" Y="6.75" />
</Path>
</AssociationLine>
<TypeIdentifier>
<HashCode>AAACAAAAAAAQAAEAAAAAAAADBAADABAAAAAAAAAAAAA=</HashCode>
<FileName>Presupuesto.cs</FileName>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="Proveedor" />
</ShowAsAssociation>
<ShowAsCollectionAssociation>
<Field Name="detalles" />
</ShowAsCollectionAssociation>
</Class>
<Class Name="Entidades.Producto">
<Position X="3.25" Y="3.75" Width="1.75" />
<Members>
<Field Name="categorias" Hidden="true" />
</Members>
<AssociationLine Name="proveedores" Type="Entidades.Proveedor" ManuallyRouted="true" FixedFromPoint="true" FixedToPoint="true">
<Path>
<Point X="5" Y="6.04" />
<Point X="7.065" Y="6.04" />
<Point X="7.065" Y="6.516" />
<Point X="7.125" Y="6.516" />
<Point X="7.125" Y="6.75" />
</Path>
</AssociationLine>
<TypeIdentifier>
<HashCode>AAECAQAAAgAAQAAgAAAAgAAYAAQAABAAIAAAAAAAAAA=</HashCode>
<FileName>Producto.cs</FileName>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="Categoria" />
</ShowAsAssociation>
<ShowAsCollectionAssociation>
<Field Name="proveedores" />
</ShowAsCollectionAssociation>
</Class>
<Class Name="Entidades.Proveedor">
<Position X="7" Y="6.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AIAAQAAAAAAAAAAAACAAgAAAAAAAABAAAAAAAAAAAAA=</HashCode>
<FileName>Proveedor.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="Entidades.Remito">
<Position X="0.5" Y="6.75" Width="2.25" />
<TypeIdentifier>
<HashCode>AAACAAAAAgAAAAAAAABAAAABACAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Remito.cs</FileName>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="Proveedor" />
</ShowAsAssociation>
<ShowAsCollectionAssociation>
<Field Name="lotesDeProductosEntregados" />
</ShowAsCollectionAssociation>
</Class>
<Font Name="Segoe UI" Size="9" />
</ClassDiagram>

View File

@@ -1,10 +0,0 @@

namespace Entidades
{
public enum EnvaseTipo
{
Plastico,
Enlatado,
Carton
}
}

View File

@@ -8,6 +8,8 @@ namespace Entidades
private List<DetalleOrdenDeCompra> detalles = new List<DetalleOrdenDeCompra>();
public Proveedor Proveedor { get; set; }
public Presupuesto presupuesto { get; set; }
public void AñadirDetalle(DetalleOrdenDeCompra detalle)
{
detalles.Add(detalle);

View File

@@ -9,6 +9,8 @@ namespace Entidades
public bool Habilitado { get; set; }
public bool Aceptado { get; set; }
public Proveedor Proveedor { get; set; }
private List<DetallePresupuesto> detalles = new List<DetallePresupuesto>();
public void AñadirDetalle(DetallePresupuesto det) {

View File

@@ -1,4 +1,5 @@
using System.Collections.ObjectModel;
using System.ComponentModel;
namespace Entidades
{
@@ -8,7 +9,18 @@ namespace Entidades
public string Nombre { get; set; }
public double Precio { get; set; }
public bool Habilitado { get; set; }
[Browsable(false)]
public Categoria Categoria { get; set; }
public string Cartegoria_
{
get
{
return Categoria.Descripcion;
}
}
private List<Proveedor> proveedores = new List<Proveedor>();
public void AñadirProveedor(Proveedor proveedor)

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\Downloads\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\\Downloads\\final actual\\Entidades\\Entidades.csproj": {}
"C:\\Users\\fedpo\\Desktop\\final actual\\Entidades\\Entidades.csproj": {}
},
"projects": {
"C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj": {
"C:\\Users\\fedpo\\Desktop\\final actual\\Entidades\\Entidades.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj",
"projectUniqueName": "C:\\Users\\fedpo\\Desktop\\final actual\\Entidades\\Entidades.csproj",
"projectName": "Entidades",
"projectPath": "C:\\Users\\fedpo\\Downloads\\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\\Downloads\\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\\Downloads\\final actual\\Entidades\\Entidades.csproj",
"projectUniqueName": "C:\\Users\\fedpo\\Desktop\\final actual\\Entidades\\Entidades.csproj",
"projectName": "Entidades",
"projectPath": "C:\\Users\\fedpo\\Downloads\\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\\Downloads\\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": "JjmZ/x9rvI6DKcp6sqA/2XwtSHr6XeI0O0c8c5GAHxMcNMVKoIzQeSSZe+awvwhJFTb+hDsL4RbtngW8O8CFow==",
"dgSpecHash": "0rUVXBZq1S9LPfJWu2rmlksDzLY8PGK0AVV6XPjlqD/aTZOh1QA3EYG1lVjYlV+GO913V9gTFygPWTJnvX11zA==",
"success": true,
"projectFilePath": "C:\\Users\\fedpo\\Downloads\\final actual\\Entidades\\Entidades.csproj",
"projectFilePath": "C:\\Users\\fedpo\\Desktop\\final actual\\Entidades\\Entidades.csproj",
"expectedPackageFiles": [],
"logs": []
}