Exemplo n.º 1
0
        protected virtual ISupplierProductStateCreated Map(ICreateSupplierProduct c)
        {
            var stateEventId = new SupplierProductEventId(c.SupplierProductId, c.Version);
            ISupplierProductStateCreated e = NewSupplierProductStateCreated(stateEventId);

            e.AvailableThruDate         = c.AvailableThruDate;
            e.SupplierPrefOrderId       = c.SupplierPrefOrderId;
            e.SupplierRatingTypeId      = c.SupplierRatingTypeId;
            e.StandardLeadTimeDays      = c.StandardLeadTimeDays;
            e.ManufacturingLeadTimeDays = c.ManufacturingLeadTimeDays;
            e.DeliveryLeadTimeDays      = c.DeliveryLeadTimeDays;
            e.QuantityUomId             = c.QuantityUomId;
            e.LastPrice           = c.LastPrice;
            e.ShippingPrice       = c.ShippingPrice;
            e.ExternalProductName = c.ExternalProductName;
            e.ExternalProductId   = c.ExternalProductId;
            e.CanDropShip         = c.CanDropShip;
            e.Comments            = c.Comments;
            e.Active    = c.Active;
            e.CommandId = c.CommandId;


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


            return(e);
        }
Exemplo n.º 2
0
        protected SupplierProductStateMergePatched NewSupplierProductStateMergePatched(long version, string commandId, string requesterId)
        {
            var stateEventId = new SupplierProductEventId(_state.SupplierProductId, version);
            var e            = NewSupplierProductStateMergePatched(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
Exemplo n.º 3
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            SupplierProductEventId other = obj as SupplierProductEventId;

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

            return(true &&
                   Object.Equals(this.SupplierProductId, other.SupplierProductId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
Exemplo n.º 4
0
 protected SupplierProductEventBase(SupplierProductEventId stateEventId)
 {
     this.SupplierProductEventId = stateEventId;
 }
Exemplo n.º 5
0
 public SupplierProductStateMergePatched(SupplierProductEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 6
0
 public SupplierProductStateCreated(SupplierProductEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 7
0
 protected SupplierProductStateEventBase(SupplierProductEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 8
0
 private SupplierProductStateMergePatched NewSupplierProductStateMergePatched(SupplierProductEventId stateEventId)
 {
     return(new SupplierProductStateMergePatched(stateEventId));
 }
Exemplo n.º 9
0
////////////////////////

        private SupplierProductStateCreated NewSupplierProductStateCreated(SupplierProductEventId stateEventId)
        {
            return(new SupplierProductStateCreated(stateEventId));
        }