Exemple #1
0
        protected void NewOrderShipGroupOrderShipGroupActionCommandAndExecute(ICreateOrderShipGroup c, IOrderShipGroupState s, IOrderShipGroupStateCreated e)
        {
            var pCommandHandler = this.OrderShipGroupOrderShipGroupActionCommandHandler;
            var pCmdContent     = default(string);
            var pCmd            = new PropertyCommand <string, string> {
                Content = pCmdContent, GetState = () => s.OrderShipGroupStatusId, SetState = p => e.OrderShipGroupStatusId = p, OuterCommandType = CommandType.Create
            };

            pCmd.Context = this.State;
            pCommandHandler.Execute(pCmd);
        }
Exemple #2
0
        protected virtual IOrderShipGroupStateCreated MapCreate(ICreateOrderShipGroup c, IOrderCommand outerCommand, long version, IOrderState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new OrderShipGroupEventId(c.OrderId, c.ShipGroupSeqId, version);
            IOrderShipGroupStateCreated e = NewOrderShipGroupStateCreated(stateEventId);
            var s = outerState.OrderShipGroups.Get(c.ShipGroupSeqId, true);

            e.ShipmentMethodTypeId  = c.ShipmentMethodTypeId;
            e.SupplierPartyId       = c.SupplierPartyId;
            e.VendorPartyId         = c.VendorPartyId;
            e.CarrierPartyId        = c.CarrierPartyId;
            e.CarrierRoleTypeId     = c.CarrierRoleTypeId;
            e.FacilityId            = c.FacilityId;
            e.DestinationFacilityId = c.DestinationFacilityId;
            e.ContactMechId         = c.ContactMechId;
            e.TelecomContactMechId  = c.TelecomContactMechId;
            e.TrackingNumber        = c.TrackingNumber;
            e.ContactPartyId        = c.ContactPartyId;
            e.VehiclePlateNumber    = c.VehiclePlateNumber;
            e.ShippingInstructions  = c.ShippingInstructions;
            e.MaySplit                    = c.MaySplit;
            e.GiftMessage                 = c.GiftMessage;
            e.IsGift                      = c.IsGift;
            e.ShipAfterDate               = c.ShipAfterDate;
            e.ShipByDate                  = c.ShipByDate;
            e.EstimatedShipDate           = c.EstimatedShipDate;
            e.EstimatedDeliveryDate       = c.EstimatedDeliveryDate;
            e.PickwaveId                  = c.PickwaveId;
            e.NumberOfPackages            = c.NumberOfPackages;
            e.NumberOfContainers          = c.NumberOfContainers;
            e.NumberOfPakagesPerContainer = c.NumberOfPakagesPerContainer;
            NewOrderShipGroupOrderShipGroupActionCommandAndExecute(c, s, e);
            e.Active = c.Active;

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();

            foreach (ICreateOrderItemShipGroupAssociation innerCommand in c.OrderItemShipGroupAssociations)
            {
                ThrowOnInconsistentCommands(c, innerCommand);

                IOrderItemShipGroupAssociationStateCreated innerEvent = MapCreate(innerCommand, c, version, s);
                e.AddOrderItemShipGroupAssociationEvent(innerEvent);
            }

            return(e);
        }// END Map(ICreate... ////////////////////////////
Exemple #3
0
 void ICreateOrderShipGroupCommands.Remove(ICreateOrderShipGroup c)
 {
     _innerCommands.Remove((CreateOrderShipGroupDto)c);
 }
Exemple #4
0
 void ICreateOrderShipGroupCommands.Add(ICreateOrderShipGroup c)
 {
     _innerCommands.Add((CreateOrderShipGroupDto)c);
 }
Exemple #5
0
 public void Remove(ICreateOrderShipGroup c)
 {
     _innerCommands.Remove(c);
 }
Exemple #6
0
 public void Add(ICreateOrderShipGroup c)
 {
     _innerCommands.Add(c);
 }