MS .Net Update

This commit is contained in:
2023-10-11 13:49:10 +02:00
parent 9a33f97c58
commit b9dbd3c4c3
31 changed files with 792 additions and 724 deletions

View File

@@ -4,6 +4,7 @@ Imports System.Text
Imports System.Text.RegularExpressions
Imports DigitalData.Modules.Logging
Imports Newtonsoft.Json
Imports Newtonsoft.Json.Linq
Imports WINDREAMLib
Public Class clsDateiverarbeitung
@@ -211,7 +212,7 @@ Public Class clsDateiverarbeitung
Try
Const WMObjectEditModeLifeCycleEdit = "&H00000080"
Const WMLifeCycleTypeArchivePeriod = 2
Logger.Debug($"ArchiveDate for WMFile shall be changed: pFromDate [{pFromDate}] pDateOperator [{pDateOperator}]...")
pWMObject.LockFor(WMObjectEditModeLifeCycleEdit)
Dim oLC = pWMObject.aWMLifeCycle()
@@ -236,6 +237,7 @@ Public Class clsDateiverarbeitung
Return False
End Select
Dim archBis = DateAdd(oDateIntervall, pIntervall, oDateFrom)
Logger.Debug($"...archBis is [{archBis.ToShortDateString}]!")
'Dim pArchiveDate As String = archBis.ToString("yyyy-MM-dd")
oLC.SetPeriodEndDate(WMLifeCycleTypeArchivePeriod, archBis)
@@ -699,6 +701,18 @@ Public Class clsDateiverarbeitung
wdIndexwert = wdIndexwert.ToString.TrimEnd
wdIndexwert = wdIndexwert.ToString.TrimStart
Logger.Debug("indexvalue read is: '" & wdIndexwert & "'")
Try
Dim oConvertDT As DateTime
If DateTime.TryParse(wdIndexwert, oConvertDT) Then
Logger.Debug("indexvalue is datetime - converting to date")
Dim myDate As Date = wdIndexwert
wdIndexwert = Format(myDate, "yyyy-MM-dd")
End If
Catch ex As Exception
Logger.Warn("clsDateiverarbeitung: Error checking datetime: " & ex.Message)
End Try
_STRING = _STRING.Replace(reg_element.Value, wdIndexwert.ToString)
Logger.Debug("REGEX_String (" & i & ") " & _STRING)
i += 1