Example #1
0
        /// <summary>
        /// 校区
        /// </summary>
        /// <returns></returns>
        public ActionResult Campus(int id = 0)
        {
            Campus model = _campusService.GetByIdAsync(id);

            if (model == null)
            {
                throw new Exception("校区不存在");
            }
            ViewBag.Imgs    = _campusService.GetImgsByCampusIdAsync(id) ?? new List <CampusImg>();
            ViewBag.Student = _studentService.GetListByCampusAsync(id, 4);
            return(View(model));
        }
Example #2
0
 public ActionResult ImgIndex(int campusId)
 {
     ViewBag.CampusId = campusId;
     ViewBag.ImgList  = _campusService.GetImgsByCampusIdAsync(campusId);
     return(View());
 }