public static ApiPagedList <ApiStory> GetUserSubmittedStories(int hostID, string username, int pageNumber, int pageSize) { ApplyPageLimits(ref pageNumber, ref pageSize); PagedStoryCollection pagedCollection = new PagedStoryCollection(); pagedCollection.Items = StoryCache.GetUserSubmittedStories(username, hostID, pageNumber, pageSize); pagedCollection.Total = StoryCache.GetUserSubmittedStoriesCount(username, hostID); return(pagedCollection.ToApi()); }
protected void Page_Load(object sender, EventArgs e) { this.UserProfileHeader.User = this.UserProfile; this.StoryListControl.NoStoriesCaption = string.Format("{0} has not submitted any stories.", this.UrlParameters.UserIdentifier); this.StoryListControl.Title = "Stories submitted by " + this.UrlParameters.UserIdentifier; this.StoryListControl.DataBind(StoryCache.GetUserSubmittedStories(this.UrlParameters.UserIdentifier, this.HostProfile.HostID, this.UrlParameters.PageNumber, this.UrlParameters.PageSize)); this.Paging.RecordCount = StoryCache.GetUserSubmittedStoriesCount(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); }