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