arreglado tema clientes y otras cosas
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user