Exemplo n.º 1
0
        private void BindList(int skip)
        {
            if (this.rpHotBrandlist != null)
            {
                DataTable dt = null;
                if (skip > 0)
                {
                    dt = BrandBrowser.GetVistiedBrandList(this.MaxNum, skip * this.maxNum + 1, skip * this.maxNum + 1 + this.MaxNum, brandTagId);
                }
                else
                {
                    dt = BrandBrowser.GetVistiedBrandList(this.MaxNum, 1, this.MaxNum, brandTagId);
                }
                if (dt != null && dt.Rows.Count > 0)
                {
                    int num = dt.Rows.Count - 1;
                    for (int i = num; i >= 0; i--)
                    {
                        if (string.IsNullOrWhiteSpace(dt.Rows[i]["BigLogo"].ToString()))
                        {
                            dt.Rows.RemoveAt(i);
                        }
                    }
                }

                rpHotBrandlist.DataSource = dt;
                rpHotBrandlist.DataBind();
            }
        }
Exemplo n.º 2
0
        public DataTable GetBrandTag()
        {
            var tag = BrandQueue.GetBrandTagCache();

            if (tag == null)
            {
                var model = BrandBrowser.GetVistiedBrandTagList();
                BrandQueue.RemoveBrandTagCache();
                BrandQueue.SaveBrandTagCache(model);
                return(model);
            }
            else
            {
                return((DataTable)tag);
            }
        }
Exemplo n.º 3
0
        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();
            }
        }
Exemplo n.º 4
0
 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();
     }
 }