Ejemplo n.º 1
0
        public ActionResult AddOrUpdateCourse(bool isNew, string courseId, string subject, string category, string title, int minCredits, int maxCredits, bool specialApproval)
        {
            Dal    db     = new Dal();
            Course course = new Course();

            course.CourseId        = courseId;
            course.Subject         = subject;
            course.Category        = category;
            course.Title           = title;
            course.MinCredits      = minCredits;
            course.MaxCredits      = maxCredits;
            course.SpecialApproval = specialApproval;

            int result = db.AddOrUpdateCourse(isNew, course);

            return(Json(new { result = result.ToString() }, JsonRequestBehavior.AllowGet));
        }