예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Paging.PageNumber = UrlParameters.PageNumber;
            this.Paging.PageSize   = UrlParameters.PageSize;

            if (!this.UrlParameters.CategoryIdentifierSpecified)
            {
                this.StoryList.DataBind(StoryCache.GetPopularStories(this.HostProfile.HostID, false, this.UrlParameters.StoryListSortBy, this.UrlParameters.PageNumber, this.UrlParameters.PageSize));
                this.Paging.RecordCount = StoryCache.GetPopularStoriesCount(this.HostProfile.HostID, false, this.UrlParameters.StoryListSortBy);
                this.Paging.BaseUrl     = UrlFactory.CreateUrl(UrlFactory.PageName.Home) + "/upcoming/popular/" + this.UrlParameters.StoryListSortBy.ToString().ToLower();
            }
            else
            {
                this.StoryList.DataBind(StoryCache.GetCategoryStories(this.UrlParameters.CategoryID, false, this.HostProfile.HostID, this.UrlParameters.PageNumber, this.UrlParameters.PageSize));
                this.Paging.RecordCount = StoryCache.GetCategoryStoryCount(this.UrlParameters.CategoryID, false, this.HostProfile.HostID);
                this.Paging.BaseUrl     = UrlFactory.CreateUrl(UrlFactory.PageName.ViewCategoryNewStories, this.UrlParameters.CategoryIdentifier);
            }

            switch (this.UrlParameters.StoryListSortBy)
            {
            case StoryListSortBy.Today:
                this.PageName = UrlFactory.PageName.UpcomingToday;
                break;

            case StoryListSortBy.PastWeek:
                this.PageName = UrlFactory.PageName.UpcomingWeek;
                break;

            default:
                this.PageName = UrlFactory.PageName.NewStories;
                break;
            }
        }
예제 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.StoryList.DataBind(StoryCache.GetCategoryStories(this.UrlParameters.CategoryID, true, this.HostProfile.HostID, this.UrlParameters.PageNumber, this.UrlParameters.PageSize));
     this.Paging.RecordCount = StoryCache.GetCategoryStoryCount(this.UrlParameters.CategoryID, true, this.HostProfile.HostID);
     this.Paging.PageNumber  = UrlParameters.PageNumber;
     this.Paging.PageSize    = UrlParameters.PageSize;
     this.Paging.BaseUrl     = UrlFactory.CreateUrl(UrlFactory.PageName.ViewCategory, this.UrlParameters.CategoryIdentifier);
 }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Paging.PageNumber = UrlParameters.PageNumber;
            this.Paging.PageSize   = UrlParameters.PageSize;

            if (this.UrlParameters.StoryListSortBy == Incremental.Kick.Common.Enums.StoryListSortBy.RecentlyPromoted)
            {
                this.UrlParameters.StoryListSortBy = Incremental.Kick.Common.Enums.StoryListSortBy.LatestUpcoming;
            }

            if (!this.UrlParameters.CategoryIdentifierSpecified)
            {
                this.StoryList.DataBind(StoryCache.GetAllStories(false, this.HostProfile.HostID, this.UrlParameters.PageNumber, this.UrlParameters.PageSize));
                this.Paging.RecordCount = StoryCache.GetStoryCount(this.HostProfile.HostID, false);
                this.Paging.BaseUrl     = UrlFactory.CreateUrl(UrlFactory.PageName.Home) + "/upcoming";
            }
            else
            {
                this.StoryList.DataBind(StoryCache.GetCategoryStories(this.UrlParameters.CategoryID, false, this.HostProfile.HostID, this.UrlParameters.PageNumber, this.UrlParameters.PageSize));
                this.Paging.RecordCount = StoryCache.GetCategoryStoryCount(this.UrlParameters.CategoryID, false, this.HostProfile.HostID);
                this.Paging.BaseUrl     = UrlFactory.CreateUrl(UrlFactory.PageName.ViewCategoryNewStories, this.UrlParameters.CategoryIdentifier);
            }
        }