Ejemplo n.º 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);
        }
Ejemplo n.º 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... ////////////////////////////
Ejemplo n.º 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... ////////////////////////////
Ejemplo n.º 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)
                   );
        }
Ejemplo n.º 5
0
 protected PhysicalInventoryLineEventBase(PhysicalInventoryLineEventId stateEventId)
 {
     this.PhysicalInventoryLineEventId = stateEventId;
 }
Ejemplo n.º 6
0
 public PhysicalInventoryLineStateRemoved(PhysicalInventoryLineEventId stateEventId) : base(stateEventId)
 {
 }
Ejemplo n.º 7
0
 public PhysicalInventoryLineStateMergePatched(PhysicalInventoryLineEventId stateEventId) : base(stateEventId)
 {
 }
Ejemplo n.º 8
0
 protected PhysicalInventoryLineStateEventBase(PhysicalInventoryLineEventId stateEventId) : base(stateEventId)
 {
 }
Ejemplo n.º 9
0
 private PhysicalInventoryLineStateRemoved NewPhysicalInventoryLineStateRemoved(PhysicalInventoryLineEventId stateEventId)
 {
     return(new PhysicalInventoryLineStateRemoved(stateEventId));
 }
Ejemplo n.º 10
0
 private PhysicalInventoryLineStateMergePatched NewPhysicalInventoryLineStateMergePatched(PhysicalInventoryLineEventId stateEventId)
 {
     return(new PhysicalInventoryLineStateMergePatched(stateEventId));
 }
Ejemplo n.º 11
0
        protected PhysicalInventoryLineEventId NewPhysicalInventoryLineEventId(InventoryItemId inventoryItemId)
        {
            var stateEventId = new PhysicalInventoryLineEventId(this.PhysicalInventoryEventId.DocumentNumber, inventoryItemId, this.PhysicalInventoryEventId.Version);

            return(stateEventId);
        }