/// <summary> /// The on page properties changing_ click. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> protected void OnPagePropertiesChanging_Click(object sender, PagePropertiesChangingEventArgs e) { var productsBase = Page as ProductsBase; if (string.IsNullOrEmpty(productsBase.Locale)) { return; } DataPager2.SetPageProperties(e.StartRowIndex, e.MaximumRows, false); DataPager1.SetPageProperties(e.StartRowIndex, e.MaximumRows, false); if (Request.QueryString["cid"] != null && Request.QueryString["root"] != null) { PagerCategoryID = int.Parse(Request.QueryString["cid"] ?? "0"); PagerRootCategoryID = int.Parse(Request.QueryString["root"] ?? "0"); } int parentcategoryID = int.Parse(Request.QueryString["parent"] ?? "0"); Category_V02 rootCategory = null; // when it is from product detail screen if (PagerCategoryID == 0) { int categoryId = 0; if (int.TryParse(Request.QueryString["CategoryID"], out categoryId)) { PagerCategoryID = categoryId; } else { PagerCategoryID = 0; } rootCategory = CatalogHelper.GetRootCategory(ProductInfoCatalog, PagerCategoryID); // Category_V02 currentCategory; } else if (PagerRootCategoryID != 0) { rootCategory = ProductInfoCatalog.RootCategories.Find(r => r.ID == PagerRootCategoryID); } if (PagerCategoryID != 0 && rootCategory != null) { Category_V02 currentCategory; if (ProductInfoCatalog.AllCategories.TryGetValue(PagerCategoryID, out currentCategory)) { PopulateProducts(currentCategory, rootCategory); } } }
protected void lvJobs_PagePropertiesChanged(object sender, EventArgs e) { if (Session["languageGlobal"] == "en") { DataPager2.SetPageProperties(DataPager2.StartRowIndex, 10, false); } else { DataPager1.SetPageProperties(DataPager1.StartRowIndex, 10, false); } lvJobs.DataSource = DataTablejob; lvJobs.DataBind(); PgeInfo(); }