예제 #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);
        }
예제 #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);
        }
예제 #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)
                   );
        }
예제 #4
0
 protected SupplierProductEventBase(SupplierProductEventId stateEventId)
 {
     this.SupplierProductEventId = stateEventId;
 }
예제 #5
0
 public SupplierProductStateMergePatched(SupplierProductEventId stateEventId) : base(stateEventId)
 {
 }
예제 #6
0
 public SupplierProductStateCreated(SupplierProductEventId stateEventId) : base(stateEventId)
 {
 }
예제 #7
0
 protected SupplierProductStateEventBase(SupplierProductEventId stateEventId) : base(stateEventId)
 {
 }
예제 #8
0
 private SupplierProductStateMergePatched NewSupplierProductStateMergePatched(SupplierProductEventId stateEventId)
 {
     return(new SupplierProductStateMergePatched(stateEventId));
 }
예제 #9
0
////////////////////////

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