예제 #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);
        }
예제 #2
0
        }// 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... ////////////////////////////
예제 #3
0
        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... ////////////////////////////
예제 #4
0
        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)
 {
 }
예제 #9
0
 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);
        }