예제 #1
0
            public static ApiPagedList <ApiStory> GetUserFriendsSubmittedStories(int hostID, string username, int pageNumber, int pageSize)
            {
                ApplyPageLimits(ref pageNumber, ref pageSize);
                PagedStoryCollection pagedCollection = new PagedStoryCollection();

                pagedCollection.Items = StoryCache.GetFriendsSubmittedStories(username, hostID, pageNumber, pageSize);
                pagedCollection.Total = StoryCache.GetFriendsSubmittedStoriesCount(username, hostID);
                return(pagedCollection.ToApi());
            }
예제 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.UserProfileHeader.User            = this.UserProfile;
     this.StoryListControl.NoStoriesCaption = string.Format("Friends of {0} have not submitted any stories.", this.UrlParameters.UserIdentifier);
     this.StoryListControl.Title            = "Stories submitted by friends of " + this.UrlParameters.UserIdentifier;
     if (!this.UserProfile.Friends.Count.Equals(0))
     {
         this.StoryListControl.DataBind(StoryCache.GetFriendsSubmittedStories(this.UrlParameters.UserIdentifier, this.HostProfile.HostID, this.UrlParameters.PageNumber, this.UrlParameters.PageSize));
         this.Paging.RecordCount = StoryCache.GetFriendsSubmittedStoriesCount(this.UrlParameters.UserIdentifier, this.HostProfile.HostID);
     }
     this.Paging.PageNumber = UrlParameters.PageNumber;
     this.Paging.PageSize   = UrlParameters.PageSize;
     this.Paging.BaseUrl    = UrlFactory.CreateUrl(this.PageName, this.UrlParameters.UserIdentifier);
 }