예제 #1
0
        protected virtual ISupplierProductStateMergePatched Map(IMergePatchSupplierProduct c)
        {
            var stateEventId = new SupplierProductEventId(c.SupplierProductId, c.Version);
            ISupplierProductStateMergePatched e = NewSupplierProductStateMergePatched(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.IsPropertyAvailableThruDateRemoved         = c.IsPropertyAvailableThruDateRemoved;
            e.IsPropertySupplierPrefOrderIdRemoved       = c.IsPropertySupplierPrefOrderIdRemoved;
            e.IsPropertySupplierRatingTypeIdRemoved      = c.IsPropertySupplierRatingTypeIdRemoved;
            e.IsPropertyStandardLeadTimeDaysRemoved      = c.IsPropertyStandardLeadTimeDaysRemoved;
            e.IsPropertyManufacturingLeadTimeDaysRemoved = c.IsPropertyManufacturingLeadTimeDaysRemoved;
            e.IsPropertyDeliveryLeadTimeDaysRemoved      = c.IsPropertyDeliveryLeadTimeDaysRemoved;
            e.IsPropertyQuantityUomIdRemoved             = c.IsPropertyQuantityUomIdRemoved;
            e.IsPropertyLastPriceRemoved           = c.IsPropertyLastPriceRemoved;
            e.IsPropertyShippingPriceRemoved       = c.IsPropertyShippingPriceRemoved;
            e.IsPropertyExternalProductNameRemoved = c.IsPropertyExternalProductNameRemoved;
            e.IsPropertyExternalProductIdRemoved   = c.IsPropertyExternalProductIdRemoved;
            e.IsPropertyCanDropShipRemoved         = c.IsPropertyCanDropShipRemoved;
            e.IsPropertyCommentsRemoved            = c.IsPropertyCommentsRemoved;
            e.IsPropertyActiveRemoved = c.IsPropertyActiveRemoved;

            e.CommandId = c.CommandId;


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

            var version = c.Version;


            return(e);
        }
 public virtual void When(IMergePatchSupplierProduct c)
 {
     Update(c, ar => ar.MergePatch(c));
 }
 void ISupplierProductApplicationService.When(IMergePatchSupplierProduct c)
 {
     this.When((MergePatchSupplierProductDto)c);
 }
예제 #4
0
        public virtual void MergePatch(IMergePatchSupplierProduct c)
        {
            ISupplierProductStateMergePatched e = Map(c);

            Apply(e);
        }