protected PhysicalInventoryStateMergePatched NewPhysicalInventoryStateMergePatched(long version, string commandId, string requesterId) { var stateEventId = new PhysicalInventoryEventId(_state.DocumentNumber, version); var e = NewPhysicalInventoryStateMergePatched(stateEventId); e.CommandId = commandId; e.CreatedBy = (string)requesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }
protected virtual IPhysicalInventoryStateMergePatched Map(IMergePatchPhysicalInventory c) { var stateEventId = new PhysicalInventoryEventId(c.DocumentNumber, c.Version); IPhysicalInventoryStateMergePatched e = NewPhysicalInventoryStateMergePatched(stateEventId); e.WarehouseId = c.WarehouseId; e.LocatorIdPattern = c.LocatorIdPattern; e.ProductIdPattern = c.ProductIdPattern; e.Posted = c.Posted; e.Processed = c.Processed; e.Processing = c.Processing; e.DocumentTypeId = c.DocumentTypeId; e.MovementDate = c.MovementDate; e.Description = c.Description; e.IsApproved = c.IsApproved; e.ApprovalAmount = c.ApprovalAmount; e.IsQuantityUpdated = c.IsQuantityUpdated; e.ReversalDocumentNumber = c.ReversalDocumentNumber; e.Active = c.Active; e.IsPropertyWarehouseIdRemoved = c.IsPropertyWarehouseIdRemoved; e.IsPropertyLocatorIdPatternRemoved = c.IsPropertyLocatorIdPatternRemoved; e.IsPropertyProductIdPatternRemoved = c.IsPropertyProductIdPatternRemoved; e.IsPropertyPostedRemoved = c.IsPropertyPostedRemoved; e.IsPropertyProcessedRemoved = c.IsPropertyProcessedRemoved; e.IsPropertyProcessingRemoved = c.IsPropertyProcessingRemoved; e.IsPropertyDocumentTypeIdRemoved = c.IsPropertyDocumentTypeIdRemoved; e.IsPropertyMovementDateRemoved = c.IsPropertyMovementDateRemoved; e.IsPropertyDescriptionRemoved = c.IsPropertyDescriptionRemoved; e.IsPropertyIsApprovedRemoved = c.IsPropertyIsApprovedRemoved; e.IsPropertyApprovalAmountRemoved = c.IsPropertyApprovalAmountRemoved; e.IsPropertyIsQuantityUpdatedRemoved = c.IsPropertyIsQuantityUpdatedRemoved; e.IsPropertyReversalDocumentNumberRemoved = c.IsPropertyReversalDocumentNumberRemoved; e.IsPropertyActiveRemoved = c.IsPropertyActiveRemoved; e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); var version = c.Version; foreach (IPhysicalInventoryLineCommand innerCommand in c.PhysicalInventoryLineCommands) { ThrowOnInconsistentCommands(c, innerCommand); IPhysicalInventoryLineEvent innerEvent = Map(innerCommand, c, version, _state); e.AddPhysicalInventoryLineEvent(innerEvent); } return(e); }
public override bool Equals(object obj) { if (Object.ReferenceEquals(this, obj)) { return(true); } PhysicalInventoryEventId other = obj as PhysicalInventoryEventId; if (other == null) { return(false); } return(true && Object.Equals(this.DocumentNumber, other.DocumentNumber) && Object.Equals(this.Version, other.Version) ); }
protected PhysicalInventoryStateEventDtoBase(PhysicalInventoryEventId stateEventId) { this.PhysicalInventoryEventId = stateEventId; }
private PhysicalInventoryStateMergePatched NewPhysicalInventoryStateMergePatched(PhysicalInventoryEventId stateEventId) { return(new PhysicalInventoryStateMergePatched(stateEventId)); }
//////////////////////// private PhysicalInventoryStateCreated NewPhysicalInventoryStateCreated(PhysicalInventoryEventId stateEventId) { return(new PhysicalInventoryStateCreated(stateEventId)); }
public PhysicalInventoryStateMergePatched(PhysicalInventoryEventId stateEventId) : base(stateEventId) { }
public PhysicalInventoryStateCreated(PhysicalInventoryEventId stateEventId) : base(stateEventId) { }
protected PhysicalInventoryStateEventBase(PhysicalInventoryEventId stateEventId) : base(stateEventId) { }