/// <summary> /// Gets the last user in the system. /// </summary> /// <returns></returns> public ForumUser GetLast() { SharePointListDescriptor descriptor = Provider.GetAllListItems(ForumConstants.Lists_Users); SharePointListItem item = descriptor.SharePointListItems[descriptor.SharePointListItems.Length - 1]; return(UserMapper.CreateDomainObject(item)); }
public ForumUser GetLast() { SharePointListProvider provider = new SharePointListProvider(ForumApplication.Instance.SpWeb); SharePointListDescriptor descriptor = provider.GetAllListItems(ForumConstants.Lists_Users); SharePointListItem item = descriptor.SharePointListItems[descriptor.SharePointListItems.Length - 1]; return(UserMapper.CreateDomainObject(item)); }
/// <summary> /// Gets all. /// </summary> /// <returns></returns> public MessageCollection GetAll() { MessageCollection messages = new MessageCollection(); SharePointListDescriptor postItems = Provider.GetAllListItems(ForumConstants.Lists_Posts); foreach (SharePointListItem postItem in postItems.SharePointListItems) { messages.Add(MessageMapper.CreateDomainObject(postItem)); } return(messages); }
public MessageCollection GetByTopicId(int id) { MessageCollection messages = new MessageCollection(); 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 GroupCollection GetAll() { GroupCollection groups = new GroupCollection(); SharePointListDescriptor items = Provider.GetAllListItems(ForumConstants.Lists_Groups); foreach (SharePointListItem listItem in items.SharePointListItems) { groups.Add(new Group(listItem.Id, listItem["Title"])); } return(groups); }
public MessageCollection FindByDate(DateTime dateCriteria) { string isoDate = SPUtility.CreateISO8601DateTimeFromSystemDateTime(dateCriteria); SharePointListDescriptor listItems = Provider.GetListItemsByField(ForumConstants.Lists_Posts, "Modified", isoDate); MessageCollection messages = new MessageCollection(); foreach (SharePointListItem item in listItems.SharePointListItems) { messages.Add(MessageMapper.CreateDomainObject(item)); } return(messages); }
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); }
/// <summary> /// Gets all categories. /// </summary> /// <returns></returns> public CategoryCollection GetAll() { SharePointListDescriptor items = Provider.GetAllListItems(ForumConstants.Lists_Category); CategoryCollection categoryCollection = new CategoryCollection(); foreach (SharePointListItem listItem in items.SharePointListItems) { categoryCollection.Add(CategoryMapper.CreateDomainObject(listItem)); } return(categoryCollection); }
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); }
public Hashtable GetPermissionsForForum(int id) { Hashtable permissions = new Hashtable(); SharePointListDescriptor listItems = Provider.GetListItemsByField(ForumConstants.Lists_ForumAccess, "ForumID", id.ToString()); foreach (SharePointListItem listItem in listItems.SharePointListItems) { Permission perm = new Permission(listItem["Title"]); permissions.Add(Convert.ToInt32(listItem["GroupID"]), perm); } return(permissions); }
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); }
/// <summary> /// Gets all. /// </summary> /// <returns></returns> public ForumUserCollection GetAll() { ForumUserCollection users = new ForumUserCollection(); SharePointListDescriptor descriptor = Provider.GetAllListItems(ForumConstants.Lists_Users); foreach (SharePointListItem listItem in descriptor.SharePointListItems) { users.Add(UserMapper.CreateDomainObject(listItem)); } return(users); }
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); }
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); }