Esempio n. 1
0
 protected void BindTopicList()
 {
     TopicQuery page = new TopicQuery {
         PageIndex = this.pager.PageIndex,
         PageSize = this.pager.PageSize,
         SortBy = "DisplaySequence",
         SortOrder = SortAction.Asc
     };
     DbQueryResult topicList = VShopHelper.GettopicList(page);
     this.rpTopic.DataSource = topicList.Data;
     this.rpTopic.DataBind();
     this.pager.TotalRecords = topicList.TotalRecords;
 }
Esempio n. 2
0
 public DbQueryResult GetTopicList(TopicQuery page)
 {
     StringBuilder builder = new StringBuilder();
     if (!(!page.IsRelease.HasValue ? true : !page.IsRelease.Value))
     {
         builder.Append("IsRelease = 1");
     }
     else if (!(!page.IsRelease.HasValue ? true : page.IsRelease.Value))
     {
         builder.Append("IsRelease = 0");
     }
     if (page.IsincludeHomeProduct.HasValue && !page.IsincludeHomeProduct.Value)
     {
         if (builder.Length > 0)
         {
             builder.Append(" and ");
         }
         builder.Append(" topicid  not in (select topicid from Vshop_HomeTopics) ");
     }
     int num = 0x200;
     return DataHelper.PagingByRownumber(page.PageIndex, page.PageSize, page.SortBy, page.SortOrder, page.IsCount, "Vshop_Topics t", "TopicId", builder.ToString(), "*, (SELECT Keys FROM vshop_Reply WHERE [ReplyType] =" + num + " AND Activityid = t.TopicId) AS Keys");
 }
Esempio n. 3
0
 public static DbQueryResult GettopicList(TopicQuery page)
 {
     return new TopicDao().GetTopicList(page);
 }