//课程主题 public ActionResult AjaxTrainingTopic(int categoryId) { List<Traning_Topic> listT = new PrepareTrainingApplyBLL().GetTrainingTopic("Delflag=0 and CategoryId=" + categoryId, "Sort desc"); List<NationalAbility_Course> listN = new NationalAbility_CourseBLL().GetList2("Delflag=0 and Display=1 and TCategoryId=" + categoryId, "Sort"); TopicAndNation topicAndNation = new TopicAndNation(); topicAndNation.topic = listT; topicAndNation.nation = listN; return Json(topicAndNation, JsonRequestBehavior.AllowGet); }
/// <summary> /// 根据小类获取主题 /// </summary> /// <param name="Category"></param> /// <returns></returns> public ActionResult GetTopicByCategory(int tCategory) { //主题 Traning_TopicBLL traning_TopicBLL = new Traning_TopicBLL(); List<Traning_Topic> listT = traning_TopicBLL.GetList(" CategoryId=" + tCategory + " and Delflag='false' and Display='true'", " Sort desc"); List<NationalAbility_Course> listN = new NationalAbility_CourseBLL().GetList2("Delflag=0 and Display=1 and TCategoryId=" + tCategory, "Sort"); TopicAndNation topicAndNation = new TopicAndNation(); topicAndNation.topic = listT; topicAndNation.nation = listN; return Json(topicAndNation, JsonRequestBehavior.AllowGet); //return (new JavaScriptSerializer()).Serialize(list); }