ms
This commit is contained in:
@@ -6,9 +6,6 @@
|
||||
</sectionGroup>
|
||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="DDWDResultHandler.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<connectionStrings />
|
||||
<startup>
|
||||
@@ -17,10 +14,13 @@
|
||||
<applicationSettings>
|
||||
<DDWDResultHandler.My.MySettings>
|
||||
<setting name="SQLSERVER_CS_RH" serializeAs="String">
|
||||
<value>Data Source=172.24.12.41\tests;Initial Catalog=DD_ECM_RENOLIT;Persist Security Info=True;User ID=sa;Password=dd</value>
|
||||
<value>Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd</value>
|
||||
</setting>
|
||||
<setting name="SQLSERVER_CS_PMRefresh" serializeAs="String">
|
||||
<value />
|
||||
<value>Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd</value>
|
||||
</setting>
|
||||
<setting name="PMREFRESH_INTERVALL" serializeAs="String">
|
||||
<value>2</value>
|
||||
</setting>
|
||||
</DDWDResultHandler.My.MySettings>
|
||||
</applicationSettings>
|
||||
@@ -43,11 +43,4 @@
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<userSettings>
|
||||
<DDWDResultHandler.My.MySettings>
|
||||
<setting name="PMREFRESH_INTERVALL" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
</DDWDResultHandler.My.MySettings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
@@ -96,7 +96,6 @@ Public Class DDWDResultHandler
|
||||
If My.Settings.SQLSERVER_CS_RH <> "" Then
|
||||
Logger.Info("Thread ResultHandler will now be started for initial Run..")
|
||||
threadResultHandler.RunWorkerAsync()
|
||||
Logger.Info("Thread PM Refresh will be started after 2mins for initial Run..")
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -185,7 +184,7 @@ Public Class DDWDResultHandler
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
Logger.Info("Keine aktiven Profile WMResulthandler vorhanden")
|
||||
Logger.Info("Keine aktiven Profile für WMResulthandler vorhanden")
|
||||
notcompleted = True
|
||||
End If
|
||||
'Try
|
||||
@@ -205,7 +204,7 @@ Public Class DDWDResultHandler
|
||||
threadPMRefresh.RunWorkerAsync()
|
||||
End If
|
||||
Else
|
||||
Logger.Warn("clsDatabase konnte nicht initialisiert werden!")
|
||||
Logger.Warn($"clsDatabase konnte nicht initialisiert werden! {My.Settings.SQLSERVER_CS_RH}")
|
||||
notcompleted = True
|
||||
End If
|
||||
Else
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.1")>
|
||||
<Assembly: AssemblyVersion("2.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
|
||||
@@ -15,7 +15,7 @@ Option Explicit On
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0"), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
@@ -56,8 +56,8 @@ Namespace My
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("Data Source=172.24.12.41\tests;Initial Catalog=DD_ECM_RENOLIT;Persist Security In"& _
|
||||
"fo=True;User ID=sa;Password=dd")> _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Secu"& _
|
||||
"rity Info=True;User ID=sa;Password=dd")> _
|
||||
Public ReadOnly Property SQLSERVER_CS_RH() As String
|
||||
Get
|
||||
Return CType(Me("SQLSERVER_CS_RH"),String)
|
||||
@@ -66,23 +66,21 @@ Namespace My
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("")> _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Secu"& _
|
||||
"rity Info=True;User ID=sa;Password=dd")> _
|
||||
Public ReadOnly Property SQLSERVER_CS_PMRefresh() As String
|
||||
Get
|
||||
Return CType(Me("SQLSERVER_CS_PMRefresh"),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("")> _
|
||||
Public Property PMREFRESH_INTERVALL() As String
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("2")> _
|
||||
Public ReadOnly Property PMREFRESH_INTERVALL() As Integer
|
||||
Get
|
||||
Return CType(Me("PMREFRESH_INTERVALL"),String)
|
||||
Return CType(Me("PMREFRESH_INTERVALL"),Integer)
|
||||
End Get
|
||||
Set
|
||||
Me("PMREFRESH_INTERVALL") = value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
@@ -3,10 +3,13 @@
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="SQLSERVER_CS_RH" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">Data Source=172.24.12.41\tests;Initial Catalog=DD_ECM_RENOLIT;Persist Security Info=True;User ID=sa;Password=dd</Value>
|
||||
<Value Profile="(Default)">Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd</Value>
|
||||
</Setting>
|
||||
<Setting Name="SQLSERVER_CS_PMRefresh" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)" />
|
||||
<Value Profile="(Default)">Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd</Value>
|
||||
</Setting>
|
||||
<Setting Name="PMREFRESH_INTERVALL" Type="System.Int32" Scope="Application">
|
||||
<Value Profile="(Default)">2</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -75,6 +75,8 @@ Public Class clsPMRefresh
|
||||
Return True
|
||||
Else
|
||||
Logger.Info($"No run of PMRefresh as hour is not in timespan ({CInt(Now.Hour)} >= {oMinHour} And {CInt(Now.Hour)} < {oMaxHour})")
|
||||
Logger.Info($"Check TBPM_KONFIGURATION Column SERVICE_SCHEDULE")
|
||||
|
||||
End If
|
||||
Else
|
||||
Logger.Info($"No run of PMRefresh as today Is Not configured as RUN")
|
||||
@@ -97,6 +99,68 @@ Public Class clsPMRefresh
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Public Function GetSearchDocumentsDTviaSQL(ByVal pSQLCommand As String) As DataTable
|
||||
Dim dtresult As New DataTable
|
||||
dtresult.Columns.Add("DOC_ID", GetType(Integer))
|
||||
dtresult.Columns.Add("PATH", GetType(String))
|
||||
dtresult.Columns.Add("CREATED", GetType(String))
|
||||
|
||||
Try
|
||||
Dim oSQLRESULT As DataTable = _database.Return_Datatable(pSQLCommand)
|
||||
If IsNothing(oSQLRESULT) Then
|
||||
Return dtresult
|
||||
End If
|
||||
'If returnDT = True Then
|
||||
If oSQLRESULT.Rows.Count > 0 Then
|
||||
|
||||
For Each oDocRow As DataRow In oSQLRESULT.Rows
|
||||
Dim oDOC_ID As Int64
|
||||
Try
|
||||
oDOC_ID = oDocRow.Item("IDB_OBJ_ID")
|
||||
Catch ex As Exception
|
||||
Try
|
||||
oDOC_ID = oDocRow.Item("DocID")
|
||||
Catch ex1 As Exception
|
||||
Logger.Warn("Could not get DocID-Column: " & ex.Message)
|
||||
Return dtresult
|
||||
End Try
|
||||
End Try
|
||||
Dim oCreated
|
||||
Try
|
||||
oCreated = oDocRow.Item("ADDED_WHEN")
|
||||
Catch ex As Exception
|
||||
Try
|
||||
oCreated = oDocRow.Item("AddedWhen")
|
||||
Catch ex1 As Exception
|
||||
Logger.Warn($"(GetSearchDocumentsDTviaSQL)Could not get AddedWhen-Column: [{ex.Message}] - SQL-Command: [{pSQLCommand}]")
|
||||
Return dtresult
|
||||
End Try
|
||||
End Try
|
||||
|
||||
Dim oPath As String
|
||||
Try
|
||||
oPath = oDocRow.Item("DocRelativePath")
|
||||
Catch ex As Exception
|
||||
Try
|
||||
oPath = oDocRow.Item("FULL_FILENAME")
|
||||
Catch ex1 As Exception
|
||||
Logger.Warn($"(GetSearchDocumentsDTviaSQL)Could not get FULL_FILENAME-Column: [{ex.Message}] - SQL-Command: [{pSQLCommand}]")
|
||||
Return dtresult
|
||||
End Try
|
||||
End Try
|
||||
Logger.Debug($"Adding DocInfo {oDOC_ID.ToString}|{oPath}|{oCreated}")
|
||||
dtresult.Rows.Add(oDOC_ID, oPath, oCreated)
|
||||
Next
|
||||
dtresult.AcceptChanges()
|
||||
End If
|
||||
Return dtresult
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Logger.Warn($"Error Getting Docs via SLQ ({pSQLCommand})")
|
||||
Return dtresult
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Refresh_Data()
|
||||
Dim oStep As String
|
||||
Try
|
||||
@@ -134,7 +198,13 @@ Public Class clsPMRefresh
|
||||
'---------------------- Die Dateien auslesen ------------------------
|
||||
Dim oDTWM_Results As DataTable
|
||||
oStep = "4c"
|
||||
oDTWM_Results = _windream.GetSearchDocumentsDT(WD_Search, oConfigIDXName_DocID, oConfigIDXName_Created, True)
|
||||
If WD_Search.Contains("wdf") Or WD_Search.Contains("wdfx") Then
|
||||
oDTWM_Results = _windream.GetSearchDocumentsDT(WD_Search, oConfigIDXName_DocID, oConfigIDXName_Created, True)
|
||||
Else
|
||||
Logger.Debug("Search via SQL")
|
||||
oDTWM_Results = GetSearchDocumentsDTviaSQL(WD_Search)
|
||||
End If
|
||||
|
||||
oStep = "4d"
|
||||
Dim oDocCount As Integer = 0
|
||||
If IsNothing(oDTWM_Results) Then
|
||||
|
||||
Reference in New Issue
Block a user