Exemple #1
0
        public Bitmap GetImage(BegemotProduct bproduct)
        {
            if (_bitmap == null)
            {
                var path = GetImagePath();
                if (!File.Exists(path))
                {

                    path = bproduct.GetImagePath();
                }

                bool hasImage = path == BegemotProduct.NoImagePath;

                _bitmap = hasImage ? null : new Bitmap(path);
            }

            return _bitmap;
        }
Exemple #2
0
        public static Product FromBegemotProduct(BegemotProduct begemotProduct)
        {
            var product = new Product();
            product.Article = begemotProduct.Article;
            product.Title = begemotProduct.GetClearTitle();

            product.Description = begemotProduct.GetDescription();
            product.Price = begemotProduct.RetailPrice;
            begemotProduct.GetImagePath();

            product.Category = ProductCategory.FromBegemotProduct(begemotProduct);

            product.Active = true;

            return product;
        }