diff --git a/Documentacion/Narrativa/DiagramaConRepos.jpg b/Documentacion/Narrativa/DiagramaConRepos.jpg deleted file mode 100644 index 0782017..0000000 Binary files a/Documentacion/Narrativa/DiagramaConRepos.jpg and /dev/null differ diff --git a/Documentacion/Narrativa/DiagramaDeClases.org b/Documentacion/Narrativa/DiagramaDeClases.org index a8fc82a..e3fc714 100644 --- a/Documentacion/Narrativa/DiagramaDeClases.org +++ b/Documentacion/Narrativa/DiagramaDeClases.org @@ -1,207 +1,6 @@ #+title: Diagrama De Clases #+LATEX_HEADER: \usepackage{svg} -* Diagrama de clases con Repositorios -#+begin_src plantuml :file DiagramaConRepos.jpg -@startuml -skinparam groupInheritance 2 - -class RepositorioLotes { -+ Añadir(detalle): bool -+ Modificar(detalle): bool -+ Eliminar(detalle): bool -} - -RepositorioLotes "1" *-- "0..*" Lote - -class RepositorioDetalles { -+ Añadir(detalle): bool -+ Modificar(detalle): bool -+ Eliminar(detalle): bool -} - -RepositorioDetalles "1" *-- "0..*" Detalle - -class RepositorioFacturas { -+ Añadir(Factura): bool -+ Modificar(Factura): bool -+ Eliminar(Factura): bool -} - -RepositorioFacturas "1" *-- "0..*" Factura - -class RepositorioVentas { -+ Añadir(Venta): bool -+ Modificar(Venta): bool -+ Eliminar(Venta): bool -} - -RepositorioVentas "1" *-- "0..*" Venta - -class RepositorioClientes { -+ Añadir(Cliente): bool -+ Modificar(Cliente): bool -+ Eliminar(Cliente): bool -} - -RepositorioClientes "1" *-- "0..*" Cliente - -class RepositorioProveedores { -+ Añadir(Proveedor): bool -+ Modificar(Proveedor): bool -+ Eliminar(Proveedor): bool -} - -class RepositorioPresupuestos { -+ Añadir(Presupuesto): bool -+ Modificar(Presupuesto): bool -+ Eliminar(Presupuesto): bool -} - -class RepositorioProductos { -+ Añadir(T): bool -+ Modificar(T): bool -+ Eliminar(T): bool -} - -RepositorioProductos ..|> Repositorio: Implementa -RepositorioLotes ..|> Repositorio: Implementa -RepositorioPresupuestos ..|> Repositorio: Implementa -RepositorioFacturas ..|> Repositorio: Implementa -RepositorioClientes ..|> Repositorio: Implementa -RepositorioVentas ..|> Repositorio: Implementa -RepositorioDetalles ..|> Repositorio: Implementa -RepositorioProveedores ..|> Repositorio: Implementa - -interface Repositorio { -+ Añadir(T): bool -+ Modificar(T): bool -+ Eliminar(T): bool -} - -RepositorioProductos "1" *--> "0..*" Producto - - -enum EnvaseTipo { -Plastico, -Enlatado, -Cartón, -} - -ProductoNoPercedero --> EnvaseTipo - -class ProductoNoPercedero { -+ TipoDeEnvase: EnvaseTipo -} - -class ProductoPercedero { -+ MesesHastaConsumoPreferente: int -+ MesesHastaVencimiento: int -} - -Producto <|-- ProductoNoPercedero -Producto <|-- ProductoPercedero - -class Producto { -+ Id: int -+ Nombre: string -+ Precio: double -- PresupuestosStock: List? -- Lotes: List? -+ Habilitado: bool - -+ MostrarPresupuestos(): ReadOnlyCollection -+ AñadirPresupuesto(Presupuesto): bool -+ EliminarPresupuesto(Presupuesto): bool - -+ MostrarLotesDeProductos(): ReadOnlyCollection -+ AñadirLotesStock(): bool -+ EliminarLotesStock(): bool -+ MostrarStockRemanente(): long -} - -class Presupuesto { -+ Id: int -+ Proveedor: Proveedor -+ Monto: int -+ CantIdad: int -} - -RepositorioPresupuestos "1" *-- "0..*" Presupuesto -RepositorioProveedores "1" *-- "0..*" Proveedor - -Presupuesto "0..*" <--* "1" Producto -Proveedor <-- Presupuesto - -class Proveedor { -+ Id: int -+ Nombre: string -+ RazónSocial: string -} - -class Venta { -+ Id: int -- Detalles: List - -+ MostrarDetalles(): ReadOnlyCollection -+ AñadirDetalle(Detalle): voId -+ ModificarDetalle(Detalle): voId -+ EliminarDetalle(Detalle): voId -} - -Lote -- Producto - -class Lote { -+ Id: int -+ Producto: Producto -+ CantIdadDeProductos: long -+ FechaVencimiento: DateTime -} - -class Detalle { -+ Id: int -+ CantIdad: int -+ PrecioUnitario: double -+ Subtotal: double -+ Producto: T -} - -class Cliente { -+ Cuit: string -+ Nombre: string -+ ApellIdo: string -+ Direccion: string -+ Correo: string -} - -class Factura { -+ Total: double -+ Fecha: DateTime -+ Cliente: Cliente -+ Venta: Venta -} - -Cliente <-- Factura -Factura --> Venta -Venta "1" *-- "1..*" Detalle - -Detalle --> Producto - -@enduml -#+end_src - -#+RESULTS: -[[file:DiagramaConRepos.jpg]] - - - - - - - - - - * Diagrama de clases sin Repositorios #+begin_src plantuml :file DiagramaSinRepos.jpg @startuml @@ -224,6 +23,7 @@ class Producto { + Precio: double - Categorias: List? + Habilitado: bool ++ EsPecedero: bool + MostrarCategoriasDeProductos(): ReadOnlyCollection + AñadirCategoriasStock(): bool @@ -248,7 +48,7 @@ class Presupuesto { } class Proveedor { -+ Id: int ++ Cuit: int + Nombre: string + RazónSocial: string + Habilitado: bool @@ -256,8 +56,7 @@ class Proveedor { class DetalleFactura { + IdFactura: int -+ PrecioUnitario: double -+ Subtotal: double ++ Subtotal(): double } class Cliente { @@ -266,6 +65,7 @@ class Cliente { + ApellIdo: string + Direccion: string + Correo: string ++ Habilitado: bool } class Detalle { @@ -275,6 +75,7 @@ class Detalle { } class Factura { ++ Id: int + Total: double + Fecha: DateTime + Cliente: Cliente @@ -296,6 +97,7 @@ enum EnvaseTipo { Plastico, Enlatado, Cartón, +NoTiene, } class DetallePresupuesto { @@ -307,6 +109,7 @@ class OrdenDeCompra { + Id: int - Productos: List + Proveedor: Proveedor ++ Entregado: bool + MostrarDetalles(): ReadOnlyCollection + AñadirDetalle(DetalleOrdenDeCompra): bool @@ -316,6 +119,8 @@ class OrdenDeCompra { class DetalleOrdenDeCompra { + IdOrdenDeCompra: int ++ Presupuesto: Presupuesto ++ MontoCU: double } class Remito { diff --git a/Documentacion/Narrativa/DiagramaSinRepos.jpg b/Documentacion/Narrativa/DiagramaSinRepos.jpg index 627ab71..fc227b2 100644 Binary files a/Documentacion/Narrativa/DiagramaSinRepos.jpg and b/Documentacion/Narrativa/DiagramaSinRepos.jpg differ diff --git a/Entidades/Cliente.cs b/Entidades/Cliente.cs index 9f5016c..a9c716a 100644 --- a/Entidades/Cliente.cs +++ b/Entidades/Cliente.cs @@ -9,8 +9,6 @@ namespace Entidades public string Apellido { get; set; } public string Direccion { get; set; } public string Correo { get; set; } - - [Browsable(false)] public bool Habilitado { get; set; } public string NombreCompleto @@ -18,10 +16,5 @@ namespace Entidades get { return $"{Nombre} {Apellido}"; } } - // Sobreescribir ToString() para mostrar el nombre completo - public override string ToString() - { - return NombreCompleto; - } } }