private IEnumerable <SettingsCategoryInfo> GetGroups(SettingsCategoryInfo category, bool isSearch)
 {
     if (isSearch)
     {
         var groups = SettingsCategoryInfoProvider.GetSettingsCategories("CategoryIsGroup = 1", "CategoryName");
         return(groups);
     }
     else
     {
         var groups = SettingsCategoryInfoProvider.GetChildSettingsCategories(category.CategoryID);
         return(groups.Cast <SettingsCategoryInfo>().Where(c => c.CategoryIsGroup).OrderBy(c => c.CategoryOrder));
     }
 }
 private IEnumerable <SettingsCategoryInfo> GetGroups(SettingsCategoryInfo category)
 {
     if (IsSearchTextValid)
     {
         var groups = SettingsCategoryInfoProvider.GetSettingsCategories("CategoryIsGroup = 1", "CategoryName");
         return(groups);
     }
     else
     {
         var groups = SettingsCategoryInfoProvider.GetChildSettingsCategories(category.CategoryName, Where);
         return(groups.Where(c => c.CategoryIsGroup));
     }
 }
    /// <summary>
    /// Reloads data.
    /// </summary>
    public void ReloadData()
    {
        // Get data
        DataSet ds = SettingsCategoryInfoProvider.GetChildSettingsCategories(CategoryName, "CategoryIsGroup = 1");

        Controls.Clear();

        if (!DataHelper.DataSourceIsEmpty(ds))
        {
            DataRowCollection rows = ds.Tables[0].Rows;
            foreach (DataRow row in rows)
            {
                // Create new panel with info about subcategory
                var            sci      = new SettingsCategoryInfo(row);
                CMSUserControl catPanel = CreatePanelForCategory(sci);

                catPanel.ID = ControlsHelper.GetUniqueID(this, "CategoryPanel_" + ValidationHelper.GetIdentifier(sci.CategoryName));
                Controls.Add(catPanel);
            }
        }
    }
    /// <summary>
    /// Reloads data.
    /// </summary>
    public void ReloadData()
    {
        CMSUserControl catPanel;
        // Get data
        DataSet ds = SettingsCategoryInfoProvider.GetChildSettingsCategories(mCategoryName, "CategoryIsGroup = 1");

        this.Controls.Clear();

        if (!DataHelper.DataSourceIsEmpty(ds))
        {
            DataRowCollection rows = ds.Tables[0].Rows;
            foreach (DataRow row in rows)
            {
                // Create new panel with info about subcategory
                SettingsCategoryInfo sci = new SettingsCategoryInfo(row);
                catPanel    = CreatePanelForCategory(sci);
                catPanel.ID = "CategoryPanel_" + sci.CategoryName.Replace(".", "_");
                this.Controls.Add(catPanel);
            }
        }
    }