コード例 #1
0
        public ActionResult EditCourseOfferings(TermCourseOffering offering)
        {
            int  TermId     = offering.TermId;
            bool isEditable = true;

            // uncomment this in production
            //if (dao.GetTermEndDate(TermId).CompareTo(DateTime.Today) < 0) isEditable = false;

            if (isEditable && dao.UpdateTermCourses(TermId, offering.CourseIds))
            {
                return(View("Index"));
            }
            else
            {
                return(View());
            }
        }