Exemple #1
0
        /// <summary>
        ///     创建分类的页面呈现
        /// </summary>
        /// <returns></returns>
        public ActionResult SortEdit()
        {
            int            id   = Convert.ToInt32(Request.QueryString["id"]);
            tbQuestionSort sort = id > 0 ? ESortBL.GetSingleByID(id) : new tbQuestionSort();

            ViewData["model"] = sort;

            if (Request.QueryString["fatherID"] != null)
            {
                ViewData["fatherModel"] = Request.QueryString["fatherID"] == "0"
                                              ? CommonLanguage.Common_TreeFootName
                                              : ESortBL.GetAllQuestionSortDictionary()[
                    Request.QueryString["fatherID"].StringToInt32()].Title;
                ViewData["fatherID"] = Request.QueryString["fatherID"];
            }
            else
            {
                if (id > 0)
                {
                    ViewData["fatherModel"] = sort.FatherID == 0
                                                  ? CommonLanguage.Common_TreeFootName
                                                  : ESortBL.GetAllQuestionSortDictionary()[sort.FatherID].Title;
                    ViewData["fatherID"] = sort.FatherID;
                }
                else
                {
                    ViewData["fatherModel"] = CommonLanguage.Common_TreeFootName;
                    ViewData["fatherID"]    = 0;
                }
            }
            return(View());
        }
Exemple #2
0
        /// <summary>
        ///     导入试题呈现
        /// </summary>
        public ViewResult ImportQuestions()
        {
            int id = Request.QueryString["id"].StringToInt32();

            if (id > 0)
            {
                //var qu = EQuestionBL.GetSingleByID(id);
                ViewData["fatherModel"] = qSortBL.GetAllQuestionSortDictionary()[id].Title;
            }
            else
            {
                if (Request.QueryString["sortID"] != null)
                {
                    ViewData["fatherModel"] = Request.QueryString["sortID"] == "0"
                                                  ? "无"
                                                  : qSortBL.GetAllQuestionSortDictionary()[
                        Request.QueryString["sortID"].StringToInt32()].Title;
                }
                else
                {
                    ViewData["fatherModel"] = "无";
                }
            }
            return(View());
        }