public IList <Message> GetByTopicId(int id) { IList <Message> messages = new List <Message>(); SharePointListDescriptor postItems = Provider.GetListItemsByField(ForumConstants.Lists_Posts, "TopicID", id.ToString()); foreach (SharePointListItem postItem in postItems.SharePointListItems) { messages.Add(MessageMapper.CreateDomainObject(postItem)); } return(messages); }
/// <summary> /// Gets all. /// </summary> /// <returns></returns> public IList <Message> GetAll() { IList <Message> messages = new List <Message>(); SharePointListDescriptor postItems = Provider.GetAllListItems(ForumConstants.Lists_Posts); foreach (SharePointListItem postItem in postItems.SharePointListItems) { messages.Add(MessageMapper.CreateDomainObject(postItem)); } return(messages); }
public IList <Message> FindByDate(DateTime dateCriteria) { string isoDate = SPUtility.CreateISO8601DateTimeFromSystemDateTime(dateCriteria); SharePointListDescriptor listItems = Provider.GetListItemsByField(ForumConstants.Lists_Posts, "Modified", isoDate); IList <Message> messages = new List <Message>(); foreach (SharePointListItem item in listItems.SharePointListItems) { messages.Add(MessageMapper.CreateDomainObject(item)); } return(messages); }
public Message GetById(int id) { SharePointListItem postItem = Provider.GetListItemByField(ForumConstants.Lists_Posts, "ID", id.ToString()); return(MessageMapper.CreateDomainObject(postItem)); }