コード例 #1
0
ファイル: SectionController.cs プロジェクト: hsb0307/forum
 public ActionResult GetAll()
 {
     return(Json(new
     {
         success = true,
         data = _queryService.FindAll()
     }));
 }
コード例 #2
0
 public ActionResult GetAll()
 {
     return(Json(new
     {
         success = true,
         data = _queryService.FindAll()
     }, JsonRequestBehavior.AllowGet));
 }
コード例 #3
0
        public ActionResult Index()
        {
            if (_contextService.CurrentAccount.AccountName != "admin")
            {
                return(View("NoPermission"));
            }
            var sections = _queryService.FindAll();

            return(View(sections.Select(x => x.ToViewModel(null))));
        }
コード例 #4
0
ファイル: SectionController.cs プロジェクト: wukejiong/forum
        public ActionResult Index(string sectionId)
        {
            var sections = _queryService.FindAll();

            return(PartialView("SectionNavbar", sections.Select(x => x.ToViewModel(sectionId))));
        }