示例#1
0
        public EditProfessorForm()
        {
            InitializeComponent();

            //dynamically add classes to combo box while storing class id's associated with class name
            Util.addClasses(cbEditProfessorFilter, classId, false, true, null, null);

            //dynamically add profs to combo box while storing prof id's associated with prof information
            Util.addProfessors(cbEditProfessor, profId, true, false, null, null);
        }
示例#2
0
        private void cbEditClassSemesterFilter_SelectedIndexChanged(object sender, EventArgs e)
        {
            string profID     = cbEditClassProfessorFilter.SelectedIndex > 0 ? profFilterId[cbEditClassProfessorFilter.SelectedIndex - 1].ToString() : null;
            string semesterID = cbEditClassSemesterFilter.SelectedIndex > 0 ? semesterFilterId[cbEditClassSemesterFilter.SelectedIndex - 1].ToString() : null;

            Util.addClasses(cbEditClass, classId, false, false, profID, semesterID);
            Util.addProfessors(cbEditClassProfessorFilter, profFilterId, false, true, null, semesterID);

            //update buttons and links (will most likely disable)
            updateClassButtons();
        }
示例#3
0
        public EditClassForm()
        {
            InitializeComponent();

            Util.addProfessors(cbEditClassProfessorFilter, profFilterId, false, true, null, null);
            Util.addProfessors(cbClassProfessor, profId, false, false, null, null);


            Util.addClasses(cbEditClass, classId, false, false, null, null);
            Util.addSemesters(cbSemester, semesterId, false);
            Util.addSemesters(cbEditClassSemesterFilter, semesterFilterId, true);
        }
示例#4
0
        public AddClassForm()
        {
            InitializeComponent();

            //dynamically add professors to combo box
            Util.addProfessors(cbClassProfessor, profId, false, false, null, null);

            //dynamically add possible grades
            Util.addLetterGrades(cbFinalLetterGrade);

            //dynamically add possible semesters
            Util.addSemesters(cbSemester, semesterId, false);
        }
示例#5
0
        //method for when the professor filter (selecting a class) drop down list is changed
        private void cbEditProfessorFilter_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cbEditProfessorFilter.SelectedIndex > 0)
            {
                currentClassId = classId[cbEditProfessorFilter.SelectedIndex - 1];
                Util.addProfessors(cbEditProfessor, profId, true, false, currentClassId.ToString(), null);
            }
            else
            {
                Util.addProfessors(cbEditProfessor, profId, true, false, null, null);
            }

            //update buttons (will disable buttons and links since drop down list of professors will
            //  be repopulated) as well as clear message status
            lblSaveStatus.Text = "";
            updateProfessorButtons();
        }