Exemple #1
0
 private void init_subAttandanceColumn(Model.Course course)
 {
     foreach (SubAttandance subAtt in course.allSubAttandances())
     {
         mainGrid.Columns.Add(init_createColumn(subAtt));
     }
 }
        /* ----- configuration ----- */
        private void createNewSubAttandance()
        {
            Model.Course course = hall.courseRef;
            newSubAtt = new SubAttandance(DateTime.Now);
            course.addSubAttandance(newSubAtt);
            DataGridViewColumn column = hall.init_createColumn(newSubAtt);

            hall.mainGrid.Columns.Insert((int)mainGridCellIndex.subAttStartIndex + course.allSubAttandances().Count - 1, column);
        }
Exemple #3
0
 private void init_rows(Model.Course course, StuList stuList)
 {
     foreach (Student stu in stuList.allStudents())
     {
         int             newRowIndex = mainGrid.Rows.Add();
         DataGridViewRow newRow      = mainGrid.Rows[newRowIndex];
         init_rows_baseAttributeInit(newRow, stu);
         init_rows_attandanceInit(newRow, course.allSubAttandances(), stu);
         init_rows_extrasInit(newRow, course.allExtras(), stu);
     }
 }
Exemple #4
0
        public void maingrid_addRow(Student stu)
        {
            Model.Course    course   = courseRef;
            int             rowIndex = mainGrid.Rows.Add();
            DataGridViewRow row      = mainGrid.Rows[rowIndex];

            stopCellValueChanged();
            init_rows_baseAttributeInit(row, stu);
            init_rows_attandanceInit(row, course.allSubAttandances(), stu);
            init_rows_extrasInit(row, course.allExtras(), stu);
            startCellValueChanged();
        }
Exemple #5
0
        private ArrayList getfullAttandanceStudents()
        {
            ArrayList students = new ArrayList();

            foreach (Student stu in stuList.allStudents())
            {
                if (stu.isFullAttandance && stu.allStuAttandances().Count == course.allSubAttandances().Count)
                {
                    students.Add(stu);
                }
            }
            return(students);
        }