コード例 #1
0
        public ActionResult CreateCourse(CourseModel newCourse)
        {
            CourseServices CourseServ    = new CourseServices();
            UserServices   UserServ      = new UserServices();
            HttpCookie     loggedTeacher = Request.Cookies["LoggedUser"];
            TeacherModel   teacher       = UserServ.GetTeacher(loggedTeacher.Values.Get("Login"));

            newCourse.TeacherId = teacher.IdNauczyciela;
            CourseServ.NewCourse(newCourse);
            return(RedirectToAction("Index", "Teacher"));
        }