Пример #1
0
        public virtual InventoryItemEntryStateCreatedDto NewInventoryItemEntryStateCreated(long entrySeqId)
        {
            var e   = new InventoryItemEntryStateCreatedDto();
            var eId = NewInventoryItemEntryEventId(entrySeqId);

            e.InventoryItemEntryEventId = eId;
            return(e);
        }
Пример #2
0
        public virtual InventoryItemEntryStateCreatedDto ToInventoryItemEntryStateCreatedDto(IInventoryItemEntryStateCreated e)
        {
            var dto = new InventoryItemEntryStateCreatedDto();

            dto.InventoryItemEntryEventId = e.InventoryItemEntryEventId;
            dto.CreatedAt         = e.CreatedAt;
            dto.CreatedBy         = e.CreatedBy;
            dto.Version           = e.Version;
            dto.CommandId         = e.CommandId;
            dto.OnHandQuantity    = e.OnHandQuantity;
            dto.InTransitQuantity = e.InTransitQuantity;
            dto.ReservedQuantity  = e.ReservedQuantity;
            dto.OccupiedQuantity  = e.OccupiedQuantity;
            dto.VirtualQuantity   = e.VirtualQuantity;
            dto.Source            = e.Source;
            return(dto);
        }
Пример #3
0
        public virtual InventoryItemStateCreatedDto ToInventoryItemStateCreatedDto(IInventoryItemStateCreated e)
        {
            var dto = new InventoryItemStateCreatedDto();

            dto.InventoryItemEventId = e.InventoryItemEventId;
            dto.CreatedAt            = e.CreatedAt;
            dto.CreatedBy            = e.CreatedBy;
            dto.CommandId            = e.CommandId;
            dto.OnHandQuantity       = e.OnHandQuantity;
            dto.InTransitQuantity    = e.InTransitQuantity;
            dto.ReservedQuantity     = e.ReservedQuantity;
            dto.OccupiedQuantity     = e.OccupiedQuantity;
            dto.VirtualQuantity      = e.VirtualQuantity;
            var inventoryItemEntryEvents = new List <InventoryItemEntryStateCreatedDto>();

            foreach (var ee in e.InventoryItemEntryEvents)
            {
                InventoryItemEntryStateCreatedDto eeDto = InventoryItemEntryStateEventDtoConverter.ToInventoryItemEntryStateCreatedDto(ee);
                inventoryItemEntryEvents.Add(eeDto);
            }
            dto.InventoryItemEntryEvents = inventoryItemEntryEvents.ToArray();

            return(dto);
        }