示例#1
0
 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
        public ActionResult Index(string sectionId)
        {
            var sections = _queryService.FindAll();

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