/// <summary> /// 自由组卷呈现 /// </summary> public ViewResult ExampaperRandom() { List <tbQuestionSort> sortList = qSortBL.GetAllQuestionSortList(); ViewData["sort"] = sortList; return(View()); }
/// <summary> /// 获取树形结构 /// </summary> /// <returns></returns> public ActionResult GetAllQuestionSortTree() { List <tbQuestionSort> questionSort = ESortBL.GetAllQuestionSortList().OrderBy(p => p._id).ToList(); var treeStr = new StringBuilder(); treeStr.AppendLine("<ul id=\"navigation\" class=\"treeview\">"); treeStr.Append("<li id=\"0\" class='pNote'>"); treeStr.AppendFormat("<a id=\"0\" title=\"{0}\" onclick=\"selectSort(0,'{0}');\">{0}</a>", "立信"); AddChild(0, questionSort, treeStr); treeStr.Append("</li>"); treeStr.AppendLine("</ul>"); return(Json(treeStr.ToString(), JsonRequestBehavior.AllowGet)); }