public IList <SelectOption> GetProductAttributeControlTypes(ProductAttributeControlTypeSelectFilterModel filter) { var serviceFilter = new ProductAttributeControlTypeFilter { ControlTypeId = filter.CurrentId, Keyword = filter.Query }; return(_productAttributeService.GetAttributeControlTypes(serviceFilter)); }
public IList <SelectOption> GetAttributeControlTypes(ProductAttributeControlTypeFilter filter) { var result = EnumUtil.ToSelectOptions <ProductAttributeControlType>().ToList(); if (filter.ControlTypeId > 0) { result = result.Where(x => x.Id != filter.ControlTypeId.ToString()).ToList(); } var search = filter.Keyword != null?filter.Keyword.ToLower() : ""; result = result.Where(x => string.IsNullOrEmpty(search) || x.Text.ToLower().Equals(search)).ToList(); return(result); }
public IList <SelectOption> GetAttributeControlTypes(ProductAttributeControlTypeFilter filter) { return(_productAttributeRepository.GetAttributeControlTypes(filter)); }