public EditEventForm()
        {
            InitializeComponent();

            //add list of all classes (both past and current) to combo box
            Util.addClasses(cbClassFilter, allClassId, false, true, null, null);

            //add only current classes for when editing a graded assignment
            Util.addClasses(cbEventClass, currentClassId, true, false, null, null);

            //dynamically add list of possible events to edit
            SQLiteDataReader events = Database.executeQuery("SELECT EventID, Title FROM Event ORDER BY Title");

            while (events.Read() == true)
            {
                eventId.Add(events.GetInt32(0));
                cbEvent.Items.Add(events.GetString(1));
            }
            events.Close();

            //set start and end date pickers to current date
            dtFilterDate.Value     = DateTime.Now;
            dtEventStartDate.Value = DateTime.Now;
            dtEventEndDate.Value   = DateTime.Now;
        }
Exemple #2
0
        //method to update the list of the classes in the drop down list using the choosen professor
        private void cbEditClassFilter_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);

            //update buttons and links (will most likely disable)
            updateClassButtons();
        }
Exemple #3
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);
        }
Exemple #4
0
        public AddEventForm()
        {
            InitializeComponent();

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

            //set start and end date pickers to current date
            dtEventStartDate.Value = DateTime.Now;
            dtEventEndDate.Value   = DateTime.Now;
        }
Exemple #5
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);
        }
Exemple #6
0
 private void FinalsCalculatorForm_Load(object sender, EventArgs e)
 {
     //add all current classes
     Util.addClasses(cbClass, classId, true, false, null, null);
 }