public override void Execute() { base.Execute(); if (_cic == null) { _cic = SelectOne <CohortIdentificationConfiguration>(BasicActivator.RepositoryLocator.CatalogueRepository); } if (_cic == null) { return; } // Confirm creating yes/no (assuming activator is interactive) if (!BasicActivator.IsInteractive || YesNo("This will create a 100% copy of the entire CohortIdentificationConfiguration including all datasets, " + "filters, parameters and set operations. Are you sure this is what you want?", "Confirm Cloning")) { CloneCreatedIfAny = _cic.CreateClone(new ThrowImmediatelyCheckNotifier()); if (_project != null) // clone the association { new ProjectCohortIdentificationConfigurationAssociation( BasicActivator.RepositoryLocator.DataExportRepository, _project, CloneCreatedIfAny); } //Load the clone up Publish(CloneCreatedIfAny); if (_project != null) { Emphasise(_project); } else { Emphasise(CloneCreatedIfAny); } Activate(CloneCreatedIfAny); } }
public override void Execute() { base.Execute(); if (_cic == null) { _cic = SelectOne <CohortIdentificationConfiguration>(activator.RepositoryLocator.CatalogueRepository); } if (_cic == null) { return; } if (YesNo("This will create a 100% copy of the entire CohortIdentificationConfiguration including all datasets, " + "filters, parameters and set operations. Are you sure this is what you want?", "Confirm Cloning")) { var checks = new PopupChecksUI("Cloning " + _cic, false); var clone = _cic.CreateClone(checks); if (_project != null) // clone the association { new ProjectCohortIdentificationConfigurationAssociation( Activator.RepositoryLocator.DataExportRepository, _project, clone); } //Load the clone up Publish(clone); if (_project != null) { Emphasise(_project); } else { Emphasise(clone); } } }