Ejemplo n.º 1
0
        public void CreateList(Course c)
        {
            if (subject_layout.Controls.Count > 0)
            {
                subject_layout.Controls.Clear();
            }
            AspireDB       db    = new AspireDB();
            List <Subject> slist = db.Subjects.Where(Subject => Subject.CourseID == c.CourseID).ToList <Subject>();

            foreach (Subject s in slist)
            {
                SubjectsView cv = new SubjectsView(s);
                subject_layout.Controls.Add(cv);
            }
            db.Database.Connection.Close();
        }
Ejemplo n.º 2
0
        public void CreateList()
        {
            if (subject_layout.Controls.Count > 0)
            {
                subject_layout.Controls.Clear();
            }
            AspireDB       db    = new AspireDB();
            List <Subject> slist = db.Subjects.ToList();

            foreach (Subject c in slist)
            {
                SubjectsView cv = new SubjectsView(c);
                subject_layout.Controls.Add(cv);
            }
            db.Database.Connection.Close();
        }