Esempio n. 1
0
        public static bool modifyCourse(
            string course_id,
            string title,
            string course_designation,
            string instructor_id,
            string department_id,
            string num_credit,
            string course_description,
            string pre_req_course,
            string max_capacity,
            string enrolled_student,
            string semester)
        {
            string pre_req_course_id = Course.getCourseIdFromDesignation(pre_req_course);

            if (Course.update(
                    course_id,
                    title,
                    course_designation,
                    instructor_id,
                    department_id,
                    num_credit,
                    course_description,
                    pre_req_course_id,
                    max_capacity,
                    enrolled_student,
                    semester))
            {
                return(true);
            }

            return(false);
        }
Esempio n. 2
0
        public static bool addCourse(
            string title,
            string course_designation,
            string instructor_id,
            string department_id,
            string num_credit,
            string course_description,
            string pre_req_course,
            string max_capacity,
            string enrolled_student)
        {
            int    course_id         = Convert.ToInt32(Course.getMaxId()) + 1;
            string pre_req_course_id = Course.getCourseIdFromDesignation(pre_req_course);

            if (Course.add(
                    course_id.ToString(),
                    title,
                    course_designation,
                    instructor_id,
                    department_id,
                    num_credit,
                    course_description,
                    pre_req_course_id,
                    max_capacity,
                    enrolled_student,
                    GLOBALS.current_semester))
            {
                return(true);
            }

            return(false);
        }