Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        /// <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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        public Message GetById(int id)
        {
            SharePointListItem postItem = Provider.GetListItemByField(ForumConstants.Lists_Posts, "ID", id.ToString());

            return(MessageMapper.CreateDomainObject(postItem));
        }