public IEnumerable <Topic> Topic([FromQuery] int page) { page = page <= 0 ? 1 : page; var topicList = _topicService.GetAllTopic(page); return(topicList); }
protected void Test() { try { List <Topic> list = TopicService.GetAllTopic(); } catch (Exception ex) { PromptInfo.Text = ex.Message; } }
public JsonResult TopicList([FromQuery] int page) { page = page <= 0 ? 1 : page; var topicList = _topicService.GetAllTopic(page); var userTopic = _topicService.GetTopicByUserId(1, 5, 5); return(Json(new { topicList = topicList, userTopic = userTopic })); }
public ActionResult Index() { if (Session["language"] == null) { Session["language"] = "en"; } FirstPageViewModel model = new FirstPageViewModel() { Topics = topicService.GetAllTopic(), MasterPage = UpdateMasterPageData() }; return(View("Index", model)); }
/// <summary> /// 展示所有的话题 /// </summary> protected void DisplayTopicList() { try { List <Topic> list = TopicService.GetAllTopic(); if (list != null) { LvTopicGroupCard.DataSource = list; LvTopicGroupCard.DataBind(); } } catch (Exception ex) { PromptInfo.Text = ex.Message; } }
public ActionResult Index() { var topics = t.GetAllTopic(); return(View(topics)); }