oh hell no
This commit is contained in:
@@ -49,6 +49,15 @@ namespace Modelo
|
||||
|
||||
public override void Mod(OrdenDeCompra t)
|
||||
{
|
||||
|
||||
t.Proveedor = context.Proveedores.First(x => x.Cuit == t.Proveedor.Cuit);
|
||||
|
||||
foreach (var detalle in t.detalles)
|
||||
{
|
||||
detalle.Producto = (detalle.Producto.EsPerecedero) ?
|
||||
context.ProductoPercederos.First(x => x.Id == detalle.Producto.Id) :
|
||||
context.ProductoNoPercederos.First(x => x.Id == detalle.Producto.Id);
|
||||
}
|
||||
context.OrdenDeCompras.Update(t);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user