private void CreateVariableInfos() { variableInfos.Clear(); ObservableCollection <VariableVM> variables = StudyUnit.Variables; foreach (VariableVM variable in variables) { VariableInfoVM variableInfo = new VariableInfoVM(variable.Variable); variableInfos.Add(variableInfo); ConceptVM concept = StudyUnit.FindConcept(variable.ConceptId); if (concept != null) { variableInfo.ConceptTitle = concept.Title; } QuestionVM question = StudyUnit.FindQuestion(variable.QuestionId); if (question != null) { variableInfo.QuestionTitle = question.Content; } UniverseVM universe = StudyUnit.FindUniverse(variable.UniverseId); if (universe != null) { variableInfo.UniverseTitle = universe.Title; } variableInfo.VariableType = Options.FindResponseTypeLabel(variable.ResponseTypeCode); } selectedVariableInfoItem = null; }
public void RemoveUniverse(UniverseVM universe) { foreach (VariableVM variable in variables) { if (variable.UniverseId == universe.Id) { variable.UniverseId = null; } } }
public void RemoveUniverseFromVariable(UniverseVM universe) { variableForm.RemoveUniverse(universe); }
public string FindUniverseTitle(string universeId) { UniverseVM universe = FindUniverse(universeId); return(universe != null ? universe.Title : ""); }