Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            hlSortCheapest.Text  = LocalizationUtility.GetText("lblPriceASC");
            hlSortExpensive.Text = LocalizationUtility.GetText("lblPriceDESC");
            hlSortNewset.Text    = LocalizationUtility.GetText("lblNewest");
            hlSortOldest.Text    = LocalizationUtility.GetText("lblOldest");
            hlSortTitleAsc.Text  = LocalizationUtility.GetText("lblTitleASC");
            hlSortTitleDesc.Text = LocalizationUtility.GetText("lblTitleDESC");

            hlSortCheapest.NavigateUrl  = RewriteService.BuildCatalogUrl(Category.CategoryId.ToString(), Category.Name, WebUtility.AddRemoveFromQueryString(Request.QueryString, "SortBy", ((int)CatalogSortBy.PriceAscending).ToString(), "cid", "p"));
            hlSortExpensive.NavigateUrl = RewriteService.BuildCatalogUrl(Category.CategoryId.ToString(), Category.Name, WebUtility.AddRemoveFromQueryString(Request.QueryString, "SortBy", ((int)CatalogSortBy.PriceDescending).ToString(), "cid", "p"));
            hlSortNewset.NavigateUrl    = RewriteService.BuildCatalogUrl(Category.CategoryId.ToString(), Category.Name, WebUtility.AddRemoveFromQueryString(Request.QueryString, "SortBy", ((int)CatalogSortBy.DateCreatedDescending).ToString(), "cid", "p"));
            hlSortOldest.NavigateUrl    = RewriteService.BuildCatalogUrl(Category.CategoryId.ToString(), Category.Name, WebUtility.AddRemoveFromQueryString(Request.QueryString, "SortBy", ((int)CatalogSortBy.DateCreatedAscending).ToString(), "cid", "p"));
            hlSortTitleAsc.NavigateUrl  = RewriteService.BuildCatalogUrl(Category.CategoryId.ToString(), Category.Name, WebUtility.AddRemoveFromQueryString(Request.QueryString, "SortBy", ((int)CatalogSortBy.TitleAscending).ToString(), "cid", "p"));
            hlSortTitleDesc.NavigateUrl = RewriteService.BuildCatalogUrl(Category.CategoryId.ToString(), Category.Name, WebUtility.AddRemoveFromQueryString(Request.QueryString, "SortBy", ((int)CatalogSortBy.TitleDescending).ToString(), "cid", "p"));

            SortProducts(ProductCollection, (CatalogSortBy)Utility.GetIntParameter("SortBy"));
        }