public void LoadStudents() { model.Clear(); ApplicationLayer.IStudent student = new ApplicationLayer.Student(); foreach (var studentDto in student.GetStudents()) { model.Add(new Models.StudentList { Class = studentDto.Class, Name = studentDto.Name }); } view.StudentDataSource = model; }
public StudentVerificationPresenter(Views.IStudentVerificationView view) { this.view = view; ApplicationLayer.IStudent student = new ApplicationLayer.Student(); model.Clear(); foreach (var result in student.CheckAllStudents()) { model.Add(new Models.StudentVerification { Name = result.Name, Result = result.Approved ? "Approved" : "Failed", Class = result.Class }); } view.DataSource = model; }