コード例 #1
0
 public DtoShipmentReceiptImageStates(IShipmentReceiptState outerState, IEnumerable <IShipmentReceiptImageState> innerStates)
 {
     this._outerState = outerState;
     if (innerStates == null)
     {
         this._innerStates = new IShipmentReceiptImageState[] { };
     }
     else
     {
         this._innerStates = innerStates;
     }
 }
コード例 #2
0
        public IShipmentReceiptState Get(ShipmentReceiptId id, bool nullAllowed)
        {
            IShipmentReceiptState state = CurrentSession.Get <ShipmentReceiptState>(id);

            if (!nullAllowed && state == null)
            {
                state = new ShipmentReceiptState();
                (state as ShipmentReceiptState).ShipmentReceiptId = id;
            }
            if (ReadOnlyProxyGenerator != null && state != null)
            {
                return(ReadOnlyProxyGenerator.CreateProxy <IShipmentReceiptState>(state, new Type[] { typeof(ISaveable) }, _readOnlyPropertyNames));
            }
            return(state);
        }
コード例 #3
0
        public void Delete(IShipmentReceiptState state)
        {
            IShipmentReceiptState s = state;

            if (ReadOnlyProxyGenerator != null)
            {
                s = ReadOnlyProxyGenerator.GetTarget <IShipmentReceiptState>(state);
            }
            var saveable = s as ISaveable;

            if (saveable != null)
            {
                saveable.Save();
            }
            CurrentSession.Delete(s);
        }
コード例 #4
0
        protected virtual ICreateInventoryItemEntry CreateInventoryItemEntry(IShipmentState shipment, IShipmentReceiptState lineReceipt)
        {
            var targetLocatorId = WarehouseUtils.GetReceivingLocatorId(shipment.DestinationFacilityId);
            var entry           = new CreateInventoryItemEntry();

            entry.InventoryItemId = new InventoryItemId(lineReceipt.ProductId, targetLocatorId, lineReceipt.AttributeSetInstanceId);
            entry.EntrySeqId      = SeqIdGenerator.GetNextId();   //DateTime.Now.Ticks;
            entry.OnHandQuantity  = lineReceipt.AcceptedQuantity; // *signum;
            entry.Source          = new InventoryItemSourceInfo(DocumentTypeIds.Shipment, shipment.ShipmentId, lineReceipt.ReceiptSeqId, 0);
            return(entry);
        }
コード例 #5
0
 public ShipmentReceiptStateDtoWrapper(IShipmentReceiptState state)
 {
     this._state = state;
 }
コード例 #6
0
 public ShipmentReceiptStateDtoWrapper()
 {
     this._state = new ShipmentReceiptState();
 }
コード例 #7
0
 public ShipmentReceiptImageStates(IShipmentReceiptState outerState)
 {
     this._shipmentReceiptState = outerState;
     this._forReapplying        = outerState.ForReapplying;
 }
コード例 #8
0
        public static TMergePatchShipmentReceipt ToMergePatchShipmentReceipt <TMergePatchShipmentReceipt>(this IShipmentReceiptState state)
            where TMergePatchShipmentReceipt : IMergePatchShipmentReceipt, new()
        {
            var cmd = new TMergePatchShipmentReceipt();

            cmd.ReceiptSeqId           = state.ReceiptSeqId;
            cmd.ProductId              = state.ProductId;
            cmd.AttributeSetInstanceId = state.AttributeSetInstanceId;
            cmd.LocatorId              = state.LocatorId;
            cmd.ShipmentItemSeqId      = state.ShipmentItemSeqId;
            cmd.ShipmentPackageSeqId   = state.ShipmentPackageSeqId;
            cmd.OrderId           = state.OrderId;
            cmd.OrderItemSeqId    = state.OrderItemSeqId;
            cmd.ReturnId          = state.ReturnId;
            cmd.ReturnItemSeqId   = state.ReturnItemSeqId;
            cmd.RejectionReasonId = state.RejectionReasonId;
            cmd.DamageStatusId    = state.DamageStatusId;
            cmd.DamageReasonId    = state.DamageReasonId;
            cmd.ReceivedBy        = state.ReceivedBy;
            cmd.DatetimeReceived  = state.DatetimeReceived;
            cmd.ItemDescription   = state.ItemDescription;
            cmd.AcceptedQuantity  = state.AcceptedQuantity;
            cmd.RejectedQuantity  = state.RejectedQuantity;
            cmd.DamagedQuantity   = state.DamagedQuantity;
            cmd.Active            = ((IShipmentReceiptStateProperties)state).Active;
            cmd.ShipmentId        = state.ShipmentId;

            if (state.ProductId == null)
            {
                cmd.IsPropertyProductIdRemoved = true;
            }
            if (state.AttributeSetInstanceId == null)
            {
                cmd.IsPropertyAttributeSetInstanceIdRemoved = true;
            }
            if (state.LocatorId == null)
            {
                cmd.IsPropertyLocatorIdRemoved = true;
            }
            if (state.ShipmentItemSeqId == null)
            {
                cmd.IsPropertyShipmentItemSeqIdRemoved = true;
            }
            if (state.ShipmentPackageSeqId == null)
            {
                cmd.IsPropertyShipmentPackageSeqIdRemoved = true;
            }
            if (state.OrderId == null)
            {
                cmd.IsPropertyOrderIdRemoved = true;
            }
            if (state.OrderItemSeqId == null)
            {
                cmd.IsPropertyOrderItemSeqIdRemoved = true;
            }
            if (state.ReturnId == null)
            {
                cmd.IsPropertyReturnIdRemoved = true;
            }
            if (state.ReturnItemSeqId == null)
            {
                cmd.IsPropertyReturnItemSeqIdRemoved = true;
            }
            if (state.RejectionReasonId == null)
            {
                cmd.IsPropertyRejectionReasonIdRemoved = true;
            }
            if (state.DamageStatusId == null)
            {
                cmd.IsPropertyDamageStatusIdRemoved = true;
            }
            if (state.DamageReasonId == null)
            {
                cmd.IsPropertyDamageReasonIdRemoved = true;
            }
            if (state.ReceivedBy == null)
            {
                cmd.IsPropertyReceivedByRemoved = true;
            }
            if (state.DatetimeReceived == null)
            {
                cmd.IsPropertyDatetimeReceivedRemoved = true;
            }
            if (state.ItemDescription == null)
            {
                cmd.IsPropertyItemDescriptionRemoved = true;
            }
            if (state.AcceptedQuantity == null)
            {
                cmd.IsPropertyAcceptedQuantityRemoved = true;
            }
            if (state.RejectedQuantity == null)
            {
                cmd.IsPropertyRejectedQuantityRemoved = true;
            }
            if (state.DamagedQuantity == null)
            {
                cmd.IsPropertyDamagedQuantityRemoved = true;
            }
            return(cmd);
        }
コード例 #9
0
        public static TRemoveShipmentReceipt ToRemoveShipmentReceipt <TRemoveShipmentReceipt>(this IShipmentReceiptState state)
            where TRemoveShipmentReceipt : IRemoveShipmentReceipt, new()
        {
            var cmd = new TRemoveShipmentReceipt();

            cmd.ReceiptSeqId = state.ReceiptSeqId;
            return(cmd);
        }
コード例 #10
0
        public static TCreateShipmentReceipt ToCreateShipmentReceipt <TCreateShipmentReceipt>(this IShipmentReceiptState state)
            where TCreateShipmentReceipt : ICreateShipmentReceipt, new()
        {
            var cmd = new TCreateShipmentReceipt();

            cmd.ReceiptSeqId           = state.ReceiptSeqId;
            cmd.ProductId              = state.ProductId;
            cmd.AttributeSetInstanceId = state.AttributeSetInstanceId;
            cmd.LocatorId              = state.LocatorId;
            cmd.ShipmentItemSeqId      = state.ShipmentItemSeqId;
            cmd.ShipmentPackageSeqId   = state.ShipmentPackageSeqId;
            cmd.OrderId           = state.OrderId;
            cmd.OrderItemSeqId    = state.OrderItemSeqId;
            cmd.ReturnId          = state.ReturnId;
            cmd.ReturnItemSeqId   = state.ReturnItemSeqId;
            cmd.RejectionReasonId = state.RejectionReasonId;
            cmd.DamageStatusId    = state.DamageStatusId;
            cmd.DamageReasonId    = state.DamageReasonId;
            cmd.ReceivedBy        = state.ReceivedBy;
            cmd.DatetimeReceived  = state.DatetimeReceived;
            cmd.ItemDescription   = state.ItemDescription;
            cmd.AcceptedQuantity  = state.AcceptedQuantity;
            cmd.RejectedQuantity  = state.RejectedQuantity;
            cmd.DamagedQuantity   = state.DamagedQuantity;
            cmd.Active            = ((IShipmentReceiptStateProperties)state).Active;
            cmd.ShipmentId        = state.ShipmentId;
            return(cmd);
        }
コード例 #11
0
ファイル: ShipmentAggregate.cs プロジェクト: uwitec/wms-8
        }// END Map(ICreate... ////////////////////////////

        protected virtual IShipmentReceiptImageStateMergePatched MapMergePatch(IMergePatchShipmentReceiptImage c, IShipmentReceiptCommand outerCommand, long version, IShipmentReceiptState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new ShipmentReceiptImageEventId(c.ShipmentId, c.ShipmentReceiptReceiptSeqId, c.SequenceId, version);
            IShipmentReceiptImageStateMergePatched e = NewShipmentReceiptImageStateMergePatched(stateEventId);
            var s = outerState.ShipmentReceiptImages.Get(c.SequenceId);

            e.Url    = c.Url;
            e.Active = c.Active;
            e.IsPropertyUrlRemoved    = c.IsPropertyUrlRemoved;
            e.IsPropertyActiveRemoved = c.IsPropertyActiveRemoved;

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();
            return(e);
        }// END Map(IMergePatch... ////////////////////////////
コード例 #12
0
ファイル: ShipmentAggregate.cs プロジェクト: uwitec/wms-8
        }// END Map(IMergePatch... ////////////////////////////

        protected virtual IShipmentReceiptImageEvent Map(IShipmentReceiptImageCommand c, IShipmentReceiptCommand outerCommand, long version, IShipmentReceiptState outerState)
        {
            var create = (c.CommandType == CommandType.Create) ? (c as ICreateShipmentReceiptImage) : null;

            if (create != null)
            {
                return(MapCreate(create, outerCommand, version, outerState));
            }

            var merge = (c.CommandType == CommandType.MergePatch || c.CommandType == null) ? (c as IMergePatchShipmentReceiptImage) : null;

            if (merge != null)
            {
                return(MapMergePatch(merge, outerCommand, version, outerState));
            }

            var remove = (c.CommandType == CommandType.Remove) ? (c as IRemoveShipmentReceiptImage) : null;

            if (remove != null)
            {
                return(MapRemove(remove, outerCommand, version));
            }
            throw new NotSupportedException();
        }
コード例 #13
0
 public virtual void Remove(IShipmentReceiptState state)
 {
     this._removedShipmentReceiptStates.Add(state.GlobalId, state);
 }
コード例 #14
0
 public virtual void AddToSave(IShipmentReceiptState state)
 {
     this._loadedShipmentReceiptStates[state.GlobalId] = state;
 }
コード例 #15
0
 public void AddToSave(IShipmentReceiptState state)
 {
     throw new NotSupportedException();
 }
コード例 #16
0
ファイル: ShipmentState.cs プロジェクト: windygu/wms-2
        public virtual void When(IShipmentStateCreated e)
        {
            ThrowOnWrongEvent(e);
            this.ShipmentTypeId = e.ShipmentTypeId;

            this.StatusId = e.StatusId;

            this.PrimaryOrderId = e.PrimaryOrderId;

            this.PrimaryReturnId = e.PrimaryReturnId;

            this.PrimaryShipGroupSeqId = e.PrimaryShipGroupSeqId;

            this.PicklistBinId = e.PicklistBinId;

            this.BolNumber = e.BolNumber;

            this.SealNumber = e.SealNumber;

            this.VehicleId = e.VehicleId;

            this.ExternalOrderNumber = e.ExternalOrderNumber;

            this.Carrier = e.Carrier;

            this.DateShipped = e.DateShipped;

            this.EstimatedReadyDate = e.EstimatedReadyDate;

            this.EstimatedShipDate = e.EstimatedShipDate;

            this.EstimatedShipWorkEffId = e.EstimatedShipWorkEffId;

            this.EstimatedArrivalDate = e.EstimatedArrivalDate;

            this.EstimatedArrivalWorkEffId = e.EstimatedArrivalWorkEffId;

            this.LatestCancelDate = e.LatestCancelDate;

            this.EstimatedShipCost = e.EstimatedShipCost;

            this.CurrencyUomId = e.CurrencyUomId;

            this.HandlingInstructions = e.HandlingInstructions;

            this.OriginFacilityId = e.OriginFacilityId;

            this.DestinationFacilityId = e.DestinationFacilityId;

            this.OriginContactMechId = e.OriginContactMechId;

            this.OriginTelecomNumberId = e.OriginTelecomNumberId;

            this.DestinationContactMechId = e.DestinationContactMechId;

            this.DestinationTelecomNumberId = e.DestinationTelecomNumberId;

            this.PartyIdTo = e.PartyIdTo;

            this.PartyIdFrom = e.PartyIdFrom;

            this.AdditionalShippingCharge = e.AdditionalShippingCharge;

            this.AddtlShippingChargeDesc = e.AddtlShippingChargeDesc;

            this.Active = (e.Active != null && e.Active.HasValue) ? e.Active.Value : default(bool);

            this.CreatedBy = e.CreatedBy;
            this.CreatedAt = e.CreatedAt;

            foreach (IShipmentImageStateCreated innerEvent in e.ShipmentImageEvents)
            {
                IShipmentImageState innerState = this.ShipmentImages.Get(innerEvent.GlobalId.SequenceId, true);
                innerState.Mutate(innerEvent);
            }
            foreach (IShipmentItemStateCreated innerEvent in e.ShipmentItemEvents)
            {
                IShipmentItemState innerState = this.ShipmentItems.Get(innerEvent.GlobalId.ShipmentItemSeqId, true);
                innerState.Mutate(innerEvent);
            }
            foreach (IShipmentReceiptStateCreated innerEvent in e.ShipmentReceiptEvents)
            {
                IShipmentReceiptState innerState = this.ShipmentReceipts.Get(innerEvent.GlobalId.ReceiptSeqId, true);
                innerState.Mutate(innerEvent);
            }
            foreach (IItemIssuanceStateCreated innerEvent in e.ItemIssuanceEvents)
            {
                IItemIssuanceState innerState = this.ItemIssuances.Get(innerEvent.GlobalId.ItemIssuanceSeqId, true);
                innerState.Mutate(innerEvent);
            }
        }
コード例 #17
0
ファイル: ShipmentState.cs プロジェクト: windygu/wms-2
        public virtual void When(IShipmentStateMergePatched e)
        {
            ThrowOnWrongEvent(e);

            if (e.ShipmentTypeId == null)
            {
                if (e.IsPropertyShipmentTypeIdRemoved)
                {
                    this.ShipmentTypeId = default(string);
                }
            }
            else
            {
                this.ShipmentTypeId = e.ShipmentTypeId;
            }

            if (e.StatusId == null)
            {
                if (e.IsPropertyStatusIdRemoved)
                {
                    this.StatusId = default(string);
                }
            }
            else
            {
                this.StatusId = e.StatusId;
            }

            if (e.PrimaryOrderId == null)
            {
                if (e.IsPropertyPrimaryOrderIdRemoved)
                {
                    this.PrimaryOrderId = default(string);
                }
            }
            else
            {
                this.PrimaryOrderId = e.PrimaryOrderId;
            }

            if (e.PrimaryReturnId == null)
            {
                if (e.IsPropertyPrimaryReturnIdRemoved)
                {
                    this.PrimaryReturnId = default(string);
                }
            }
            else
            {
                this.PrimaryReturnId = e.PrimaryReturnId;
            }

            if (e.PrimaryShipGroupSeqId == null)
            {
                if (e.IsPropertyPrimaryShipGroupSeqIdRemoved)
                {
                    this.PrimaryShipGroupSeqId = default(string);
                }
            }
            else
            {
                this.PrimaryShipGroupSeqId = e.PrimaryShipGroupSeqId;
            }

            if (e.PicklistBinId == null)
            {
                if (e.IsPropertyPicklistBinIdRemoved)
                {
                    this.PicklistBinId = default(string);
                }
            }
            else
            {
                this.PicklistBinId = e.PicklistBinId;
            }

            if (e.BolNumber == null)
            {
                if (e.IsPropertyBolNumberRemoved)
                {
                    this.BolNumber = default(string);
                }
            }
            else
            {
                this.BolNumber = e.BolNumber;
            }

            if (e.SealNumber == null)
            {
                if (e.IsPropertySealNumberRemoved)
                {
                    this.SealNumber = default(string);
                }
            }
            else
            {
                this.SealNumber = e.SealNumber;
            }

            if (e.VehicleId == null)
            {
                if (e.IsPropertyVehicleIdRemoved)
                {
                    this.VehicleId = default(string);
                }
            }
            else
            {
                this.VehicleId = e.VehicleId;
            }

            if (e.ExternalOrderNumber == null)
            {
                if (e.IsPropertyExternalOrderNumberRemoved)
                {
                    this.ExternalOrderNumber = default(string);
                }
            }
            else
            {
                this.ExternalOrderNumber = e.ExternalOrderNumber;
            }

            if (e.Carrier == null)
            {
                if (e.IsPropertyCarrierRemoved)
                {
                    this.Carrier = default(string);
                }
            }
            else
            {
                this.Carrier = e.Carrier;
            }

            if (e.DateShipped == null)
            {
                if (e.IsPropertyDateShippedRemoved)
                {
                    this.DateShipped = default(DateTime?);
                }
            }
            else
            {
                this.DateShipped = e.DateShipped;
            }

            if (e.EstimatedReadyDate == null)
            {
                if (e.IsPropertyEstimatedReadyDateRemoved)
                {
                    this.EstimatedReadyDate = default(DateTime?);
                }
            }
            else
            {
                this.EstimatedReadyDate = e.EstimatedReadyDate;
            }

            if (e.EstimatedShipDate == null)
            {
                if (e.IsPropertyEstimatedShipDateRemoved)
                {
                    this.EstimatedShipDate = default(DateTime?);
                }
            }
            else
            {
                this.EstimatedShipDate = e.EstimatedShipDate;
            }

            if (e.EstimatedShipWorkEffId == null)
            {
                if (e.IsPropertyEstimatedShipWorkEffIdRemoved)
                {
                    this.EstimatedShipWorkEffId = default(string);
                }
            }
            else
            {
                this.EstimatedShipWorkEffId = e.EstimatedShipWorkEffId;
            }

            if (e.EstimatedArrivalDate == null)
            {
                if (e.IsPropertyEstimatedArrivalDateRemoved)
                {
                    this.EstimatedArrivalDate = default(DateTime?);
                }
            }
            else
            {
                this.EstimatedArrivalDate = e.EstimatedArrivalDate;
            }

            if (e.EstimatedArrivalWorkEffId == null)
            {
                if (e.IsPropertyEstimatedArrivalWorkEffIdRemoved)
                {
                    this.EstimatedArrivalWorkEffId = default(string);
                }
            }
            else
            {
                this.EstimatedArrivalWorkEffId = e.EstimatedArrivalWorkEffId;
            }

            if (e.LatestCancelDate == null)
            {
                if (e.IsPropertyLatestCancelDateRemoved)
                {
                    this.LatestCancelDate = default(DateTime?);
                }
            }
            else
            {
                this.LatestCancelDate = e.LatestCancelDate;
            }

            if (e.EstimatedShipCost == null)
            {
                if (e.IsPropertyEstimatedShipCostRemoved)
                {
                    this.EstimatedShipCost = default(decimal?);
                }
            }
            else
            {
                this.EstimatedShipCost = e.EstimatedShipCost;
            }

            if (e.CurrencyUomId == null)
            {
                if (e.IsPropertyCurrencyUomIdRemoved)
                {
                    this.CurrencyUomId = default(string);
                }
            }
            else
            {
                this.CurrencyUomId = e.CurrencyUomId;
            }

            if (e.HandlingInstructions == null)
            {
                if (e.IsPropertyHandlingInstructionsRemoved)
                {
                    this.HandlingInstructions = default(string);
                }
            }
            else
            {
                this.HandlingInstructions = e.HandlingInstructions;
            }

            if (e.OriginFacilityId == null)
            {
                if (e.IsPropertyOriginFacilityIdRemoved)
                {
                    this.OriginFacilityId = default(string);
                }
            }
            else
            {
                this.OriginFacilityId = e.OriginFacilityId;
            }

            if (e.DestinationFacilityId == null)
            {
                if (e.IsPropertyDestinationFacilityIdRemoved)
                {
                    this.DestinationFacilityId = default(string);
                }
            }
            else
            {
                this.DestinationFacilityId = e.DestinationFacilityId;
            }

            if (e.OriginContactMechId == null)
            {
                if (e.IsPropertyOriginContactMechIdRemoved)
                {
                    this.OriginContactMechId = default(string);
                }
            }
            else
            {
                this.OriginContactMechId = e.OriginContactMechId;
            }

            if (e.OriginTelecomNumberId == null)
            {
                if (e.IsPropertyOriginTelecomNumberIdRemoved)
                {
                    this.OriginTelecomNumberId = default(string);
                }
            }
            else
            {
                this.OriginTelecomNumberId = e.OriginTelecomNumberId;
            }

            if (e.DestinationContactMechId == null)
            {
                if (e.IsPropertyDestinationContactMechIdRemoved)
                {
                    this.DestinationContactMechId = default(string);
                }
            }
            else
            {
                this.DestinationContactMechId = e.DestinationContactMechId;
            }

            if (e.DestinationTelecomNumberId == null)
            {
                if (e.IsPropertyDestinationTelecomNumberIdRemoved)
                {
                    this.DestinationTelecomNumberId = default(string);
                }
            }
            else
            {
                this.DestinationTelecomNumberId = e.DestinationTelecomNumberId;
            }

            if (e.PartyIdTo == null)
            {
                if (e.IsPropertyPartyIdToRemoved)
                {
                    this.PartyIdTo = default(string);
                }
            }
            else
            {
                this.PartyIdTo = e.PartyIdTo;
            }

            if (e.PartyIdFrom == null)
            {
                if (e.IsPropertyPartyIdFromRemoved)
                {
                    this.PartyIdFrom = default(string);
                }
            }
            else
            {
                this.PartyIdFrom = e.PartyIdFrom;
            }

            if (e.AdditionalShippingCharge == null)
            {
                if (e.IsPropertyAdditionalShippingChargeRemoved)
                {
                    this.AdditionalShippingCharge = default(decimal?);
                }
            }
            else
            {
                this.AdditionalShippingCharge = e.AdditionalShippingCharge;
            }

            if (e.AddtlShippingChargeDesc == null)
            {
                if (e.IsPropertyAddtlShippingChargeDescRemoved)
                {
                    this.AddtlShippingChargeDesc = default(string);
                }
            }
            else
            {
                this.AddtlShippingChargeDesc = e.AddtlShippingChargeDesc;
            }

            if (e.Active == null)
            {
                if (e.IsPropertyActiveRemoved)
                {
                    this.Active = default(bool);
                }
            }
            else
            {
                this.Active = (e.Active != null && e.Active.HasValue) ? e.Active.Value : default(bool);
            }


            this.UpdatedBy = e.CreatedBy;
            this.UpdatedAt = e.CreatedAt;


            foreach (IShipmentImageEvent innerEvent in e.ShipmentImageEvents)
            {
                IShipmentImageState innerState = this.ShipmentImages.Get(innerEvent.GlobalId.SequenceId);

                innerState.Mutate(innerEvent);
                var removed = innerEvent as IShipmentImageStateRemoved;
                if (removed != null)
                {
                    this.ShipmentImages.Remove(innerState);
                }
            }

            foreach (IShipmentItemEvent innerEvent in e.ShipmentItemEvents)
            {
                IShipmentItemState innerState = this.ShipmentItems.Get(innerEvent.GlobalId.ShipmentItemSeqId);

                innerState.Mutate(innerEvent);
            }

            foreach (IShipmentReceiptEvent innerEvent in e.ShipmentReceiptEvents)
            {
                IShipmentReceiptState innerState = this.ShipmentReceipts.Get(innerEvent.GlobalId.ReceiptSeqId);

                innerState.Mutate(innerEvent);
            }

            foreach (IItemIssuanceEvent innerEvent in e.ItemIssuanceEvents)
            {
                IItemIssuanceState innerState = this.ItemIssuances.Get(innerEvent.GlobalId.ItemIssuanceSeqId);

                innerState.Mutate(innerEvent);
                var removed = innerEvent as IItemIssuanceStateRemoved;
                if (removed != null)
                {
                    this.ItemIssuances.Remove(innerState);
                }
            }
        }
コード例 #18
0
        public static IShipmentReceiptCommand ToCreateOrMergePatchShipmentReceipt <TCreateShipmentReceipt, TMergePatchShipmentReceipt>(this IShipmentReceiptState state)
            where TCreateShipmentReceipt : ICreateShipmentReceipt, new()
            where TMergePatchShipmentReceipt : IMergePatchShipmentReceipt, new()
        {
            bool bUnsaved = ((IShipmentReceiptState)state).IsUnsaved;

            if (bUnsaved)
            {
                return(state.ToCreateShipmentReceipt <TCreateShipmentReceipt>());
            }
            else
            {
                return(state.ToMergePatchShipmentReceipt <TMergePatchShipmentReceipt>());
            }
        }