Beispiel #1
0
        private List <Question> GetAllRelatedQuestions(System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
        {
            var questionList = new List <Question>(Questions);

            foreach (var q in e.NewItems)
            {
                var s = q as Question;
                var t = Traveler.GetAllRequisites(s);
                questionList.AddRange(t);
            }
            var id = questionList.Where(y => y.Template == false).Select(x => x.Id).Distinct();
            var nl = new List <Question>();

            foreach (var idi in id)
            {
                nl.Add(questionList.First(x => x.Id == idi));
            }
            return(nl);
        }