Exemple #1
0
        private void BuildList()
        {
            for (int curr = 1; curr <= Globals.MaxSem; curr++)
            {
                CurriculumsList.Add(new Curriculum(curr));
            }

            foreach (Curriculum curr in CurriculumsList)
            {
                foreach (Course crs in curr.Courses)
                {
                    foreach (Event ev in crs.LectEventsList)
                    {
                        int num = SqlWorker.getRoomEq(ev.Room);
                        if (num == 0)
                        {
                            continue;
                        }
                        SemEqCount[curr.Semester - 1] += num;
                        WeekEqCount[ev.Day - 1]       += num;
                        ev.Equpment = num;
                        this.ev_list.Items.Add(ev);
                    }

                    foreach (Event ev in crs.PractEventsList)
                    {
                        int num = SqlWorker.getRoomEq(ev.Room);
                        if (num == 0)
                        {
                            continue;
                        }
                        SemEqCount[curr.Semester] += num;
                        WeekEqCount[ev.Day]       += num;
                        ev.Equpment = num;
                        this.ev_list.Items.Add(ev);
                    }

                    foreach (Event ev in crs.LabsEventsList)
                    {
                        int num = SqlWorker.getRoomEq(ev.Room);
                        if (num == 0)
                        {
                            continue;
                        }
                        SemEqCount[curr.Semester] += num;
                        WeekEqCount[ev.Day]       += num;
                        ev.Equpment = num;
                        this.ev_list.Items.Add(ev);
                    }
                }
            }


            setSemTilesText();
            setWeekTilesText();
        }