Beispiel #1
0
    private void GetAllCategoryForSearch(AspxCommonInfo aspxCommonObj, string modulePath, string pageExtension)
    {
        bool   isActive = true;
        string prefix   = "---";
        List <CategoryInfo> lstCategory = AspxSearchController.GetAllCategoryForSearch(prefix, isActive, aspxCommonObj);

        if (lstCategory != null && lstCategory.Count > 0)
        {
            Elements = new StringBuilder();
            Elements.Append("<select id=\"sfSimpleSearchCategory\">");
            Elements.Append("<option value=\"0\" ><a href=\"#\"><span class=\"value\" category=\"--All Category--\">");
            Elements.Append(getLocale("--All Category--"));
            Elements.Append("</span></a></option>");
            foreach (CategoryInfo item in lstCategory)
            {
                Elements.Append("<option value=\"");
                Elements.Append(item.CategoryID);
                Elements.Append("\" isGiftCard=\"");
                Elements.Append(item.IsChecked);
                Elements.Append("\"><a href=\"#\"><span class=\"value\" category=\"");
                Elements.Append(item.LevelCategoryName);
                Elements.Append("\">");
                Elements.Append(item.LevelCategoryName);
                Elements.Append("</span></a></option>");
            }
            Elements.Append("</select>");
            litSSCat.Text = Elements.ToString();
        }
    }
Beispiel #2
0
    public void GetAllCategoryForSearch()
    {
        bool           isActive      = true;
        string         prefix        = "---";
        AspxCommonInfo aspxCommonObj = new AspxCommonInfo();

        aspxCommonObj.StoreID     = StoreID;
        aspxCommonObj.PortalID    = PortalID;
        aspxCommonObj.UserName    = UserName;
        aspxCommonObj.CultureName = CultureName;
        string modulePath = this.AppRelativeTemplateSourceDirectory;

        hst = AppLocalized.getLocale(modulePath);
        string pageExtension            = SageFrameSettingKeys.PageExtension;
        List <CategoryInfo> lstCategory = AspxSearchController.GetAllCategoryForSearch(prefix, isActive, aspxCommonObj);

        if (lstCategory != null && lstCategory.Count > 0)
        {
            StringBuilder Elements = new StringBuilder();
            Elements.Append("<select id=\"sfSimpleSearchCategory\">");
            Elements.Append("<option value=\"0\" ><a href=\"#\"><span class=\"value\" category=\"--All Category--\">");
            Elements.Append(getLocale("--All Category--"));
            Elements.Append("</span></a></option>");
            foreach (CategoryInfo item in lstCategory)
            {
                Elements.Append("<option value=\"");
                Elements.Append(item.CategoryID);
                Elements.Append("\" isGiftCard=\"");
                Elements.Append(item.IsChecked);
                Elements.Append("\"><a href=\"#\"><span class=\"value\" category=\"");
                Elements.Append(item.LevelCategoryName);
                Elements.Append("\">");
                Elements.Append(item.LevelCategoryName);
                Elements.Append("</span></a></option>");
            }

            Elements.Append("</select>");
            litSSCat.Text = Elements.ToString();
        }
    }