示例#1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         ModuleServicePath         = ResolveUrl("~") + "Modules/AspxCommerce/AspxCommerceServices/";
         aspxCommonObj.StoreID     = GetStoreID;
         aspxCommonObj.PortalID    = GetPortalID;
         aspxCommonObj.CultureName = GetCurrentCultureName;
         SearchSettingInfo objSettingInfo = AspxSearchController.GetSearchSetting(aspxCommonObj);
         ShowCategoryForSearch = objSettingInfo.ShowCategoryForSearch;
         EnableAdvanceSearch   = objSettingInfo.EnableAdvanceSearch;
         ShowSearchKeyWord     = objSettingInfo.ShowSearchKeyWord;
     }
     IncludeLanguageJS();
 }
示例#2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ModuleServicePath = ResolveUrl("~") + "Modules/AspxCommerce/AspxCommerceServices/";
        IncludeJs("SimpleSearchSettingJS", "/Modules/AspxCommerce/AspxGeneralSearch/js/SimpleSearchSetting.js");
        AspxCommonInfo aspxCommonObj = new AspxCommonInfo(GetStoreID, GetPortalID, GetCurrentCultureName);

        if (!IsPostBack)
        {
            SearchSettingInfo objSettingInfo = AspxSearchController.GetSearchSetting(aspxCommonObj);
            ShowCategoryForSearch = objSettingInfo.ShowCategoryForSearch;
            EnableAdvanceSearch   = objSettingInfo.EnableAdvanceSearch;
            ShowSearchKeyWord     = objSettingInfo.ShowSearchKeyWord;
        }
        IncludeLanguageJS();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            SageFrameConfig    pagebase = new SageFrameConfig();
            StoreSettingConfig ssc      = new StoreSettingConfig();
            IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
            if (!IsPostBack)
            {
                IncludeCss("SimpleSearch", "/Templates/" + TemplateName + "/css/JQueryUIFront/jquery.ui.all.css");
                IncludeJs("SimpleSearch", "/js/JQueryUI/jquery-ui-1.8.10.custom.js", "/Modules/AspxCommerce/AspxGeneralSearch/js/SimpleSearch.js");
                StoreID     = GetStoreID;
                PortalID    = GetPortalID;
                UserName    = GetUsername;
                CultureName = GetCurrentCultureName;
                IncludeLanguageJS();
                AdvanceSearchURL = ssc.GetStoreSettingsByKey(StoreSetting.AdvanceSearchURL, StoreID, PortalID, CultureName);
                AspxCommonInfo aspxCommonObj = new AspxCommonInfo();
                aspxCommonObj.StoreID     = StoreID;
                aspxCommonObj.PortalID    = PortalID;
                aspxCommonObj.CultureName = CultureName;
                SearchSettingInfo objSettingInfo = AspxSearchController.GetSearchSetting(aspxCommonObj);
                ShowCategoryForSearch = objSettingInfo.ShowCategoryForSearch;
                EnableAdvanceSearch   = objSettingInfo.EnableAdvanceSearch;
                ShowSearchKeyWords    = objSettingInfo.ShowSearchKeyWord;

                ResultPage = ssc.GetStoreSettingsByKey(StoreSetting.DetailPageURL, StoreID, PortalID,
                                                       CultureName);
            }

            if (ShowCategoryForSearch.ToLower() == "true")
            {
                GetAllCategoryForSearch();
            }
            if (ShowSearchKeyWords.ToLower() == "true")
            {
                GetTopSearchTerms();
            }
            IncludeLanguageJS();
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
示例#4
0
 internal bool GetConfigurationSettings()
 {
     try
     {
         string            sp          = "[dbo].[usp_GetSearchQueryStringType]";
         SQLHandler        SQLH        = new SQLHandler();
         SearchSettingInfo settingInfo = SQLH.ExecuteAsObject <SearchSettingInfo>(sp);
         if (settingInfo == null)
         {
             return(false);
         }
         else
         {
             return(settingInfo.SettingValue == "1" ? true : false);
         }
     }
     catch
     {
         return(false);
     }
 }
示例#5
0
        internal AutomatedSearchInfo GetSearchInformationsForTable(string tableName)
        {
            try
            {
                List <KeyValuePair <string, object> > ParaMeterCollection = new List <KeyValuePair <string, object> >();
                ParaMeterCollection.Add(new KeyValuePair <string, object>("@TableName", tableName));

                string sp = "[dbo].[usp_GetSearchAutomationSettingsByTableName]";

                SQLHandler          sagesql = new SQLHandler();
                System.Data.DataSet ds      = sagesql.ExecuteAsDataSet(sp, ParaMeterCollection);

                if (ds != null && ds.Tables.Count > 0)
                {
                    SearchConfigurationInfo searchConfigurationInfo = DataSourceHelper.FillObject <SearchConfigurationInfo>(ds.Tables[0].CreateDataReader());

                    SearchSettingInfo searchSettingInfo = DataSourceHelper.FillObject <SearchSettingInfo>(ds.Tables[1].CreateDataReader());

                    List <SearchMappingInfo> lstMappingInfo = DataSourceHelper.FillCollection <SearchMappingInfo>(ds.Tables[2].CreateDataReader());

                    List <SearchQueryStringInfo> lstQueryStringInfo = DataSourceHelper.FillCollection <SearchQueryStringInfo>(ds.Tables[3].CreateDataReader());

                    AutomatedSearchInfo automatedSearchInfo = new AutomatedSearchInfo();
                    automatedSearchInfo.SearchConfiguration = searchConfigurationInfo;
                    automatedSearchInfo.SearchSettingInfo   = searchSettingInfo;
                    automatedSearchInfo.SearchMappings      = lstMappingInfo;
                    automatedSearchInfo.SearchQueryInfos    = lstQueryStringInfo;

                    return(automatedSearchInfo);
                }
                else
                {
                    return(null);
                }
            }
            catch
            {
                return(null);
            }
        }