示例#1
0
        public virtual MovementLineStateCreatedDto NewMovementLineStateCreated(string lineNumber)
        {
            var e   = new MovementLineStateCreatedDto();
            var eId = NewMovementLineEventId(lineNumber);

            e.MovementLineEventId = eId;
            return(e);
        }
        public virtual MovementLineStateCreatedDto ToMovementLineStateCreatedDto(IMovementLineStateCreated e)
        {
            var dto = new MovementLineStateCreatedDto();

            dto.MovementLineEventId    = e.MovementLineEventId;
            dto.CreatedAt              = e.CreatedAt;
            dto.CreatedBy              = e.CreatedBy;
            dto.Version                = e.Version;
            dto.CommandId              = e.CommandId;
            dto.MovementQuantity       = e.MovementQuantity;
            dto.ProductId              = e.ProductId;
            dto.LocatorIdFrom          = e.LocatorIdFrom;
            dto.LocatorIdTo            = e.LocatorIdTo;
            dto.AttributeSetInstanceId = e.AttributeSetInstanceId;
            dto.Processed              = e.Processed;
            dto.ReversalLineNumber     = e.ReversalLineNumber;
            dto.Active = e.Active;
            return(dto);
        }
        public virtual MovementStateCreatedDto ToMovementStateCreatedDto(IMovementStateCreated e)
        {
            var dto = new MovementStateCreatedDto();

            dto.MovementEventId        = e.MovementEventId;
            dto.CreatedAt              = e.CreatedAt;
            dto.CreatedBy              = e.CreatedBy;
            dto.CommandId              = e.CommandId;
            dto.DocumentStatusId       = e.DocumentStatusId;
            dto.MovementDate           = e.MovementDate;
            dto.Posted                 = e.Posted;
            dto.Processed              = e.Processed;
            dto.Processing             = e.Processing;
            dto.DateReceived           = e.DateReceived;
            dto.DocumentTypeId         = e.DocumentTypeId;
            dto.IsInTransit            = e.IsInTransit;
            dto.IsApproved             = e.IsApproved;
            dto.ApprovalAmount         = e.ApprovalAmount;
            dto.ShipperId              = e.ShipperId;
            dto.SalesRepresentativeId  = e.SalesRepresentativeId;
            dto.BusinessPartnerId      = e.BusinessPartnerId;
            dto.ChargeAmount           = e.ChargeAmount;
            dto.CreateFrom             = e.CreateFrom;
            dto.FreightAmount          = e.FreightAmount;
            dto.ReversalDocumentNumber = e.ReversalDocumentNumber;
            dto.WarehouseIdFrom        = e.WarehouseIdFrom;
            dto.WarehouseIdTo          = e.WarehouseIdTo;
            dto.Description            = e.Description;
            dto.Active                 = e.Active;
            var movementLineEvents = new List <MovementLineStateCreatedDto>();

            foreach (var ee in e.MovementLineEvents)
            {
                MovementLineStateCreatedDto eeDto = MovementLineStateEventDtoConverter.ToMovementLineStateCreatedDto(ee);
                movementLineEvents.Add(eeDto);
            }
            dto.MovementLineEvents = movementLineEvents.ToArray();

            return(dto);
        }