Example #1
0
 public ActionResult EditCourse(CourseInfo courseInfo)
 {
     courseInfo.CourseCode = $"{courseInfo.CourseSubject}{courseInfo.CourseNum}";
     if (dao.UpdateCourseInfo(courseInfo))
     {
         return(RedirectToAction("ListCourses"));
     }
     return(RedirectToAction("EditCourse", new { courseId = courseInfo.CourseId }));
 }