public void addLocalPostDraftsToPostList() { if (null != this.LocalPostDrafts && 0 < this.LocalPostDrafts.Count) { for (int i = this.LocalPostDrafts.Count - 1; i >= 0; i--) { Post post = this.LocalPostDrafts.ElementAt(i); PostListItem draftListItem = new PostListItem(); draftListItem.DateCreated = post.DateCreated; draftListItem.DateCreatedGMT = post.DateCreatedGMT; draftListItem.PostId = "-1"; draftListItem.Status = post.PostStatus; draftListItem.Title = post.Title; this.PostListItems.Insert(0, draftListItem); } } }
public void addLocalPostDraftsToPostList() { if (null != this.LocalPostDrafts && 0 < this.LocalPostDrafts.Count ) { for (int i = this.LocalPostDrafts.Count - 1 ; i >= 0 ; i--) { Post post = this.LocalPostDrafts.ElementAt(i); PostListItem draftListItem = new PostListItem(); draftListItem.DateCreated = post.DateCreated; draftListItem.DateCreatedGMT = post.DateCreatedGMT; draftListItem.PostId = "-1"; draftListItem.Status = post.PostStatus; draftListItem.Title = post.Title; this.PostListItems.Insert(0, draftListItem); } } }