Beispiel #1
0
    def create_module(self, name: str, edv_number: str):
        """Ein Modul anlegen"""

        module = Module()
        module.set_name(name)
        module.set_edv_number(edv_number)
        module.set_id(1)

        with ModuleMapper() as mapper:
            return mapper.insert(module)
Beispiel #2
0
 def remove_project_from_module(self, project, module):
     """Ein Projekt von einem Modul entfernen"""
     with ModuleMapper() as mapper:
         mapper.remove_project_from_module(project, module)
Beispiel #3
0
 def add_project_to_module(self, project, module):
     """Ein Projekt einem Modul hinzufügen"""
     with ModuleMapper() as mapper:
         mapper.add_project_to_module(project, module)
Beispiel #4
0
 def get_module_by_edv_number(self, edv_number):
     """Ein Modul anhand seiner EDV-Nummer ausgeben"""
     with ModuleMapper() as mapper:
         return mapper.find_by_number(edv_number)
Beispiel #5
0
 def get_module_by_name(self, name):
     """Ein Modul anhand seines Namen auslesen"""
     with ModuleMapper() as mapper:
         return mapper.find_by_name(name)
Beispiel #6
0
 def get_all_modules(self):
     """Alle Module ausgeben"""
     with ModuleMapper() as mapper:
         return mapper.find_all()
Beispiel #7
0
 def get_module_by_id(self, id):
     """Ein Modul anhand seiner ID auslesen"""
     with ModuleMapper() as mapper:
         return mapper.find_by_id(id)
Beispiel #8
0
 def delete_module(self, module):
     """Ein Modul löschen"""
     with ModuleMapper() as mapper:
         mapper.delete(module)
Beispiel #9
0
 def save_module(self, module):
     """Ein Modul speichern"""
     with ModuleMapper() as mapper:
         mapper.update(module)