Change Doc Type

This commit is contained in:
Jonathan Jenne
2023-09-27 15:01:04 +02:00
parent 17670724b6
commit ebe79ddb92
9 changed files with 481 additions and 24 deletions

View File

@@ -0,0 +1,29 @@
Imports DD_LIB_Standards
Imports DigitalData.Modules.Base
Imports DigitalData.Modules.Logging
Public Class ClassDoctypeChange
Inherits BaseClass
Public Sub New(pLogConfig As LogConfig)
MyBase.New(pLogConfig)
End Sub
Public Function ChangeDocType(pFilePaths As List(Of String), pNewDocTypeName As String, pObjectType As String) As Boolean
Try
For Each oPath As String In pFilePaths
Dim oResult As Boolean = clsWD_SET.IndexFile(oPath, "String 37", pNewDocTypeName, pObjectType)
If oResult = True Then
Logger.Debug("Successfully set doctype of file [{0}] to [{1}]", oPath, pNewDocTypeName)
Else
Logger.Warn("Could not set doctype of file [{0}]!", pNewDocTypeName)
End If
Next
Return True
Catch ex As Exception
Logger.Error(ex)
End Try
End Function
End Class