Beispiel #1
0
        public virtual GoodIdentificationStateCreatedDto NewGoodIdentificationStateCreated(string goodIdentificationTypeId)
        {
            var e   = new GoodIdentificationStateCreatedDto();
            var eId = NewGoodIdentificationEventId(goodIdentificationTypeId);

            e.GoodIdentificationEventId = eId;
            return(e);
        }
        public virtual GoodIdentificationStateCreatedDto ToGoodIdentificationStateCreatedDto(IGoodIdentificationStateCreated e)
        {
            var dto = new GoodIdentificationStateCreatedDto();

            dto.GoodIdentificationEventId = e.GoodIdentificationEventId;
            dto.CreatedAt = e.CreatedAt;
            dto.CreatedBy = e.CreatedBy;
            dto.Version   = e.Version;
            dto.CommandId = e.CommandId;
            dto.IdValue   = e.IdValue;
            dto.Active    = e.Active;
            return(dto);
        }
Beispiel #3
0
        public virtual ProductStateCreatedDto ToProductStateCreatedDto(IProductStateCreated e)
        {
            var dto = new ProductStateCreatedDto();

            dto.ProductEventId             = e.ProductEventId;
            dto.CreatedAt                  = e.CreatedAt;
            dto.CreatedBy                  = e.CreatedBy;
            dto.CommandId                  = e.CommandId;
            dto.ProductTypeId              = e.ProductTypeId;
            dto.PrimaryProductCategoryId   = e.PrimaryProductCategoryId;
            dto.ManufacturerPartyId        = e.ManufacturerPartyId;
            dto.FacilityId                 = e.FacilityId;
            dto.IntroductionDate           = e.IntroductionDate;
            dto.ReleaseDate                = e.ReleaseDate;
            dto.SupportDiscontinuationDate = e.SupportDiscontinuationDate;
            dto.SalesDiscontinuationDate   = e.SalesDiscontinuationDate;
            dto.SalesDiscWhenNotAvail      = e.SalesDiscWhenNotAvail;
            dto.InternalName               = e.InternalName;
            dto.BrandName                  = e.BrandName;
            dto.Comments                 = e.Comments;
            dto.ProductName              = e.ProductName;
            dto.Description              = e.Description;
            dto.PriceDetailText          = e.PriceDetailText;
            dto.SmallImageUrl            = e.SmallImageUrl;
            dto.MediumImageUrl           = e.MediumImageUrl;
            dto.LargeImageUrl            = e.LargeImageUrl;
            dto.DetailImageUrl           = e.DetailImageUrl;
            dto.OriginalImageUrl         = e.OriginalImageUrl;
            dto.DetailScreen             = e.DetailScreen;
            dto.InventoryMessage         = e.InventoryMessage;
            dto.InventoryItemTypeId      = e.InventoryItemTypeId;
            dto.RequireInventory         = e.RequireInventory;
            dto.QuantityUomId            = e.QuantityUomId;
            dto.QuantityIncluded         = e.QuantityIncluded;
            dto.PiecesIncluded           = e.PiecesIncluded;
            dto.RequireAmount            = e.RequireAmount;
            dto.FixedAmount              = e.FixedAmount;
            dto.AmountUomTypeId          = e.AmountUomTypeId;
            dto.WeightUomId              = e.WeightUomId;
            dto.ShippingWeight           = e.ShippingWeight;
            dto.ProductWeight            = e.ProductWeight;
            dto.HeightUomId              = e.HeightUomId;
            dto.ProductHeight            = e.ProductHeight;
            dto.ShippingHeight           = e.ShippingHeight;
            dto.WidthUomId               = e.WidthUomId;
            dto.ProductWidth             = e.ProductWidth;
            dto.ShippingWidth            = e.ShippingWidth;
            dto.DepthUomId               = e.DepthUomId;
            dto.ProductDepth             = e.ProductDepth;
            dto.ShippingDepth            = e.ShippingDepth;
            dto.DiameterUomId            = e.DiameterUomId;
            dto.ProductDiameter          = e.ProductDiameter;
            dto.ProductRating            = e.ProductRating;
            dto.RatingTypeEnum           = e.RatingTypeEnum;
            dto.Returnable               = e.Returnable;
            dto.Taxable                  = e.Taxable;
            dto.ChargeShipping           = e.ChargeShipping;
            dto.AutoCreateKeywords       = e.AutoCreateKeywords;
            dto.IncludeInPromotions      = e.IncludeInPromotions;
            dto.IsVirtual                = e.IsVirtual;
            dto.IsVariant                = e.IsVariant;
            dto.VirtualVariantMethodEnum = e.VirtualVariantMethodEnum;
            dto.InShippingBox            = e.InShippingBox;
            dto.DefaultShipmentBoxTypeId = e.DefaultShipmentBoxTypeId;
            dto.IsSerialNumbered         = e.IsSerialNumbered;
            dto.IsManagedByLot           = e.IsManagedByLot;
            dto.AttributeSetId           = e.AttributeSetId;
            dto.AttributeSetInstanceId   = e.AttributeSetInstanceId;
            dto.Active = e.Active;
            var goodIdentificationEvents = new List <GoodIdentificationStateCreatedDto>();

            foreach (var ee in e.GoodIdentificationEvents)
            {
                GoodIdentificationStateCreatedDto eeDto = GoodIdentificationStateEventDtoConverter.ToGoodIdentificationStateCreatedDto(ee);
                goodIdentificationEvents.Add(eeDto);
            }
            dto.GoodIdentificationEvents = goodIdentificationEvents.ToArray();

            return(dto);
        }