arreglado tema clientes y otras cosas

This commit is contained in:
fedpo
2024-08-06 01:06:37 +01:00
committed by fede
parent 4ef8bd03fc
commit 33988cb3db
28 changed files with 153 additions and 99 deletions

View File

@@ -6,11 +6,6 @@ namespace Modelo
{
public override bool Add(Cliente t)
{
if (ExistePorCuit(t.Cuit))
{
throw new InvalidOperationException($"El Cliente con el CUIT {t.Cuit} ya existe.");
}
bool ret = false;
try
{
@@ -33,8 +28,6 @@ namespace Modelo
override public bool Mod(Cliente t)
{
bool ret = false;
try
{
var clienteAModificar = almacen.FindIndex(x => x.Cuit == t.Cuit);

View File

@@ -4,6 +4,7 @@ namespace Modelo
{
public sealed class RepositorioLote : RepositorioBase<Lote, RepositorioLote>
{
override public bool Add(Lote t)
{
bool ret = false;
@@ -21,6 +22,23 @@ namespace Modelo
return ret;
}
public bool Add(Remito rem)
{
if (rem.MostrarLotes().Count <= 0) return true;
var ret = false;
try
{
foreach (var detalle in rem.MostrarLotes())
{
ret = Add(detalle);
}
}catch (Exception)
{
throw;
}
return ret;
}
override public bool Mod(Lote t)
{
bool ret = false;