public bool DeleteGroup(string groupName) { bool result = true; if (String.IsNullOrWhiteSpace(linkToSiteEditor)) throw new Exception("Link to SiteEditor is empty. Can't delete new group."); if (String.IsNullOrWhiteSpace(groupName)) throw new ArgumentNullException("The given GroupName is incorrect. Can't delete new group."); deletingGroupName = groupName; groupSectionTask = GroupEditorSectionTask.DeleteExistingGroup; webBrowserTask = WebBrowserTask.OpenManageGroupsSection; webBrowser.Navigate(linkToSiteEditor); return result; }
/// <summary> /// Creates a new group with specified GroupName, Description, students IDs /// The method is Private, because Description adding is not implemented /// </summary> /// <param name="groupName">The name of creating group</param> /// <param name="groupDescription">The description of creating group</param> /// <param name="studentIDs">The student IDs to add in a new group</param> /// <returns>The count of added students. Not implemented yet</returns> private int CreateNewGroup(string groupName, string groupDescription, string[] studentIDs) { addingStudentsCount = 0; if (linkToSiteEditor == "") throw new Exception("Link to SiteEditor is empty. Can't create new group."); addingGroupName = groupName; addingGroupDescription = groupDescription; addingStudentIDs = studentIDs; groupSectionTask = GroupEditorSectionTask.CreateNewGroup; webBrowserTask = WebBrowserTask.OpenManageGroupsSection; webBrowser.Navigate(linkToSiteEditor); return addingStudentsCount; }