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