Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
 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();
 }