Пример #1
0
        public static IList <CategoryInfo> GetSubCategories(int parentCategoryId)
        {
            IList <CategoryInfo> list = new List <CategoryInfo>();

            System.Data.DataTable categories = SubsiteCatalogHelper.GetCategories();
            System.Data.DataRow[] array      = categories.Select("ParentCategoryId = " + parentCategoryId.ToString());
            for (int i = 0; i < array.Length; i++)
            {
                list.Add(DataMapper.ConvertDataRowToProductCategory(array[i]));
            }
            return(list);
        }
Пример #2
0
        public static IList <CategoryInfo> GetMainCategories()
        {
            IList <CategoryInfo> list = new List <CategoryInfo>();

            System.Data.DataTable categories = SubsiteCatalogHelper.GetCategories();
            System.Data.DataRow[] array      = categories.Select("Depth = 1");
            for (int i = 0; i < array.Length; i++)
            {
                list.Add(DataMapper.ConvertDataRowToProductCategory(array[i]));
            }
            return(list);
        }