Exemplo n.º 1
0
        public Course(String id,
                      int year,
                      int sem,
                      String name,
                      String description,
                      int points,
                      String academicOrg,
                      String academicGroup,
                      String courseComp,
                      String gradingBasis,
                      String typeOffered,
                      String remarks  = "",
                      String careerId = "",
                      CommonInternals.CourseType type = CommonInternals.CourseType.ELECTIVE)
        {
            this.id            = id;
            this.year          = year;
            this.sem           = sem;
            this.name          = name;
            this.description   = description;
            this.points        = points;
            this.academicOrg   = academicOrg;
            this.academicGroup = academicGroup;
            this.courseComp    = courseComp;
            this.gradingBasis  = gradingBasis;
            this.typeOffered   = typeOffered;
            this.remarks       = remarks;
            this.careerId      = careerId;
            this.type          = type;

            initialise();
        }
Exemplo n.º 2
0
        public Course(String id, 
                    int year,
                    int sem, 
                    String name, 
                    String description, 
                    int points, 
                    String academicOrg, 
                    String academicGroup, 
                    String courseComp, 
                    String gradingBasis, 
                    String typeOffered,
                    String remarks = "",
                    String careerId = "",
                    CommonInternals.CourseType type=CommonInternals.CourseType.ELECTIVE)
        {
            this.id = id;
            this.year = year;
            this.sem = sem;
            this.name = name;
            this.description = description;
            this.points = points;
            this.academicOrg = academicOrg;
            this.academicGroup = academicGroup;
            this.courseComp = courseComp;
            this.gradingBasis = gradingBasis;
            this.typeOffered = typeOffered;
            this.remarks = remarks;
            this.careerId = careerId;
            this.type = type;

            initialise();
        }
Exemplo n.º 3
0
        private CommonInternals.CourseType getCourseType(Course targetCourse)
        {
            CommonInternals.CourseType courseType = CommonInternals.CourseType.ELECTIVE;

            if (DatabaseConnection.isCourseCompulsory(targetCourse))
            {
                courseType = CommonInternals.CourseType.COMPULSORY;
            }
            else if (DatabaseConnection.isCourseElective(targetCourse))
            {
                courseType = CommonInternals.CourseType.ELECTIVE;
            }

            return(courseType);
        }
Exemplo n.º 4
0
        public void setType(CommonInternals.CourseType type)
        {
            if (type == CommonInternals.CourseType.COMPULSORY)
            {
                if (courseButton != null)
                {
                    courseButton.Background = Brushes.OrangeRed;
                }
            }
            else
            {
                if (courseButton != null)
                {
                    courseButton.Background = Brushes.LightGreen;
                }
            }

            this.type = type;
        }
Exemplo n.º 5
0
        public void setType(CommonInternals.CourseType type)
        {
            if(type == CommonInternals.CourseType.COMPULSORY)
            {
                if(courseButton != null)
                {
                    courseButton.Background = Brushes.OrangeRed;
                }
            }
            else
            {
                if(courseButton != null)
                {
                    courseButton.Background = Brushes.LightGreen;
                }
            }

            this.type = type;
        }