Ejemplo n.º 1
0
 def update(self, id, major):
     # id, major, valid check
     if id == "" or major == "":  # valid check
         message_display("아이디와 전공 데이터 입력이 필요합니다.")
     service = StudentService()
     message = service.update(id, major)
     message_display(message)
Ejemplo n.º 2
0
    def __init__(self, view: IResultView) -> None:
        ObjectPresenter.__init__(self, view, ResultService)
        self.students = {i.full_name(): i for i in StudentService().get_all()}
        self.view.set_student_items(self.students.keys())

        self.topics = {i.name: i for i in TopicService().get_all()}
        self.view.set_topic_items(self.topics.keys())
Ejemplo n.º 3
0
 def __init__(self, view: IKlasView) -> None:
     ObjectPresenter.__init__(self, view, KlasService)
     self.directions = {i.name: i for i in DirectionService().get_all()}
     self.view.set_direction_items(self.directions.keys())
     self.syllabuses = {str(i): i for i in SyllabusService().get_all()}
     self.view.set_syllabus_items(self.syllabuses.keys())
     self.students = {i.name: i for i in StudentService().get_all()}
     self.view.set_student_items(self.students.keys())
Ejemplo n.º 4
0
print(syllabus)

studying = StudyingDTO(beginning_time=datetime(2020, 9, 4, 9, 40, 0))

studying_service = StudyingService()

print('\nИзучение:\n')

studying_service.create(studying)
print(studying)

student1 = StudentDTO("Авав", "Авовов", "Арович", date=datetime(2000, 1, 12))
student2 = StudentDTO("Гав", "Вов", "Ович", date=datetime(2000, 4, 12))
student3 = StudentDTO("Мав", "Авв", "Жим", date=datetime(2000, 5, 12))

student_service = StudentService()

student_service.create(student1)
student_service.create(student2)
student_service.create(student3)

print('\nУченики:\n')

all_students = student_service.get_all()
for student in all_students:
    print(student)

klass = KlasDTO(date=datetime(2013, 9, 1), letter="a", direction=direction, syllabus=syllabus, studying=studying, students=all_students)

klas_service = KlasService()
Ejemplo n.º 5
0
 def register(self, student):
     # 만약 id가 email 형식인 경우 email 맞는지 student.id.valid 체크
     service = StudentService()
     message = service.register(student)  # 비즈니스 메서드 호출
     message_display(message)  # View Select
Ejemplo n.º 6
0
 def file_write(self):
     service = StudentService()
     service.file_write()
Ejemplo n.º 7
0
 def file_read(self):
     service = StudentService()
     service.file_read()
Ejemplo n.º 8
0
 def remove(self, id):
     if id == "":
         message_display("아이디 입력이 필요합니다.")
     service = StudentService()
     message = service.remove(id)
     message_display(message)
Ejemplo n.º 9
0
 def getAllStudents(self):
     service = StudentService()
     students = service.getAllStudents()  # 비즈니스 메서드 호출
     list_display(students)  # 데이터 저장해서 view select
Ejemplo n.º 10
0
 def register(self, student):
     # 만약 id가 email형식인 경우 email 형식 맞는지 student.id valid 체크
     service = StudentService()
     bm = service.register(student)  # 비즈니스 메서드 호출
     message_display(bm)
Ejemplo n.º 11
0
 def register(self, student):
     # 만약 id가 email형식인 경우 email형식에 맞게 들어왔는지 student.id vaild 체크
     service = StudentService()
     message = service.register(student) # 비즈니스 메서드 호출
     message_display(message)  # view select