Beispiel #1
0
        /// <summary>
        /// 绑定列表
        /// </summary>
        protected void BindTopicList()
        {
            int intRecordCount = 0;
            IList <TourUnion.Model.Interaction.TopicInfo> list = new List <TourUnion.Model.Interaction.TopicInfo>();
            int UserId = 0;

            if (usermanage.AccountUser != null)
            {
                UserId = usermanage.AccountUser.Id;
            }

            Adpost.Common.ExporPage.PageControlSelect pagecontrol = new Adpost.Common.ExporPage.PageControlSelect(PageSize);
            CurrencyPage = pagecontrol.CurrentPage;

            string Title = Server.UrlDecode(Request.QueryString["Title"]);

            TourUnion.BLL.Interaction.Interaction bll = new TourUnion.BLL.Interaction.Interaction();

            if (isHotTopic == 1)
            {
                list = bll.GetHotTopics(PageSize, CurrencyPage, ref intRecordCount, Title);
            }
            else
            {
                list = bll.GetTopicsByCategoryId(PageSize, CurrencyPage, ref intRecordCount, TopicClassId, Title);
            }
            bll = null;
            if (intRecordCount > 0)
            {
                this.NoDate.Visible = false;
                pagecontrol.SetPage(this.ExporPageInfoSelect1, intRecordCount);
                this.ExporPageInfoSelect1.HrefType = Adpost.Common.ExporPage.HrefTypeEnum.JsHref;
                this.ExporPageInfoSelect1.AttributesEventAdd("onclick", "LoadData(this)", 1);
                this.repTopicList.DataSource = list;
                this.repTopicList.DataBind();
                pagecontrol = null;
            }
            else
            {
                this.NoDate.Visible = true;
            }

            list = null;
        }
Beispiel #2
0
        protected void BindAllTopicClass()
        {
            TourUnion.BLL.Interaction.Interaction            bll  = new TourUnion.BLL.Interaction.Interaction();
            IList <TourUnion.Model.Interaction.CategoryInfo> list = bll.GetCategorys();
            int index = 0;

            //直接链到BS端
            foreach (TourUnion.Model.Interaction.CategoryInfo model in list)
            {
                strAllClass += string.Format("<a href=\"javascript:void(0);\" onclick=\"ChangeCss(this);GetUrl({0})\" >{1}</a> | ", model.CategoryId, model.CategoryName);
                index++;
                if (index == 2)
                {
                    strAllClass  = strAllClass.Substring(0, strAllClass.LastIndexOf("|"));
                    strAllClass += "</br>";
                }
            }
            strAllClass = strAllClass.Substring(0, strAllClass.LastIndexOf("|"));
            list        = null;
            bll         = null;
        }