Example #1
0
        public List<Brand> GetBrands(string categoryUrl)
        {
            CategoryDL categoryDL = new CategoryDL();
            Category category = categoryDL.GetCategoryByUrl(categoryUrl);

            BrandDL brandDL = new BrandDL();
            return category != null ? brandDL.GetBrands(category.CategoryID) : null;
        }
Example #2
0
        public List<Brand> GetBrands(string categoryUrl, bool includeChildrenCategories = false)
        {
            CategoryDL categoryDL = new CategoryDL();
            Category category = categoryDL.GetCategoryByUrl(categoryUrl);

            BrandDL brandDL = new BrandDL();
            return brandDL.GetBrands(category.CategoryID, includeChildrenCategories);
        }
Example #3
0
        public List<Product> GetProducts(string categoryUrl, List<string> brandsID, List<AttributeValue> attributeValues, string sortName, string priceFrom, string priceTo)
        {
            /*string sort = string.Empty;
            switch (sortString)
            {
                case "Nazivu":
                    {
                        sort = " brand.name";
                        break;
                    }

                case "Ceni opadajuće":
                    {
                        sort = " product.price DESC";
                        break;
                    }

                case "Ceni rastuće":
                    {
                        sort = " product.price";
                        break;
                    }
            }*/
            CategoryDL categoryDL = new CategoryDL();
            Category category = categoryDL.GetCategoryByUrl(categoryUrl);

            ProductDL productDL = new ProductDL();
            return productDL.GetProducts(category.CategoryID, brandsID, attributeValues, getSort(sortName), getPrice(priceFrom), getPrice(priceTo));
        }