public List <Student> GetAll() { var repository = new StudentDao(); var students = repository.GetAll(); return(students); }
public void InitData() { StudentDao studentDao = new StudentDao(); var studentslist = studentDao.GetAll(); List <StudentViewModel> vieModels = new List <StudentViewModel>(); foreach (Student student in studentslist) { StudentViewModel studentViewModel = new StudentViewModel(student); vieModels.Add(studentViewModel); //vieModels.Add(new StudentViewModel(student)); } students = new BindingList <StudentViewModel>(vieModels); this.grid_students.DataSource = students; }
public Report() { StudentDao studentDao = new StudentDao(); students = studentDao.GetAll(); StudentGradeDao studentGradeDao = new StudentGradeDao(); grades = studentGradeDao.GetAll(); SubjectDao subjectDao = new SubjectDao(); subjects = subjectDao.GetAll(); ExaminationDao examinationDao = new ExaminationDao(); examinations = examinationDao.GetAll(); SessionDao sessionDao = new SessionDao(); sessions = sessionDao.GetAll(); GroupDao groupDao = new GroupDao(); groups = groupDao.GetAll(); }