Exemplo n.º 1
0
    /// <summary>
    /// Gets category names for given settings groupIDPath
    /// </summary>
    /// <param name="groupIDPath">Settings group IDPath</param>
    /// <returns>String with parent category names</returns>
    private string GetCategoryNames(string groupIDPath)
    {
        // Get parent category names
        DataSet parents = SettingsCategoryInfoProvider.GetSettingsCategories(SettingsCategoryInfoProvider.GetCategoriesOnPathWhereCondition(groupIDPath, true) + " AND (CategoryLevel > 0)", "CategoryLevel", -1, "CategoryDisplayName");

        if (!DataHelper.DataSourceIsEmpty(parents))
        {
            string result = "";
            foreach (DataRow parent in parents.Tables[0].Rows)
            {
                result += parent["CategoryDisplayName"] + " > ";
            }

            return(result.Substring(0, result.LastIndexOfCSafe(">")).Trim());
        }
        return(String.Empty);
    }