}// END Map(ICreate... //////////////////////////// protected virtual IItemIssuanceStateMergePatched MapMergePatch(IMergePatchItemIssuance c, IShipmentCommand outerCommand, long version, IShipmentState outerState) { c.RequesterId = outerCommand.RequesterId; var stateEventId = new ItemIssuanceEventId(c.ShipmentId, c.ItemIssuanceSeqId, version); IItemIssuanceStateMergePatched e = NewItemIssuanceStateMergePatched(stateEventId); var s = outerState.ItemIssuances.Get(c.ItemIssuanceSeqId); e.OrderId = c.OrderId; e.OrderItemSeqId = c.OrderItemSeqId; e.ShipGroupSeqId = c.ShipGroupSeqId; e.ProductId = c.ProductId; e.LocatorId = c.LocatorId; e.AttributeSetInstanceId = c.AttributeSetInstanceId; e.ShipmentItemSeqId = c.ShipmentItemSeqId; e.FixedAssetId = c.FixedAssetId; e.MaintHistSeqId = c.MaintHistSeqId; e.IssuedDateTime = c.IssuedDateTime; e.IssuedByUserLoginId = c.IssuedByUserLoginId; e.Quantity = c.Quantity; e.CancelQuantity = c.CancelQuantity; e.Active = c.Active; e.IsPropertyOrderIdRemoved = c.IsPropertyOrderIdRemoved; e.IsPropertyOrderItemSeqIdRemoved = c.IsPropertyOrderItemSeqIdRemoved; e.IsPropertyShipGroupSeqIdRemoved = c.IsPropertyShipGroupSeqIdRemoved; e.IsPropertyProductIdRemoved = c.IsPropertyProductIdRemoved; e.IsPropertyLocatorIdRemoved = c.IsPropertyLocatorIdRemoved; e.IsPropertyAttributeSetInstanceIdRemoved = c.IsPropertyAttributeSetInstanceIdRemoved; e.IsPropertyShipmentItemSeqIdRemoved = c.IsPropertyShipmentItemSeqIdRemoved; e.IsPropertyFixedAssetIdRemoved = c.IsPropertyFixedAssetIdRemoved; e.IsPropertyMaintHistSeqIdRemoved = c.IsPropertyMaintHistSeqIdRemoved; e.IsPropertyIssuedDateTimeRemoved = c.IsPropertyIssuedDateTimeRemoved; e.IsPropertyIssuedByUserLoginIdRemoved = c.IsPropertyIssuedByUserLoginIdRemoved; e.IsPropertyQuantityRemoved = c.IsPropertyQuantityRemoved; e.IsPropertyCancelQuantityRemoved = c.IsPropertyCancelQuantityRemoved; e.IsPropertyActiveRemoved = c.IsPropertyActiveRemoved; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }// END Map(IMergePatch... ////////////////////////////
public virtual void When(IItemIssuanceStateMergePatched e) { ThrowOnWrongEvent(e); if (e.OrderId == null) { if (e.IsPropertyOrderIdRemoved) { this.OrderId = default(string); } } else { this.OrderId = e.OrderId; } if (e.OrderItemSeqId == null) { if (e.IsPropertyOrderItemSeqIdRemoved) { this.OrderItemSeqId = default(string); } } else { this.OrderItemSeqId = e.OrderItemSeqId; } if (e.ShipGroupSeqId == null) { if (e.IsPropertyShipGroupSeqIdRemoved) { this.ShipGroupSeqId = default(string); } } else { this.ShipGroupSeqId = e.ShipGroupSeqId; } if (e.ProductId == null) { if (e.IsPropertyProductIdRemoved) { this.ProductId = default(string); } } else { this.ProductId = e.ProductId; } if (e.LocatorId == null) { if (e.IsPropertyLocatorIdRemoved) { this.LocatorId = default(string); } } else { this.LocatorId = e.LocatorId; } if (e.AttributeSetInstanceId == null) { if (e.IsPropertyAttributeSetInstanceIdRemoved) { this.AttributeSetInstanceId = default(string); } } else { this.AttributeSetInstanceId = e.AttributeSetInstanceId; } if (e.ShipmentItemSeqId == null) { if (e.IsPropertyShipmentItemSeqIdRemoved) { this.ShipmentItemSeqId = default(string); } } else { this.ShipmentItemSeqId = e.ShipmentItemSeqId; } if (e.FixedAssetId == null) { if (e.IsPropertyFixedAssetIdRemoved) { this.FixedAssetId = default(string); } } else { this.FixedAssetId = e.FixedAssetId; } if (e.MaintHistSeqId == null) { if (e.IsPropertyMaintHistSeqIdRemoved) { this.MaintHistSeqId = default(string); } } else { this.MaintHistSeqId = e.MaintHistSeqId; } if (e.IssuedDateTime == null) { if (e.IsPropertyIssuedDateTimeRemoved) { this.IssuedDateTime = default(DateTime?); } } else { this.IssuedDateTime = e.IssuedDateTime; } if (e.IssuedByUserLoginId == null) { if (e.IsPropertyIssuedByUserLoginIdRemoved) { this.IssuedByUserLoginId = default(string); } } else { this.IssuedByUserLoginId = e.IssuedByUserLoginId; } if (e.Quantity == null) { if (e.IsPropertyQuantityRemoved) { this.Quantity = default(decimal?); } } else { this.Quantity = e.Quantity; } if (e.CancelQuantity == null) { if (e.IsPropertyCancelQuantityRemoved) { this.CancelQuantity = default(decimal?); } } else { this.CancelQuantity = e.CancelQuantity; } 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; }
void IItemIssuanceState.When(IItemIssuanceStateMergePatched e) { throw new NotSupportedException(); }
public virtual ItemIssuanceStateMergePatchedDto ToItemIssuanceStateMergePatchedDto(IItemIssuanceStateMergePatched e) { var dto = new ItemIssuanceStateMergePatchedDto(); dto.ItemIssuanceEventId = e.ItemIssuanceEventId; dto.CreatedAt = e.CreatedAt; dto.CreatedBy = e.CreatedBy; dto.Version = e.Version; dto.CommandId = e.CommandId; dto.OrderId = e.OrderId; dto.OrderItemSeqId = e.OrderItemSeqId; dto.ShipGroupSeqId = e.ShipGroupSeqId; dto.ProductId = e.ProductId; dto.LocatorId = e.LocatorId; dto.AttributeSetInstanceId = e.AttributeSetInstanceId; dto.ShipmentItemSeqId = e.ShipmentItemSeqId; dto.FixedAssetId = e.FixedAssetId; dto.MaintHistSeqId = e.MaintHistSeqId; dto.IssuedDateTime = e.IssuedDateTime; dto.IssuedByUserLoginId = e.IssuedByUserLoginId; dto.Quantity = e.Quantity; dto.CancelQuantity = e.CancelQuantity; dto.Active = e.Active; dto.IsPropertyOrderIdRemoved = e.IsPropertyOrderIdRemoved; dto.IsPropertyOrderItemSeqIdRemoved = e.IsPropertyOrderItemSeqIdRemoved; dto.IsPropertyShipGroupSeqIdRemoved = e.IsPropertyShipGroupSeqIdRemoved; dto.IsPropertyProductIdRemoved = e.IsPropertyProductIdRemoved; dto.IsPropertyLocatorIdRemoved = e.IsPropertyLocatorIdRemoved; dto.IsPropertyAttributeSetInstanceIdRemoved = e.IsPropertyAttributeSetInstanceIdRemoved; dto.IsPropertyShipmentItemSeqIdRemoved = e.IsPropertyShipmentItemSeqIdRemoved; dto.IsPropertyFixedAssetIdRemoved = e.IsPropertyFixedAssetIdRemoved; dto.IsPropertyMaintHistSeqIdRemoved = e.IsPropertyMaintHistSeqIdRemoved; dto.IsPropertyIssuedDateTimeRemoved = e.IsPropertyIssuedDateTimeRemoved; dto.IsPropertyIssuedByUserLoginIdRemoved = e.IsPropertyIssuedByUserLoginIdRemoved; dto.IsPropertyQuantityRemoved = e.IsPropertyQuantityRemoved; dto.IsPropertyCancelQuantityRemoved = e.IsPropertyCancelQuantityRemoved; dto.IsPropertyActiveRemoved = e.IsPropertyActiveRemoved; return(dto); }