/// <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)); }
public ActionResult ImgIndex(int campusId) { ViewBag.CampusId = campusId; ViewBag.ImgList = _campusService.GetImgsByCampusIdAsync(campusId); return(View()); }