Exemplo n.º 1
0
 public void editGroupName(string groupNameOld, string groupNameNew) // edit method used by the editGroup popup
 {
     if (_groupController.GetGroupByName(groupNameNew) == null)
     {
         IGroupViewModel group = _groupController.GetGroupByName(groupNameOld);
         _groupController.UpdateGroup(group.GetName(), groupNameNew);
         fillGroupComboBox();
         groupComboBox.SelectedIndex = groupComboBox.Items.IndexOf(groupNameNew);
         analysisListView.Items.Clear();
         fillGroupComboBox();
         updateAnalysisGroups();
         updateListViews();
     }
     else
     {
         string errorMessage = "You cannot change a group name to one that already exists";
         var    form2        = new ErrorMessageDisplay(errorMessage);
         form2.Show(this);
     }
 }
Exemplo n.º 2
0
 public bool UpdateGroup(string name, int groupId)
 {
     return(groupController.UpdateGroup(name, groupId));
 }