Exemplo n.º 1
0
        public ProductDescription FetchCategoryProductDescription(Guid categoryId, Guid pdId)
        {
            var category = FetchCategory(categoryId);
            ProductDescription productDescription = null;

            if (category != null)
            {
                productDescription = category.FetchProductDescription(pdId);
            }
            return(productDescription);
        }
Exemplo n.º 2
0
        public ProductDescription AddProductDescription(decimal basePrice, string description, bool gstFree)
        {
            var pd = new ProductDescription(this, basePrice, description, gstFree);

            if (ProductDescriptions.Contains(pd))
            {
                throw new Exception(" Product already exists");
            }

            ProductDescriptions.Add(pd);
            return(pd);
        }