MS_02.06.2016

This commit is contained in:
SchreiberM
2016-06-02 12:18:52 +02:00
parent a3bbbfa570
commit 9371880314
11 changed files with 2247 additions and 413 deletions

View File

@@ -232,6 +232,33 @@ Public Class ClassImport_Windream
If IsDBNull(CONTROLVALUE) Then
value = ""
Else
Dim sql1 = "SELECT * FROM TBPMO_WD_NAMECONVENTION_FORMAT WHERE ID = (SELECT TOP 1 GUID FROM TBPMO_WD_FORMVIEW_DOKTYPES WHERE DOCTYPE_ID = " & DocTypeID & " AND FORMVIEW_ID = " & CURRENT_FORMVIEW_ID & ")"
Dim DT_FORMAT As DataTable = ClassDatabase.Return_Datatable(sql1)
If Not IsNothing(DT_FORMAT) Then
If DT_FORMAT.Rows.Count > 0 Then
Dim result
Try
result = (From FormatRow In DT_FORMAT.AsEnumerable
Select FormatRow Where FormatRow.Item("PATTERN") = APattern).Single()
Catch ex As Exception
End Try
If Not IsNothing(result) Then
Dim _rule = result.Item("FORMAT_RULE")
If Not IsNothing(_rule) Then
If IsDate(CONTROLVALUE) Then
Dim _date = CDate(CONTROLVALUE)
_rule = _rule.ToString.Replace("Y", "y")
_rule = _rule.ToString.Replace("D", "d")
Dim convertedvalue = _date.ToString(_rule)
CONTROLVALUE = convertedvalue
End If
End If
End If
End If
End If
value = CONTROLVALUE
End If
End If