Esempio n. 1
0
        public ActionResult EditCourse(int?CourseID)
        {
            if (!CourseID.HasValue || !ASS.CourseExist(CourseID))
            {
                throw new Exception();
            }
            var Model = AS.GetCourse(CourseID.Value);

            return(View(Model));
        }
Esempio n. 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));
        }
Esempio n. 3
0
        public void CourseExistTest()
        {
            int CourseID = 1;

            var TheCourse = _AS.CourseExist(CourseID);

            Assert.IsTrue(TheCourse);
        }