Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 6
0
 def get_all_modules(self):
     """Alle Module ausgeben"""
     with ModuleMapper() as mapper:
         return mapper.find_all()
Exemplo n.º 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)
Exemplo n.º 8
0
 def delete_module(self, module):
     """Ein Modul löschen"""
     with ModuleMapper() as mapper:
         mapper.delete(module)
Exemplo n.º 9
0
 def save_module(self, module):
     """Ein Modul speichern"""
     with ModuleMapper() as mapper:
         mapper.update(module)