Compare commits

...

3 Commits

Author SHA1 Message Date
Jonathan Jenne
7c0ccb7184 Version 1.3.9.6 2022-10-10 11:45:48 +02:00
Jonathan Jenne
2da202a2a7 Improve logging 2022-10-10 11:45:25 +02:00
Jonathan Jenne
16ace2c242 Show last modified date for templates 2022-10-10 11:45:08 +02:00
5 changed files with 42 additions and 5 deletions

View File

@ -22,6 +22,11 @@ Namespace Templates
Public Property OutputDirectory As String Public Property OutputDirectory As String
Public Property ArchiveDirectory As String Public Property ArchiveDirectory As String
''' <summary>
''' Last modified date of the template file
''' </summary>
Public Property LastModified As Date
Public ReadOnly Property DocType As DocumentType Public ReadOnly Property DocType As DocumentType
Get Get
Dim oDocType As String = GetParameter("DOCTYPE") Dim oDocType As String = GetParameter("DOCTYPE")

View File

@ -18,7 +18,7 @@ Namespace Templates
Public Property FilterConfiguration As New FilterConfig Public Property FilterConfiguration As New FilterConfig
Private Const SQL_TBMT_FILTERS = "SELECT * FROM [DD_ECM].[dbo].[VWMT_FILTERS]" Private Const SQL_TBMT_FILTERS = "SELECT * FROM [DD_ECM].[dbo].[VWMT_FILTERS]"
Private Const SQL_VWMT_ITEMS = "SELECT * FROM [DD_ECM].[dbo].[VWMT_ITEMS]" Private Const SQL_VWMT_ITEMS = "SELECT * FROM [DD_ECM].[dbo].[VWMT_ITEMS] ORDER BY TEMPLATE_NAME, TABLE_NAME"
Private Const SQL_VWMT_MAPPING = "SELECT * FROM [DD_ECM].[dbo].[VWMT_MAPPING]" Private Const SQL_VWMT_MAPPING = "SELECT * FROM [DD_ECM].[dbo].[VWMT_MAPPING]"
Private Const SQL_TBMT_MANDATORS = "SELECT * FROM [DD_ECM].[dbo].[TBMT_MANDATORS] ORDER BY ORDER_KEY" Private Const SQL_TBMT_MANDATORS = "SELECT * FROM [DD_ECM].[dbo].[TBMT_MANDATORS] ORDER BY ORDER_KEY"
Private Const SQL_TBMT_CONFIG = "SELECT * FROM [DD_ECM].[dbo].[TBMT_CONFIG]" Private Const SQL_TBMT_CONFIG = "SELECT * FROM [DD_ECM].[dbo].[TBMT_CONFIG]"
@ -73,6 +73,8 @@ Namespace Templates
.Parameter2 = oRow.ItemEx("PARAMETER_2", String.Empty) .Parameter2 = oRow.ItemEx("PARAMETER_2", String.Empty)
} }
Logger.Debug("Loading Template [{0}]", oTemplate.Name)
oTemplates.Add(oTemplate) oTemplates.Add(oTemplate)
Next Next
@ -207,6 +209,8 @@ Namespace Templates
} }
} }
Logger.Debug("Creating Template Item for Table [{0}]: [{1}]", oColumn.Table, oColumn.Name)
oItems.Add(oColumn) oItems.Add(oColumn)
Next Next
@ -267,6 +271,7 @@ Namespace Templates
Public Function UpdateTemplateTablesFromDatabase(pTemplate As Template, pTemplateConfig As TemplateConfig) As Template Public Function UpdateTemplateTablesFromDatabase(pTemplate As Template, pTemplateConfig As TemplateConfig) As Template
If pTemplateConfig Is Nothing Then If pTemplateConfig Is Nothing Then
Logger.Warn("Template config is empty. Skipping.")
Return pTemplate Return pTemplate
End If End If
@ -300,7 +305,7 @@ Namespace Templates
Dim oTable = pTemplate.Tables.Where(Function(table) table.Name = oItem.Table).FirstOrDefault() Dim oTable = pTemplate.Tables.Where(Function(table) table.Name = oItem.Table).FirstOrDefault()
If oTable Is Nothing Then If oTable Is Nothing Then
Logger.Warn("Table [{0}] for item [{1}] does exist in this Template!", oItem.Table, oItem.Name) Logger.Warn("Table [{0}] for item [{1}] does not exist in this Template!", oItem.Table, oItem.Name)
Continue For Continue For
End If End If

View File

@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyCompany("Digital Data")> <Assembly: AssemblyCompany("Digital Data")>
<Assembly: AssemblyProduct("WebService Multitool")> <Assembly: AssemblyProduct("WebService Multitool")>
<Assembly: AssemblyCopyright("Copyright © 2022")> <Assembly: AssemblyCopyright("Copyright © 2022")>
<Assembly: AssemblyTrademark("1.3.9.5")> <Assembly: AssemblyTrademark("1.3.9.6")>
<Assembly: ComVisible(False)> <Assembly: ComVisible(False)>
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' indem Sie "*" wie unten gezeigt eingeben: ' indem Sie "*" wie unten gezeigt eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.3.9.5")> <Assembly: AssemblyVersion("1.3.9.6")>
<Assembly: AssemblyFileVersion("1.0.0.0")> <Assembly: AssemblyFileVersion("1.0.0.0")>

View File

@ -45,6 +45,7 @@ Partial Class frmMain
Me.colName = New DevExpress.XtraGrid.Columns.GridColumn() Me.colName = New DevExpress.XtraGrid.Columns.GridColumn()
Me.colDescription = New DevExpress.XtraGrid.Columns.GridColumn() Me.colDescription = New DevExpress.XtraGrid.Columns.GridColumn()
Me.colFileName = New DevExpress.XtraGrid.Columns.GridColumn() Me.colFileName = New DevExpress.XtraGrid.Columns.GridColumn()
Me.colChangedWhen = New DevExpress.XtraGrid.Columns.GridColumn()
Me.SplashScreenManager = New DevExpress.XtraSplashScreen.SplashScreenManager(Me, GetType(Global.MultiTool.Form.frmWaitForm), True, True) Me.SplashScreenManager = New DevExpress.XtraSplashScreen.SplashScreenManager(Me, GetType(Global.MultiTool.Form.frmWaitForm), True, True)
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.SvgImageCollection1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.SvgImageCollection1, System.ComponentModel.ISupportInitialize).BeginInit()
@ -204,7 +205,7 @@ Partial Class frmMain
' '
'GridViewTemplates 'GridViewTemplates
' '
Me.GridViewTemplates.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colName, Me.colDescription, Me.colFileName}) Me.GridViewTemplates.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colName, Me.colDescription, Me.colFileName, Me.colChangedWhen})
Me.GridViewTemplates.GridControl = Me.GridControlTemplates Me.GridViewTemplates.GridControl = Me.GridControlTemplates
Me.GridViewTemplates.Name = "GridViewTemplates" Me.GridViewTemplates.Name = "GridViewTemplates"
' '
@ -232,6 +233,14 @@ Partial Class frmMain
Me.colFileName.Visible = True Me.colFileName.Visible = True
Me.colFileName.VisibleIndex = 2 Me.colFileName.VisibleIndex = 2
' '
'colChangedWhen
'
Me.colChangedWhen.Caption = "Letzte Änderung"
Me.colChangedWhen.FieldName = "LastModified"
Me.colChangedWhen.Name = "colChangedWhen"
Me.colChangedWhen.Visible = True
Me.colChangedWhen.VisibleIndex = 3
'
'SplashScreenManager 'SplashScreenManager
' '
Me.SplashScreenManager.ClosingDelay = 500 Me.SplashScreenManager.ClosingDelay = 500
@ -283,4 +292,5 @@ Partial Class frmMain
Friend WithEvents btnOpenSchemaDirectory As DevExpress.XtraBars.BarButtonItem Friend WithEvents btnOpenSchemaDirectory As DevExpress.XtraBars.BarButtonItem
Friend WithEvents RibbonPageGroup4 As DevExpress.XtraBars.Ribbon.RibbonPageGroup Friend WithEvents RibbonPageGroup4 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents btnReloadWinlineData As DevExpress.XtraBars.BarButtonItem Friend WithEvents btnReloadWinlineData As DevExpress.XtraBars.BarButtonItem
Friend WithEvents colChangedWhen As DevExpress.XtraGrid.Columns.GridColumn
End Class End Class

View File

@ -124,6 +124,19 @@ Public Class frmMain
Dim oBindingSource = New BindingList(Of Template) Dim oBindingSource = New BindingList(Of Template)
For Each oTemplate As Template In TemplateLoader.TemplateList For Each oTemplate As Template In TemplateLoader.TemplateList
' Check template files and update modified date
Try
Dim oFilePath = IO.Path.Combine(My.GeneralConfiguration.TemplateDirectory, oTemplate.FileName)
Dim oFileInfo = New FileInfo(oFilePath)
If oFileInfo.Exists Then
oTemplate.LastModified = oFileInfo.LastWriteTime
End If
Catch ex As Exception
Logger.Error(ex)
End Try
oBindingSource.Add(oTemplate) oBindingSource.Add(oTemplate)
Next Next
Return oBindingSource Return oBindingSource
@ -287,4 +300,8 @@ Public Class frmMain
RibbonPageGroupStart.Enabled = True RibbonPageGroupStart.Enabled = True
SplashScreenManager.CloseWaitForm() SplashScreenManager.CloseWaitForm()
End Sub End Sub
Private Sub RibbonControl1_Click(sender As Object, e As EventArgs) Handles RibbonControl1.Click
End Sub
End Class End Class