コード例 #1
0
ファイル: AdminController.cs プロジェクト: jonhei13/Jonsi
        public ActionResult EditCourse(int?CourseID)
        {
            if (!CourseID.HasValue || !ASS.CourseExist(CourseID))
            {
                throw new Exception();
            }
            var Model = AS.GetCourse(CourseID.Value);

            return(View(Model));
        }
コード例 #2
0
        public ActionResult CreateAssignment(int?CourseID)
        {
            if (CourseID != null)
            {
                if (!AS.CourseExist(CourseID))
                {
                    throw new Exception();
                }
            }
            var AssignmentViewModel = new AssignmentViewModel();

            AssignmentViewModel.UserModel = US.GetUserOverviewByUserName(User.Identity.GetUserName(), CourseID);
            return(View(AssignmentViewModel));
        }
コード例 #3
0
        public void CourseExistTest()
        {
            int CourseID = 1;

            var TheCourse = _AS.CourseExist(CourseID);

            Assert.IsTrue(TheCourse);
        }