Beispiel #1
0
        private string GetName(ISearchHandlerEx sh, IWebItem module)
        {
            if (sh.GetType().Equals(typeof(EmployeeSearchHendler)))
            {
                return(Core.Users.CustomNamingPeople.Substitute <Resources.Resource>("Employees"));
            }

            return(module != null ? module.Name : sh.SearchName);
        }
Beispiel #2
0
 public static void UnRegistry(ISearchHandlerEx handler)
 {
     lock (handlers)
     {
         if (handler != null)
         {
             handlers.RemoveAll(h => h.GetType() == handler.GetType());
         }
     }
 }
Beispiel #3
0
 public static void Registry(ISearchHandlerEx handler)
 {
     lock (handlers)
     {
         if (handler != null && handlers.All(h => h.GetType() != handler.GetType()))
         {
             handlers.Add(handler);
         }
     }
 }
 public static void UnRegistry(ISearchHandlerEx handler)
 {
     lock (handlers)
     {
         if (handler != null)
         {
             handlers.RemoveAll(h => h.GetType() == handler.GetType());
         }
     }
 }
 public static void Registry(ISearchHandlerEx handler)
 {
     lock (handlers)
     {
         if (handler != null && handlers.All(h => h.GetType() != handler.GetType()))
         {
             handlers.Add(handler);
         }
     }
 }
Beispiel #6
0
        private string GetMoreUrl(ISearchHandlerEx sh, ref Guid productID)
        {
            var path = sh.AbsoluteSearchURL;

            if (sh.ProductID.Equals(Guid.Empty) && !productID.Equals(Guid.Empty))
            {
                path = sh.AbsoluteSearchURL + (sh.AbsoluteSearchURL.IndexOf("?") != -1 ? "&" : "?") + CommonLinkUtility.GetProductParamsPair(productID);
            }

            path = path + (path.IndexOf("?") != -1 ? "&search=" : "?search=") + HttpUtility.UrlEncode(_searchText, Encoding.UTF8);

            return(path);
        }
Beispiel #7
0
        private string GetLogo(ISearchHandlerEx sh, IWebItem module)
        {
            if (sh.GetType().Equals(typeof(EmployeeSearchHendler)))
            {
                return(WebImageSupplier.GetAbsoluteWebPath("employee.png"));
            }

            if (module != null)
            {
                return(module.GetIconAbsoluteURL());
            }

            return(WebImageSupplier.GetAbsoluteWebPath(sh.Logo.ImageFileName, sh.Logo.PartID));
        }
Beispiel #8
0
        private string GetMoreUrl(ISearchHandlerEx sh, ref Guid productID)
        {
            var path = sh.AbsoluteSearchURL;

            if (sh.ProductID.Equals(Guid.Empty) && !productID.Equals(Guid.Empty))
                path = sh.AbsoluteSearchURL + (sh.AbsoluteSearchURL.IndexOf("?") != -1 ? "&" : "?") + CommonLinkUtility.GetProductParamsPair(productID);

            path = path + (path.IndexOf("?") != -1 ? "&search=" : "?search=") + HttpUtility.UrlEncode(_searchText, Encoding.UTF8);

            return path;
        }
Beispiel #9
0
 private void BuildMoreUrl(SearchResult searchResult, ISearchHandlerEx sh, ref Guid productID)
 {
     searchResult.MoreURL = GetMoreUrl(sh, ref productID);
 }
Beispiel #10
0
        private string GetLogo(ISearchHandlerEx sh, IWebItem module)
        {

            if (sh.GetType().Equals(typeof (EmployeeSearchHendler)))
                return WebImageSupplier.GetAbsoluteWebPath("employee.png");

            if (module != null)
                return module.GetIconAbsoluteURL();

            return WebImageSupplier.GetAbsoluteWebPath(sh.Logo.ImageFileName, sh.Logo.PartID);
        }
Beispiel #11
0
 private void BuildLogo(SearchResult searchResult, ISearchHandlerEx sh, IWebItem module)
 {
     searchResult.LogoURL = GetLogo(sh, module);
 }
Beispiel #12
0
        private string GetName(ISearchHandlerEx sh, IWebItem module)
        {
            if (sh.GetType().Equals(typeof (EmployeeSearchHendler)))
                return Core.Users.CustomNamingPeople.Substitute<Resources.Resource>("Employees");

            return module != null ? module.Name : sh.SearchName;
        }
Beispiel #13
0
 private void BuildName(SearchResult searchResult, ISearchHandlerEx sh, IWebItem module)
 {
     searchResult.Name = GetName(sh, module);
 }
Beispiel #14
0
 private void BuildMoreUrl(SearchResult searchResult, ISearchHandlerEx sh, ref Guid productID)
 {
     searchResult.MoreURL = GetMoreUrl(sh, ref productID);
 }
Beispiel #15
0
 private void BuildLogo(SearchResult searchResult, ISearchHandlerEx sh, IWebItem module)
 {
     searchResult.LogoURL = GetLogo(sh, module);
 }
Beispiel #16
0
 private void BuildName(SearchResult searchResult, ISearchHandlerEx sh, IWebItem module)
 {
     searchResult.Name = GetName(sh, module);
 }