First Version with Template Config from Database
This commit is contained in:
@@ -112,12 +112,17 @@ Public Class frmImportMain
|
||||
|
||||
' Load WinLine Data
|
||||
Try
|
||||
SplashScreenManager.SetWaitFormDescription("Lade Basisdaten")
|
||||
Winline.Mandators.Clear()
|
||||
Winline.LoadEconomicYears()
|
||||
Await Winline.LoadMandators()
|
||||
|
||||
' TODO: Comment in when we finally use the database for additional configuration
|
||||
'Winline.LoadTemplateConfiguration()
|
||||
SplashScreenManager.SetWaitFormDescription("Lade Schema Informationen")
|
||||
If Await Winline.LoadTemplateConfiguration() = False Then
|
||||
Logger.Warn("Template Configuration was not loaded!")
|
||||
Winline.TemplateConfiguration = Nothing
|
||||
End If
|
||||
|
||||
For Each oMandator As Mandator In Winline.Mandators
|
||||
SplashScreenManager.SetWaitFormDescription(String.Format(My.Resources.frmImportMainExtra.Lade__0__Konten, oMandator.Id))
|
||||
@@ -136,13 +141,15 @@ Public Class frmImportMain
|
||||
|
||||
DocumentLoader = New DocumentLoader(LogConfig, Winline)
|
||||
SchemaLoader = New SchemaLoader(LogConfig)
|
||||
GridLoader = New GridLoader(LogConfig)
|
||||
GridLoader = New GridLoader(LogConfig, Winline.TemplateConfiguration)
|
||||
|
||||
SplashScreenManager.SetWaitFormDescription(My.Resources.frmImportMainExtra.Lade_Vorlagen)
|
||||
|
||||
SchemaLoader.LoadFiles(ConfigManager.Config.SchemaDirectory)
|
||||
CurrentSchemaName = SchemaLoader.SchemaList.First().FullName
|
||||
|
||||
CurrentSchema = SchemaLoader.GetSchemaFromFile(CurrentSchemaName)
|
||||
CurrentSchema = SchemaLoader.UpdateSchemaWithDatabaseConfiguration(CurrentSchema, Winline.TemplateConfiguration)
|
||||
|
||||
Grids = CreateGridsAndColumns(CurrentSchema)
|
||||
|
||||
@@ -223,8 +230,18 @@ Public Class frmImportMain
|
||||
Dim oDocumentRow = CurrentDocument.Rows.
|
||||
Where(Function(r) r.Id.ToString = oRow.Item(COLUMN_GUID)).
|
||||
SingleOrDefault()
|
||||
Dim oSchemaTable = CurrentSchema.Tables.
|
||||
Where(Function(t) t.Name = oGrid.Name).
|
||||
SingleOrDefault()
|
||||
|
||||
Dim oForm As New frmRowEditor(LogConfig, oColumns, oDocumentRow, CurrentDocument.Mandator, Winline)
|
||||
Dim oForm As New frmRowEditor(
|
||||
LogConfig,
|
||||
oColumns,
|
||||
oDocumentRow,
|
||||
CurrentDocument.Mandator,
|
||||
Winline,
|
||||
oSchemaTable
|
||||
)
|
||||
If oForm.ShowDialog() = DialogResult.OK Then
|
||||
Dim oModifiedRow = oForm.DocumentRow
|
||||
Dim oIndex = CurrentDocument.Rows.IndexOf(oModifiedRow)
|
||||
@@ -479,7 +496,7 @@ Public Class frmImportMain
|
||||
End Sub
|
||||
|
||||
Private Sub btnConfig_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnConfig.ItemClick
|
||||
Dim oForm As New frmConfig With {
|
||||
Dim oForm As New frmConfig(LogConfig) With {
|
||||
.ConfigManager = ConfigManager
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user