public virtual void AddTerminology(string terminologyId) { Terminology terminology = TerminologyById(terminologyId); if (terminology == null) { terminology = new Terminology(terminologyId); terminologies.Add(terminology); } }
public virtual Terminology TerminologyById(string terminologyId) { Terminology result = null; foreach (Terminology t in Terminologies) { if (t.TerminologyId == terminologyId) { result = t; } } return(result); }
public abstract void LoadTerminologyLanguages(Terminology terminology, OnError onError);
protected virtual void PopulateGrid() { ProgressBar.Visible = false; OkButton.Enabled = true; if (string.IsNullOrEmpty(TerminologyId)) { Text = "Select a Terminology"; Grid.DataSource = null; Grid.DataSource = Service.Terminologies; if (Grid.Columns.Count > 0) { Grid.Columns[0].HeaderText = "Terminology"; } } else if (string.IsNullOrEmpty(SubsetId) || string.IsNullOrEmpty(SubsetLanguage)) { Text = "Select a Subset for Terminology " + TerminologyId; Grid.DataSource = null; Terminology terminology = Service.TerminologyById(TerminologyId); if (terminology != null) { List <TerminologyQuery> subsets = terminology.Queries; if (subsets.Count > 0) { Grid.DataSource = terminology.Queries; if (Grid.Columns.Count > 0) { Grid.Columns[0].HeaderText = "Subset"; } } else { if (terminology.Languages == null) { Service.LoadTerminologyLanguages(terminology, ShowException); } if (terminology.Languages.Count > 0) { Text = "Concepts for Terminology " + TerminologyId + " (no subsets have been defined for this terminology)"; ProgressBar.Visible = true; if (string.IsNullOrEmpty(ReferenceId)) { Service.LoadConcepts(OnConceptsLoaded, ShowException, TerminologyId, terminology.Languages[0]); } else { Service.LoadChildConcepts(OnConceptsLoaded, ShowException, TerminologyId, terminology.Languages[0], ReferenceId); } } } } } else { Text = "Concepts for Terminology " + TerminologyId + " (" + SubsetId + ")"; ProgressBar.Visible = true; if (string.IsNullOrEmpty(ReferenceId)) { Service.LoadConceptsFromSubset(OnConceptsLoaded, ShowException, TerminologyId, SubsetId, SubsetLanguage); } else { Service.LoadChildConceptsFromSubset(OnConceptsLoaded, ShowException, TerminologyId, SubsetId, SubsetLanguage, ReferenceId); } } }