private void TypesOfData(int data, int noOfEntries) { for (int i = 0; i < noOfEntries; i++) { if (data == 1) { List <Trainer> trainers = new List <Trainer>(); TrainersList trainerList = new TrainersList(); trainers.Add(trainerList.GetTrainerDetails()); trainerList.PrintTrainersList(trainers); } else if (data == 2) { List <Students> students = new List <Students>(); StudentsList studentsList = new StudentsList(); students.Add(studentsList.GetStudentDetails()); studentsList.PrintStudentList(students); } else if (data == 3) { List <Courses> courses = new List <Courses>(); CoursesList courseList = new CoursesList(); courses.Add(courseList.GetCourseDetails()); courseList.PrintCoursesList(courses); } else { List <Assignments> Assignment = new List <Assignments>(); AssignmentList assignmentList = new AssignmentList(); Assignment.Add(assignmentList.GetAssignmentDetails()); assignmentList.PrintAssignmentList(Assignment); } } }
public void SetTrainer(Trainer trainer) { TrainersList.Add(trainer); }