Exemplo n.º 1
0
 public void Insertar(SucursalDto dto)
 {
     try
     {
         var entity = new Sucursal();
         entity = DSucursalConverter.ToEntity(dto);
         UnitOfWork.SucursalRepository.Sucursales.Add(entity);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 2
0
 public void Actualizar(OrdenPagoDto dto)
 {
     try
     {
         foreach (var entity in UnitOfWork.OrdenPagoRepository.OrdenesPago)
         {
             if (dto.Id == entity.Id)
             {
                 entity.Monto     = dto.Monto;
                 entity.Moneda    = dto.Moneda;
                 entity.Estado    = dto.Estado;
                 entity.FechaPago = dto.FechaPago;
                 entity.Sucursal  = DSucursalConverter.ToEntity(dto.Sucursal);
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }