AspNet.StarterKits.Classifieds.BusinessLogicLayer.CategoriesDB.GetCategoriesByParentId C# (CSharp) Method

GetCategoriesByParentId() public method

public GetCategoriesByParentId ( int parentCategroyId ) : CategoriesDataComponent.CategoriesDataTable
parentCategroyId int
return CategoriesDataComponent.CategoriesDataTable
		public CategoriesDataComponent.CategoriesDataTable GetCategoriesByParentId(int parentCategroyId)
		{
			return null;
		}

Usage Example

Beispiel #1
0
        private static void FetchCategoriesRecursively(bool recursing, List<CachedCategory> list, CategoriesDB db, int categoryId, string levelPrefix)
        {
            CategoriesDataComponent.CategoriesDataTable subCategories = db.GetCategoriesByParentId(categoryId);

            if (subCategories != null)
            {
                string categoryIdString = categoryId.ToString();
                foreach (CategoriesDataComponent.CategoriesRow category in subCategories)
                {
                    list.Add(new CachedCategory(category.Name, category.Id, categoryId, category.NumActiveAds, levelPrefix));

                    if (recursing)
                        FetchCategoriesRecursively(recursing, list, db, category.Id, levelPrefix + "--");
                }
            }
        }