Exemplo n.º 1
0
        public Forum GetById(int id)
        {
            SharePointListItem currentItem = Provider.GetListItemByField(ForumConstants.Lists_Forums, "ID", id.ToString());

            if (currentItem == null)
            {
                return(new Forum(id, 1, "Default Forum"));
            }

            return(ForumMapper.CreateDomainObject(currentItem));
        }
Exemplo n.º 2
0
        public ForumCollection GetAll()
        {
            SharePointListDescriptor descriptor      = Provider.GetAllListItems(ForumConstants.Lists_Forums);
            ForumCollection          forumCollection = new ForumCollection();

            foreach (SharePointListItem listItem in descriptor.SharePointListItems)
            {
                forumCollection.Add(ForumMapper.CreateDomainObject(listItem));
            }

            return(forumCollection);
        }
Exemplo n.º 3
0
        public ForumCollection FindByCategoryId(int id)
        {
            SharePointListDescriptor descriptor      = Provider.GetListItemsByField(ForumConstants.Lists_Forums, "CategoryID", id.ToString());
            ForumCollection          forumCollection = new ForumCollection();

            foreach (SharePointListItem listItem in descriptor.SharePointListItems)
            {
                forumCollection.Add(ForumMapper.CreateDomainObject(listItem));
            }

            return(forumCollection);
        }