Esempio n. 1
0
        /// <summary>
        /// Converts this instance of <see cref="movement"/> to an instance of <see cref="movementDto"/>.
        /// </summary>
        /// <param name="entity"><see cref="movement"/> to convert.</param>
        public static movementDto ToDTO(this movement entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new movementDto();

            dto.v_MovementId           = entity.v_MovementId;
            dto.v_WarehouseId          = entity.v_WarehouseId;
            dto.v_SupplierId           = entity.v_SupplierId;
            dto.i_ProcessTypeId        = entity.i_ProcessTypeId;
            dto.v_ParentMovementId     = entity.v_ParentMovementId;
            dto.v_Motive               = entity.v_Motive;
            dto.i_MotiveTypeId         = entity.i_MotiveTypeId;
            dto.d_Date                 = entity.d_Date;
            dto.r_TotalQuantity        = entity.r_TotalQuantity;
            dto.i_MovementTypeId       = entity.i_MovementTypeId;
            dto.i_RequireRemoteProcess = entity.i_RequireRemoteProcess;
            dto.v_RemoteWarehouseId    = entity.v_RemoteWarehouseId;
            dto.i_CurrencyId           = entity.i_CurrencyId;
            dto.r_ExchangeRate         = entity.r_ExchangeRate;
            dto.v_ReferenceDocument    = entity.v_ReferenceDocument;
            dto.i_CostCenterId         = entity.i_CostCenterId;
            dto.v_Observations         = entity.v_Observations;
            dto.i_IsLocallyProcessed   = entity.i_IsLocallyProcessed;
            dto.i_IsRemoteProcessed    = entity.i_IsRemoteProcessed;
            dto.i_InsertUserId         = entity.i_InsertUserId;
            dto.i_UpdateUserId         = entity.i_UpdateUserId;
            dto.d_UpdateDate           = entity.d_UpdateDate;
            dto.i_UpdateNodeId         = entity.i_UpdateNodeId;
            dto.v_ComentaryUpdate      = entity.v_ComentaryUpdate;

            entity.OnDTO(dto);

            return(dto);
        }