protected CohortCreationRequest GetCohortCreationRequest(string cohortInitialDescription) { //user wants to create a new cohort //do we know where it's going to end up? if (ExternalCohortTable == null) { if (!SelectOne(Activator.RepositoryLocator.DataExportRepository, out ExternalCohortTable, null, true)) //not yet, get user to pick one { return(null); //user didn't select one and cancelled dialog } } //and document the request //Get a new request for the source they are trying to populate CohortCreationRequestUI requestUI = new CohortCreationRequestUI(Activator, ExternalCohortTable, Project); if (!string.IsNullOrWhiteSpace(cohortInitialDescription)) { requestUI.CohortDescription = cohortInitialDescription + " (" + Environment.UserName + " - " + DateTime.Now + ")"; } if (requestUI.ShowDialog() != DialogResult.OK) { return(null); } if (Project == null) { Project = requestUI.Project; } return(requestUI.Result); }
public override CohortCreationRequest GetCohortCreationRequest(ExternalCohortTable externalCohortTable, IProject project, string cohortInitialDescription) { var ui = new CohortCreationRequestUI(this, externalCohortTable, project); if (!string.IsNullOrWhiteSpace(cohortInitialDescription)) { ui.CohortDescription = cohortInitialDescription + " (" + Environment.UserName + " - " + DateTime.Now + ")"; } if (ui.ShowDialog() != DialogResult.OK) { return(null); } return(ui.Result); }