public static IList <CategoryInfo> GetSequenceCategories()
        {
            IList <CategoryInfo> list           = new List <CategoryInfo>();
            IList <CategoryInfo> mainCategories = SubsiteCatalogHelper.GetMainCategories();

            foreach (CategoryInfo current in mainCategories)
            {
                list.Add(current);
                SubsiteCatalogHelper.LoadSubCategorys(current.CategoryId, list);
            }
            return(list);
        }
        private static void LoadSubCategorys(int parentCategoryId, IList <CategoryInfo> categories)
        {
            IList <CategoryInfo> subCategories = SubsiteCatalogHelper.GetSubCategories(parentCategoryId);

            if (subCategories != null && subCategories.Count > 0)
            {
                foreach (CategoryInfo current in subCategories)
                {
                    categories.Add(current);
                    SubsiteCatalogHelper.LoadSubCategorys(current.CategoryId, categories);
                }
            }
        }