public int Save(Group group) { SharePointListProvider provider = new SharePointListProvider(ForumApplication.Instance.SpWeb); string[] values = { "Title", group.Name, }; SharePointListItem listItem = new SharePointListItem(group.Id, values); if (group.Id == 0) return provider.AddListItem(ForumConstants.Lists_Groups, listItem); else return provider.UpdateListItem(ForumConstants.Lists_Groups, listItem); }
public int Save(ForumUser user) { int userId; SharePointListProvider provider = new SharePointListProvider(ForumApplication.Instance.SpWeb); SharePointListItem listItem = UserMapper.CreateDto(user); if (user.Id == 0) { userId = provider.AddListItem(ForumConstants.Lists_Users, listItem); } else { userId = provider.UpdateListItem(ForumConstants.Lists_Users, listItem); } return(userId); }
public int Save(ForumUser user) { int userId; SharePointListProvider provider = new SharePointListProvider(ForumApplication.Instance.SpWeb); SharePointListItem listItem = UserMapper.CreateDto(user); if (user.Id == 0) { userId = provider.AddListItem(ForumConstants.Lists_Users, listItem); } else { userId = provider.UpdateListItem(ForumConstants.Lists_Users, listItem); } return userId; }
public int Save(Group group) { SharePointListProvider provider = new SharePointListProvider(ForumApplication.Instance.SpWeb); string[] values = { "Title", group.Name, }; SharePointListItem listItem = new SharePointListItem(group.Id, values); if (group.Id == 0) { return(provider.AddListItem(ForumConstants.Lists_Groups, listItem)); } else { return(provider.UpdateListItem(ForumConstants.Lists_Groups, listItem)); } }