public static StatisticsInfoVM FindByQuestionIdOrVariableId(ICollection <StatisticsInfoVM> infos, string questionId, string variableId) { StatisticsInfoVM statisticsInfo = FindByQuestionId(infos, questionId); if (statisticsInfo != null) { return(statisticsInfo); } return(FindByVariableId(infos, variableId)); }
private void SelectStatisticsInfo() { StatisticsInfoVM statisticsInfo = null; VariableInfoVM variableInfo = SelectedVariableInfo; if (variableInfo != null) { statisticsInfo = StatisticsInfoVM.FindByQuestionIdOrVariableId(StatisticsInfos, variableInfo.QuestionId, variableInfo.Id); } SelectedStatisticsInfo = statisticsInfo; }
private void CreateStatisticsInfos() { statisticsInfos.Clear(); List <StatisticsInfo> statisticsInfoModels = StudyUnit.StatisticsInfoModels; foreach (StatisticsInfo statisticsInfoModel in statisticsInfoModels) { StatisticsInfoVM statisticsInfo = new StatisticsInfoVM(statisticsInfoModel); statisticsInfos.Add(statisticsInfo); } }