internal void ShowFrameworkQuestionInfo(FrameworkQuestionItem questionViewItem) { this.IsNoQuestion = false; this.IsDetailAndInfo = true; this.ShowQuestionDetailTab = false; SetFrameworkQuestionInfoTab(questionViewItem); }
internal void SetFrameworkQuestions(int requirement_ID, CSET_Context controlEntity) { this.FrameworkQuestions.Clear(); Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); var newQuestionItems = (from nr in controlEntity.NEW_REQUIREMENT from newquestions in nr.NEW_QUESTIONs() join newquestionSets in controlEntity.NEW_QUESTION_SETS on newquestions.Question_Id equals newquestionSets.Question_Id into questionSets join level in controlEntity.UNIVERSAL_SAL_LEVEL on newquestions.Universal_Sal_Level equals level.Universal_Sal_Level1 join subheading in controlEntity.UNIVERSAL_SUB_CATEGORY_HEADINGS on newquestions.Heading_Pair_Id equals subheading.Heading_Pair_Id join questionGroupHeading in controlEntity.QUESTION_GROUP_HEADING on subheading.Question_Group_Heading_Id equals questionGroupHeading.Question_Group_Heading_Id where nr.Requirement_Id == requirement_ID select new { NewRequirement = nr, Question = newquestions, Level = level, QuestionGroupHeading = questionGroupHeading, QuestionSets = questionSets }); foreach (var item in newQuestionItems) { FrameworkQuestionItem questionItem = new FrameworkQuestionItem(); questionItem.QuestionText = item.Question.Simple_Question; questionItem.RequirementID = item.Question.Question_Id; questionItem.SALLevel = item.Level; questionItem.QuestionGroupHeading = item.QuestionGroupHeading; SETS set = item.QuestionSets.OrderBy(x => x.Set_NameNavigation.Order_Framework_Standards).Select(x => x.Set_NameNavigation).FirstOrDefault(); questionItem.Standard = set.Short_Name; questionItem.SetName = set; questionItem.Question = item.Question; questionItem.Reference = "Ref"; this.FrameworkQuestions.Add(questionItem); } stopWatch.Stop(); //CSETLogger.Info("Time to get framework questions Time: " + stopWatch.ElapsedMilliseconds); }