public virtual ShipmentPackageStateCreatedDto ToShipmentPackageStateCreatedDto(IShipmentPackageStateCreated e)
        {
            var dto = new ShipmentPackageStateCreatedDto();

            dto.ShipmentPackageEventId = e.ShipmentPackageEventId;
            dto.CreatedAt         = e.CreatedAt;
            dto.CreatedBy         = e.CreatedBy;
            dto.CommandId         = e.CommandId;
            dto.ShipmentBoxTypeId = e.ShipmentBoxTypeId;
            dto.DateCreated       = e.DateCreated;
            dto.BoxLength         = e.BoxLength;
            dto.BoxHeight         = e.BoxHeight;
            dto.BoxWidth          = e.BoxWidth;
            dto.DimensionUomId    = e.DimensionUomId;
            dto.Weight            = e.Weight;
            dto.WeightUomId       = e.WeightUomId;
            dto.InsuredValue      = e.InsuredValue;
            dto.Active            = e.Active;
            var shipmentPackageContentEvents = new List <ShipmentPackageContentStateCreatedDto>();

            foreach (var ee in e.ShipmentPackageContentEvents)
            {
                ShipmentPackageContentStateCreatedDto eeDto = ShipmentPackageContentStateEventDtoConverter.ToShipmentPackageContentStateCreatedDto(ee);
                shipmentPackageContentEvents.Add(eeDto);
            }
            dto.ShipmentPackageContentEvents = shipmentPackageContentEvents.ToArray();

            return(dto);
        }
Пример #2
0
        public virtual ShipmentPackageContentStateCreatedDto NewShipmentPackageContentStateCreated(string shipmentItemSeqId)
        {
            var e   = new ShipmentPackageContentStateCreatedDto();
            var eId = NewShipmentPackageContentEventId(shipmentItemSeqId);

            e.ShipmentPackageContentEventId = eId;
            return(e);
        }
Пример #3
0
        public virtual ShipmentPackageContentStateCreatedDto ToShipmentPackageContentStateCreatedDto(IShipmentPackageContentStateCreated e)
        {
            var dto = new ShipmentPackageContentStateCreatedDto();

            dto.ShipmentPackageContentEventId = e.ShipmentPackageContentEventId;
            dto.CreatedAt          = e.CreatedAt;
            dto.CreatedBy          = e.CreatedBy;
            dto.Version            = e.Version;
            dto.CommandId          = e.CommandId;
            dto.Quantity           = e.Quantity;
            dto.SubProductId       = e.SubProductId;
            dto.SubProductQuantity = e.SubProductQuantity;
            dto.Active             = e.Active;
            return(dto);
        }