private string GetTitle(string searchValue, OrderDirectionType direction) { var orderTarget = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(searchValue.ToLower()); var orderDir = direction == OrderDirectionType.Asc ? "Lower" : "Higher"; return(string.Format("Sort by {0}: {1} First", orderTarget, orderDir)); }
public void SetState(OrderDirectionType orderDirection) { _orderDir = orderDirection; _orderByMax.enabled = _orderDir == OrderDirectionType.Asc; _orderByMin.enabled = _orderDir == OrderDirectionType.Desc; _orderByNone.enabled = _orderDir == OrderDirectionType.None; }
private void AddDropItem(FilterCategory filter, OrderDirectionType direction) { _lstDropItems.Add(new OrderDropdownItem() { Title = GetTitle(filter.SearchValue, direction), SearchValue = filter.SearchValue, Direction = direction }); }
public ShowingItemsInfo(int offset, int limit) { ClassId = string.Empty; Offset = offset; Limit = limit; Categories = new List <string>(); SearchPattern = string.Empty; OrderBy = string.Empty; OrderByDirection = OrderDirectionType.None; MinPriceRange = 0; MaxPriceRange = 0; }
private void OnOrderClicked(OrderByButton button, OrderDirectionType order) { _currentOrderType = order; _searchValue = GetSearchValue(button); ApplyChanging(); }