From 2cb2fe1401d9e07b76d3c9518924097c5f761f6e Mon Sep 17 00:00:00 2001 From: fedpo Date: Mon, 2 Dec 2024 16:17:16 +0000 Subject: [PATCH] =?UTF-8?q?Peque=C3=B1o=20refactor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controladora/ControladoraClientes.cs | 2 +- Controladora/ControladoraLotes.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Controladora/ControladoraClientes.cs b/Controladora/ControladoraClientes.cs index 06e2835..d450dc0 100644 --- a/Controladora/ControladoraClientes.cs +++ b/Controladora/ControladoraClientes.cs @@ -15,7 +15,7 @@ namespace Controladora public string AƱadir(Cliente t) { if (t == null) return "El Cliente es nulo, fallo la carga"; - + if (t.Cuit == 0) return "Cuit no puede ser 0"; try { repositorioClientes.Add(t); diff --git a/Controladora/ControladoraLotes.cs b/Controladora/ControladoraLotes.cs index 56808ec..50c0a92 100644 --- a/Controladora/ControladoraLotes.cs +++ b/Controladora/ControladoraLotes.cs @@ -41,7 +41,7 @@ namespace Controladora if (producto == null) return 0; if (producto.Id < 0) return 0; var lotes = repositorioLotes.Listar(); - if (!lotes.Any(x => x.Producto.Id == producto.Id)) return 0; // basicamente no hay productos con esa id + if (!lotes.Any(x => x.Producto.Id == producto.Id)) return 0; var CantidadStock = lotes .Where(x => x.Producto.Id == producto.Id)