예제 #1
0
파일: Schedule.cs 프로젝트: ZAYEC77/Susie
        public void GetFormSchedule(Group G)
        {
            if (G == null) return;
            ScheduleView form = new ScheduleView();
            form.Text = G.Title;
            List<Lesson> query = (from l in Lessons
                                  where G.IsMember(l.Groups) && (l.Semester == semester)
                                  select l).ToList<Lesson>();

            form.panel1.Controls.Clear();

            foreach (Lesson l in query)
            {
                VisualLesson c = new VisualLesson();
                form.panel1.Controls.Add(c);
                c.Lesson = l;
                c.Mode = ViewMode.ForGroup;
            }

            form.ShowDialog();
        }
예제 #2
0
파일: Schedule.cs 프로젝트: ZAYEC77/Susie
 public void GetFormSchedule(Classroom C)
 {
     if (C == null) return;
     ScheduleView form = new ScheduleView();
     form.Text = C.Title;
     List<Lesson> query = (from l in C.Lessons
                           where (l.Semester == semester)
                           select l).ToList<Lesson>();
     form.panel1.Controls.Clear();
     foreach (Lesson l in query)
     {
         VisualLesson c = new VisualLesson();
         form.panel1.Controls.Add(c);
         c.Lesson = l;
         c.Mode = ViewMode.ForClassroom;
     }
     form.ShowDialog();
 }