예제 #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);
        }
예제 #2
0
 public static void UnRegistry(ISearchHandlerEx handler)
 {
     lock (handlers)
     {
         if (handler != null)
         {
             handlers.RemoveAll(h => h.GetType() == handler.GetType());
         }
     }
 }
예제 #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);
         }
     }
 }
예제 #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);
        }
예제 #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));
        }
예제 #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;
        }
예제 #9
0
 private void BuildMoreUrl(SearchResult searchResult, ISearchHandlerEx sh, ref Guid productID)
 {
     searchResult.MoreURL = GetMoreUrl(sh, ref productID);
 }
예제 #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);
        }
예제 #11
0
 private void BuildLogo(SearchResult searchResult, ISearchHandlerEx sh, IWebItem module)
 {
     searchResult.LogoURL = GetLogo(sh, module);
 }
예제 #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;
        }
예제 #13
0
 private void BuildName(SearchResult searchResult, ISearchHandlerEx sh, IWebItem module)
 {
     searchResult.Name = GetName(sh, module);
 }
예제 #14
0
 private void BuildMoreUrl(SearchResult searchResult, ISearchHandlerEx sh, ref Guid productID)
 {
     searchResult.MoreURL = GetMoreUrl(sh, ref productID);
 }
예제 #15
0
 private void BuildLogo(SearchResult searchResult, ISearchHandlerEx sh, IWebItem module)
 {
     searchResult.LogoURL = GetLogo(sh, module);
 }
예제 #16
0
 private void BuildName(SearchResult searchResult, ISearchHandlerEx sh, IWebItem module)
 {
     searchResult.Name = GetName(sh, module);
 }