Exemplo n.º 1
0
        private void LayoutRoot_Loaded(object sender, RoutedEventArgs e)
        {
            txbSubId.Text      = subjectViewInfo.SubjectInfo.SUBJECTID.ToString() + ".";
            txbSubContent.Text = subjectViewInfo.SubjectInfo.CONTENT;

            System.Linq.IOrderedEnumerable <T_OA_REQUIREDETAIL> oanswerList = subjectViewInfo.AnswerList.OrderBy(ee => ee.CODE);
            foreach (T_OA_REQUIREDETAIL i in oanswerList)
            {
                if (i.CONTENT != "无")
                {
                    //根据答案 获取每个答案的统计结果
                    V_SSubjectAnswerResult v = null;
                    if (_SubAnswerResult != null)
                    {
                        v = _SubAnswerResult.LstAnswer.FirstOrDefault(ee => ee.AnswerCode == i.CODE);
                    }
                    if (v == null)
                    {
                        v = new V_SSubjectAnswerResult();
                    }

                    SurveyAnswer_1 sa = new SurveyAnswer_1(i.CODE, i.CONTENT, v.Count);
                    spAnswerList.Children.Add(sa);
                }
            }
        }
Exemplo n.º 2
0
        private void LayoutRoot_Loaded(object sender, RoutedEventArgs e)
        {
            txbSubId.Text = subjectViewInfo.SubjectInfo.SUBJECTID.ToString() + ".";
            txbSubContent.Text = subjectViewInfo.SubjectInfo.CONTENT;

            System.Linq.IOrderedEnumerable<T_OA_REQUIREDETAIL> oanswerList = subjectViewInfo.AnswerList.OrderBy(ee => ee.CODE);
            foreach (T_OA_REQUIREDETAIL i in oanswerList)
            {
                if (i.CONTENT != "无")
                {
                    //根据答案 获取每个答案的统计结果
                    V_SSubjectAnswerResult v = null;
                    if (_SubAnswerResult != null)
                        v = _SubAnswerResult.LstAnswer.FirstOrDefault(ee => ee.AnswerCode == i.CODE);
                    if (v == null)
                        v = new V_SSubjectAnswerResult();                             

                    SurveyAnswer_1 sa = new SurveyAnswer_1(i.CODE,i.CONTENT,v.Count);
                    spAnswerList.Children.Add(sa);
                }
            }
        }