Example #1
0
        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;
        }
Example #2
0
 public void RemoveUniverse(UniverseVM universe)
 {
     foreach (VariableVM variable in variables)
     {
         if (variable.UniverseId == universe.Id)
         {
             variable.UniverseId = null;
         }
     }
 }
Example #3
0
 public void RemoveUniverseFromVariable(UniverseVM universe)
 {
     variableForm.RemoveUniverse(universe);
 }
Example #4
0
        public string FindUniverseTitle(string universeId)
        {
            UniverseVM universe = FindUniverse(universeId);

            return(universe != null ? universe.Title : "");
        }