/// <summary> /// Adds the project to the selected list. This method is invoked by the AddCommand. /// </summary> public void AddProject() { ProjectViewModel selectedProjectVM = _unassignedProjects.FirstOrDefault(p => p.IsSelected == true); SelectedProjects.Add(selectedProjectVM); UnassignedProjects.Remove(selectedProjectVM); }
private void ProjectAdded(Project project) { if (!SelectedProjects.IsExist(project) && project.Activity != null) { SelectedProjects.Add(new Project { Id = project.Id, Name = project.Name, Activity = project.Activity }); } }
/// <summary> /// Adds a new change /// </summary> /// <param name="CDVM"></param> public void AddChange(ChangeDescriptionViewModel CDVM, bool Notify) { Changes.Add(CDVM); ChangeController.UserName = CDVM.User; ChangeController.ProjectName = CDVM.Project; CDVM.PropertyChanged += new PropertyChangedEventHandler(CDVM_PropertyChanged); if (Notify) { RaisePropertyChanged("NewChange"); } if (!SelectedProjects.Contains(CDVM.Project)) { SelectedProjects.Add(CDVM.Project); } if (!SelectedUsers.Contains(CDVM.User)) { SelectedUsers.Add(CDVM.User); } RaisePropertyChanged("SelectedChanges"); }