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); }
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); } } }
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); }
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)); }
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; }
private void BuildMoreUrl(SearchResult searchResult, ISearchHandlerEx sh, ref Guid productID) { searchResult.MoreURL = GetMoreUrl(sh, ref productID); }
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); }
private void BuildLogo(SearchResult searchResult, ISearchHandlerEx sh, IWebItem module) { searchResult.LogoURL = GetLogo(sh, module); }
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; }
private void BuildName(SearchResult searchResult, ISearchHandlerEx sh, IWebItem module) { searchResult.Name = GetName(sh, module); }