コード例 #1
0
ファイル: SubjectController.cs プロジェクト: slaq777/lmsystem
 public ActionResult SubGroups(int subjectId)
 {
     var model = new SubjectWorkingViewModel(subjectId);
     return PartialView("_SubGroupEdit", model.SubGroups);
 }
コード例 #2
0
ファイル: SubjectController.cs プロジェクト: slaq777/lmsystem
        public ActionResult SubGroupsChangeGroup(string subjectId, string groupId)
        {
            var model = new SubjectWorkingViewModel(int.Parse(subjectId));

            return PartialView("_SubGroupsEditTemplate", model.SubGroup(int.Parse(groupId)));
        }
コード例 #3
0
ファイル: SubjectController.cs プロジェクト: slaq777/lmsystem
        public ActionResult Index(int subjectId)
        {
            if (SubjectManagementService.IsWorkingSubject(WebSecurity.CurrentUserId, subjectId))
            {
                var model = new SubjectWorkingViewModel(subjectId);
                return View(model);
            }
            else if (User.IsInRole("student"))
            {
                var model = new SubjectWorkingViewModel(subjectId);
                return View(model);
            }

            return RedirectToAction("Index", "Lms");
        }