Esempio n. 1
0
        public ActionResult BrowseQuestion(int flag = 0)
        {
            Response.Expires = 0;
            string ids = Request.QueryString["ids"];
            //基础信息
            List <tbQuestion> baseInfor = EQuestionBL.GetQuestionList(ids.Substring(1, ids.Length - 2).GetArray());
            var listQuestion            = new List <MQuestionShow>();

            foreach (tbQuestion item in baseInfor)
            {
                var mq = new MQuestionShow
                {
                    QuestionContent = item.QuestionContent.NoHtml(),
                    //QuestionKey = konwDic[item.QuestionKey].KeyName,
                    QuestionType       = item.QuestionType,
                    QuestionTypeStr    = EnumsLanguage.GetString(((QuestionType)item.QuestionType).ToString()),
                    QuestionAnswerKeys = item.QuestionAnswerKeys,
                    QuestionAnalysis   = item.QuestionAnalysis,
                    QuestionAnswer     = item.QuestionAnswer,
                    FileUpload         =
                        (item.FileUpload == null || item.FileUpload.Count == 0)
                                ? new List <FileUpload>()
                                : item.FileUpload
                };
                listQuestion.Add(mq);
            }

            // ViewData["model"] = listQuestion;
            ViewBag.model   = listQuestion;
            ViewBag.backUrl = Url.RetechAction("QuestionList", "Question");
            if (flag == 1)
            {
                ViewBag.backUrl = Url.RetechAction("QuestionManage", "Question");
            }
            return(View());
        }