Esempio n. 1
0
		public TopicCollection GetAll()
		{
			TopicCollection topicCollection = new TopicCollection();

			SharePointListDescriptor descriptor = Provider.GetAllListItems(ForumConstants.Lists_Topics);
			foreach (SharePointListItem listItem in descriptor.SharePointListItems)
			{
				topicCollection.Add(TopicMapper.CreateDomainObject(listItem));
			}

			return topicCollection;
		}
Esempio n. 2
0
		public TopicCollection FindByForumId(int id)
		{
			TopicCollection topicCollection = new TopicCollection();

			SharePointListDescriptor descriptor = Provider.GetListItemsByField(ForumConstants.Lists_Topics, "ForumID", id.ToString());
			foreach (SharePointListItem listItem in descriptor.SharePointListItems)
			{
				topicCollection.Add(TopicMapper.CreateDomainObject(listItem));
			}

			return topicCollection;
		}
Esempio n. 3
0
		public TopicCollection FindInactive()
		{
			SharePointListDescriptor listItems = Provider.GetListItemsByField(
				ForumConstants.Lists_Topics, "NumPosts", "1");
			TopicCollection topics = new TopicCollection();
			foreach (SharePointListItem item in listItems.SharePointListItems)
			{
				topics.Add(TopicMapper.CreateDomainObject(item));
			}
			return topics;
		}
Esempio n. 4
0
		public TopicCollection FindByDate(DateTime dateCriteria)
		{
			string isoDate = SPUtility.CreateISO8601DateTimeFromSystemDateTime(dateCriteria);			
			SharePointListDescriptor listItems = Provider.GetListItemsByField(ForumConstants.Lists_Topics, "Modified", isoDate);
			TopicCollection topics = new TopicCollection();
			foreach (SharePointListItem item in listItems.SharePointListItems)
			{
				topics.Add(TopicMapper.CreateDomainObject(item));
			}
			return topics;
		}