Exemplo n.º 1
0
        private void AddChildren(ProjectCohortIdentificationConfigurationAssociationsNode projectCiCsNode, DescendancyList descendancy)
        {
            //add the associations
            HashSet <object> children = new HashSet <object>();

            foreach (ProjectCohortIdentificationConfigurationAssociation association in AllProjectAssociatedCics.Where(assoc => assoc.Project_ID == projectCiCsNode.Project.ID))
            {
                var matchingCic = AllCohortIdentificationConfigurations.SingleOrDefault(cic => cic.ID == association.CohortIdentificationConfiguration_ID);

                if (matchingCic == null)
                {
                    _errorsCheckNotifier.OnCheckPerformed(
                        new CheckEventArgs(
                            "Failed to find Associated Cohort Identification Configuration with ID " +
                            association.CohortIdentificationConfiguration_ID +
                            " which was supposed to be associated with " + association.Project, CheckResult.Fail));//inject knowledge of what the cic is so it doesn't have to be fetched during ToString
                }
                else
                {
                    association.InjectKnown(matchingCic);

                    //document that it is a child of the project cics node
                    children.Add(association);
                }
            }

            AddToDictionaries(children, descendancy);
        }
Exemplo n.º 2
0
        private void AddChildren(ProjectCohortsNode projectCohortsNode, DescendancyList descendancy)
        {
            HashSet <object> children = new HashSet <object>();
            var projectCiCsNode       = new ProjectCohortIdentificationConfigurationAssociationsNode(projectCohortsNode.Project);

            children.Add(projectCiCsNode);
            AddChildren(projectCiCsNode, descendancy.Add(projectCiCsNode));

            var savedCohortsNode = new ProjectSavedCohortsNode(projectCohortsNode.Project);

            children.Add(savedCohortsNode);
            AddChildren(savedCohortsNode, descendancy.Add(savedCohortsNode));

            AddToDictionaries(children, descendancy);
        }
Exemplo n.º 3
0
 public ProjectCohortIdentificationConfigurationAssociationsNodeMenu(RDMPContextMenuStripArgs args, ProjectCohortIdentificationConfigurationAssociationsNode node)
     : base(args, node)
 {
     Add(new ExecuteCommandAssociateCohortIdentificationConfigurationWithProject(_activator).SetTarget(node.Project));
     Add(new ExecuteCommandCreateNewCohortIdentificationConfiguration(_activator).SetTarget(node.Project));
 }