This commit is contained in:
Jonathan Jenne
2021-11-19 13:53:38 +01:00
parent 673a507d04
commit ee23cdd7e8
23 changed files with 291 additions and 97 deletions

View File

@@ -55,6 +55,11 @@ Public Class frmMain
SchemaLoader = New SchemaLoader(LogConfig, Database)
Await SchemaLoader.LoadTemplates()
Await SchemaLoader.LoadTemplateConfiguration()
Await SchemaLoader.LoadMappingConfiguration()
' Save Schema data in 'My' Namespace
My.MappingConfiguration = SchemaLoader.MappingConfiguration
My.TemplateConfiguration = SchemaLoader.TemplateConfiguration
Dim oBindingSource = New BindingList(Of Schema)
For Each oSchema As Schema In SchemaLoader.SchemaList
@@ -70,7 +75,7 @@ Public Class frmMain
Private Sub btnOpenImportExportForm_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnOpenImportExportForm.ItemClick
Try
Dim oSchema = GridViewTemplates.GetRow(GridViewTemplates.FocusedRowHandle)
Dim oSchema As Schema = GridViewTemplates.GetRow(GridViewTemplates.FocusedRowHandle)
If oSchema Is Nothing Then
MsgBox("Keine Vorlage ausgewählt! Bitte wählen Sie eine Vorlage aus!", MsgBoxStyle.Exclamation, Text)
@@ -80,8 +85,12 @@ Public Class frmMain
oSchema = SchemaLoader.UpdateSchemaFromFile(oSchema, ConfigManager.Config.SchemaDirectory)
oSchema = SchemaLoader.UpdateSchemaFromDatabase(oSchema, SchemaLoader.TemplateConfiguration)
Dim oForm As New frmImportMain(LogConfig, ConfigManager, oSchema)
oForm.ShowDialog()
If oSchema.IsImport Then
Dim oForm As New frmImportMain(LogConfig, ConfigManager, oSchema)
oForm.ShowDialog()
Else
MsgBox("Export-Vorlagen werden noch nicht unterstützt!", MsgBoxStyle.Exclamation, Text)
End If
Catch ex As Exception
FormHelper.ShowError(ex, My.Resources.frmMainExtra.Laden_der_Vorlage)