MS Json
This commit is contained in:
39
app/ResultHandler_Konfig/MyDataset.Designer.vb
generated
39
app/ResultHandler_Konfig/MyDataset.Designer.vb
generated
@@ -869,6 +869,8 @@ Partial Public Class MyDataset
|
||||
|
||||
Private columnGEAENDERTWANN As Global.System.Data.DataColumn
|
||||
|
||||
Private Shared columnLetzter_Durchlauf_defaultValue As Date = Date.Parse("1900-01-01T00:00:00")
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Sub New()
|
||||
@@ -1147,8 +1149,9 @@ Partial Public Class MyDataset
|
||||
Me.columnDay.AllowDBNull = false
|
||||
Me.columnDay.MaxLength = 100
|
||||
Me.columnRun.AllowDBNull = false
|
||||
Me.columnRun.DefaultValue = CType("",String)
|
||||
Me.columnRun.MaxLength = 100
|
||||
Me.columnLetzter_Durchlauf.AllowDBNull = false
|
||||
Me.columnLetzter_Durchlauf.DefaultValue = CType(TBWMRH_PROFILDataTable.columnLetzter_Durchlauf_defaultValue,Date)
|
||||
Me.columnRunning.AllowDBNull = false
|
||||
Me.columnRunning.DefaultValue = CType(false,Boolean)
|
||||
Me.columnReihenfolge.AllowDBNull = false
|
||||
@@ -2684,7 +2687,11 @@ Partial Public Class MyDataset
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Property Letzter_Durchlauf() As Date
|
||||
Get
|
||||
Return CType(Me(Me.tableTBWMRH_PROFIL.Letzter_DurchlaufColumn),Date)
|
||||
Try
|
||||
Return CType(Me(Me.tableTBWMRH_PROFIL.Letzter_DurchlaufColumn),Date)
|
||||
Catch e As Global.System.InvalidCastException
|
||||
Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Letzter_Durchlauf in Tabelle TBWMRH_PROFIL ist DBNull.", e)
|
||||
End Try
|
||||
End Get
|
||||
Set
|
||||
Me(Me.tableTBWMRH_PROFIL.Letzter_DurchlaufColumn) = value
|
||||
@@ -2785,6 +2792,18 @@ Partial Public Class MyDataset
|
||||
Me(Me.tableTBWMRH_PROFIL.AktivColumn) = Global.System.Convert.DBNull
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Function IsLetzter_DurchlaufNull() As Boolean
|
||||
Return Me.IsNull(Me.tableTBWMRH_PROFIL.Letzter_DurchlaufColumn)
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Sub SetLetzter_DurchlaufNull()
|
||||
Me(Me.tableTBWMRH_PROFIL.Letzter_DurchlaufColumn) = Global.System.Convert.DBNull
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Function IsERSTELLTWERNull() As Boolean
|
||||
@@ -4385,7 +4404,7 @@ Namespace MyDatasetTableAdapters
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
|
||||
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
|
||||
Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
|
||||
Public Overloads Overridable Function Insert(ByVal Profilname As String, ByVal Aktiv As Global.System.Nullable(Of Boolean), ByVal Objekttyp As String, ByVal WindreamSuche As String, ByVal Day As String, ByVal Run As String, ByVal Letzter_Durchlauf As Date, ByVal Running As Boolean, ByVal Reihenfolge As Integer, ByVal ERSTELLTWER As String) As Integer
|
||||
Public Overloads Overridable Function Insert(ByVal Profilname As String, ByVal Aktiv As Global.System.Nullable(Of Boolean), ByVal Objekttyp As String, ByVal WindreamSuche As String, ByVal Day As String, ByVal Run As String, ByVal Letzter_Durchlauf As Global.System.Nullable(Of Date), ByVal Running As Boolean, ByVal Reihenfolge As Integer, ByVal ERSTELLTWER As String) As Integer
|
||||
If (Profilname Is Nothing) Then
|
||||
Throw New Global.System.ArgumentNullException("Profilname")
|
||||
Else
|
||||
@@ -4416,7 +4435,11 @@ Namespace MyDatasetTableAdapters
|
||||
Else
|
||||
Me.Adapter.InsertCommand.Parameters(5).Value = CType(Run,String)
|
||||
End If
|
||||
Me.Adapter.InsertCommand.Parameters(6).Value = CType(Letzter_Durchlauf,Date)
|
||||
If (Letzter_Durchlauf.HasValue = true) Then
|
||||
Me.Adapter.InsertCommand.Parameters(6).Value = CType(Letzter_Durchlauf.Value,Date)
|
||||
Else
|
||||
Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value
|
||||
End If
|
||||
Me.Adapter.InsertCommand.Parameters(7).Value = CType(Running,Boolean)
|
||||
Me.Adapter.InsertCommand.Parameters(8).Value = CType(Reihenfolge,Integer)
|
||||
If (ERSTELLTWER Is Nothing) Then
|
||||
@@ -4443,7 +4466,7 @@ Namespace MyDatasetTableAdapters
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
|
||||
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
|
||||
Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
|
||||
Public Overloads Overridable Function Update(ByVal Profilname As String, ByVal Aktiv As Global.System.Nullable(Of Boolean), ByVal Objekttyp As String, ByVal WindreamSuche As String, ByVal Day As String, ByVal Run As String, ByVal Letzter_Durchlauf As Date, ByVal Running As Boolean, ByVal Reihenfolge As Integer, ByVal GEAENDERTWER As String, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer
|
||||
Public Overloads Overridable Function Update(ByVal Profilname As String, ByVal Aktiv As Global.System.Nullable(Of Boolean), ByVal Objekttyp As String, ByVal WindreamSuche As String, ByVal Day As String, ByVal Run As String, ByVal Letzter_Durchlauf As Global.System.Nullable(Of Date), ByVal Running As Boolean, ByVal Reihenfolge As Integer, ByVal GEAENDERTWER As String, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer
|
||||
If (Profilname Is Nothing) Then
|
||||
Throw New Global.System.ArgumentNullException("Profilname")
|
||||
Else
|
||||
@@ -4474,7 +4497,11 @@ Namespace MyDatasetTableAdapters
|
||||
Else
|
||||
Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Run,String)
|
||||
End If
|
||||
Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Letzter_Durchlauf,Date)
|
||||
If (Letzter_Durchlauf.HasValue = true) Then
|
||||
Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Letzter_Durchlauf.Value,Date)
|
||||
Else
|
||||
Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value
|
||||
End If
|
||||
Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Running,Boolean)
|
||||
Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Reihenfolge,Integer)
|
||||
If (GEAENDERTWER Is Nothing) Then
|
||||
|
||||
@@ -87,7 +87,7 @@ SELECT GUID, Profilname, Aktiv, Objekttyp, WindreamSuche, Day, Run, Letzter_Durc
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="WindreamSuche" ColumnName="WindreamSuche" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@WindreamSuche" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="WindreamSuche" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="Day" ColumnName="Day" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@Day" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Day" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="Run" ColumnName="Run" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@Run" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Run" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="Letzter_Durchlauf" ColumnName="Letzter_Durchlauf" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@Letzter_Durchlauf" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="Letzter_Durchlauf" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="Letzter_Durchlauf" ColumnName="Letzter_Durchlauf" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@Letzter_Durchlauf" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="Letzter_Durchlauf" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="Running" ColumnName="Running" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@Running" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="Running" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="Reihenfolge" ColumnName="Reihenfolge" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Reihenfolge" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Reihenfolge" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="ERSTELLTWER" ColumnName="ERSTELLTWER" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@ERSTELLTWER" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="ERSTELLTWER" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
@@ -115,7 +115,7 @@ SELECT GUID, Profilname, Aktiv, Objekttyp, WindreamSuche, Day, Run, Letzter_Durc
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="WindreamSuche" ColumnName="WindreamSuche" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@WindreamSuche" Precision="0" ProviderType="VarChar" Scale="0" Size="500" SourceColumn="WindreamSuche" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="Day" ColumnName="Day" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@Day" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Day" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="Run" ColumnName="Run" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@Run" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Run" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="Letzter_Durchlauf" ColumnName="Letzter_Durchlauf" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@Letzter_Durchlauf" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="Letzter_Durchlauf" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="Letzter_Durchlauf" ColumnName="Letzter_Durchlauf" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@Letzter_Durchlauf" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="Letzter_Durchlauf" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="Running" ColumnName="Running" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@Running" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="Running" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="Reihenfolge" ColumnName="Reihenfolge" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Reihenfolge" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Reihenfolge" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="GEAENDERTWER" ColumnName="GEAENDERTWER" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@GEAENDERTWER" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="GEAENDERTWER" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
@@ -493,14 +493,14 @@ WHERE PROFIL_ID = @PID</CommandText>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Run" msprop:Generator_ColumnVarNameInTable="columnRun" msprop:Generator_ColumnPropNameInRow="Run" msprop:Generator_ColumnPropNameInTable="RunColumn" msprop:Generator_UserColumnName="Run">
|
||||
<xs:element name="Run" msprop:Generator_ColumnVarNameInTable="columnRun" msprop:Generator_ColumnPropNameInRow="Run" msprop:Generator_ColumnPropNameInTable="RunColumn" msprop:Generator_UserColumnName="Run" default="">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="100" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Letzter_Durchlauf" msprop:Generator_ColumnVarNameInTable="columnLetzter_Durchlauf" msprop:Generator_ColumnPropNameInRow="Letzter_Durchlauf" msprop:Generator_ColumnPropNameInTable="Letzter_DurchlaufColumn" msprop:Generator_UserColumnName="Letzter_Durchlauf" type="xs:dateTime" />
|
||||
<xs:element name="Letzter_Durchlauf" msprop:Generator_ColumnVarNameInTable="columnLetzter_Durchlauf" msprop:Generator_ColumnPropNameInRow="Letzter_Durchlauf" msprop:Generator_ColumnPropNameInTable="Letzter_DurchlaufColumn" msprop:Generator_UserColumnName="Letzter_Durchlauf" type="xs:dateTime" default="1900-01-01T00:00:00+01:00" minOccurs="0" />
|
||||
<xs:element name="Running" msprop:Generator_ColumnVarNameInTable="columnRunning" msprop:Generator_ColumnPropNameInRow="Running" msprop:Generator_ColumnPropNameInTable="RunningColumn" msprop:Generator_UserColumnName="Running" type="xs:boolean" default="false" />
|
||||
<xs:element name="Reihenfolge" msprop:Generator_ColumnVarNameInTable="columnReihenfolge" msprop:Generator_ColumnPropNameInRow="Reihenfolge" msprop:Generator_ColumnPropNameInTable="ReihenfolgeColumn" msprop:Generator_UserColumnName="Reihenfolge" type="xs:int" default="1" />
|
||||
<xs:element name="ERSTELLTWER" msprop:Generator_ColumnVarNameInTable="columnERSTELLTWER" msprop:Generator_ColumnPropNameInRow="ERSTELLTWER" msprop:Generator_ColumnPropNameInTable="ERSTELLTWERColumn" msprop:Generator_UserColumnName="ERSTELLTWER" minOccurs="0">
|
||||
|
||||
@@ -76,6 +76,9 @@
|
||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WMOTOOLLib.dll</HintPath>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Oracle.ManagedDataAccess">
|
||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\Oracle.ManagedDataAccess.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
@@ -57,7 +57,7 @@ Public Class clsDateiverarbeitung
|
||||
clsLogger.AddError("Unvorhergesehener Fehler beim Lock-Vorgang: " & ex.Message, "clsDV.Export_File")
|
||||
Return False
|
||||
End Try
|
||||
|
||||
|
||||
Dim oWMStream = WDDatei.OpenStream("BinaryObject", WMObjectStreamOpenModeReadWrite)
|
||||
'### VERSIONIERUNG ###
|
||||
Dim version As Integer = 2
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
Imports WINDREAMLib
|
||||
Imports System.IO
|
||||
Imports System.Text
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
Public Class clsProfil
|
||||
|
||||
#Region "***** Variablen *****"
|
||||
@@ -53,82 +56,103 @@ Public Class clsProfil
|
||||
Dim _error As Boolean = False
|
||||
'Try
|
||||
Dim Run_Profile As Boolean = False
|
||||
'Soll die Verarbeitung heute durchgeführt werden??
|
||||
Dim Dayofweek As Integer = My.Computer.Clock.LocalTime.DayOfWeek
|
||||
If _profDay.Substring(Dayofweek - 1, 1) = 1 Then
|
||||
'Verarbeitung soll heute durchgeführt werden
|
||||
clsLogger.AddDetailLog("Verarbeitung soll heute durchgeführt werden!")
|
||||
clsLogger.AddDetailLog("_RunType: " & _profRunType)
|
||||
Dim arr As String()
|
||||
arr = _profRunType.Split(";")
|
||||
clsLogger.AddDetailLog("arr(1): " & arr(1).ToString)
|
||||
Select Case arr(0)
|
||||
Case "TIME"
|
||||
' Dim intervall As Integer = clsSQLITE.konf_intervall / 60
|
||||
clsLogger.AddDetailLog("Intervall: 1 Minute")
|
||||
Dim Time_next As DateTime = _proflastRun.AddMinutes(1)
|
||||
Dim _RunTime As Date = CDate(arr(1))
|
||||
clsLogger.AddDetailLog("ProfilTime: " & _RunTime)
|
||||
clsLogger.AddDetailLog("_RunTime.ToShortTimeString: " & _RunTime.ToShortTimeString & " # " & "Now.ToShortTimeString: " & Now.ToShortTimeString)
|
||||
If Time_next.ToString.StartsWith("11.11.1911") Then
|
||||
clsLogger.AddDetailLog("Manueller Durchlauf des Profils - 11.11.1911")
|
||||
Run_Profile = True
|
||||
Else
|
||||
'Ist die Uhrzeit in der Range
|
||||
If _RunTime.ToShortTimeString = Now.ToShortTimeString Then
|
||||
Run_Profile = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Case "INTV"
|
||||
'Die Differenz berechnen
|
||||
Dim DiffMin As Integer = DateDiff(DateInterval.Minute, _proflastRun, Date.Now)
|
||||
Dim msg As String
|
||||
msg = "Minutenangaben: " & vbNewLine
|
||||
msg = msg & "DiffMin: " & DiffMin & vbNewLine
|
||||
msg = msg & "Intervall: " & arr(1)
|
||||
clsLogger.AddDetailLog(msg)
|
||||
If DiffMin >= CInt(arr(1)) Then
|
||||
'Den Durchlauf erlauben
|
||||
Run_Profile = True
|
||||
End If
|
||||
Case Else
|
||||
clsLogger.Add(">> _profRunType konnte nicht ausgewertet werden - " & arr(0), False)
|
||||
End Select
|
||||
If Run_Profile = True Then
|
||||
clsLogger.Add(">> Start des Durchlaufes für Profil '" & _Profilname & "'", False)
|
||||
'den Durchlaufszeitpunkt speichern
|
||||
clsDatatabase.Execute_non_Query("Update TBWMRH_PROFIL SET Running = 1 WHERE GUID = " & _profGUID)
|
||||
clsLogger.AddDetailLog("Prüfen der windream-Suche.......")
|
||||
If File.Exists(_profwdSuche) = False Then
|
||||
clsLogger.Add("Die Windream-Suche '" & _profwdSuche & "' existiert nicht!", True, "clsProfil.Profil_Durchlauf")
|
||||
'wenn die gesuchte File eine Suche ist: per MAil informierne und Indexierung abbrechen
|
||||
clsDatatabase.Execute_non_Query("Update TBWMRH_PROFIL SET Running = 0 WHERE GUID = " & _profGUID)
|
||||
clsLogger.WriteLog()
|
||||
Return False
|
||||
'Soll die Verarbeitung heute durchgeführt werden??
|
||||
Dim Dayofweek As Integer = My.Computer.Clock.LocalTime.DayOfWeek
|
||||
If _profDay.Substring(Dayofweek - 1, 1) = 1 Then
|
||||
'Verarbeitung soll heute durchgeführt werden
|
||||
clsLogger.AddDetailLog("Verarbeitung soll heute durchgeführt werden!")
|
||||
clsLogger.AddDetailLog("_RunType: " & _profRunType)
|
||||
Dim arr As String()
|
||||
arr = _profRunType.Split(";")
|
||||
clsLogger.AddDetailLog("arr(1): " & arr(1).ToString)
|
||||
Select Case arr(0)
|
||||
Case "TIME"
|
||||
' Dim intervall As Integer = clsSQLITE.konf_intervall / 60
|
||||
clsLogger.AddDetailLog("Intervall: 1 Minute")
|
||||
Dim Time_next As DateTime = _proflastRun.AddMinutes(1)
|
||||
Dim _RunTime As Date = CDate(arr(1))
|
||||
clsLogger.AddDetailLog("ProfilTime: " & _RunTime)
|
||||
clsLogger.AddDetailLog("_RunTime.ToShortTimeString: " & _RunTime.ToShortTimeString & " # " & "Now.ToShortTimeString: " & Now.ToShortTimeString)
|
||||
If Time_next.ToString.StartsWith("11.11.1911") Then
|
||||
clsLogger.AddDetailLog("Manueller Durchlauf des Profils - 11.11.1911")
|
||||
Run_Profile = True
|
||||
Else
|
||||
' windream-Suche für Profil starten
|
||||
clsLogger.AddDetailLog("GetSearchDocuments für Suche '" & _profwdSuche & "' starten: ")
|
||||
Dim windreamSucheErgebnisse As WMObjects = clsWindream_allgemein.GetSearchDocuments(_profwdSuche)
|
||||
'Ist die Uhrzeit in der Range
|
||||
If _RunTime.ToShortTimeString = Now.ToShortTimeString Then
|
||||
Run_Profile = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Case "INTV"
|
||||
'Die Differenz berechnen
|
||||
Dim DiffMin As Integer = DateDiff(DateInterval.Minute, _proflastRun, Date.Now)
|
||||
Dim msg As String
|
||||
msg = "Minutenangaben: " & vbNewLine
|
||||
msg = msg & "DiffMin: " & DiffMin & vbNewLine
|
||||
msg = msg & "Intervall: " & arr(1)
|
||||
clsLogger.AddDetailLog(msg)
|
||||
If DiffMin >= CInt(arr(1)) Then
|
||||
'Den Durchlauf erlauben
|
||||
Run_Profile = True
|
||||
End If
|
||||
Case Else
|
||||
clsLogger.Add(">> _profRunType konnte nicht ausgewertet werden - " & arr(0), False)
|
||||
End Select
|
||||
If Run_Profile = True Then
|
||||
clsLogger.Add(">> Start des Durchlaufes für Profil '" & _Profilname & "'", False)
|
||||
'den Durchlaufszeitpunkt speichern
|
||||
clsDatatabase.Execute_non_Query("Update TBWMRH_PROFIL SET Running = 1 WHERE GUID = " & _profGUID)
|
||||
clsLogger.AddDetailLog("Prüfen der windream-Suche.......")
|
||||
If File.Exists(_profwdSuche) = False Then
|
||||
clsLogger.Add("Die Windream-Suche '" & _profwdSuche & "' existiert nicht!", True, "clsProfil.Profil_Durchlauf")
|
||||
'wenn die gesuchte File eine Suche ist: per MAil informierne und Indexierung abbrechen
|
||||
clsDatatabase.Execute_non_Query("Update TBWMRH_PROFIL SET Running = 0 WHERE GUID = " & _profGUID)
|
||||
clsLogger.WriteLog()
|
||||
Return False
|
||||
Else
|
||||
' windream-Suche für Profil starten
|
||||
clsLogger.AddDetailLog("GetSearchDocuments für Suche '" & _profwdSuche & "' starten: ")
|
||||
Dim windreamSucheErgebnisse As WMObjects = clsWindream_allgemein.GetSearchDocuments(_profwdSuche)
|
||||
If windreamSucheErgebnisse Is Nothing Then
|
||||
clsLogger.Add("windreamSucheErgebnisse is nothing!", True, "clsProfil.Profil_Durchlauf")
|
||||
clsLogger.WriteLog()
|
||||
Return False
|
||||
End If
|
||||
If windreamSucheErgebnisse.Count > 0 Then
|
||||
clsLogger.Add("- Insgesamt sollen '" & windreamSucheErgebnisse.Count & "' Dateien bearbeitet werden", False)
|
||||
clsLogger.AddDetailLog("SELECT * FROM TBWMRH_PROFIL_JOB WHERE AKTIV = 1 AND PROFIL_ID = " & _profGUID & " ORDER BY REIHENFOLGE")
|
||||
Dim DT_PROFIL_JOB As DataTable = clsDatatabase.Return_Datatable("SELECT * FROM TBWMRH_PROFIL_JOB WHERE AKTIV = 1 AND PROFIL_ID = " & _profGUID & " ORDER BY REIHENFOLGE")
|
||||
Dim DT_PROFIL_FILE_JOB As DataTable = clsDatatabase.Return_Datatable("SELECT * FROM TBWMRH_PROFIL_FILE_JOB WHERE AKTIV = 1 AND PROFIL_ID = " & _profGUID & " ORDER BY REIHENFOLGE")
|
||||
clsLogger.AddDetailLog("DT_PROFIL_JOB und DT_PROFIL_FILE_JOB generiert ")
|
||||
If DT_PROFIL_JOB.Rows.Count > 0 Then
|
||||
clsLogger.AddDetailLog("DT_PROFIL_JOB.Rows.Count > 0")
|
||||
If clsDateiverarbeitung.InitProfilData = True Then
|
||||
clsLogger.Add("- Insgesamt sollen '" & windreamSucheErgebnisse.Count & "' Dateien bearbeitet werden", False)
|
||||
clsLogger.AddDetailLog("SELECT * FROM TBWMRH_PROFIL_JOB WHERE AKTIV = 1 AND PROFIL_ID = " & _profGUID & " ORDER BY REIHENFOLGE")
|
||||
Dim DT_PROFIL_JOB As DataTable = clsDatatabase.Return_Datatable("SELECT * FROM TBWMRH_PROFIL_JOB WHERE AKTIV = 1 AND PROFIL_ID = " & _profGUID & " ORDER BY REIHENFOLGE")
|
||||
Dim DT_PROFIL_FILE_JOB As DataTable = clsDatatabase.Return_Datatable("SELECT * FROM TBWMRH_PROFIL_FILE_JOB WHERE AKTIV = 1 AND PROFIL_ID = " & _profGUID & " ORDER BY REIHENFOLGE")
|
||||
clsLogger.AddDetailLog("DT_PROFIL_JOB und DT_PROFIL_FILE_JOB generiert ")
|
||||
If DT_PROFIL_JOB.Rows.Count > 0 Then
|
||||
clsLogger.AddDetailLog("DT_PROFIL_JOB.Rows.Count > 0")
|
||||
If clsDateiverarbeitung.InitProfilData = True Then
|
||||
clsLogger.AddDetailLog("clsDateiverarbeitung.InitProfilData = True")
|
||||
For Each DR_PR_JB As DataRow In DT_PROFIL_JOB.Rows
|
||||
Dim result = DR_PR_JB.Item("JOB_TYP").ToString.ToUpper
|
||||
Select Case DR_PR_JB.Item("JOB_TYP").ToString.ToUpper
|
||||
Case "BNS json Download".ToLower
|
||||
Case "BNS json Download".ToUpper
|
||||
'ARRAY oder Äqivalent bilden
|
||||
Dim sb As New StringBuilder()
|
||||
Dim sw As New StringWriter(sb)
|
||||
Using writer As JsonWriter = New JsonTextWriter(sw)
|
||||
writer.Formatting = Formatting.Indented
|
||||
|
||||
writer.WriteStartObject()
|
||||
writer.WritePropertyName("CPU")
|
||||
writer.WriteValue("Intel")
|
||||
writer.WritePropertyName("PSU")
|
||||
writer.WriteValue("500W")
|
||||
writer.WritePropertyName("Drives")
|
||||
writer.WriteStartArray()
|
||||
writer.WriteValue("DVD read/writer")
|
||||
writer.WriteComment("(broken)")
|
||||
writer.WriteValue("500 gigabyte hard drive")
|
||||
writer.WriteValue("200 gigabype hard drive")
|
||||
writer.WriteEnd()
|
||||
writer.WriteEndObject()
|
||||
End Using
|
||||
Console.WriteLine(sb.ToString())
|
||||
End Select
|
||||
Next
|
||||
|
||||
@@ -239,7 +263,7 @@ Public Class clsProfil
|
||||
clsDatatabase.Execute_non_Query("UPDATE TBWMRH_PROFIL SET Running = 0, LETZTER_DURCHLAUF = Getdate() WHERE GUID = " & _profGUID)
|
||||
End If
|
||||
'Next
|
||||
Case "BNS json Download".ToLower
|
||||
Case "BNS json Download".ToUpper
|
||||
clsDateiverarbeitung.BNSjsonDownload(WMdok)
|
||||
|
||||
End Select
|
||||
@@ -250,37 +274,37 @@ Public Class clsProfil
|
||||
Next
|
||||
For Each DR_PR_JB As DataRow In DT_PROFIL_JOB.Rows
|
||||
Select Case DR_PR_JB.Item("JOB_TYP").ToString.ToUpper
|
||||
Case "BNS json Download".ToLower
|
||||
Case "BNS json Download".ToUpper
|
||||
'ARRAY Exportieren
|
||||
Dim Export_Path = DR_PR_JB.Item("STRING1")
|
||||
|
||||
End Select
|
||||
Next
|
||||
Else
|
||||
clsLogger.Add(">> Initialisierung Profil nicht erfolgreich", True)
|
||||
clsLogger.WriteLog()
|
||||
End If
|
||||
Else
|
||||
clsLogger.Add(">> KEINE JOBS für Profil '" & _Profilname & "' angelegt!", False, "clsProfil.Profil_Durchlauf")
|
||||
clsLogger.Add(">> Initialisierung Profil nicht erfolgreich", True)
|
||||
clsLogger.WriteLog()
|
||||
End If
|
||||
Else
|
||||
' keine Dateien zum Importieren
|
||||
clsLogger.Add(">> Keine windream-Dokumente für Profil '" & _Profilname & "' vorhanden/gefunden.", False)
|
||||
clsLogger.Add("", False)
|
||||
clsLogger.Add(">> KEINE JOBS für Profil '" & _Profilname & "' angelegt!", False, "clsProfil.Profil_Durchlauf")
|
||||
clsLogger.WriteLog()
|
||||
End If
|
||||
Else
|
||||
' keine Dateien zum Importieren
|
||||
clsLogger.Add(">> Keine windream-Dokumente für Profil '" & _Profilname & "' vorhanden/gefunden.", False)
|
||||
clsLogger.Add("", False)
|
||||
clsLogger.WriteLog()
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
clsLogger.AddDetailLog("Verarbeitung für heute NICHT konfiguriert")
|
||||
clsLogger.WriteLog()
|
||||
|
||||
End If
|
||||
Else
|
||||
clsLogger.AddDetailLog("Verarbeitung für heute NICHT konfiguriert")
|
||||
clsLogger.WriteLog()
|
||||
End If
|
||||
'Abschluss des Profiles
|
||||
clsDatatabase.Execute_non_Query("UPDATE TBWMRH_PROFIL SET Running = 0, LETZTER_DURCHLAUF = GETDATE() WHERE GUID = " & _profGUID)
|
||||
clsLogger.AddDetailLog("'UPDATE TBWMRH_PROFIL SET Running = 0' ausgeführt")
|
||||
clsLogger.WriteLog()
|
||||
clsLogger.WriteLog()
|
||||
Return True
|
||||
'Catch ex As Exception
|
||||
' clsLogger.AddError("Unvorhergesehener Fehler: " & ex.Message, "clsProfil.Profil_Durchlauf")
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="EntityFramework" version="6.1.1" targetFramework="net451" />
|
||||
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net451" />
|
||||
<package id="System.Data.SQLite" version="1.0.94.1" targetFramework="net461" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user