Change Doc Type
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user