Exemplo n.º 1
0
        private void UpdateSelectedItem()
        {
            ProductsSearchSortTypeListItem sortTypeItem = ProductsSearchParamsViewModel.GetSortTypeItem(this._searchParams.GetValue <ProductsSearchSortType>("sort"), this._searchParams.GetValue <bool>("rev"));

            if (sortTypeItem == null)
            {
                return;
            }
            this.SelectSortItem(sortTypeItem);
        }
Exemplo n.º 2
0
        public static string ToPrettyString(SearchParams searchParams, string currencyName)
        {
            List <string> stringList = new List <string>();
            ProductsSearchSortTypeListItem sortTypeItem = ProductsSearchParamsViewModel.GetSortTypeItem(searchParams.GetValue <ProductsSearchSortType>("sort"), searchParams.GetValue <bool>("rev"));

            if (sortTypeItem != null)
            {
                string lowerInvariant = sortTypeItem.Text.ToLowerInvariant();
                stringList.Add(lowerInvariant);
            }
            long num1 = searchParams.GetValue <long>("price_from");
            long num2 = searchParams.GetValue <long>("price_to");

            if (num1 > 0L || num2 > 0L)
            {
                string str = (num1 <= 0L || num2 <= 0L ? (num1 <= 0L ? string.Format("{0} {1}", CommonResources.UsersSearch_AgeTo, num2) : string.Format("{0} {1}", CommonResources.UsersSearch_AgeFrom, num1)) : string.Format("{0} - {1}", num1, num2)) + " " + currencyName.GetCurrencyDesc();
                stringList.Add(str);
            }
            return(string.Join(", ", (IEnumerable <string>)stringList).Capitalize());
        }