Exemplo n.º 1
0
        /// <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);
        }
Exemplo n.º 2
0
 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
         });
     }
 }
Exemplo n.º 3
0
        /// <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");
        }