Пример #1
0
        } // checked

        public void PrintTable(List <Major> majors)
        {
            List <Subject> subjects = subjectHandler.GetSubjects();
            Table          table    = new Table(90);

            table.PrintLine();
            table.PrintRow("Id", "Chuyên nghành", "Bộ môn");
            table.PrintLine();
            foreach (var major in majors)
            {
                Subject subject = subjectHandler.GetSubject(major.SubjectID, subjects);
                table.PrintRow(major.ID, major.Name, subject.Name);
            }
            table.PrintLine();
        } //checked
Пример #2
0
        } //checked

        public void PrintTable(List <Class> classes)
        {
            Console.Clear();
            List <Teacher> teachers = teacherHandler.GetList();
            List <Major>   majors   = majorHandler.GetMajors();
            List <Subject> subjects = subjectHandler.GetSubjects();
            Table          table    = new Table(90);

            table.PrintLine();
            table.PrintRow("Lớp", "Sĩ số", "Bộ môn", "Chuyên ngành", "Giảng viên CN", "Niên khóa");
            table.PrintLine();
            foreach (var c in classes)
            {
                string tcName      = teacherHandler.GetInfo(c.TeacherId, teachers).Name;
                string majorName   = majorHandler.GetMajor(c.MajorID, majors).Name;
                string subjectName = subjectHandler.GetSubject(c.SubjectID, subjects).Name;
                table.PrintRow(c.ID, c.Population.ToString(), subjectName, majorName, tcName, c.StartYear + "-" + c.EndYear);
            }
            table.PrintLine();
        } // checked