support custom windows for article window

This commit is contained in:
Jonathan Jenne 2021-03-18 14:00:54 +01:00
parent a020fbc480
commit a143aaf09e
2 changed files with 11 additions and 7 deletions

View File

@ -111,11 +111,11 @@ Public Class Winline
For Each oRow As DataRow In oDatatable.Rows For Each oRow As DataRow In oDatatable.Rows
Dim oVersion As New ProductVersion() With { Dim oVersion As New ProductVersion() With {
.Guid = oRow.Item("GUID"), .Guid = NotNull(oRow.Item("GUID"), 0),
.VersionId = oRow.Item("VERSION"), .VersionId = NotNull(oRow.Item("VERSION"), 0),
.GroupId = oRow.Item("GROUP_ID"), .GroupId = NotNull(oRow.Item("GROUP_ID"), 0),
.Name = oRow.Item("NAME"), .Name = NotNull(oRow.Item("NAME"), "(Kein Name)"),
.Code = oRow.Item("CODE") .Code = NotNull(oRow.Item("CODE"), "(Kein Code)")
} }
oVersions.Add(oVersion) oVersions.Add(oVersion)

View File

@ -8,6 +8,10 @@
Private ReadOnly Config As Config = My.Application.ConfigManager.Config Private ReadOnly Config As Config = My.Application.ConfigManager.Config
Private ReadOnly Logger As Logger = My.Application.LogConfig.GetLogger Private ReadOnly Logger As Logger = My.Application.LogConfig.GetLogger
Private Const TEMPLATE_NUMBER_NORMAL_ARTICLE = 45
Private Const TEMPLATE_NUMBER_SERIAL_ARTICLE = 46
Private Const CUSTOM_WINDOW_ID = 529
Private Sub frmCreateArticle_Load(sender As Object, e As EventArgs) Handles MyBase.Load Private Sub frmCreateArticle_Load(sender As Object, e As EventArgs) Handles MyBase.Load
txtRunningNumber.Text = RunningNumber txtRunningNumber.Text = RunningNumber
txtArticleNumber.Text = ArticleNumber txtArticleNumber.Text = ArticleNumber
@ -57,7 +61,7 @@
Dim oArticle = StartArticleCreation(True) Dim oArticle = StartArticleCreation(True)
If oArticle IsNot Nothing Then If oArticle IsNot Nothing Then
My.Computer.Clipboard.SetText(oArticle) My.Computer.Clipboard.SetText(oArticle)
My.Application.Winline.RunWinlineMacro(My.Application.ConfigManager.Config.CompletionMacro, oArticle) My.Application.Winline.RunWinlineMacro(My.Application.ConfigManager.Config.CompletionMacro, oArticle, CUSTOM_WINDOW_ID, TEMPLATE_NUMBER_SERIAL_ARTICLE)
End If End If
End If End If
End Sub End Sub
@ -66,7 +70,7 @@
Dim oArticle = StartArticleCreation(False) Dim oArticle = StartArticleCreation(False)
If oArticle IsNot Nothing Then If oArticle IsNot Nothing Then
My.Computer.Clipboard.SetText(oArticle) My.Computer.Clipboard.SetText(oArticle)
My.Application.Winline.RunWinlineMacro(My.Application.ConfigManager.Config.CompletionMacro, oArticle) My.Application.Winline.RunWinlineMacro(My.Application.ConfigManager.Config.CompletionMacro, oArticle, CUSTOM_WINDOW_ID, TEMPLATE_NUMBER_NORMAL_ARTICLE)
End If End If
End Sub End Sub
End Class End Class