Reposfix: correjido gitignore
This commit is contained in:
80
Modelo/RepositorioRemito.cs
Normal file
80
Modelo/RepositorioRemito.cs
Normal file
@@ -0,0 +1,80 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime;
|
||||
using Entidades;
|
||||
|
||||
namespace Modelo
|
||||
{
|
||||
public sealed class RepositorioRemito : RepositorioSingleton<Remito, RepositorioRemito>
|
||||
{
|
||||
|
||||
override public bool Add(Remito t)
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
try
|
||||
{
|
||||
almacen.Add(t);
|
||||
ret = true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
override public bool Mod(Remito t)
|
||||
{
|
||||
|
||||
bool ret = false;
|
||||
|
||||
try
|
||||
{
|
||||
var remitoAModificar = almacen.Find(x => x.Id == t.Id);
|
||||
if (remitoAModificar != null)
|
||||
{
|
||||
|
||||
remitoAModificar = t;
|
||||
ret = true;
|
||||
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
override public bool Del(Remito t)
|
||||
{
|
||||
|
||||
bool ret = false;
|
||||
|
||||
try
|
||||
{
|
||||
var RemitoAEliminar = almacen.Find(x => x.Id == t.Id);
|
||||
if (RemitoAEliminar != null)
|
||||
{
|
||||
almacen.Remove(RemitoAEliminar);
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
public ReadOnlyCollection<Lote> MostrarLotes(Remito remito)
|
||||
{
|
||||
return remito.MostrarLotes();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user