public ActionResult LectureSettingView() { var nowDisplayRole = HogwartsSettingUtility.GetSetting(HogwartsSettingUtility.NowDisplayRole); ViewBag.Lectures = LectureUtility.GetLecturesInNowRole(nowDisplayRole); return(PartialView("_LectureSettingView")); }
// GET: HogwartsSettings public ActionResult Index() { var nowDisplayRole = HogwartsSettingUtility.GetSetting(HogwartsSettingUtility.NowDisplayRole); ViewBag.Roles = UserUtility.GetAllRoleExceptAdmin(); ViewBag.LecturesForSelectBox = LectureUtility.GetLecturesInNowRole(nowDisplayRole); ViewBag.NowDisplayRole = nowDisplayRole; ViewBag.NowLecture = HogwartsSettingUtility.GetNowLecture(); return(View(db.HogwartsSettings.ToList())); }