Пример #1
0
 protected override void AttachChildControls()
 {
     this.rptAffiches = (ThemedTemplatedRepeater)this.FindControl("rptAffiches");
     if (!this.Page.IsPostBack)
     {
         this.rptAffiches.DataSource = CommentBrowser.GetAfficheList();
         this.rptAffiches.DataBind();
     }
 }
Пример #2
0
        private IList <AfficheInfo> GetDataSource()
        {
            IList <AfficheInfo> afficheList = CommentBrowser.GetAfficheList();

            if (this.MaxNum > 0 && this.MaxNum < afficheList.Count)
            {
                for (int i = afficheList.Count - 1; i >= this.MaxNum; i--)
                {
                    afficheList.RemoveAt(i);
                }
            }
            return(afficheList);
        }
Пример #3
0
        private IList <AfficheInfo> GetDataSource()
        {
            IList <AfficheInfo> afficheList = CommentBrowser.GetAfficheList(true);

            if (this.MaxNum > 0 && this.MaxNum < afficheList.Count)
            {
                for (int num = afficheList.Count - 1; num >= this.MaxNum; num--)
                {
                    afficheList.RemoveAt(num);
                }
            }
            return(afficheList);
        }
Пример #4
0
        private void BindList()
        {
            AfficheQuery articleQuery = new AfficheQuery();

            /*if (!string.IsNullOrEmpty(this.Page.Request.QueryString["CategoryId"]))
             * {
             *  int value = 0;
             *  if (int.TryParse(this.Page.Request.QueryString["CategoryId"], out value))
             *  {
             *      articleQuery.CategoryId = new int?(value);
             *  }
             * }//CommentBrowser.GetArticleList(articleQuery);*/
            articleQuery.PageIndex = this.pager.PageIndex;
            articleQuery.PageSize  = this.pager.PageSize;
            articleQuery.SortBy    = "AddedDate";
            articleQuery.SortOrder = SortAction.Desc;
            DbQueryResult articleList = CommentBrowser.GetAfficheList(articleQuery);

            this.rptArticles.DataSource = articleList.Data;
            this.rptArticles.DataBind();
            this.pager.TotalRecords = articleList.TotalRecords;
        }