update
This commit is contained in:
@@ -172,6 +172,7 @@ Public Class frmAddSendungsvermerkShort
|
||||
If dt Is Nothing OrElse dt.Rows.Count = 0 Then
|
||||
Return
|
||||
End If
|
||||
EnsureAnhangsartenOptionsLoaded()
|
||||
|
||||
Dim docsLeft = Label1.Left + 3
|
||||
Dim docsTop = Label1.Bottom + 6
|
||||
@@ -210,9 +211,6 @@ Public Class frmAddSendungsvermerkShort
|
||||
cb.Tag = id
|
||||
cb.Margin = New Padding(0, 0, 8, 2)
|
||||
AddHandler cb.CheckedChanged, AddressOf DynamicAnforderungCheckboxChanged
|
||||
If Not _documentCustomNameByCodeId.ContainsKey(id) Then
|
||||
_documentCustomNameByCodeId(id) = bezeichnung
|
||||
End If
|
||||
|
||||
If bezeichnung.ToLowerInvariant().Contains("nicht leserlich") Then
|
||||
Continue For
|
||||
@@ -226,6 +224,9 @@ Public Class frmAddSendungsvermerkShort
|
||||
Catch
|
||||
End Try
|
||||
_anhangsartIdByCheckbox(cb) = anhangsartId
|
||||
If Not _documentCustomNameByCodeId.ContainsKey(id) Then
|
||||
_documentCustomNameByCodeId(id) = GetAnhangsartDisplayTextById(anhangsartId)
|
||||
End If
|
||||
|
||||
Dim bereich As Integer = BereichAngefordert
|
||||
Try
|
||||
@@ -509,6 +510,17 @@ Public Class frmAddSendungsvermerkShort
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Function GetAnhangsartDisplayTextById(anhangsartId As Integer) As String
|
||||
If anhangsartId <= 0 Then Return ""
|
||||
EnsureAnhangsartenOptionsLoaded()
|
||||
For Each optionItem In _anhangsartenOptions
|
||||
If optionItem.Id = anhangsartId Then
|
||||
Return If(optionItem.Text, "").Trim()
|
||||
End If
|
||||
Next
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
Private Function TryGetCheckboxCodeId(cb As CheckBox, ByRef codeId As Integer) As Boolean
|
||||
codeId = 0
|
||||
If cb Is Nothing OrElse cb.Tag Is Nothing Then Return False
|
||||
@@ -525,17 +537,17 @@ Public Class frmAddSendungsvermerkShort
|
||||
End If
|
||||
|
||||
_selectedDocumentCodeId = codeId
|
||||
Dim anhangsartId = GetEffectiveAnhangsartId(cb)
|
||||
|
||||
Dim customName = ""
|
||||
If _documentCustomNameByCodeId.ContainsKey(codeId) Then
|
||||
customName = If(_documentCustomNameByCodeId(codeId), "").Trim()
|
||||
Else
|
||||
customName = If(cb.Text, "").Trim()
|
||||
customName = GetAnhangsartDisplayTextById(anhangsartId)
|
||||
_documentCustomNameByCodeId(codeId) = customName
|
||||
End If
|
||||
|
||||
Dim baseText = GetDocumentBaseTextByCodeId(codeId)
|
||||
Dim anhangsartId = GetEffectiveAnhangsartId(cb)
|
||||
|
||||
_isLoadingDocumentEditor = True
|
||||
txtDocumentEditorName.Text = customName
|
||||
|
||||
Reference in New Issue
Block a user