private void BindList(int skip) { if (this.rp_guest != null) { System.Collections.Generic.IList <int> browedProductList = BrandQueue.GetBrowedProductList((skip * this.maxNum) + this.MaxNum); int browedListCount = browedProductList.Count; if (browedListCount > (skip * this.maxNum) + this.MaxNum) { int isRemove = browedListCount - this.maxNum; while (isRemove > 0) { isRemove--; browedProductList.RemoveAt(0); } } else { browedProductList.Clear(); } //DataTable table = ProductBrowser.GetSuggestProductsProducts(browedProductList, 6); DataTable table = BrandBrowser.GetVistiedBrandList(browedProductList); if (table != null) { if (table.Rows.Count < this.maxNum) { DataTable dt = BrandBrowser.GetVistiedBrandList(this.MaxNum - table.Rows.Count, skip * this.maxNum + 1, skip * this.maxNum + 1 + this.MaxNum, brandTagId); TableToTable(table, dt); } } else { table = BrandBrowser.GetVistiedBrandList(this.MaxNum, skip * this.maxNum + 1, skip * this.maxNum + 1 + this.MaxNum, brandTagId); } if (table.Rows.Count < 8) { this.rp_guest.DataSource = null; this.rp_guest.DataBind(); return; } this.rp_guest.DataSource = table; this.rp_guest.DataBind(); } }
private void BindList() { if (this.rp_guest != null) { System.Collections.Generic.IList <int> browedProductList = BrandQueue.GetBrowedProductList(this.MaxNum); DataTable table = BrandBrowser.GetVistiedBrandList(browedProductList); if (table != null) { if (table.Rows.Count < this.MaxNum) { DataTable dt = BrandBrowser.GetVistiedBrandList(this.MaxNum - table.Rows.Count, 1, this.MaxNum, this.brandTagId); TableToTable(table, dt); } } else { table = BrandBrowser.GetVistiedBrandList(this.MaxNum, 1, this.MaxNum, brandTagId); } this.rp_guest.DataSource = table; this.rp_guest.DataBind(); } }