示例#1
0
        private PhysicalInventoryLineEventId NewPhysicalInventoryLineEventId(InventoryItemId inventoryItemId)
        {
            var eId = new PhysicalInventoryLineEventId();

            eId.PhysicalInventoryDocumentNumber = this.PhysicalInventoryEventId.DocumentNumber;
            eId.InventoryItemId          = inventoryItemId;
            eId.PhysicalInventoryVersion = this.PhysicalInventoryEventId.Version;
            return(eId);
        }
        }// END Map(IMergePatch... ////////////////////////////

        protected virtual IPhysicalInventoryLineStateRemoved MapRemove(IRemovePhysicalInventoryLine c, IPhysicalInventoryCommand outerCommand, long version)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new PhysicalInventoryLineEventId(c.PhysicalInventoryDocumentNumber, c.InventoryItemId, version);
            IPhysicalInventoryLineStateRemoved e = NewPhysicalInventoryLineStateRemoved(stateEventId);


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

            return(e);
        }// END Map(IRemove... ////////////////////////////
        protected virtual IPhysicalInventoryLineStateCreated MapCreate(ICreatePhysicalInventoryLine c, IPhysicalInventoryCommand outerCommand, long version, IPhysicalInventoryState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new PhysicalInventoryLineEventId(c.PhysicalInventoryDocumentNumber, c.InventoryItemId, version);
            IPhysicalInventoryLineStateCreated e = NewPhysicalInventoryLineStateCreated(stateEventId);
            var s = outerState.PhysicalInventoryLines.Get(c.InventoryItemId, true);

            e.BookQuantity       = c.BookQuantity;
            e.CountedQuantity    = c.CountedQuantity;
            e.Processed          = c.Processed;
            e.LineNumber         = c.LineNumber;
            e.ReversalLineNumber = c.ReversalLineNumber;
            e.Description        = c.Description;

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();
            return(e);
        }// END Map(ICreate... ////////////////////////////
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            PhysicalInventoryLineEventId other = obj as PhysicalInventoryLineEventId;

            if (other == null)
            {
                return(false);
            }

            return(true &&
                   Object.Equals(this.PhysicalInventoryDocumentNumber, other.PhysicalInventoryDocumentNumber) &&
                   Object.Equals(this.InventoryItemId, other.InventoryItemId) &&
                   Object.Equals(this.PhysicalInventoryVersion, other.PhysicalInventoryVersion)
                   );
        }
示例#5
0
 protected PhysicalInventoryLineEventBase(PhysicalInventoryLineEventId stateEventId)
 {
     this.PhysicalInventoryLineEventId = stateEventId;
 }
示例#6
0
 public PhysicalInventoryLineStateRemoved(PhysicalInventoryLineEventId stateEventId) : base(stateEventId)
 {
 }
示例#7
0
 public PhysicalInventoryLineStateMergePatched(PhysicalInventoryLineEventId stateEventId) : base(stateEventId)
 {
 }
示例#8
0
 protected PhysicalInventoryLineStateEventBase(PhysicalInventoryLineEventId stateEventId) : base(stateEventId)
 {
 }
 private PhysicalInventoryLineStateRemoved NewPhysicalInventoryLineStateRemoved(PhysicalInventoryLineEventId stateEventId)
 {
     return(new PhysicalInventoryLineStateRemoved(stateEventId));
 }
示例#10
0
 private PhysicalInventoryLineStateMergePatched NewPhysicalInventoryLineStateMergePatched(PhysicalInventoryLineEventId stateEventId)
 {
     return(new PhysicalInventoryLineStateMergePatched(stateEventId));
 }
示例#11
0
        protected PhysicalInventoryLineEventId NewPhysicalInventoryLineEventId(InventoryItemId inventoryItemId)
        {
            var stateEventId = new PhysicalInventoryLineEventId(this.PhysicalInventoryEventId.DocumentNumber, inventoryItemId, this.PhysicalInventoryEventId.Version);

            return(stateEventId);
        }