MS
This commit is contained in:
46
app/DDWDResultHandler/App.config
Normal file
46
app/DDWDResultHandler/App.config
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, 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" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
|
||||
</startup>
|
||||
<applicationSettings>
|
||||
<DDWDResultHandler.My.MySettings>
|
||||
<setting name="MyConnection" 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>
|
||||
</setting>
|
||||
</DDWDResultHandler.My.MySettings>
|
||||
</applicationSettings>
|
||||
<system.data>
|
||||
<!--
|
||||
NOTE: The extra "remove" element below is to prevent the design-time
|
||||
support components within EF6 from selecting the legacy ADO.NET
|
||||
provider for SQLite (i.e. the one without any EF6 support). It
|
||||
appears to only consider the first ADO.NET provider in the list
|
||||
within the resulting "app.config" or "web.config" file.
|
||||
-->
|
||||
<DbProviderFactories>
|
||||
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
|
||||
<remove invariant="System.Data.SQLite" />
|
||||
<remove invariant="System.Data.SQLite.EF6" />
|
||||
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
|
||||
</DbProviderFactories>
|
||||
</system.data>
|
||||
<entityFramework>
|
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
|
||||
<parameters>
|
||||
<parameter value="v11.0" />
|
||||
</parameters>
|
||||
</defaultConnectionFactory>
|
||||
<providers>
|
||||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
||||
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
|
||||
</providers>
|
||||
</entityFramework>
|
||||
</configuration>
|
||||
80
app/DDWDResultHandler/ClassDatabase.vb
Normal file
80
app/DDWDResultHandler/ClassDatabase.vb
Normal file
@@ -0,0 +1,80 @@
|
||||
Public Class ClassDatabase
|
||||
Private Shared connectionString As String
|
||||
|
||||
Public Shared Function Init()
|
||||
Try
|
||||
connectionString = MyConnectionString
|
||||
Dim SQLconnect As New SqlClient.SqlConnection
|
||||
SQLconnect.ConnectionString = connectionString
|
||||
SQLconnect.Open()
|
||||
SQLconnect.Close()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Fehler bei DatabaseInit: " & ex.Message, True)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Shared Function Return_Datatable(Select_anweisung As String)
|
||||
Try
|
||||
Dim SQLconnect As New SqlClient.SqlConnection
|
||||
Dim SQLcommand As SqlClient.SqlCommand
|
||||
SQLconnect.ConnectionString = connectionString
|
||||
SQLconnect.Open()
|
||||
SQLcommand = SQLconnect.CreateCommand
|
||||
SQLcommand.CommandText = Select_anweisung
|
||||
|
||||
Dim adapter1 As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(SQLcommand)
|
||||
Dim dt As DataTable = New DataTable()
|
||||
adapter1.Fill(dt)
|
||||
SQLconnect.Close()
|
||||
Return dt
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Fehler bei Return_Datatable: " & ex.Message, True)
|
||||
ClassLogger.Add("SQL: " & Select_anweisung, False)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
Public Shared Function Execute_non_Query(ExecuteCMD As String, Optional Userinput As Boolean = False)
|
||||
Try
|
||||
Dim SQLconnect As New SqlClient.SqlConnection
|
||||
Dim SQLcommand As SqlClient.SqlCommand
|
||||
SQLconnect.ConnectionString = connectionString
|
||||
SQLconnect.Open()
|
||||
SQLcommand = SQLconnect.CreateCommand
|
||||
'Update Last Created Record in Foo
|
||||
SQLcommand.CommandText = ExecuteCMD
|
||||
SQLcommand.ExecuteNonQuery()
|
||||
SQLcommand.Dispose()
|
||||
SQLconnect.Close()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
If Userinput = True Then
|
||||
MsgBox("Fehler bei Execute_non_Query: " & ex.Message, MsgBoxStyle.Critical)
|
||||
End If
|
||||
ClassLogger.Add("Fehler bei Execute_non_Query: " & ex.Message, True)
|
||||
ClassLogger.Add("SQL: " & ExecuteCMD, False)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Public Shared Function Execute_Scalar(cmdscalar As String)
|
||||
Dim result
|
||||
Try
|
||||
Dim SQLconnect As New SqlClient.SqlConnection
|
||||
Dim SQLcommand As SqlClient.SqlCommand
|
||||
SQLconnect.ConnectionString = connectionString
|
||||
SQLconnect.Open()
|
||||
SQLcommand = SQLconnect.CreateCommand
|
||||
'Update Last Created Record in Foo
|
||||
SQLcommand.CommandText = cmdscalar
|
||||
result = SQLcommand.ExecuteScalar()
|
||||
SQLcommand.Dispose()
|
||||
SQLconnect.Close()
|
||||
Return result
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Fehler bei Execute_Scalar: " & ex.Message, True)
|
||||
ClassLogger.Add("SQL: " & cmdscalar, False)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
End Class
|
||||
216
app/DDWDResultHandler/ClassLoggerOld.vb
Normal file
216
app/DDWDResultHandler/ClassLoggerOld.vb
Normal file
@@ -0,0 +1,216 @@
|
||||
Imports System.IO
|
||||
|
||||
Public Class ClassLoggerOld
|
||||
Private Shared DateiSpeicherort As String = Nothing
|
||||
Private Shared DateiPrefix As String = ""
|
||||
Private Shared Datei As IO.File = Nothing
|
||||
Private Shared Dateiname As String = ""
|
||||
Private Shared StreamWriter As IO.StreamWriter = Nothing
|
||||
Private Shared HasInformedAboutError As Boolean = False
|
||||
' eine Art Konstruktor
|
||||
Public Shared Sub Init(ByVal speicherort As String, Optional ByVal prefix As String = "", Optional ByVal appendFile As Boolean = True)
|
||||
SetSpeicherort()
|
||||
ClassLoggerOld.DateiSpeicherort = speicherort
|
||||
' wenn ein Prfix gesetzt wurde
|
||||
If Not prefix = "" Then
|
||||
' initialisiert das Prefix
|
||||
ClassLoggerOld.SetPrefix(prefix)
|
||||
End If
|
||||
Dim str As String = ClassLoggerOld.DateiSpeicherort & "\" & ClassLoggerOld.DateiPrefix & System.DateTime.Now.ToString("yyyy_MM_dd") & ".txt"
|
||||
Dim anz As Integer = 1
|
||||
Do While File.Exists(str)
|
||||
Dim info As New FileInfo(str)
|
||||
Dim length As Long = info.Length
|
||||
If length > 5000000 Then
|
||||
str = IO.Path.GetDirectoryName(str)
|
||||
str = str & "\" & ClassLoggerOld.DateiPrefix & System.DateTime.Now.ToString("yyyy_MM_dd") & "(" & anz.ToString & ").txt"
|
||||
anz = anz + 1
|
||||
Else
|
||||
Exit Do
|
||||
End If
|
||||
Loop
|
||||
ClassLoggerOld.Dateiname = str
|
||||
If Not appendFile Then
|
||||
' der Versuch die Datei zu löschen
|
||||
'Try
|
||||
' My.Computer.FileSystem.DeleteFile(ClassNILogger.Dateiname, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently)
|
||||
'Catch ex As Exception
|
||||
' ' bei Fehler besteht kein Schreibrecht auf die Datei oder Datei existiert nicht
|
||||
' ' ALSO: alles Okay soweit
|
||||
'End Try
|
||||
My.Computer.FileSystem.WriteAllText(ClassLoggerOld.Dateiname, "Neu erstellt - appendfile", False)
|
||||
End If
|
||||
' testen ob sich die Datei öffnen und beschreiben lässt
|
||||
'ClassNILogger.CheckIsLogWritable()
|
||||
End Sub
|
||||
|
||||
' legt den Speicherort fest
|
||||
Public Shared Sub SetSpeicherort()
|
||||
Dim f As New IO.DirectoryInfo(My.Application.Info.DirectoryPath & "\Log")
|
||||
If f.Exists = False Then
|
||||
IO.Directory.CreateDirectory(My.Application.Info.DirectoryPath & "\Log")
|
||||
End If
|
||||
ClassLoggerOld.DateiSpeicherort = My.Application.Info.DirectoryPath & "\Log\"
|
||||
End Sub
|
||||
|
||||
' legt das Prefix für den Dateinamen fest
|
||||
Public Shared Sub SetPrefix(ByVal prefix As String)
|
||||
ClassLoggerOld.DateiPrefix = prefix
|
||||
End Sub
|
||||
|
||||
Public Shared Sub Add(ByVal text As String, ByVal _error As Boolean, Optional ByVal Funktion As String = "")
|
||||
Try
|
||||
If ClassLoggerOld.OpenFile Then
|
||||
Try
|
||||
Dim msg As String
|
||||
If _error = True And Funktion <> "" Then
|
||||
msg = ">> Achtung Fehler in Funktion '" & Funktion & "'" & vbNewLine & "Fehlermeldung: "
|
||||
ElseIf _error = True Then
|
||||
msg = ">> Achtung Fehler:" & vbNewLine & "Fehlermeldung: "
|
||||
End If
|
||||
msg &= text
|
||||
|
||||
ClassLoggerOld.StreamWriter.WriteLine(msg)
|
||||
ClassLoggerOld.CloseFile()
|
||||
Catch e As Exception
|
||||
ClassLoggerOld.WriteErrorMessage()
|
||||
End Try
|
||||
Else
|
||||
ClassLoggerOld.WriteErrorMessage()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
Public Shared Sub AddDetailLog(ByVal text As String)
|
||||
If ClassLoggerOld.OpenFile Then
|
||||
Try
|
||||
If clsSQLITE.konf_logerrorsonly = False Then
|
||||
ClassLoggerOld.StreamWriter.WriteLine(">> " & text)
|
||||
ClassLoggerOld.CloseFile()
|
||||
End If
|
||||
Catch e As Exception
|
||||
ClassLoggerOld.WriteErrorMessage()
|
||||
End Try
|
||||
Else
|
||||
ClassLoggerOld.WriteErrorMessage()
|
||||
End If
|
||||
End Sub
|
||||
' öffnet eine Datei zum Schreiben
|
||||
Private Shared Function OpenFile()
|
||||
Try
|
||||
' wenn ein Speicherort festgelegt wurde
|
||||
If Not ClassLoggerOld.DateiSpeicherort = Nothing Then
|
||||
' den Dateienamen definieren
|
||||
Dim dateiname As String = ClassLoggerOld.Dateiname
|
||||
' Datei anlegen wenn noch nicht vorhanden
|
||||
My.Computer.FileSystem.WriteAllText(dateiname, String.Empty, True)
|
||||
' die Datei zum Schreiben öffnen
|
||||
ClassLoggerOld.StreamWriter = New IO.StreamWriter(dateiname, True, System.Text.Encoding.UTF8)
|
||||
End If
|
||||
' wenn die Datei erfolgreich geöffnet wurde
|
||||
If ClassLoggerOld.StreamWriter IsNot Nothing Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
' öffnet eine Datei zum Schreiben
|
||||
Private Shared Function OpenFile(ByVal DateiSpeicherort As String, ByVal DateiPrefix As String)
|
||||
Try
|
||||
' wenn ein Speicherort festgelegt wurde
|
||||
If Not DateiSpeicherort = Nothing And ClassLoggerOld.CheckIsLogWritable() Then
|
||||
' den Dateienamen definieren
|
||||
Dim dateiname As String = ClassLoggerOld.Dateiname
|
||||
' Datei anlegen wenn noch nicht vorhanden
|
||||
My.Computer.FileSystem.WriteAllText(dateiname, String.Empty, True)
|
||||
|
||||
' die Datei zum Schreiben öffnen
|
||||
ClassLoggerOld.StreamWriter = New IO.StreamWriter(dateiname, True, System.Text.Encoding.UTF8)
|
||||
End If
|
||||
' wenn die Datei erfolgreich geöffnet wurde
|
||||
If ClassLoggerOld.StreamWriter IsNot Nothing Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
' schliesst die geöffnete Datei
|
||||
Private Shared Sub CloseFile()
|
||||
|
||||
' wenn eine Datei geöffnet ist
|
||||
If ClassLoggerOld.StreamWriter IsNot Nothing Then
|
||||
' die Datei schliessen
|
||||
ClassLoggerOld.StreamWriter.Close()
|
||||
ClassLoggerOld.StreamWriter = Nothing
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Public Shared Function CheckIsLogWritable()
|
||||
|
||||
If ClassLoggerOld.OpenFile Then
|
||||
Try
|
||||
ClassLoggerOld.CloseFile()
|
||||
Catch e As Exception
|
||||
ClassLoggerOld.WriteErrorMessage()
|
||||
Return False
|
||||
End Try
|
||||
Else
|
||||
ClassLoggerOld.WriteErrorMessage()
|
||||
Return False
|
||||
End If
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Function CheckIsLogWritable(ByVal vDateiSpeicherort As String, ByVal vDateiPrefix As String)
|
||||
|
||||
If ClassLoggerOld.OpenFile(vDateiSpeicherort, vDateiPrefix) Then
|
||||
Try
|
||||
ClassLoggerOld.CloseFile()
|
||||
Catch e As Exception
|
||||
ClassLoggerOld.WriteErrorMessage()
|
||||
Return False
|
||||
End Try
|
||||
Else
|
||||
ClassLoggerOld.WriteErrorMessage()
|
||||
Return False
|
||||
End If
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
||||
Private Shared Sub WriteErrorMessage()
|
||||
If Not ClassLoggerOld.HasInformedAboutError Then
|
||||
Try
|
||||
EventLog.WriteEntry("Windream Result Handler", "Fehler beim Öffnen der Logdatei - Keine Schreibrechte in Verzeichnis??", EventLogEntryType.Warning)
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
'EventLog1.Source = "Windream Result Handler"
|
||||
'clsSQLITE.Execute_non_Query("INSERT INTO TBLOG (MODUL,MESSAGE) VALUES ('MAIN','" & "Fehler beim Öffnen der Logdatei - Keine Schreibrechte im Verzeichnis? Es wird keine Logdatei angelegt oder beschrieben.")
|
||||
'MsgBox("Beim Öffnen der Logdatei ist ein Fehler aufgetreten. Bitte stellen Sie sicher das Sie sowohl über entsprechende Schreibrechte im Verzeichnis, als auch über ausreichend Speicherplatz zum Speichern der Logdatei verfügen." & _
|
||||
' vbNewLine & vbNewLine & "Es wird keine Logdatei angelegt oder beschrieben." & vbNewLine & vbNewLine & "Im folgenden werden Sie über Fehler, den Log betreffend nicht weiter informiert, um den Ablauf des Dateiimporters nicht zu stören.", _
|
||||
' MsgBoxStyle.Information, "Fehler beim Öffnen der Logdatei")
|
||||
ClassLoggerOld.HasInformedAboutError = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
52
app/DDWDResultHandler/DDWDResultHandler.Designer.vb
generated
Normal file
52
app/DDWDResultHandler/DDWDResultHandler.Designer.vb
generated
Normal file
@@ -0,0 +1,52 @@
|
||||
Imports System.ServiceProcess
|
||||
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class DDWDResultHandler
|
||||
Inherits System.ServiceProcess.ServiceBase
|
||||
|
||||
'UserService überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
' Der Haupteinstiegspunkt für den Prozess
|
||||
<MTAThread()> _
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Shared Sub Main()
|
||||
Dim ServicesToRun() As System.ServiceProcess.ServiceBase
|
||||
|
||||
' Innerhalb eines Prozesses können mehrere NT-Dienste ausgeführt werden. Um einen
|
||||
' weiteren Dienst zu diesem Prozess hinzuzufügen, ändern Sie die folgende Zeile,
|
||||
' um ein zweites Dienstobjekt zu erstellen. Zum Beispiel
|
||||
'
|
||||
' ServicesToRun = New System.ServiceProcess.ServiceBase () {New DDWDResultHandler, New MySecondUserService}
|
||||
'
|
||||
ServicesToRun = New System.ServiceProcess.ServiceBase() {New DDWDResultHandler}
|
||||
|
||||
System.ServiceProcess.ServiceBase.Run(ServicesToRun)
|
||||
End Sub
|
||||
|
||||
'Wird vom Komponenten-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
' Hinweis: Die folgende Prozedur ist für den Komponenten-Designer erforderlich.
|
||||
' Das Bearbeiten ist mit dem Komponenten-Designer möglich.
|
||||
' Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
'
|
||||
'DDWDResultHandler
|
||||
'
|
||||
Me.AutoLog = False
|
||||
Me.ServiceName = "DDWDResultHandler"
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
123
app/DDWDResultHandler/DDWDResultHandler.resx
Normal file
123
app/DDWDResultHandler/DDWDResultHandler.resx
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
172
app/DDWDResultHandler/DDWDResultHandler.vb
Normal file
172
app/DDWDResultHandler/DDWDResultHandler.vb
Normal file
@@ -0,0 +1,172 @@
|
||||
Imports System.IO
|
||||
'Imports System.Collections.ObjectModel
|
||||
Imports System.ComponentModel
|
||||
Imports System.Data.SQLite
|
||||
Public Class DDWDResultHandler
|
||||
#Region "+++++ Variablen +++++"
|
||||
Public Shared _windream As New clsWindream_allgemein
|
||||
Public Shared threadRunner As BackgroundWorker
|
||||
|
||||
Public Shared _PROFIL_ID As Integer
|
||||
Dim _INTERVALL As Integer
|
||||
'Variablen für Dateiimporter
|
||||
|
||||
#End Region
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
If Not System.Diagnostics.EventLog.SourceExists("Windream Result Handler") Then
|
||||
System.Diagnostics.EventLog.CreateEventSource("Windream Result Handler",
|
||||
"DigitalData Log")
|
||||
End If
|
||||
'EventLog1.Source = "Windream Result Handler"
|
||||
'EventLog1.Log = "DigitalData Log"
|
||||
End Sub
|
||||
Protected Overrides Sub OnStart(ByVal args() As String)
|
||||
' Code zum Starten des Dienstes hier einfügen. Diese Methode sollte Vorgänge
|
||||
' ausführen, damit der Dienst gestartet werden kann.
|
||||
'EventLog1.WriteEntry("Dienst 'DD windream Result Handler' gestartet")
|
||||
Try
|
||||
clsLogger.Init(My.Application.Info.DirectoryPath & "\Log", "logResultHandler_")
|
||||
clsLogger.Add(" ", False)
|
||||
clsLogger.Add("## WindreamResultHandler gestartet - " & Now & " ## ", False)
|
||||
|
||||
If My.Settings.MyConnection = String.Empty Then
|
||||
clsLogger.Add("Achtung: Es wurde noch kein Datenbank-ConnectionString hinterlegt.", True)
|
||||
Else
|
||||
If clsSQLITE.Init = False Then
|
||||
clsLogger.Add("Achtung: Es konnte keine Verbindung zur Datenbank '" & My.Settings.MyConnection & "' hergestellt werden!", True)
|
||||
Else
|
||||
' '### Thread für Durchlauf generieren
|
||||
DDWDResultHandler.threadRunner = New BackgroundWorker()
|
||||
DDWDResultHandler.threadRunner.WorkerReportsProgress = True
|
||||
DDWDResultHandler.threadRunner.WorkerSupportsCancellation = True
|
||||
AddHandler threadRunner.DoWork, AddressOf RUN_THREAD
|
||||
AddHandler threadRunner.RunWorkerCompleted, AddressOf Thread_Completed
|
||||
|
||||
' '### Den Timer generieren
|
||||
Dim Timer_Durchlauf As New System.Timers.Timer()
|
||||
'Das Event hinterlegen welches bei "Tick" ausgelöst wird
|
||||
AddHandler Timer_Durchlauf.Elapsed, AddressOf Thread_Run
|
||||
' Set the Interval
|
||||
Timer_Durchlauf.Interval = 60000
|
||||
'ClassLogger.Add("- Timer - Intervall: " & clsSQLITE.konf_intervall & " Minuten", False)
|
||||
Timer_Durchlauf.Enabled = True
|
||||
clsLogger.AddDetailLog("Timer gestartet")
|
||||
' Und den Durchlauf das erste Mal starten
|
||||
threadRunner.RunWorkerAsync()
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError(ex.Message, "OnStart")
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
Public Shared Sub Thread_Run()
|
||||
If Not threadRunner.IsBusy Then
|
||||
threadRunner.RunWorkerAsync()
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnStop()
|
||||
' Hier Code zum Ausführen erforderlicher Löschvorgänge zum Beenden des Dienstes einfügen.
|
||||
'EventLog1.WriteEntry("Dienst 'DD windream Result Handler' gestoppt")
|
||||
clsLogger.Add("", False)
|
||||
clsLogger.Add("## WindreamResultHandler wurde gestoppt - " & Now & " ## ", False)
|
||||
clsSQLITE.Execute_non_Query("Update TBPROFIL SET Running = 1 WHERE GUID = " & clsProfil._profGUID)
|
||||
clsLogger.Add("", False)
|
||||
clsLogger.WriteLog()
|
||||
End Sub
|
||||
Public Shared Sub RUN_THREAD(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs)
|
||||
Try
|
||||
Dim notcompleted As Boolean = False
|
||||
clsLogger.Init(My.Application.Info.DirectoryPath & "\Log", "logResultHandler_")
|
||||
clsLogger.Add("", False)
|
||||
clsLogger.Add("## Start Durchlauf WindreamResultHandler - " & Now & " ## ", False)
|
||||
clsLogger.Add("", False)
|
||||
'windream initialisieren
|
||||
If _windream.Init() = True Then
|
||||
clsLogger.AddDetailLog("windream vollumfänglich initialisiert!")
|
||||
'Zur sicherheit die DB nochmal initialiseren
|
||||
If clsSQLITE.Init() = True Then
|
||||
Dim DT As DataTable = clsSQLITE.Return_Datatable("SELECT GUID FROM TBPROFIL WHERE AKTIV = 1 order by REIHENFOLGE")
|
||||
If DT.Rows.Count > 0 Then
|
||||
clsLogger.AddDetailLog("Anzahl der aktiven Profile: " & DT.Rows.Count.ToString)
|
||||
For Each DR As DataRow In DT.Rows
|
||||
_PROFIL_ID = CInt(DR.Item("GUID"))
|
||||
'Und nun das Profil durchlaufen
|
||||
Dim initresult = clsProfil.Init(_PROFIL_ID)
|
||||
If initresult = True Then
|
||||
clsLogger.WriteLog()
|
||||
clsProfil.Profil_Durchlauf()
|
||||
ElseIf initresult = False Then
|
||||
clsLogger.Add("clsProfil konnte nicht initialisiert werden", True, "RUN_THREAD")
|
||||
notcompleted = True
|
||||
ElseIf initresult = 0 Then
|
||||
clsLogger.AddDetailLog("initresult: 0")
|
||||
notcompleted = True
|
||||
ElseIf initresult = 1 Then
|
||||
clsLogger.AddDetailLog("initresult: 1")
|
||||
notcompleted = True
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
clsLogger.Add("- Keine aktiven Profile vorhanden", False)
|
||||
notcompleted = True
|
||||
End If
|
||||
clsSQLITE.Execute_non_Query("UPDATE TBKONFIGURATION SET LAST_TICK = DATETIME ('now' , 'localtime') WHERE GUID = 1")
|
||||
Else
|
||||
clsLogger.Add("- clsSQLLite konnte nicht initialisiert werden!", False)
|
||||
notcompleted = True
|
||||
End If
|
||||
Else
|
||||
clsLogger.Add("# Achtung: Windream-Init mit Fehlern beendet", False)
|
||||
notcompleted = True
|
||||
End If
|
||||
If notcompleted = True Then
|
||||
clsLogger.WriteLog()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError(ex.Message, "RUN_THREAD")
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
#Region "*** BackgroundWorker DI und NI beenden und Abbrechen ***"
|
||||
Private Shared Sub Thread_Completed(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) 'Handles threadDateiimport.RunWorkerCompleted
|
||||
' This event fires when the DoWork event completes
|
||||
Try
|
||||
Dim result As String = ""
|
||||
|
||||
If e.Cancelled Then
|
||||
clsLogger.Add("## Der Dateiimport wurde durch den Anwender abgebrochen", False)
|
||||
clsLogger.WriteLog()
|
||||
ElseIf e.Error IsNot Nothing Then
|
||||
clsLogger.Add("Fehler bei Durchlauf. Der Vorgang wird abgebrochen.", True, "Thread_Completed")
|
||||
clsLogger.Add(e.Error.Message, True, "Thread_Completed")
|
||||
clsLogger.WriteLog()
|
||||
End If
|
||||
|
||||
'If DI_Verzeichnisloeschen Then
|
||||
' Try
|
||||
' My.Computer.FileSystem.DeleteDirectory(DI_Quellordner, FileIO.DeleteDirectoryOption.ThrowIfDirectoryNonEmpty)
|
||||
' Catch ex As Exception
|
||||
' ClassLogger.Add("ACHTUNG: Der Vorgang wurde abgeschlossen. Das Quellverzeichnis konnte jedoch nicht gelöscht werden, da sich in dem Ordner noch Dateien/Verzeichnisse befinden.", False)
|
||||
' End Try
|
||||
'End If
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError(ex.Message, "Thread_Completed")
|
||||
End Try
|
||||
End Sub
|
||||
Public Shared Function Thread_Abbrechen()
|
||||
Try
|
||||
If DDWDResultHandler.threadRunner.IsBusy Then
|
||||
DDWDResultHandler.threadRunner.CancelAsync()
|
||||
End If
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError(ex.Message, "Thread_Abbrechen")
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
#End Region
|
||||
End Class
|
||||
210
app/DDWDResultHandler/DDWDResultHandler.vbproj
Normal file
210
app/DDWDResultHandler/DDWDResultHandler.vbproj
Normal file
@@ -0,0 +1,210 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{190A63D1-A129-499D-A863-59D39D9EA58F}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>DDWDResultHandler.DDWDResultHandler</StartupObject>
|
||||
<RootNamespace>DDWDResultHandler</RootNamespace>
|
||||
<AssemblyName>DDWDResultHandler</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Console</MyType>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>DDWDResultHandler.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>DDWDResultHandler.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.1.1\lib\net45\EntityFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework.SqlServer">
|
||||
<HintPath>..\packages\EntityFramework.6.1.1\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Interop.WINDREAMLib">
|
||||
<HintPath>..\..\..\Bibliotheken\DLL\windreamDLL\64bit\Interop.WINDREAMLib.dll</HintPath>
|
||||
<EmbedInteropTypes>False</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="Oracle.ManagedDataAccess">
|
||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\Oracle.ManagedDataAccess.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ClassLoggerOld.vb" />
|
||||
<Compile Include="clsDatatabase.vb" />
|
||||
<Compile Include="clsDateiverarbeitung.vb" />
|
||||
<Compile Include="clsEmail.vb" />
|
||||
<Compile Include="clsHelper.vb" />
|
||||
<Compile Include="clsLogger.vb" />
|
||||
<Compile Include="clsProfil.vb" />
|
||||
<Compile Include="clsWindream_allgemein.vb" />
|
||||
<Compile Include="clsWindream_Index.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DDWDResultHandler.vb">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DDWDResultHandler.Designer.vb">
|
||||
<DependentUpon>DDWDResultHandler.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Compile Include="MyDataset.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>MyDataset.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProjectInstaller.Designer.vb">
|
||||
<DependentUpon>ProjectInstaller.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProjectInstaller.vb">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="RUNTIME_VARIABLES.vb" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="DDWDResultHandler.resx">
|
||||
<DependentUpon>DDWDResultHandler.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ProjectInstaller.resx">
|
||||
<DependentUpon>ProjectInstaller.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="App.config" />
|
||||
<None Include="MyDataset.xsc">
|
||||
<DependentUpon>MyDataset.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="MyDataset.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSDataSetGenerator</Generator>
|
||||
<LastGenOutput>MyDataset.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="MyDataset.xss">
|
||||
<DependentUpon>MyDataset.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<COMReference Include="WMOBRWSLib">
|
||||
<Guid>{25B51999-6DCA-11D4-B815-00104BB52DEA}</Guid>
|
||||
<VersionMajor>1</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>tlbimp</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</COMReference>
|
||||
<COMReference Include="WMOSRCHLib">
|
||||
<Guid>{BE4F1D13-88A8-11D4-B3FA-0001021F035F}</Guid>
|
||||
<VersionMajor>1</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>tlbimp</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</COMReference>
|
||||
<COMReference Include="WMOTOOLLib">
|
||||
<Guid>{A704B4C1-E1C1-11D2-B2A9-00104B066E1A}</Guid>
|
||||
<VersionMajor>1</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>tlbimp</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</COMReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WCFMetadata Include="Service References\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<Import Project="..\packages\System.Data.SQLite.Core.1.0.94.0\build\net451\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.94.0\build\net451\System.Data.SQLite.Core.targets')" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
13
app/DDWDResultHandler/My Project/Application.Designer.vb
generated
Normal file
13
app/DDWDResultHandler/My Project/Application.Designer.vb
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.34014
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
10
app/DDWDResultHandler/My Project/Application.myapp
Normal file
10
app/DDWDResultHandler/My Project/Application.myapp
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>false</MySubMain>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<ApplicationType>3</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
35
app/DDWDResultHandler/My Project/AssemblyInfo.vb
Normal file
35
app/DDWDResultHandler/My Project/AssemblyInfo.vb
Normal file
@@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
' die mit einer Assembly verknüpft sind.
|
||||
|
||||
' Die Werte der Assemblyattribute überprüfen
|
||||
|
||||
<Assembly: AssemblyTitle("DDWDResultHandler")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("DDWDResultHandler")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2014")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||
<Assembly: Guid("1f08708a-1a24-4add-a049-0e53d7fe374e")>
|
||||
|
||||
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
'
|
||||
' Hauptversion
|
||||
' Nebenversion
|
||||
' Buildnummer
|
||||
' Revision
|
||||
'
|
||||
' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
62
app/DDWDResultHandler/My Project/Resources.Designer.vb
generated
Normal file
62
app/DDWDResultHandler/My Project/Resources.Designer.vb
generated
Normal file
@@ -0,0 +1,62 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.34014
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
'class via a tool like ResGen or Visual Studio.
|
||||
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
'with the /str option, or rebuild your VS project.
|
||||
'''<summary>
|
||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' Returns the cached ResourceManager instance used by this class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("DDWDResultHandler.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Overrides the current thread's CurrentUICulture property for all
|
||||
''' resource lookups using this strongly typed resource class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set(ByVal value As Global.System.Globalization.CultureInfo)
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
117
app/DDWDResultHandler/My Project/Resources.resx
Normal file
117
app/DDWDResultHandler/My Project/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
83
app/DDWDResultHandler/My Project/Settings.Designer.vb
generated
Normal file
83
app/DDWDResultHandler/My Project/Settings.Designer.vb
generated
Normal file
@@ -0,0 +1,83 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Dieser Code wurde von einem Tool generiert.
|
||||
' Laufzeitversion:4.0.30319.42000
|
||||
'
|
||||
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
' der Code erneut generiert wird.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.0.1.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||
|
||||
#Region "Automatische My.Settings-Speicherfunktion"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<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")> _
|
||||
Public ReadOnly Property MyConnection() As String
|
||||
Get
|
||||
Return CType(Me("MyConnection"),String)
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.DDWDResultHandler.My.MySettings
|
||||
Get
|
||||
Return Global.DDWDResultHandler.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
9
app/DDWDResultHandler/My Project/Settings.settings
Normal file
9
app/DDWDResultHandler/My Project/Settings.settings
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="MyConnection" 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>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
648
app/DDWDResultHandler/MyDataset.Designer.vb
generated
Normal file
648
app/DDWDResultHandler/MyDataset.Designer.vb
generated
Normal file
@@ -0,0 +1,648 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Dieser Code wurde von einem Tool generiert.
|
||||
' Laufzeitversion:4.0.30319.34014
|
||||
'
|
||||
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
' der Code erneut generiert wird.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict Off
|
||||
Option Explicit On
|
||||
|
||||
|
||||
|
||||
'''<summary>
|
||||
'''Represents a strongly typed in-memory cache of data.
|
||||
'''</summary>
|
||||
<Global.System.Serializable(), _
|
||||
Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
|
||||
Global.System.ComponentModel.ToolboxItem(true), _
|
||||
Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema"), _
|
||||
Global.System.Xml.Serialization.XmlRootAttribute("MyDataset"), _
|
||||
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")> _
|
||||
Partial Public Class MyDataset
|
||||
Inherits Global.System.Data.DataSet
|
||||
|
||||
Private tableTBVEKTOR_INDEX As TBVEKTOR_INDEXDataTable
|
||||
|
||||
Private _schemaSerializationMode As Global.System.Data.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
Me.BeginInit()
|
||||
Me.InitClass()
|
||||
Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
|
||||
AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
|
||||
AddHandler MyBase.Relations.CollectionChanged, schemaChangedHandler
|
||||
Me.EndInit()
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
|
||||
MyBase.New(info, context, False)
|
||||
If (Me.IsBinarySerialized(info, context) = True) Then
|
||||
Me.InitVars(False)
|
||||
Dim schemaChangedHandler1 As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
|
||||
AddHandler Me.Tables.CollectionChanged, schemaChangedHandler1
|
||||
AddHandler Me.Relations.CollectionChanged, schemaChangedHandler1
|
||||
Return
|
||||
End If
|
||||
Dim strSchema As String = CType(info.GetValue("XmlSchema", GetType(String)), String)
|
||||
If (Me.DetermineSchemaSerializationMode(info, context) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then
|
||||
Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet()
|
||||
ds.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))
|
||||
If (Not (ds.Tables("TBVEKTOR_INDEX")) Is Nothing) Then
|
||||
MyBase.Tables.Add(New TBVEKTOR_INDEXDataTable(ds.Tables("TBVEKTOR_INDEX")))
|
||||
End If
|
||||
Me.DataSetName = ds.DataSetName
|
||||
Me.Prefix = ds.Prefix
|
||||
Me.Namespace = ds.Namespace
|
||||
Me.Locale = ds.Locale
|
||||
Me.CaseSensitive = ds.CaseSensitive
|
||||
Me.EnforceConstraints = ds.EnforceConstraints
|
||||
Me.Merge(ds, False, Global.System.Data.MissingSchemaAction.Add)
|
||||
Me.InitVars()
|
||||
Else
|
||||
Me.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))
|
||||
End If
|
||||
Me.GetSerializationData(info, context)
|
||||
Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
|
||||
AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
|
||||
AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
|
||||
Global.System.ComponentModel.Browsable(False), _
|
||||
Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
|
||||
Public ReadOnly Property TBVEKTOR_INDEX() As TBVEKTOR_INDEXDataTable
|
||||
Get
|
||||
Return Me.tableTBVEKTOR_INDEX
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
|
||||
Global.System.ComponentModel.BrowsableAttribute(True), _
|
||||
Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Visible)> _
|
||||
Public Overrides Property SchemaSerializationMode() As Global.System.Data.SchemaSerializationMode
|
||||
Get
|
||||
Return Me._schemaSerializationMode
|
||||
End Get
|
||||
Set(value As Global.System.Data.SchemaSerializationMode)
|
||||
Me._schemaSerializationMode = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
|
||||
Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
|
||||
Public Shadows ReadOnly Property Tables() As Global.System.Data.DataTableCollection
|
||||
Get
|
||||
Return MyBase.Tables
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
|
||||
Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
|
||||
Public Shadows ReadOnly Property Relations() As Global.System.Data.DataRelationCollection
|
||||
Get
|
||||
Return MyBase.Relations
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Protected Overrides Sub InitializeDerivedDataSet()
|
||||
Me.BeginInit()
|
||||
Me.InitClass()
|
||||
Me.EndInit()
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Overrides Function Clone() As Global.System.Data.DataSet
|
||||
Dim cln As MyDataset = CType(MyBase.Clone, MyDataset)
|
||||
cln.InitVars()
|
||||
cln.SchemaSerializationMode = Me.SchemaSerializationMode
|
||||
Return cln
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Protected Overrides Function ShouldSerializeTables() As Boolean
|
||||
Return False
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Protected Overrides Function ShouldSerializeRelations() As Boolean
|
||||
Return False
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Protected Overrides Sub ReadXmlSerializable(ByVal reader As Global.System.Xml.XmlReader)
|
||||
If (Me.DetermineSchemaSerializationMode(reader) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then
|
||||
Me.Reset()
|
||||
Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet()
|
||||
ds.ReadXml(reader)
|
||||
If (Not (ds.Tables("TBVEKTOR_INDEX")) Is Nothing) Then
|
||||
MyBase.Tables.Add(New TBVEKTOR_INDEXDataTable(ds.Tables("TBVEKTOR_INDEX")))
|
||||
End If
|
||||
Me.DataSetName = ds.DataSetName
|
||||
Me.Prefix = ds.Prefix
|
||||
Me.Namespace = ds.Namespace
|
||||
Me.Locale = ds.Locale
|
||||
Me.CaseSensitive = ds.CaseSensitive
|
||||
Me.EnforceConstraints = ds.EnforceConstraints
|
||||
Me.Merge(ds, False, Global.System.Data.MissingSchemaAction.Add)
|
||||
Me.InitVars()
|
||||
Else
|
||||
Me.ReadXml(reader)
|
||||
Me.InitVars()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Protected Overrides Function GetSchemaSerializable() As Global.System.Xml.Schema.XmlSchema
|
||||
Dim stream As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
|
||||
Me.WriteXmlSchema(New Global.System.Xml.XmlTextWriter(stream, Nothing))
|
||||
stream.Position = 0
|
||||
Return Global.System.Xml.Schema.XmlSchema.Read(New Global.System.Xml.XmlTextReader(stream), Nothing)
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Friend Overloads Sub InitVars()
|
||||
Me.InitVars(True)
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Friend Overloads Sub InitVars(ByVal initTable As Boolean)
|
||||
Me.tableTBVEKTOR_INDEX = CType(MyBase.Tables("TBVEKTOR_INDEX"), TBVEKTOR_INDEXDataTable)
|
||||
If (initTable = True) Then
|
||||
If (Not (Me.tableTBVEKTOR_INDEX) Is Nothing) Then
|
||||
Me.tableTBVEKTOR_INDEX.InitVars()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Private Sub InitClass()
|
||||
Me.DataSetName = "MyDataset"
|
||||
Me.Prefix = ""
|
||||
Me.Namespace = "http://tempuri.org/MyDataset.xsd"
|
||||
Me.EnforceConstraints = True
|
||||
Me.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
|
||||
Me.tableTBVEKTOR_INDEX = New TBVEKTOR_INDEXDataTable()
|
||||
MyBase.Tables.Add(Me.tableTBVEKTOR_INDEX)
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Private Function ShouldSerializeTBVEKTOR_INDEX() As Boolean
|
||||
Return False
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Private Sub SchemaChanged(ByVal sender As Object, ByVal e As Global.System.ComponentModel.CollectionChangeEventArgs)
|
||||
If (e.Action = Global.System.ComponentModel.CollectionChangeAction.Remove) Then
|
||||
Me.InitVars()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Shared Function GetTypedDataSetSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
|
||||
Dim ds As MyDataset = New MyDataset()
|
||||
Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
|
||||
Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
|
||||
Dim any As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
|
||||
any.Namespace = ds.Namespace
|
||||
sequence.Items.Add(any)
|
||||
type.Particle = sequence
|
||||
Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
|
||||
If xs.Contains(dsSchema.TargetNamespace) Then
|
||||
Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
|
||||
Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
|
||||
Try
|
||||
Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
|
||||
dsSchema.Write(s1)
|
||||
Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
|
||||
Do While schemas.MoveNext
|
||||
schema = CType(schemas.Current, Global.System.Xml.Schema.XmlSchema)
|
||||
s2.SetLength(0)
|
||||
schema.Write(s2)
|
||||
If (s1.Length = s2.Length) Then
|
||||
s1.Position = 0
|
||||
s2.Position = 0
|
||||
|
||||
Do While ((s1.Position <> s1.Length) _
|
||||
AndAlso (s1.ReadByte = s2.ReadByte))
|
||||
|
||||
|
||||
Loop
|
||||
If (s1.Position = s1.Length) Then
|
||||
Return type
|
||||
End If
|
||||
End If
|
||||
|
||||
Loop
|
||||
Finally
|
||||
If (Not (s1) Is Nothing) Then
|
||||
s1.Close()
|
||||
End If
|
||||
If (Not (s2) Is Nothing) Then
|
||||
s2.Close()
|
||||
End If
|
||||
End Try
|
||||
End If
|
||||
xs.Add(dsSchema)
|
||||
Return type
|
||||
End Function
|
||||
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Delegate Sub TBVEKTOR_INDEXRowChangeEventHandler(ByVal sender As Object, ByVal e As TBVEKTOR_INDEXRowChangeEvent)
|
||||
|
||||
'''<summary>
|
||||
'''Represents the strongly named DataTable class.
|
||||
'''</summary>
|
||||
<Global.System.Serializable(), _
|
||||
Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
|
||||
Partial Public Class TBVEKTOR_INDEXDataTable
|
||||
Inherits Global.System.Data.TypedTableBase(Of TBVEKTOR_INDEXRow)
|
||||
|
||||
Private columnIndexname As Global.System.Data.DataColumn
|
||||
|
||||
Private columnValue As Global.System.Data.DataColumn
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
Me.TableName = "TBVEKTOR_INDEX"
|
||||
Me.BeginInit()
|
||||
Me.InitClass()
|
||||
Me.EndInit()
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Friend Sub New(ByVal table As Global.System.Data.DataTable)
|
||||
MyBase.New()
|
||||
Me.TableName = table.TableName
|
||||
If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
|
||||
Me.CaseSensitive = table.CaseSensitive
|
||||
End If
|
||||
If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
|
||||
Me.Locale = table.Locale
|
||||
End If
|
||||
If (table.Namespace <> table.DataSet.Namespace) Then
|
||||
Me.Namespace = table.Namespace
|
||||
End If
|
||||
Me.Prefix = table.Prefix
|
||||
Me.MinimumCapacity = table.MinimumCapacity
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
|
||||
MyBase.New(info, context)
|
||||
Me.InitVars()
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public ReadOnly Property IndexnameColumn() As Global.System.Data.DataColumn
|
||||
Get
|
||||
Return Me.columnIndexname
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public ReadOnly Property ValueColumn() As Global.System.Data.DataColumn
|
||||
Get
|
||||
Return Me.columnValue
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
|
||||
Global.System.ComponentModel.Browsable(False)> _
|
||||
Public ReadOnly Property Count() As Integer
|
||||
Get
|
||||
Return Me.Rows.Count
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Default Public ReadOnly Property Item(ByVal index As Integer) As TBVEKTOR_INDEXRow
|
||||
Get
|
||||
Return CType(Me.Rows(index), TBVEKTOR_INDEXRow)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Event TBVEKTOR_INDEXRowChanging As TBVEKTOR_INDEXRowChangeEventHandler
|
||||
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Event TBVEKTOR_INDEXRowChanged As TBVEKTOR_INDEXRowChangeEventHandler
|
||||
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Event TBVEKTOR_INDEXRowDeleting As TBVEKTOR_INDEXRowChangeEventHandler
|
||||
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Event TBVEKTOR_INDEXRowDeleted As TBVEKTOR_INDEXRowChangeEventHandler
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Overloads Sub AddTBVEKTOR_INDEXRow(ByVal row As TBVEKTOR_INDEXRow)
|
||||
Me.Rows.Add(row)
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Overloads Function AddTBVEKTOR_INDEXRow(ByVal Indexname As String, ByVal Value As String) As TBVEKTOR_INDEXRow
|
||||
Dim rowTBVEKTOR_INDEXRow As TBVEKTOR_INDEXRow = CType(Me.NewRow, TBVEKTOR_INDEXRow)
|
||||
Dim columnValuesArray() As Object = New Object() {Indexname, Value}
|
||||
rowTBVEKTOR_INDEXRow.ItemArray = columnValuesArray
|
||||
Me.Rows.Add(rowTBVEKTOR_INDEXRow)
|
||||
Return rowTBVEKTOR_INDEXRow
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Overrides Function Clone() As Global.System.Data.DataTable
|
||||
Dim cln As TBVEKTOR_INDEXDataTable = CType(MyBase.Clone, TBVEKTOR_INDEXDataTable)
|
||||
cln.InitVars()
|
||||
Return cln
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
|
||||
Return New TBVEKTOR_INDEXDataTable()
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Friend Sub InitVars()
|
||||
Me.columnIndexname = MyBase.Columns("Indexname")
|
||||
Me.columnValue = MyBase.Columns("Value")
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Private Sub InitClass()
|
||||
Me.columnIndexname = New Global.System.Data.DataColumn("Indexname", GetType(String), Nothing, Global.System.Data.MappingType.Element)
|
||||
MyBase.Columns.Add(Me.columnIndexname)
|
||||
Me.columnValue = New Global.System.Data.DataColumn("Value", GetType(String), Nothing, Global.System.Data.MappingType.Element)
|
||||
MyBase.Columns.Add(Me.columnValue)
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Function NewTBVEKTOR_INDEXRow() As TBVEKTOR_INDEXRow
|
||||
Return CType(Me.NewRow, TBVEKTOR_INDEXRow)
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
|
||||
Return New TBVEKTOR_INDEXRow(builder)
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Protected Overrides Function GetRowType() As Global.System.Type
|
||||
Return GetType(TBVEKTOR_INDEXRow)
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
|
||||
MyBase.OnRowChanged(e)
|
||||
If (Not (Me.TBVEKTOR_INDEXRowChangedEvent) Is Nothing) Then
|
||||
RaiseEvent TBVEKTOR_INDEXRowChanged(Me, New TBVEKTOR_INDEXRowChangeEvent(CType(e.Row, TBVEKTOR_INDEXRow), e.Action))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
|
||||
MyBase.OnRowChanging(e)
|
||||
If (Not (Me.TBVEKTOR_INDEXRowChangingEvent) Is Nothing) Then
|
||||
RaiseEvent TBVEKTOR_INDEXRowChanging(Me, New TBVEKTOR_INDEXRowChangeEvent(CType(e.Row, TBVEKTOR_INDEXRow), e.Action))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
|
||||
MyBase.OnRowDeleted(e)
|
||||
If (Not (Me.TBVEKTOR_INDEXRowDeletedEvent) Is Nothing) Then
|
||||
RaiseEvent TBVEKTOR_INDEXRowDeleted(Me, New TBVEKTOR_INDEXRowChangeEvent(CType(e.Row, TBVEKTOR_INDEXRow), e.Action))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
|
||||
MyBase.OnRowDeleting(e)
|
||||
If (Not (Me.TBVEKTOR_INDEXRowDeletingEvent) Is Nothing) Then
|
||||
RaiseEvent TBVEKTOR_INDEXRowDeleting(Me, New TBVEKTOR_INDEXRowChangeEvent(CType(e.Row, TBVEKTOR_INDEXRow), e.Action))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Sub RemoveTBVEKTOR_INDEXRow(ByVal row As TBVEKTOR_INDEXRow)
|
||||
Me.Rows.Remove(row)
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
|
||||
Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
|
||||
Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
|
||||
Dim ds As MyDataset = New MyDataset()
|
||||
Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
|
||||
any1.Namespace = "http://www.w3.org/2001/XMLSchema"
|
||||
any1.MinOccurs = New Decimal(0)
|
||||
any1.MaxOccurs = Decimal.MaxValue
|
||||
any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
|
||||
sequence.Items.Add(any1)
|
||||
Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
|
||||
any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
|
||||
any2.MinOccurs = New Decimal(1)
|
||||
any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
|
||||
sequence.Items.Add(any2)
|
||||
Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
|
||||
attribute1.Name = "namespace"
|
||||
attribute1.FixedValue = ds.Namespace
|
||||
type.Attributes.Add(attribute1)
|
||||
Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
|
||||
attribute2.Name = "tableTypeName"
|
||||
attribute2.FixedValue = "TBVEKTOR_INDEXDataTable"
|
||||
type.Attributes.Add(attribute2)
|
||||
type.Particle = sequence
|
||||
Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
|
||||
If xs.Contains(dsSchema.TargetNamespace) Then
|
||||
Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
|
||||
Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
|
||||
Try
|
||||
Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
|
||||
dsSchema.Write(s1)
|
||||
Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
|
||||
Do While schemas.MoveNext
|
||||
schema = CType(schemas.Current, Global.System.Xml.Schema.XmlSchema)
|
||||
s2.SetLength(0)
|
||||
schema.Write(s2)
|
||||
If (s1.Length = s2.Length) Then
|
||||
s1.Position = 0
|
||||
s2.Position = 0
|
||||
|
||||
Do While ((s1.Position <> s1.Length) _
|
||||
AndAlso (s1.ReadByte = s2.ReadByte))
|
||||
|
||||
|
||||
Loop
|
||||
If (s1.Position = s1.Length) Then
|
||||
Return type
|
||||
End If
|
||||
End If
|
||||
|
||||
Loop
|
||||
Finally
|
||||
If (Not (s1) Is Nothing) Then
|
||||
s1.Close()
|
||||
End If
|
||||
If (Not (s2) Is Nothing) Then
|
||||
s2.Close()
|
||||
End If
|
||||
End Try
|
||||
End If
|
||||
xs.Add(dsSchema)
|
||||
Return type
|
||||
End Function
|
||||
End Class
|
||||
|
||||
'''<summary>
|
||||
'''Represents strongly named DataRow class.
|
||||
'''</summary>
|
||||
Partial Public Class TBVEKTOR_INDEXRow
|
||||
Inherits Global.System.Data.DataRow
|
||||
|
||||
Private tableTBVEKTOR_INDEX As TBVEKTOR_INDEXDataTable
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
|
||||
MyBase.New(rb)
|
||||
Me.tableTBVEKTOR_INDEX = CType(Me.Table, TBVEKTOR_INDEXDataTable)
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Property Indexname() As String
|
||||
Get
|
||||
Try
|
||||
Return CType(Me(Me.tableTBVEKTOR_INDEX.IndexnameColumn), String)
|
||||
Catch e As Global.System.InvalidCastException
|
||||
Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Indexname in Tabelle TBVEKTOR_INDEX ist DBNull.", e)
|
||||
End Try
|
||||
End Get
|
||||
Set(value As String)
|
||||
Me(Me.tableTBVEKTOR_INDEX.IndexnameColumn) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Property Value() As String
|
||||
Get
|
||||
Try
|
||||
Return CType(Me(Me.tableTBVEKTOR_INDEX.ValueColumn), String)
|
||||
Catch e As Global.System.InvalidCastException
|
||||
Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Value in Tabelle TBVEKTOR_INDEX ist DBNull.", e)
|
||||
End Try
|
||||
End Get
|
||||
Set(value As String)
|
||||
Me(Me.tableTBVEKTOR_INDEX.ValueColumn) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Function IsIndexnameNull() As Boolean
|
||||
Return Me.IsNull(Me.tableTBVEKTOR_INDEX.IndexnameColumn)
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Sub SetIndexnameNull()
|
||||
Me(Me.tableTBVEKTOR_INDEX.IndexnameColumn) = 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 IsValueNull() As Boolean
|
||||
Return Me.IsNull(Me.tableTBVEKTOR_INDEX.ValueColumn)
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Sub SetValueNull()
|
||||
Me(Me.tableTBVEKTOR_INDEX.ValueColumn) = Global.System.Convert.DBNull
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
'''<summary>
|
||||
'''Row event argument class
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Class TBVEKTOR_INDEXRowChangeEvent
|
||||
Inherits Global.System.EventArgs
|
||||
|
||||
Private eventRow As TBVEKTOR_INDEXRow
|
||||
|
||||
Private eventAction As Global.System.Data.DataRowAction
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Sub New(ByVal row As TBVEKTOR_INDEXRow, ByVal action As Global.System.Data.DataRowAction)
|
||||
MyBase.New()
|
||||
Me.eventRow = row
|
||||
Me.eventAction = action
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public ReadOnly Property Row() As TBVEKTOR_INDEXRow
|
||||
Get
|
||||
Return Me.eventRow
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public ReadOnly Property Action() As Global.System.Data.DataRowAction
|
||||
Get
|
||||
Return Me.eventAction
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Class
|
||||
9
app/DDWDResultHandler/MyDataset.xsc
Normal file
9
app/DDWDResultHandler/MyDataset.xsc
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DataSetUISetting Version="1.00" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<TableUISettings />
|
||||
</DataSetUISetting>
|
||||
26
app/DDWDResultHandler/MyDataset.xsd
Normal file
26
app/DDWDResultHandler/MyDataset.xsd
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema id="MyDataset" targetNamespace="http://tempuri.org/MyDataset.xsd" xmlns:mstns="http://tempuri.org/MyDataset.xsd" xmlns="http://tempuri.org/MyDataset.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
|
||||
<xs:annotation>
|
||||
<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<Connections />
|
||||
<Tables />
|
||||
<Sources />
|
||||
</DataSource>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:element name="MyDataset" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="MyDataset" msprop:Generator_UserDSName="MyDataset">
|
||||
<xs:complexType>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="TBVEKTOR_INDEX" msprop:Generator_TableClassName="TBVEKTOR_INDEXDataTable" msprop:Generator_TableVarName="tableTBVEKTOR_INDEX" msprop:Generator_TablePropName="TBVEKTOR_INDEX" msprop:Generator_RowDeletingName="TBVEKTOR_INDEXRowDeleting" msprop:Generator_RowChangingName="TBVEKTOR_INDEXRowChanging" msprop:Generator_RowEvHandlerName="TBVEKTOR_INDEXRowChangeEventHandler" msprop:Generator_RowDeletedName="TBVEKTOR_INDEXRowDeleted" msprop:Generator_UserTableName="TBVEKTOR_INDEX" msprop:Generator_RowChangedName="TBVEKTOR_INDEXRowChanged" msprop:Generator_RowEvArgName="TBVEKTOR_INDEXRowChangeEvent" msprop:Generator_RowClassName="TBVEKTOR_INDEXRow">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Indexname" msprop:Generator_ColumnVarNameInTable="columnIndexname" msprop:Generator_ColumnPropNameInRow="Indexname" msprop:Generator_ColumnPropNameInTable="IndexnameColumn" msprop:Generator_UserColumnName="Indexname" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="Value" msprop:Generator_ColumnVarNameInTable="columnValue" msprop:Generator_ColumnPropNameInRow="Value" msprop:Generator_ColumnPropNameInTable="ValueColumn" msprop:Generator_UserColumnName="Value" type="xs:string" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
12
app/DDWDResultHandler/MyDataset.xss
Normal file
12
app/DDWDResultHandler/MyDataset.xss
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool to store the dataset designer's layout information.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="-10" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<Shapes>
|
||||
<Shape ID="DesignTable:TBVEKTOR_INDEX" ZOrder="1" X="0" Y="0" Height="67" Width="171" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="86" />
|
||||
</Shapes>
|
||||
<Connectors />
|
||||
</DiagramLayout>
|
||||
48
app/DDWDResultHandler/ProjectInstaller.Designer.vb
generated
Normal file
48
app/DDWDResultHandler/ProjectInstaller.Designer.vb
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
<System.ComponentModel.RunInstaller(True)> Partial Class ProjectInstaller
|
||||
Inherits System.Configuration.Install.Installer
|
||||
|
||||
'Installer überschreibt den Löschvorgang zum Bereinigen der Komponentenliste.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Komponenten-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Komponenten-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Komponenten-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.ServiceProcessInstaller1 = New System.ServiceProcess.ServiceProcessInstaller()
|
||||
Me.ServiceInstaller1 = New System.ServiceProcess.ServiceInstaller()
|
||||
'
|
||||
'ServiceProcessInstaller1
|
||||
'
|
||||
Me.ServiceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalSystem
|
||||
Me.ServiceProcessInstaller1.Password = Nothing
|
||||
Me.ServiceProcessInstaller1.Username = Nothing
|
||||
'
|
||||
'ServiceInstaller1
|
||||
'
|
||||
Me.ServiceInstaller1.Description = "Führt windream Suchen aus und verarbeitet die gefundenen Dateien nach Profilangab" & _
|
||||
"e"
|
||||
Me.ServiceInstaller1.DisplayName = "DD windream Result Handler"
|
||||
Me.ServiceInstaller1.ServiceName = "DDWDResultHandler"
|
||||
'
|
||||
'ProjectInstaller
|
||||
'
|
||||
Me.Installers.AddRange(New System.Configuration.Install.Installer() {Me.ServiceProcessInstaller1, Me.ServiceInstaller1})
|
||||
|
||||
End Sub
|
||||
Friend WithEvents ServiceProcessInstaller1 As System.ServiceProcess.ServiceProcessInstaller
|
||||
Friend WithEvents ServiceInstaller1 As System.ServiceProcess.ServiceInstaller
|
||||
|
||||
End Class
|
||||
129
app/DDWDResultHandler/ProjectInstaller.resx
Normal file
129
app/DDWDResultHandler/ProjectInstaller.resx
Normal file
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="ServiceProcessInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="ServiceInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>197, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
16
app/DDWDResultHandler/ProjectInstaller.vb
Normal file
16
app/DDWDResultHandler/ProjectInstaller.vb
Normal file
@@ -0,0 +1,16 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Configuration.Install
|
||||
|
||||
Public Class ProjectInstaller
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'Dieser Aufruf ist für den Komponenten-Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
'Initialisierungscode nach dem Aufruf von InitializeComponent hinzufügen
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
4
app/DDWDResultHandler/RUNTIME_VARIABLES.vb
Normal file
4
app/DDWDResultHandler/RUNTIME_VARIABLES.vb
Normal file
@@ -0,0 +1,4 @@
|
||||
Module RUNTIME_VARIABLES
|
||||
Public EXPORTED_FILENAME As String
|
||||
|
||||
End Module
|
||||
131
app/DDWDResultHandler/clsDatatabase.vb
Normal file
131
app/DDWDResultHandler/clsDatatabase.vb
Normal file
@@ -0,0 +1,131 @@
|
||||
Imports System.Data.SqlClient
|
||||
Imports Oracle.ManagedDataAccess.Client
|
||||
|
||||
Public Class clsDatatabase
|
||||
Public Shared Function ExecuteonOracleDb(CONSTRING As String, ByVal plsqlcommand As String)
|
||||
Try
|
||||
' die nötigen Variablen definieren
|
||||
Dim result As Object = Nothing
|
||||
Dim conn As New OracleConnectionStringBuilder
|
||||
|
||||
Dim Oracle_Conn As OracleConnection = New OracleConnection(CONSTRING)
|
||||
Dim Oracle_Command As OracleCommand = Nothing
|
||||
Dim DataAdapter As OracleDataAdapter = Nothing
|
||||
|
||||
' Verbindung zur Datenbank aufbauen
|
||||
Try
|
||||
Oracle_Conn.Open()
|
||||
Catch ex As Exception
|
||||
clsLogger.Add(ex.Message, True, "clsDatatabase.ExecuteonOracleDb(OpenConnection)")
|
||||
Return False
|
||||
End Try
|
||||
|
||||
|
||||
' SQL-Abfrage definieren
|
||||
Try
|
||||
Oracle_Command = New OracleCommand(plsqlcommand, Oracle_Conn)
|
||||
Oracle_Command.AddToStatementCache = True
|
||||
|
||||
Catch ex As Exception
|
||||
clsLogger.Add(ex.Message, True, "clsDatatabase.plsqlcommandDefine")
|
||||
Oracle_Conn.Close()
|
||||
Return False
|
||||
End Try
|
||||
|
||||
|
||||
' *** Ausführen des Command ***
|
||||
If Command() IsNot Nothing Then
|
||||
Try
|
||||
Oracle_Command.ExecuteNonQuery()
|
||||
' DB-Connection schliessen
|
||||
Oracle_Conn.Close()
|
||||
Return True
|
||||
|
||||
Catch ex As Exception
|
||||
clsLogger.Add(ex.Message & vbNewLine & "Execute Command => (" & plsqlcommand & ")", True, "clsDatatabase.ExecuteonOracleDb")
|
||||
Oracle_Conn.Close()
|
||||
|
||||
Return False
|
||||
End Try
|
||||
|
||||
Else
|
||||
' kann eintreten, wenn entweder die SQL-Anweisung falsch ist oder wenn die DataConnection nicht richtig aufgebaut werden konnte
|
||||
' Eintrag in Logdatei machen
|
||||
clsLogger.Add("SQL-Command ist ungültig bzw konnte nicht erstellt werden (SQL: " & plsqlcommand & ")", True, "clsDatatabase.ExecuteonOracleDb")
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
clsLogger.Add("Unexpected Error in ExecuteonOracleDb: " & ex.Message & vbNewLine & "(SQL: " & plsqlcommand & ")", True, "clsDatatabase.ExecuteonOracleDb")
|
||||
' an dieser Stelle sollte jeder unvorhergesehene Fehler der Funktion abgefangen werden
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Public Shared Function ExecuteonMSSQL(ConString As String, ByVal sqlcommand As String)
|
||||
Try
|
||||
|
||||
' die nötigen Variablen definieren
|
||||
Dim Connection As SqlConnection = Nothing
|
||||
' Dim ConnectionString As SqlConnectionStringBuilder = Nothing
|
||||
Dim Command As SqlCommand = Nothing
|
||||
Dim DataAdapter As SqlDataAdapter = Nothing
|
||||
|
||||
'' ConnectionString aufbauen (aus Settings auslesen)
|
||||
'ConnectionString = New SqlConnectionStringBuilder()
|
||||
'ConnectionString.DataSource = datasource
|
||||
'ConnectionString.UserID = User
|
||||
'ConnectionString.Password = pw
|
||||
'ConnectionString.InitialCatalog = init_Cata
|
||||
|
||||
|
||||
|
||||
' Verbindung zur Datenbank aufbauen
|
||||
Try
|
||||
Connection = New SqlConnection(ConString)
|
||||
Connection.Open()
|
||||
Catch ex As Exception
|
||||
clsLogger.Add(ex.Message, True, "clsDatatabase.ExecuteonMSSQL(OpenConnection)")
|
||||
Return False
|
||||
End Try
|
||||
|
||||
|
||||
' SQL-Abfrage definieren
|
||||
Try
|
||||
Command = New SqlCommand(sqlcommand, Connection)
|
||||
Catch ex As Exception
|
||||
clsLogger.Add(ex.Message, True, "clsDatatabase.ExecuteonMSSQL(DefineCommand)")
|
||||
Return False
|
||||
Connection.Close()
|
||||
End Try
|
||||
|
||||
' *** Ausführen des Command ***
|
||||
If Command IsNot Nothing Then
|
||||
|
||||
Try
|
||||
Command.ExecuteNonQuery()
|
||||
' DB-Connection schliessen
|
||||
Connection.Close()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' bei einem Fehler einen Eintrag in der Logdatei erzeugen
|
||||
clsLogger.Add(ex.Message, True, "clsDatatabase.ExecuteonMSSQL(ExecuteCommand)")
|
||||
Return False
|
||||
Connection.Close()
|
||||
End Try
|
||||
Else
|
||||
' kann eintreten, wenn entweder die SQL-Anweisung falsch ist oder wenn die DataConnection nicht richtig aufgebaut werden konnte
|
||||
' Eintrag in Logdatei machen
|
||||
clsLogger.Add("Could not create COMMAND", True, "clsDatatabase.ExecuteonMSSQL")
|
||||
Return False
|
||||
Connection.Close()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
' an dieser Stelle sollte jeder unvorhergesehene Fehler der Funktion abgefangen werden
|
||||
clsLogger.Add("UNEXPECTED ERROR: " & ex.Message, True, "clsDatatabase.ExecuteonMSSQL")
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
End Class
|
||||
245
app/DDWDResultHandler/clsDateiverarbeitung.vb
Normal file
245
app/DDWDResultHandler/clsDateiverarbeitung.vb
Normal file
@@ -0,0 +1,245 @@
|
||||
Imports WINDREAMLib
|
||||
Imports System.IO
|
||||
Public Class clsDateiverarbeitung
|
||||
|
||||
#Region "***** Variablen und Konstanten*****"
|
||||
Public Shared _windream As New clsWindream_allgemein
|
||||
|
||||
Public Shared pr_Profilname, pr_Objekttyp, pr_wdSuche, konfig_WDLaufwerk, konfig_VERSIONSTZ As String
|
||||
Public Shared pr_GUID As Integer
|
||||
Public Shared pr_DTPROFIL_REGELN As DataTable
|
||||
Public Shared aktfile_Exportresult
|
||||
|
||||
Private email As New clsEmail
|
||||
Public Shared CriticalError As Boolean = False
|
||||
|
||||
Private Shared regel_TYP, regel_INDEX_NAME, regel_QUELLE1, regel_FROM1, regel_FROM2 As String
|
||||
Private Shared Indexe() As String = Nothing ' zum Speichern der Indexe
|
||||
Private Shared NI_Values() As String = Nothing ' zum Speichern der Werte
|
||||
|
||||
Private Shared WD_aktivesDokument As WMObject
|
||||
|
||||
|
||||
Const WMObjectStreamOpenModeReadWrite = 2
|
||||
Const WMObjectEditModeFileSystem = &H15
|
||||
#End Region
|
||||
Public Shared Function InitProfilData()
|
||||
Try
|
||||
pr_Profilname = Nothing
|
||||
pr_Objekttyp = Nothing
|
||||
pr_wdSuche = Nothing
|
||||
pr_DTPROFIL_REGELN = Nothing
|
||||
' Profildaten der Klasse mitteilen
|
||||
pr_Profilname = clsProfil._Profilname
|
||||
pr_Objekttyp = clsProfil._profObjekttyp
|
||||
pr_wdSuche = clsProfil._profwdSuche
|
||||
pr_GUID = clsProfil._profGUID
|
||||
konfig_WDLaufwerk = clsSQLITE.konf_WDLAUFWERK
|
||||
konfig_VERSIONSTZ = clsSQLITE.konf_VERSIONSTRENNZEICHEN
|
||||
clsLogger.AddDetailLog("InitProfilData Profildaten zugewiesen....")
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError(ex.Message, "cls_DV.InitProfilData")
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
'Kopiert die übergebene Datei in den Zielpfad
|
||||
Public Shared Function Export_File(WDDatei As WMObject, Zielpfad As String)
|
||||
Try
|
||||
If Not Zielpfad.EndsWith("\") Then
|
||||
Zielpfad = Zielpfad & "\"
|
||||
End If
|
||||
clsLogger.Add("", False)
|
||||
clsLogger.Add(">> Verarbeitung von Datei: " & WDDatei.aName, False)
|
||||
'Die Quelle zusammensetzen
|
||||
clsLogger.AddDetailLog("PFAD: " & konfig_WDLaufwerk & ":" & WDDatei.aPath & "\" & WDDatei.aName)
|
||||
'Dim Quelle As String = IO.Path.GetDirectoryName(WDLaufwerk & ":" & WDDatei.aPath & "\" & WDDatei.aName)
|
||||
|
||||
Dim ExportFileIO = New WMOTOOLLib.WMFileIO ' CreateObject("WMOTOOLLib.WMFileIO") ' New WMOTOOLLib.WMFileIO
|
||||
clsLogger.AddDetailLog("ExportFileIO erzeugt.....")
|
||||
' Stream Interface bereitstellen
|
||||
WDDatei.LockFor(WMObjectEditModeFileSystem)
|
||||
Try
|
||||
If Not WDDatei.aLocked Then
|
||||
WDDatei.lock()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
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
|
||||
'Dim Stammname As String = System.IO.Path.GetFileNameWithoutExtension(Quelle)
|
||||
Dim Filename = WDDatei.aName.Substring(0, WDDatei.aName.LastIndexOf("."))
|
||||
Dim Extension = WDDatei.aName.Substring(WDDatei.aName.LastIndexOf("."))
|
||||
Dim tempFilename As String = Zielpfad & Filename & Extension
|
||||
'Überprüfen ob File existiert
|
||||
Do While IO.File.Exists(tempFilename) = True
|
||||
tempFilename = Zielpfad & Filename & konfig_VERSIONSTZ & version & Extension
|
||||
version = version + 1
|
||||
Loop
|
||||
clsLogger.AddDetailLog("Zieldateiname: " & tempFilename)
|
||||
' den Dateiinhalt der neuen Datei zuweisen
|
||||
ExportFileIO.aWMStream = oWMStream
|
||||
ExportFileIO.bstrOriginalFileName = tempFilename
|
||||
'Das eigentliche kopieren
|
||||
ExportFileIO.ExportOriginal(True)
|
||||
' close the windream file stream
|
||||
oWMStream.Close()
|
||||
WDDatei.Save()
|
||||
WDDatei.unlock()
|
||||
EXPORTED_FILENAME = tempFilename
|
||||
clsLogger.Add(">> Datei erfolgreich nach '" & tempFilename & "' verschoben.", False, "clsDV Export_File")
|
||||
aktfile_Exportresult = tempFilename
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
'bei einem Fehler einen Eintrag in der Logdatei machen
|
||||
clsLogger.AddError("Unvorhergesehener Fehler: " & ex.Message, "clsDV.Export_File")
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Public Shared Function Rename_File(wddok As WMObject, konvention As String)
|
||||
Try
|
||||
clsLogger.AddDetailLog("Konvention: '" & konvention & "'")
|
||||
|
||||
' Regulären Ausdruck zum Auslesen der windream-Indexe definieren
|
||||
Dim preg As String = "\[%{1}[a-zA-Z0-9\!\$\&\/\(\)\=\?\,\.\-\;\:_öÖüÜäÄ\#\'\+\*\~\{\}\@\€\<\>\ ]+]{1}"
|
||||
' einen Regulären Ausdruck laden
|
||||
Dim regulärerAusdruck As System.Text.RegularExpressions.Regex = New System.Text.RegularExpressions.Regex(preg)
|
||||
' die Vorkommen im SQL-String auslesen
|
||||
Dim reg_elemente As System.Text.RegularExpressions.MatchCollection = regulärerAusdruck.Matches(konvention)
|
||||
Dim i As Integer = 0
|
||||
' alle Vorkommen der windream-Indexe im SQL-String durchlaufen
|
||||
For Each reg_element As System.Text.RegularExpressions.Match In reg_elemente
|
||||
' die Zeichen [% und ] entfernen (liefert den wirklichen windream-Index)
|
||||
Dim reg_element_Ohne_SZ As String = reg_element.Value.Replace("[%", "")
|
||||
reg_element_Ohne_SZ = reg_element_Ohne_SZ.Replace("]", "")
|
||||
clsLogger.AddDetailLog("Indexwert aus Index '" & reg_element_Ohne_SZ & "' auslesen....")
|
||||
Dim wdIndexwert
|
||||
' den Wert des Indexes für das aktuelle Dokument auslesen
|
||||
wdIndexwert = wddok.GetVariableValue(reg_element_Ohne_SZ)
|
||||
If wdIndexwert Is Nothing = False Then
|
||||
If Not wdIndexwert.GetType.ToString.Contains("System.Object") Then
|
||||
clsLogger.AddDetailLog("Namenkonvention (" & i & ") " & konvention)
|
||||
wdIndexwert = wdIndexwert.ToString.TrimEnd
|
||||
wdIndexwert = wdIndexwert.ToString.TrimStart
|
||||
clsLogger.AddDetailLog("Ausgelesener Indexwert = '" & wdIndexwert & "'")
|
||||
konvention = konvention.Replace(reg_element.Value, wdIndexwert.ToString)
|
||||
i += 1
|
||||
Else
|
||||
clsLogger.Add(">> Achtung gelesener Wert ist ein Vektorfeld - keine Umbenennung möglich ", False, "clsProfil.Profil_Durchlauf")
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Dim version As Integer = 2
|
||||
Dim ZielPfad As String = Path.GetDirectoryName(aktfile_Exportresult)
|
||||
clsLogger.AddDetailLog("ZielPfad: " & ZielPfad)
|
||||
Dim Filename = konvention
|
||||
Dim Extension = Path.GetExtension(aktfile_Exportresult)
|
||||
clsLogger.AddDetailLog("Extension: " & Extension)
|
||||
Dim tempFilename As String = ZielPfad & "\" & Filename & Extension
|
||||
clsLogger.AddDetailLog("tempFilename: " & tempFilename)
|
||||
'Überprüfen ob File existiert
|
||||
Do While IO.File.Exists(tempFilename) = True
|
||||
tempFilename = ZielPfad & "\" & Filename & konfig_VERSIONSTZ & version & Extension
|
||||
version += 1
|
||||
Loop
|
||||
clsLogger.AddDetailLog("RenameFile - OLDFilename: " & aktfile_Exportresult & " - NEWFilename: " & Path.GetFileName(tempFilename))
|
||||
My.Computer.FileSystem.RenameFile(aktfile_Exportresult, Path.GetFileName(tempFilename))
|
||||
clsLogger.Add(">> Datei wurde erfolgreich umbenannt.", False, "clsProfil.RenameFile")
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError("Unvorhergesehener Fehler: " & ex.Message, "clsProfil.RenameFile")
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Public Shared Function RUN_ORACLE_COMMAND(WMFile As WMObject, OracleCS As String, OracleCommandRAW As String)
|
||||
Try
|
||||
Dim result = REGEX_REPLACE(WMFile, OracleCommandRAW)
|
||||
If result = Nothing Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
If clsDatatabase.ExecuteonOracleDb(OracleCS, OracleCommandRAW) = True Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError("Unvorhergesehener Fehler: " & ex.Message, "RUN_ORACLE_COMMAND")
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Public Shared Function RUN_MSSQL_COMMAND(WMFile As WMObject, MSSQLCS As String, SQLCommandRAW As String)
|
||||
Try
|
||||
Dim result = REGEX_REPLACE(WMFile, SQLCommandRAW)
|
||||
If result = Nothing Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
If clsDatatabase.ExecuteonMSSQL(MSSQLCS, SQLCommandRAW) = True Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError("Unvorhergesehener Fehler: " & ex.Message, "RUN_MSSQL_COMMAND")
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Shared Function REGEX_REPLACE(WMFile As WMObject, _STRING As String)
|
||||
Try
|
||||
' Regulären Ausdruck zum Auslesen der windream-Indexe definieren
|
||||
Dim preg As String = "\[%{1}[a-zA-Z0-9\!\$\&\/\(\)\=\?\,\.\-\;\:_öÖüÜäÄ\#\'\+\*\~\{\}\@\€\<\>\ ]+]{1}"
|
||||
' einen Regulären Ausdruck laden
|
||||
Dim regulärerAusdruck As System.Text.RegularExpressions.Regex = New System.Text.RegularExpressions.Regex(preg)
|
||||
' die Vorkommen im SQL-String auslesen
|
||||
Dim reg_elemente As System.Text.RegularExpressions.MatchCollection = regulärerAusdruck.Matches(_STRING)
|
||||
Dim i As Integer = 0
|
||||
' alle Vorkommen der windream-Indexe im SQL-String durchlaufen
|
||||
For Each reg_element As System.Text.RegularExpressions.Match In reg_elemente
|
||||
' die Zeichen [% und ] entfernen (liefert den wirklichen windream-Index)
|
||||
Dim reg_element_Ohne_SZ As String = reg_element.Value.Replace("[%", "")
|
||||
reg_element_Ohne_SZ = reg_element_Ohne_SZ.Replace("]", "")
|
||||
clsLogger.AddDetailLog("Indexwert aus Index/Variable '" & reg_element_Ohne_SZ & "' auslesen....")
|
||||
If reg_element_Ohne_SZ = "EXPORTED_FILENAME" Then
|
||||
If EXPORTED_FILENAME <> "" Then
|
||||
_STRING = _STRING.Replace(reg_element.Value, EXPORTED_FILENAME)
|
||||
End If
|
||||
Else
|
||||
Dim wdIndexwert
|
||||
' den Wert des Indexes für das aktuelle Dokument auslesen
|
||||
wdIndexwert = WMFile.GetVariableValue(reg_element_Ohne_SZ)
|
||||
If wdIndexwert Is Nothing = False Then
|
||||
If Not wdIndexwert.GetType.ToString.Contains("System.Object") Then
|
||||
clsLogger.AddDetailLog("Namenkonvention (" & i & ") " & _STRING)
|
||||
wdIndexwert = wdIndexwert.ToString.TrimEnd
|
||||
wdIndexwert = wdIndexwert.ToString.TrimStart
|
||||
clsLogger.AddDetailLog("Ausgelesener Indexwert = '" & wdIndexwert & "'")
|
||||
_STRING = _STRING.Replace(reg_element.Value, wdIndexwert.ToString)
|
||||
i += 1
|
||||
Else
|
||||
clsLogger.Add(">> Achtung gelesener Wert ist ein Vektorfeld - keine Umbenennung möglich ", False, "clsProfil.Profil_Durchlauf")
|
||||
Return Nothing
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
Return _STRING
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError("Unvorhergesehener Fehler: " & ex.Message, "REGEX_REPLACE")
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
75
app/DDWDResultHandler/clsEmail.vb
Normal file
75
app/DDWDResultHandler/clsEmail.vb
Normal file
@@ -0,0 +1,75 @@
|
||||
Imports System.Net.Mail
|
||||
Public Class clsEmail
|
||||
Private Shared MailAktiv As Boolean = False
|
||||
Private Shared MailSSL As Boolean = False
|
||||
Private Shared MailEmpfaenger, MailFrom, MAilSMTP, MailUser, MailUser_PW As String
|
||||
Public Shared Function Init()
|
||||
Try
|
||||
Dim DT As DataTable = clsSQLITE.Return_Datatable("select * from TBKONFIGURATION where GUID = 1 and EMAIL_AKTIV = 1")
|
||||
If DT.Rows.Count = 1 Then
|
||||
For Each row As DataRow In DT.Rows
|
||||
MailEmpfaenger = row.Item("EMAIL_EMP")
|
||||
MailFrom = row.Item("EMAIL_ABS")
|
||||
MAilSMTP = row.Item("EMAIL_SMTP")
|
||||
MailSSL = row.Item("EMAIL_SSL")
|
||||
MailUser = row.Item("EMAIL_USER")
|
||||
MailUser_PW = row.Item("EMAIL_USER_PW")
|
||||
MailAktiv = True
|
||||
Exit For
|
||||
Next
|
||||
Else
|
||||
MailAktiv = False
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
clsLogger.Add(ex.Message, True, "clsEmail.Init")
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Public Shared Function Send_EMail(ByVal MailBetreff As String, ByVal vBody As String)
|
||||
'#### E-MAIL NACHRICHT VERSENDEN
|
||||
Try
|
||||
Dim empfaenger As String()
|
||||
If MailEmpfaenger.Contains(";") Then
|
||||
empfaenger = MailEmpfaenger.Split(";")
|
||||
Else
|
||||
ReDim Preserve empfaenger(0)
|
||||
empfaenger(0) = MailEmpfaenger
|
||||
End If
|
||||
'Für jeden Empfänger eine Neue Mail erzeugen
|
||||
For Each _mailempfaenger As String In empfaenger
|
||||
'Neue Nachricht erzeugen:
|
||||
Dim message As New MailMessage(MailFrom, _mailempfaenger, MailBetreff, _
|
||||
"<font face=""Arial"">" & vBody & "<br>Maschine: " & Environment.MachineName & _
|
||||
"<br>Domain-Name: " & Environment.UserDomainName & "<br>" & _
|
||||
"<br>Gesendet am: " & My.Computer.Clock.LocalTime.ToShortDateString & "-" & _
|
||||
My.Computer.Clock.LocalTime.ToLongTimeString & "</font>")
|
||||
' create and add the attachment(s) */
|
||||
' Dim Attachment As Attachment = New Attachment("E:\test\Frachkostenreport.txt")
|
||||
'message.Attachments.Add(Attachment)
|
||||
With message
|
||||
.IsBodyHtml = True
|
||||
End With
|
||||
|
||||
'Einen SMTP Client erzeugen und Anmeldungsinformationen hinterlegen
|
||||
Dim emailClient As New SmtpClient(MAilSMTP)
|
||||
emailClient.EnableSsl = MailSSL
|
||||
'Email mit Authentifizierung
|
||||
Dim SMTPUserInfo As New System.Net.NetworkCredential(MailUser, MailUser_PW) ', My.Settings.vDomain)
|
||||
emailClient.UseDefaultCredentials = False
|
||||
emailClient.Credentials = SMTPUserInfo
|
||||
emailClient.Port = 25
|
||||
clsLogger.Add("==> Fehler Email erfolgreich an " & _mailempfaenger & " versendet!", False)
|
||||
clsLogger.Add("==> Text: " & vBody, False)
|
||||
clsLogger.Add("", False)
|
||||
'*Send the message */
|
||||
emailClient.Send(message)
|
||||
Return True
|
||||
Next
|
||||
Catch ex As Exception
|
||||
clsLogger.Add(ex.Message, True, "cls.SendEmail")
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
End Class
|
||||
78
app/DDWDResultHandler/clsHelper.vb
Normal file
78
app/DDWDResultHandler/clsHelper.vb
Normal file
@@ -0,0 +1,78 @@
|
||||
Imports System.IO
|
||||
|
||||
Public Class clsHelper
|
||||
Public Shared Function Check_Folder(path As String)
|
||||
Try
|
||||
If Not IO.Directory.Exists(path) Then
|
||||
' Nein! Jetzt erstellen...
|
||||
IO.Directory.CreateDirectory(path)
|
||||
clsLogger.Add("Folder: '" & path & "' wurde erfolgreich angelegt", False)
|
||||
' Ordner wurde korrekt erstellt!
|
||||
End If
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError(ex.Message, "clsHelper.Check_Folder")
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Public Shared Function Prevent_Null(value)
|
||||
Select Case value.GetType.ToString
|
||||
Case "System.DBNull"
|
||||
Return Nothing
|
||||
Case Else
|
||||
Return value
|
||||
End Select
|
||||
End Function
|
||||
Public Shared Function func_check_file_use(ByVal sub_filename) As Boolean
|
||||
Dim fs As Integer = FreeFile()
|
||||
Dim inuse As Boolean = False
|
||||
If File.Exists(sub_filename) Then
|
||||
Try
|
||||
FileOpen(fs, sub_filename, OpenMode.Binary, _
|
||||
OpenAccess.ReadWrite, OpenShare.LockReadWrite)
|
||||
Catch
|
||||
inuse = True
|
||||
Finally
|
||||
FileClose(fs)
|
||||
End Try
|
||||
End If
|
||||
Return inuse
|
||||
End Function
|
||||
Public Shared Function file_exists(ByVal _file As String)
|
||||
Try
|
||||
If System.IO.File.Exists(_file) Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError(ex.Message, "clsHelper.file_exists")
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Public Shared Function Datei_Versionieren(Dateiname As String, LOG_ERR_ONLY As Boolean, modul As String)
|
||||
Try
|
||||
Dim version As Integer = 1
|
||||
Dim extension As String = Path.GetExtension(Dateiname) 'Quelldatei.Substring(Quelldatei.LastIndexOf("."))
|
||||
Dim Stammname As String = Path.GetDirectoryName(Dateiname)
|
||||
Dim neuername As String = Path.GetFileNameWithoutExtension(Dateiname)
|
||||
Dim endgueltigerDateiname As String = neuername & extension
|
||||
'Automatische Versionierung mit Tilde + Version
|
||||
Do While file_exists(Stammname & "\" & neuername & extension) = True
|
||||
clsLogger.Add(" - Datei " & endgueltigerDateiname & " ist vorhanden - Datei wird versioniert", False)
|
||||
neuername = Stammname & clsSQLITE.konf_VERSIONSTRENNZEICHEN & version
|
||||
endgueltigerDateiname = neuername & extension
|
||||
version = version + 1
|
||||
Loop
|
||||
Return Stammname & "\" & neuername & extension
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError(ex.Message, "clsHelper.Datei_Versionieren")
|
||||
Return Nothing
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Public Shared Function string_Contains(s As String, search As String)
|
||||
Return s.ToLower.Contains(search.ToLower)
|
||||
End Function
|
||||
End Class
|
||||
155
app/DDWDResultHandler/clsLogger.vb
Normal file
155
app/DDWDResultHandler/clsLogger.vb
Normal file
@@ -0,0 +1,155 @@
|
||||
Imports System.IO
|
||||
|
||||
Public Class clsLogger
|
||||
Private Shared LogPath As String
|
||||
Private Shared LogFilename As String
|
||||
Private Shared logErr_name As String
|
||||
Private Shared log_string As String
|
||||
Public Shared Function Init(ByVal speicherort As String, ByVal prefix As String)
|
||||
Try
|
||||
'Den Speicherort festlegen
|
||||
SetSpeicherort()
|
||||
Dim logf_name As String = LogPath & "\" & prefix & System.DateTime.Now.ToString("yyyy_MM_dd") & ".txt"
|
||||
logErr_name = LogPath & "\" & "ErrorLog_" & System.DateTime.Now.ToString("yyyy_MM_dd") & ".txt"
|
||||
Dim anz As Integer = 1
|
||||
Do While File.Exists(logf_name)
|
||||
Dim info As New FileInfo(logf_name)
|
||||
Dim length As Long = info.Length
|
||||
If length > 5000000 Then
|
||||
logf_name = IO.Path.GetDirectoryName(logf_name)
|
||||
logf_name = logf_name & "\" & prefix & System.DateTime.Now.ToString("yyyy_MM_dd") & "(" & anz.ToString & ").txt"
|
||||
anz = anz + 1
|
||||
Else
|
||||
Exit Do
|
||||
End If
|
||||
Loop
|
||||
LogFilename = logf_name
|
||||
Try
|
||||
'Veruch das Log zu öffnen
|
||||
Dim fs As FileStream = New FileStream(LogFilename, FileMode.OpenOrCreate, FileAccess.Write)
|
||||
' --- Stream öffnen
|
||||
Dim w As StreamWriter = New StreamWriter(fs)
|
||||
' --- Anfügen am Ende
|
||||
w.BaseStream.Seek(0, SeekOrigin.End)
|
||||
' --- Zeilen schreiben
|
||||
w.WriteLine(" ")
|
||||
' --- Writer und Stream schließen
|
||||
w.Close()
|
||||
fs.Close()
|
||||
Catch ex As Exception
|
||||
LogEscalation_Error("The Logfile could not be created - Error: " & ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
'Alles Ok
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
LogEscalation_Error("Unexpected Error in init Logger - Error: " & ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Private Shared Sub LogEscalation_Error(msg As String)
|
||||
Try
|
||||
'Veruch das Log zu öffnen
|
||||
Dim fs As FileStream = New FileStream(logErr_name, FileMode.OpenOrCreate, FileAccess.Write)
|
||||
' --- Stream öffnen
|
||||
Dim w As StreamWriter = New StreamWriter(fs)
|
||||
' --- Anfügen am Ende
|
||||
w.BaseStream.Seek(0, SeekOrigin.End)
|
||||
' --- Zeilen schreiben
|
||||
w.WriteLine(msg)
|
||||
' --- Writer und Stream schließen
|
||||
w.Close()
|
||||
fs.Close()
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End Sub
|
||||
' legt den Speicherort fest
|
||||
Public Shared Sub SetSpeicherort()
|
||||
Dim f As New IO.DirectoryInfo(My.Application.Info.DirectoryPath & "\Log")
|
||||
If f.Exists = False Then
|
||||
IO.Directory.CreateDirectory(My.Application.Info.DirectoryPath & "\Log")
|
||||
End If
|
||||
LogPath = My.Application.Info.DirectoryPath & "\Log\"
|
||||
End Sub
|
||||
Public Shared Sub Add(ByVal text As String, ByVal _error As Boolean, Optional ByVal Funktion As String = "")
|
||||
Dim msg As String
|
||||
If log_string <> "" Then
|
||||
log_string &= vbNewLine
|
||||
End If
|
||||
'Präfixe schreiben
|
||||
If _error = True And Funktion <> "" Then
|
||||
msg = ">> Achtung Fehler in Funktion '" & Funktion & "'" & vbNewLine & "Fehlermeldung: "
|
||||
ElseIf _error = True Then
|
||||
msg = ">> Achtung Fehler:" & vbNewLine & "Fehlermeldung: "
|
||||
End If
|
||||
'Präfix und Meldung zusammenstellen
|
||||
msg &= text
|
||||
log_string &= msg
|
||||
End Sub
|
||||
Public Shared Sub AddError(ByVal error_string As String, Optional ByVal Funktion As String = "")
|
||||
Try
|
||||
'Zuerst mal die Details schreiben
|
||||
WriteLog()
|
||||
'Nun den eigentlichen Fehler loggen
|
||||
Dim msg As String
|
||||
'Präfixe schreiben
|
||||
If Funktion <> "" Then
|
||||
msg = ">> Achtung Fehler in Funktion '" & Funktion & "'" & vbNewLine & "Fehlermeldung: "
|
||||
Else
|
||||
msg = ">> Achtung Fehler:" & vbNewLine & "Fehlermeldung: "
|
||||
End If
|
||||
'Präfix und Meldung zusammenstellen
|
||||
msg &= error_string
|
||||
'Veruch das Log zu öffnen
|
||||
Dim fs As FileStream = New FileStream(LogFilename, FileMode.OpenOrCreate, FileAccess.Write)
|
||||
' --- Stream öffnen
|
||||
Dim w As StreamWriter = New StreamWriter(fs)
|
||||
' --- Anfügen am Ende
|
||||
w.BaseStream.Seek(0, SeekOrigin.End)
|
||||
' --- Zeilen schreiben
|
||||
w.WriteLine(msg)
|
||||
' --- Writer und Stream schließen
|
||||
w.Close()
|
||||
fs.Close()
|
||||
Catch ex As Exception
|
||||
LogEscalation_Error("Unexpected Error in AddError - Error: " & ex.Message)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Public Shared Sub AddDetailLog(ByVal text As String)
|
||||
Try
|
||||
If clsSQLITE.konf_logerrorsonly = False Then
|
||||
If log_string <> "" Then
|
||||
log_string &= vbNewLine
|
||||
End If
|
||||
log_string &= ">> " & text
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LogEscalation_Error("Unexpected Error in AddDetailLog - Error: " & ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Shared Sub WriteLog()
|
||||
Try
|
||||
'Veruch das Log zu öffnen
|
||||
Dim fs As FileStream = New FileStream(LogFilename, FileMode.OpenOrCreate, FileAccess.Write)
|
||||
' --- Stream öffnen
|
||||
Dim w As StreamWriter = New StreamWriter(fs)
|
||||
' --- Anfügen am Ende
|
||||
w.BaseStream.Seek(0, SeekOrigin.End)
|
||||
' --- Zeilen schreiben
|
||||
w.WriteLine(log_string)
|
||||
' --- Writer und Stream schließen
|
||||
w.Close()
|
||||
fs.Close()
|
||||
SetSpeicherort()
|
||||
'Den Meldungsstring wieder leeren
|
||||
log_string = ""
|
||||
Catch ex As Exception
|
||||
LogEscalation_Error("Unexpected Error in WriteLog - Error: " & ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
370
app/DDWDResultHandler/clsProfil.vb
Normal file
370
app/DDWDResultHandler/clsProfil.vb
Normal file
@@ -0,0 +1,370 @@
|
||||
Imports WINDREAMLib
|
||||
Imports System.IO
|
||||
Public Class clsProfil
|
||||
|
||||
#Region "***** Variablen *****"
|
||||
Public Shared _Profilname, _profObjekttyp, _profwdSuche, _profDay, _profRunType As String
|
||||
Public Shared _profGUID As Integer
|
||||
Public Shared _proflastRun As Date
|
||||
|
||||
|
||||
Private email As New clsEmail
|
||||
Private Shared CriticalError As Boolean = False
|
||||
|
||||
Private Shared WD_aktivesDokument As WMObject
|
||||
#End Region
|
||||
Public Shared Function Init(guid As Integer)
|
||||
Try
|
||||
clsLogger.AddDetailLog("Start Initialisierung Profil für GUID: " & guid.ToString)
|
||||
Dim DT As DataTable = clsSQLITE.Return_Datatable("Select * from TBPROFIL where GUID = " & guid & " AND Running = 0")
|
||||
If DT.Rows.Count > 0 Then
|
||||
For Each DR As DataRow In DT.Rows
|
||||
_profGUID = guid
|
||||
_Profilname = CStr(DR.Item("Profilname"))
|
||||
clsLogger.AddDetailLog("Check Profilname '" & _Profilname & "', GUID: " & _profGUID & " geladen")
|
||||
' Überprüfen ob Profil aktiv oder inaktiv
|
||||
If CBool(DR.Item("Aktiv")) = False Then
|
||||
clsLogger.Add("## Profil '" & _Profilname & "' ist inaktiv geschaltet", False)
|
||||
clsLogger.Add("", False)
|
||||
Return 0
|
||||
Else
|
||||
_profObjekttyp = CStr(DR.Item("Objekttyp"))
|
||||
_profwdSuche = CStr(DR.Item("WindreamSuche"))
|
||||
_profDay = CStr(DR.Item("Day"))
|
||||
_profRunType = CStr(DR.Item("Run"))
|
||||
_proflastRun = DR.Item("Letzter_Durchlauf")
|
||||
clsLogger.AddDetailLog("Raw-Daten für Profil '" & _Profilname & "', GUID: " & _profGUID & " geladen")
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
clsLogger.Add("Achtung - keine Profile für diesen Durchlaufthread verfügbar", False)
|
||||
Return 1
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError(ex.Message, "Profil_Init")
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
'Durchlauf des Profils wird aus dem Service gestartet wenn Init = True war
|
||||
Public Shared Function Profil_Durchlauf()
|
||||
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 Time_last As DateTime = clsSQLITE.konf_LASTTICK.ToShortTimeString
|
||||
' 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
|
||||
clsSQLITE.Execute_non_Query("Update TBPROFIL 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
|
||||
If clsSQLITE.konf_EmailAktiv Then
|
||||
clsEmail.Send_EMail("Fehler in windream-ResultHandler", "<br> >> Profilname: '" & _Profilname & "'<br> >> Die windream-Suche : " & _profwdSuche & " konnte nicht gefunden werden!" & _
|
||||
"<br> >> Mögliche Fehlerursache: Das W-Laufwerk ist nicht verfügbar!")
|
||||
End If
|
||||
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.Count > 0 Then
|
||||
clsLogger.Add("- Insgesamt sollen '" & windreamSucheErgebnisse.Count & "' Dateien bearbeitet werden", False)
|
||||
clsLogger.AddDetailLog("SELECT * FROM TBPROFIL_JOB WHERE AKTIV = 1 AND PROFIL_ID = " & _profGUID & " ORDER BY REIHENFOLGE")
|
||||
Dim DT_PROFIL_JOB As DataTable = clsSQLITE.Return_Datatable("SELECT * FROM TBPROFIL_JOB WHERE AKTIV = 1 AND PROFIL_ID = " & _profGUID & " ORDER BY REIHENFOLGE")
|
||||
Dim DT_PROFIL_FILE_JOB As DataTable = clsSQLITE.Return_Datatable("SELECT * FROM TBPROFIL_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 dok As WMObject In windreamSucheErgebnisse
|
||||
For Each DR_PR_JB As DataRow In DT_PROFIL_JOB.Rows
|
||||
Select Case DR_PR_JB.Item("JOB_TYP").ToString.ToUpper
|
||||
Case "Create Mail Attachment".ToUpper
|
||||
Case "Export HDD".ToUpper
|
||||
clsLogger.AddDetailLog("Case Export HDD")
|
||||
'Für jedes Dokument in der Windream-Ergebnisliste
|
||||
'For Each dok As WMObject In windreamSucheErgebnisse
|
||||
' aktuelles Dokument zum Export bereitstellen
|
||||
EXPORTED_FILENAME = ""
|
||||
If clsDateiverarbeitung.Export_File(dok, DR_PR_JB.Item("STRING1")) = True Then
|
||||
If DT_PROFIL_FILE_JOB.Rows.Count > 0 Then
|
||||
clsLogger.AddDetailLog("Anzahl ")
|
||||
'Für jeden File-Job
|
||||
Dim errorFileJob As Boolean = False
|
||||
For Each DR_PR_FILE_JOB As DataRow In DT_PROFIL_FILE_JOB.Rows
|
||||
If errorFileJob = True Then Exit For
|
||||
Select Case DR_PR_FILE_JOB.Item("TYP").ToString.ToLower
|
||||
Case "Set Index".ToLower
|
||||
Try
|
||||
'Überprüfen ob Value bereits gesetzt wurde?
|
||||
Dim idxName As String = DR_PR_FILE_JOB.Item("STRING1").ToString
|
||||
Dim idxvalue As String = DR_PR_FILE_JOB.Item("STRING2").ToString
|
||||
If idxvalue.Contains("[%DATETIME]") Then
|
||||
idxvalue = idxvalue.Replace("[%DATETIME]", Now.ToString)
|
||||
End If
|
||||
clsLogger.AddDetailLog("Datei soll mit Index '" & idxName & "'indexiert werden...")
|
||||
Dim arrIndex() As String
|
||||
ReDim Preserve arrIndex(0)
|
||||
arrIndex(0) = idxName
|
||||
clsLogger.AddDetailLog("...nach arrIndex")
|
||||
|
||||
Dim arrValue() As String
|
||||
|
||||
Dim aktvalue As Object
|
||||
aktvalue = dok.GetVariableValue(idxName)
|
||||
clsLogger.AddDetailLog("...nach aktValue zuweisen..")
|
||||
|
||||
If aktvalue Is Nothing Then
|
||||
clsLogger.AddDetailLog("Index '" & idxName & "' ist noch leer.")
|
||||
ReDim Preserve arrValue(0)
|
||||
arrValue(0) = idxvalue
|
||||
Else
|
||||
clsLogger.AddDetailLog("Index '" & idxName & "' ist bereits gefüllt.")
|
||||
Dim myArray()
|
||||
ReDim myArray(0)
|
||||
myArray(0) = idxvalue
|
||||
|
||||
Dim VektorArray()
|
||||
VektorArray = Return_VektorArray(dok, idxName, myArray, True)
|
||||
|
||||
If VektorArray Is Nothing = False Then
|
||||
ReDim arrValue(VektorArray.Length - 1)
|
||||
Array.Copy(VektorArray, arrValue, VektorArray.Length)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If arrValue Is Nothing = False Then
|
||||
clsWindream_Index.RunIndexing(dok, arrIndex, arrValue, _profObjekttyp)
|
||||
Else
|
||||
clsLogger.Add(">> arrValue is nothing - keine Indexierung", False, "clsProfil.Profil_Durchlauf")
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError("Unvorhergesehener Fehler: " & ex.Message, "clsProfil.Profil_Durchlauf(SetIndex)")
|
||||
End Try
|
||||
Case "Rename File with windream Index".ToLower
|
||||
clsLogger.AddDetailLog("Exportierte Datei soll nach Indexvorgaben umbenannt werden...")
|
||||
clsDateiverarbeitung.Rename_File(dok, DR_PR_FILE_JOB.Item("STRING1").ToString)
|
||||
Case "Execute Oracle Command"
|
||||
Try
|
||||
Dim oracleconnectionstring = DR_PR_FILE_JOB.Item("STRING1").ToString
|
||||
Dim oracleCommandRAW = DR_PR_FILE_JOB.Item("STRING2").ToString
|
||||
errorFileJob = clsDateiverarbeitung.RUN_ORACLE_COMMAND(dok, oracleconnectionstring, oracleCommandRAW)
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError("Unvorhergesehener Fehler: " & ex.Message, "clsProfil.Profil_Durchlauf(ExecuteOracleCommand)")
|
||||
End Try
|
||||
Case "Execute MSSQL Command"
|
||||
Try
|
||||
errorFileJob = clsDateiverarbeitung.RUN_MSSQL_COMMAND(dok, DR_PR_FILE_JOB.Item("STRING1").ToString, DR_PR_FILE_JOB.Item("STRING2").ToString)
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError("Unvorhergesehener Fehler: " & ex.Message, "clsProfil.Profil_Durchlauf(ExecuteMSSQLCommand)")
|
||||
End Try
|
||||
End Select
|
||||
'Abschluss Bearbeitung File Job
|
||||
clsLogger.WriteLog()
|
||||
Next
|
||||
Else
|
||||
clsLogger.Add(">> KEINE File-JOBS für Profil '" & _Profilname & "' angelegt!", False, "clsProfil.Profil_Durchlauf")
|
||||
clsLogger.WriteLog()
|
||||
End If
|
||||
Else
|
||||
clsSQLITE.Execute_non_Query("UPDATE TBPROFIL SET Running = 0, LETZTER_DURCHLAUF = DATETIME ('now' , 'localtime') WHERE GUID = " & _profGUID)
|
||||
End If
|
||||
'Next
|
||||
|
||||
End Select
|
||||
'Abschluss Bearbeitung Job
|
||||
clsLogger.WriteLog()
|
||||
Next
|
||||
|
||||
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.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
|
||||
|
||||
End If
|
||||
Else
|
||||
clsLogger.AddDetailLog("Verarbeitung für heute NICHT konfiguriert")
|
||||
clsLogger.WriteLog()
|
||||
End If
|
||||
'Abschluss des Profiles
|
||||
clsSQLITE.Execute_non_Query("UPDATE TBPROFIL SET Running = 0, LETZTER_DURCHLAUF = DATETIME ('now' , 'localtime') WHERE GUID = " & _profGUID)
|
||||
clsLogger.AddDetailLog("'UPDATE TBPROFIL SET Running = 0' ausgeführt")
|
||||
clsLogger.WriteLog()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError("Unvorhergesehener Fehler: " & ex.Message, "clsProfil.Profil_Durchlauf")
|
||||
clsSQLITE.Execute_non_Query("Update TBPROFIL SET Running = 0 WHERE GUID = " & _profGUID)
|
||||
CriticalError = False
|
||||
DDWDResultHandler.threadRunner.CancelAsync()
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Private Shared Function Return_VektorArray(ByVal oDocument As WMObject, vktIndexName As String, NIIndexe As Object, CheckDuplikat As Boolean)
|
||||
Try
|
||||
Dim missing As Boolean = False
|
||||
Dim Anzahl As Integer = 0
|
||||
Dim ValueArray()
|
||||
'Jeden Wert des Vektorfeldes durchlaufen
|
||||
Dim wertWD = oDocument.GetVariableValue(vktIndexName)
|
||||
If wertWD Is Nothing = False Then
|
||||
'Nochmals prüfen ob wirklich Array
|
||||
If wertWD.GetType.ToString.Contains("System.Object") Then
|
||||
'Keine Duplikatprüfung also einfach neues Array füllen
|
||||
If CheckDuplikat = False Then
|
||||
For Each value As Object In wertWD
|
||||
'Das Array anpassen
|
||||
ReDim Preserve ValueArray(Anzahl)
|
||||
'Den Wert im Array speichern
|
||||
ValueArray(Anzahl) = value.ToString
|
||||
Anzahl += 1
|
||||
Next
|
||||
'Und jetzt den/die Neuen Wert(e) anfügen
|
||||
For Each NewValue As Object In NIIndexe
|
||||
If NewValue Is Nothing = False Then
|
||||
'Das Array anpassen
|
||||
ReDim Preserve ValueArray(Anzahl)
|
||||
'Den Wert im Array speichern
|
||||
ValueArray(Anzahl) = NewValue.ToString
|
||||
Anzahl += 1
|
||||
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
clsLogger.AddDetailLog("Duplikatprüfung soll durchgeführt werden.")
|
||||
'Duplikat Prüfung an, also nur anhängen wenn Wert <>
|
||||
For Each WDValue As Object In wertWD
|
||||
If WDValue Is Nothing = False Then
|
||||
'Erst einmal die ALten Werte schreiben
|
||||
ReDim Preserve ValueArray(Anzahl)
|
||||
'Den Wert im Array speichern
|
||||
ValueArray(Anzahl) = WDValue.ToString
|
||||
clsLogger.AddDetailLog("Value (" & Anzahl & ") " & WDValue.ToString)
|
||||
Anzahl += 1
|
||||
End If
|
||||
Next
|
||||
'Jetzt die Neuen Werte auf Duplikate überprüfen
|
||||
For Each NewValue As Object In NIIndexe
|
||||
If NewValue Is Nothing = False Then
|
||||
If ValueArray.Contains(NewValue) = False Then
|
||||
clsLogger.AddDetailLog("New Value (" & Anzahl & ") " & NewValue.ToString)
|
||||
'Das Array anpassen
|
||||
ReDim Preserve ValueArray(Anzahl)
|
||||
'Den Wert im Array speichern
|
||||
ValueArray(Anzahl) = NewValue.ToString
|
||||
Anzahl += 1
|
||||
Else
|
||||
clsLogger.AddDetailLog("Value '" & NewValue.ToString & "' bereits in Vektorfeld enthalten")
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
clsLogger.AddDetailLog("Vektorfeld ist noch leer....")
|
||||
'Den/die Neuen Wert(e) anfügen
|
||||
For Each NewValue As Object In NIIndexe
|
||||
If NewValue Is Nothing = False Then
|
||||
If CheckDuplikat = True Then
|
||||
If ValueArray Is Nothing = False Then
|
||||
If ValueArray.Contains(NewValue) = False Then
|
||||
'Das Array anpassen
|
||||
ReDim Preserve ValueArray(Anzahl)
|
||||
'Den Wert im Array speichern
|
||||
ValueArray(Anzahl) = NewValue.ToString
|
||||
Anzahl += 1
|
||||
Else
|
||||
clsLogger.AddDetailLog("Value '" & NewValue.ToString & "' bereits in Array enthalten")
|
||||
End If
|
||||
Else 'Dererste Wert, also hinzufügen
|
||||
'Das Array anpassen
|
||||
ReDim Preserve ValueArray(Anzahl)
|
||||
'Den Wert im Array speichern
|
||||
ValueArray(Anzahl) = NewValue.ToString
|
||||
Anzahl += 1
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
'Das Array anpassen
|
||||
ReDim Preserve ValueArray(Anzahl)
|
||||
'Den Wert im Array speichern
|
||||
ValueArray(Anzahl) = NewValue.ToString
|
||||
Anzahl += 1
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
clsLogger.AddDetailLog("Return ValueArray: length " & ValueArray.Length)
|
||||
Return ValueArray
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError(ex.Message, "Return_VektorArray")
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
692
app/DDWDResultHandler/clsWindream_Index.vb
Normal file
692
app/DDWDResultHandler/clsWindream_Index.vb
Normal file
@@ -0,0 +1,692 @@
|
||||
Imports WINDREAMLib
|
||||
Imports WMOSRCHLib
|
||||
Public Class clsWindream_Index
|
||||
Inherits clsWindream_allgemein
|
||||
|
||||
#Region "+++++ Konstanten +++++"
|
||||
Protected Const WMObjectEditModeObject = &H1F
|
||||
Protected Const WMObjectStreamOpenModeReadWrite = 2
|
||||
Protected Const WMEntityObjectType = 10
|
||||
Protected Const WMEntityDocument = 1
|
||||
|
||||
Const WMObjectVariableValueTypeUndefined = 0
|
||||
Const WMObjectVariableValueTypeString = 1
|
||||
Const WMObjectVariableValueTypeInteger = 2
|
||||
Const WMObjectVariableValueTypeFloat = 3
|
||||
Const WMObjectVariableValueTypeBoolean = 4
|
||||
Const WMObjectVariableValueTypeDate = 5
|
||||
Const WMObjectVariableValueTypeFixedPoint = 6
|
||||
Const WMObjectVariableValueTypeTimeStamp = 7
|
||||
Const WMObjectVariableValueTypeCurrency = 8
|
||||
Const WMObjectVariableValueTypeTime = 9
|
||||
Const WMObjectVariableValueTypeVariant = 10
|
||||
Const WMObjectVariableValueTypeMask = &HFFF
|
||||
Const WMObjectVariableValueFlagMask = &HFFFFF000
|
||||
Const WMObjectVariableValueTypeVector = &H1000
|
||||
Const WMObjectVariableValueTypeFulltext = &H2000
|
||||
Const WMObjectVariableValueTypeDefaultValue = &H4000
|
||||
#End Region
|
||||
|
||||
#Region "+++++ Variablen +++++"
|
||||
'Private oController = CreateObject("WMOSrch.WMQuickSearch") 'As New WMOSearchController
|
||||
'Private oController As New WMOSearchController
|
||||
Private oController As New WMOSearchController
|
||||
'Dim srchQuick = CreateObject("WMOSrch.WMQuickSearch") 'As WMOSRCHLib.WMQuickSearch
|
||||
#End Region
|
||||
|
||||
#Region "+++++ Allgemeine Methoden und Funktionen +++++"
|
||||
Sub New()
|
||||
MyBase.New()
|
||||
End Sub
|
||||
Private Shared Function IsNotEmpty(ByVal aValue As Object)
|
||||
|
||||
If aValue IsNot Nothing Then
|
||||
Dim itsType As Type = aValue.GetType
|
||||
If itsType Is GetType(String) Then
|
||||
|
||||
If Not aValue = "" Then
|
||||
Return True
|
||||
End If
|
||||
|
||||
Return False
|
||||
Else
|
||||
Return True
|
||||
End If
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
End Function
|
||||
Private Function return_type(ByVal _wert As Object)
|
||||
Return _wert.GetType
|
||||
End Function
|
||||
Public Function GetIndex_Type(idxName) As String
|
||||
Try
|
||||
Dim oAttribute = oSession.GetWMObjectByName(WINDREAMLib.WMEntity.WMEntityAttribute, idxName)
|
||||
'den Variablentyp (String, Integer, ...) auslesen
|
||||
Dim vType = oAttribute.getVariableValue("dwAttrType")
|
||||
Dim Type As String
|
||||
Select Case (vType)
|
||||
'Case WMObjectVariableValueTypeUndefined
|
||||
Case WMObjectVariableValueTypeString
|
||||
Type = "String"
|
||||
Case WMObjectVariableValueTypeInteger
|
||||
Type = "Integer"
|
||||
Case WMObjectVariableValueTypeFloat
|
||||
Type = "Float"
|
||||
Case WMObjectVariableValueTypeFixedPoint
|
||||
Type = "Point"
|
||||
Case WMObjectVariableValueTypeBoolean
|
||||
Type = "Boolean"
|
||||
Case WMObjectVariableValueTypeDate
|
||||
Type = "Date"
|
||||
Case WMObjectVariableValueTypeTimeStamp
|
||||
Type = "Timestamp"
|
||||
Case WMObjectVariableValueTypeCurrency
|
||||
Type = "Currency"
|
||||
Case WMObjectVariableValueTypeTime
|
||||
Type = "Time"
|
||||
Case WMObjectVariableValueTypeFloat
|
||||
Type = "Float"
|
||||
Case WMObjectVariableValueTypeVariant
|
||||
Type = "Varia´nt"
|
||||
Case WMObjectVariableValueTypeFulltext
|
||||
Type = "Fulltext"
|
||||
Case 4097
|
||||
Type = "Vektor String"
|
||||
Case 4098
|
||||
Type = "Vektor Numerisch"
|
||||
Case 4099
|
||||
Type = "Vektor Float"
|
||||
Case 4101
|
||||
Type = "Vektor Date"
|
||||
Case 4103
|
||||
Type = "Vektor DateTime"
|
||||
Case 36865
|
||||
Type = "Vektor Alpha"
|
||||
Case Else
|
||||
Type = "String Else"
|
||||
End Select
|
||||
Return Type
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End Function
|
||||
Public Shared Function RunIndexing_Vektor(ByVal oDocument As WMObject, ByVal Indizes As String(), ByVal aValues As String())
|
||||
Try
|
||||
If Indizes IsNot Nothing And aValues IsNot Nothing Then
|
||||
If Not oDocument.aLocked Then
|
||||
oDocument.lock()
|
||||
|
||||
If aValues.Length = 1 And aValues(0) = "" Then
|
||||
clsLogger.Add(" >> RunIndexing_Vektor: Indexwert ist leer/Nothing - Keine Nachindexierung", False)
|
||||
Else
|
||||
'Jetzt jeden Indexwert durchlaufen
|
||||
Dim indexname As String
|
||||
indexname = Indizes(0)
|
||||
clsLogger.AddDetailLog("RunIndexing_Vektor: Indexname: " & indexname)
|
||||
'VEKTORFELDER, ALSO ÜBERPRÜFEN OB ERGEBNIS-ARRAY GEFÜLLT IST
|
||||
clsLogger.AddDetailLog("RunIndexing_Vektor: VEKTORFELD-Indexierung: Vorbereiten des Arrays")
|
||||
' das entsprechende Attribut aus windream auslesen
|
||||
Dim oAttribute = oSession.GetWMObjectByName(WINDREAMLib.WMEntity.WMEntityAttribute, indexname)
|
||||
' den Variablentyp (String, Integer, ...) auslesen
|
||||
Dim vType = oAttribute.getVariableValue("dwAttrType")
|
||||
Select Case (vType)
|
||||
Case 4097
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: 4097 Vektor alphanumerisch")
|
||||
Case 4098
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: 4098 Vektor Numerisch")
|
||||
Case 4099
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: 4099 Vektor Kommazahl")
|
||||
Case 4101
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: 4101 Vektor Date")
|
||||
Case 4103
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: 4103 Vektor DateTime")
|
||||
Case 4107
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: 4107 Vektor Integer(64bit)")
|
||||
Case 36865
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: 36865 Vektor alphanumerisch")
|
||||
End Select
|
||||
Dim myArray
|
||||
Dim Anzahl As Integer = aValues.Length - 1
|
||||
'Vektorfeld wird mit EINEM Wert gefüllt
|
||||
If Anzahl = 0 Then
|
||||
clsLogger.AddDetailLog("RunIndexing_Vektor: Vektorfeld wird mit EINEM Wert gefüllt ")
|
||||
ReDim myArray(0)
|
||||
Select Case (vType)
|
||||
Case 4097
|
||||
myArray(0) = CStr(aValues(0))
|
||||
Case 4098
|
||||
myArray(0) = CInt(aValues(0).Replace(" ", ""))
|
||||
Case 4099
|
||||
Dim str As String = aValues(0)
|
||||
str = str.ToString.Replace(" ", "")
|
||||
myArray(0) = CDbl(str.Replace(".", ","))
|
||||
|
||||
Case 4101
|
||||
myArray(0) = CDate(aValues(0))
|
||||
Case 4103
|
||||
myArray(0) = aValues(0)
|
||||
Case 4107
|
||||
myArray(0) = Convert.ToInt64(aValues(0))
|
||||
Case 36865
|
||||
myArray(0) = CStr(aValues(0))
|
||||
End Select
|
||||
clsLogger.AddDetailLog("RunIndexing_Vektor: Konvertierter Wert: " & myArray(0).ToString)
|
||||
Else
|
||||
clsLogger.AddDetailLog("RunIndexing_Vektor: Vektorfeld wird mit MEHREREN Werten gefüllt ")
|
||||
'Die Größe des Arrays festlegen
|
||||
ReDim myArray(Anzahl)
|
||||
Dim i1 As Integer = 0
|
||||
For Each aValue As String In aValues
|
||||
Select Case (vType)
|
||||
Case 4107
|
||||
Dim wert = aValue.Replace(" ", "")
|
||||
wert = Convert.ToInt64(wert) 'ToInt64
|
||||
myArray(i1) = wert
|
||||
Case 4097
|
||||
myArray(i1) = CStr(aValue)
|
||||
Case 4098
|
||||
Dim wert = aValue.Replace(" ", "")
|
||||
Dim convertValue
|
||||
If IsNumeric(wert) Then
|
||||
Try
|
||||
convertValue = CInt(wert)
|
||||
Catch ex As Exception
|
||||
clsLogger.AddDetailLog("Wert muss in Int64 konvertiert werden")
|
||||
convertValue = Convert.ToInt64(wert) 'ToInt64
|
||||
End Try
|
||||
Else
|
||||
' clsLoggerNI.Add("Indexierungswert '" & wert.ToString & "' kann nicht in Integer konvertiert werden")
|
||||
Return False
|
||||
End If
|
||||
|
||||
myArray(i1) = convertValue
|
||||
Case 4099
|
||||
myArray(i1) = CDbl(aValue.Replace(".", ",").Replace(" ", ""))
|
||||
Case 4101
|
||||
myArray(i1) = CDate(aValue)
|
||||
Case 4103
|
||||
myArray(i1) = aValue
|
||||
Case 36865
|
||||
myArray(i1) = CStr(aValue)
|
||||
Case Else
|
||||
myArray(i1) = CStr(aValue)
|
||||
End Select
|
||||
i1 += 1
|
||||
Next
|
||||
End If
|
||||
'Jetzt die Nachindexierung für Vektor-Felder
|
||||
oDocument.SetVariableValue(indexname, myArray)
|
||||
clsLogger.AddDetailLog("RunIndexing_Vektor: 'SetVariableValue' für VEKTOR erfolgreich")
|
||||
|
||||
oDocument.Save()
|
||||
oDocument.unlock()
|
||||
clsLogger.AddDetailLog("RunIndexing_Vektor: Indexierung erfolgreich beendet (Save und Unlock durchgeführt)")
|
||||
Return True
|
||||
End If
|
||||
Else
|
||||
clsLogger.Add(" >> RunIndexing_Vektor: Dokument ist gesperrt, Indexierung erst im nächsten Durchlauf!", True)
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError("## Fehler in RunIndexing_Vektor - Fehler: " & ex.Message, "RunIndexingVektor")
|
||||
oDocument.Save()
|
||||
oDocument.unlock()
|
||||
Return False
|
||||
End Try
|
||||
|
||||
|
||||
End Function
|
||||
Public Shared Function RunIndexing(ByVal oDocument As WMObject, ByVal Indizes() As String, ByVal aValues() As Object, Objekttyp As String)
|
||||
Try
|
||||
If Indizes IsNot Nothing And aValues IsNot Nothing Then
|
||||
If Not oDocument.aLocked Then
|
||||
oDocument.lock()
|
||||
Dim i As Integer = 0
|
||||
Dim indexname As String
|
||||
If aValues.Length = 1 And aValues(0) = "" Then
|
||||
clsLogger.AddDetailLog("Indexwert ist leer/Nothing - Keine Indexierung")
|
||||
End If
|
||||
' wenn der Datei noch kein Dokumenttyp zugewiesen wurde
|
||||
If oDocument.aObjectType.aName <> Objekttyp Then
|
||||
' ihr den entsprechenden Dokumenttyp zuweisen
|
||||
oDocument.aObjectType = oSession.GetWMObjectByName(WINDREAMLib.WMEntity.WMEntityObjectType, Objekttyp)
|
||||
' WMObject.aObjectType = selectedProfile.Dokumenttyp
|
||||
clsLogger.AddDetailLog("Objekttyp war Standard und wurde in '" & Objekttyp & "' geändert.")
|
||||
Else
|
||||
clsLogger.AddDetailLog("Objekttyp war bereits gesetzt")
|
||||
End If
|
||||
|
||||
Try
|
||||
oDocument.Save()
|
||||
Catch ex As Exception
|
||||
' wenn es einen Fehler beim speichern gab, dann konnte auch kein Dokumenttyp gesetzt werden -> es kann also auch keine
|
||||
' Indexierung stattfinden und die Indexierung muss nicht fortgesetzt werden
|
||||
Return False
|
||||
End Try
|
||||
|
||||
'Jetzt jeden Indexwert durchlaufen
|
||||
For Each aName As String In Indizes
|
||||
indexname = aName
|
||||
' das entsprechende Attribut aus windream auslesen
|
||||
Dim oAttribute = oSession.GetWMObjectByName(WINDREAMLib.WMEntity.WMEntityAttribute, Indizes(i))
|
||||
' den Variablentyp (String, Integer, ...) auslesen
|
||||
Dim vType = oAttribute.getVariableValue("dwAttrType")
|
||||
' wenn in aValues an Position i ein Wert steht
|
||||
If IsNotEmpty(aValues(i)) Then
|
||||
Dim _int As Boolean = False
|
||||
Dim _date As Boolean = False
|
||||
Dim _dbl As Boolean = False
|
||||
Dim _bool As Boolean = False
|
||||
'If indexname = "Tournr" Then
|
||||
' MsgBox("Index: " & indexname & vbNewLine & "wert: " & aValues(i), MsgBoxStyle.Information, "Index: " & aName.ToString)
|
||||
'End If
|
||||
clsLogger.AddDetailLog("Indexierung von Index '" & indexname & "'")
|
||||
'MsgBox(oDocument.aName & vbNewLine & aValues(i) & vbNewLine & vType, MsgBoxStyle.Exclamation, "Zeile 87")
|
||||
Dim value = aValues(i)
|
||||
Dim convertValue
|
||||
Dim vektor As Boolean = False
|
||||
'Den Typ des Index-Feldes auslesen
|
||||
'MsgBox(value.GetType.ToString)
|
||||
Select Case (vType)
|
||||
'Case WMObjectVariableValueTypeUndefined
|
||||
Case WMObjectVariableValueTypeString
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: WMObjectVariableValueTypeString")
|
||||
convertValue = CStr(value)
|
||||
Case WMObjectVariableValueTypeInteger
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: WMObjectVariableValueTypeInteger")
|
||||
value = value.ToString.Replace(" ", "")
|
||||
If IsNumeric(value) = False Then
|
||||
clsLogger.AddDetailLog("Achtung: Value '" & value & "' kann nicht in Zahl konvertiert werden!")
|
||||
End If
|
||||
|
||||
value = value.ToString.Replace(" ", "")
|
||||
convertValue = CInt(value)
|
||||
_int = True
|
||||
Case WMObjectVariableValueTypeFloat
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: WMObjectVariableValueTypeFloat")
|
||||
value = value.ToString.Replace(" ", "")
|
||||
convertValue = CDbl(value)
|
||||
Case WMObjectVariableValueTypeFixedPoint
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: WMObjectVariableValueTypeFixedPoint")
|
||||
value = value.ToString.Replace(" ", "")
|
||||
convertValue = CDbl(value)
|
||||
_dbl = True
|
||||
Case WMObjectVariableValueTypeBoolean
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: WMObjectVariableValueTypeBoolean")
|
||||
convertValue = CBool(value)
|
||||
_bool = True
|
||||
Case WMObjectVariableValueTypeDate
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: WMObjectVariableValueTypeDate")
|
||||
_date = True
|
||||
'Dim _date As Date = value
|
||||
convertValue = value
|
||||
Case WMObjectVariableValueTypeTimeStamp
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: WMObjectVariableValueTypeTimeStamp")
|
||||
convertValue = CDbl(value)
|
||||
Case WMObjectVariableValueTypeCurrency
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: WMObjectVariableValueTypeCurrency")
|
||||
'Wegen currency muß ein eigenes Objekt vom typ Variant erzeugt werden
|
||||
Dim aValueWrapper As System.Runtime.InteropServices.CurrencyWrapper = New System.Runtime.InteropServices.CurrencyWrapper(CDec(value))
|
||||
convertValue = aValueWrapper
|
||||
Case WMObjectVariableValueTypeTime
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: WMObjectVariableValueTypeTime")
|
||||
'If ((value)) Then
|
||||
' convertValue = CDate(value)
|
||||
'Else
|
||||
' convertValue = ""
|
||||
'End If
|
||||
'Dim _date As Date = value
|
||||
convertValue = convertValue '*_date.ToShortTimeString
|
||||
Case WMObjectVariableValueTypeFloat
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: WMObjectVariableValueTypeFloat")
|
||||
convertValue = CStr(value)
|
||||
Case WMObjectVariableValueTypeVariant
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: WMObjectVariableValueTypeVariant")
|
||||
convertValue = CStr(value)
|
||||
Case WMObjectVariableValueTypeFulltext
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: WMObjectVariableValueTypeFulltext")
|
||||
convertValue = CStr(value)
|
||||
Case 4097
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: 4097 Vektor alphanumerisch")
|
||||
'Vektor alphanumerisch
|
||||
vektor = True
|
||||
Case 4098
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: 4098 Vektor Numerisch")
|
||||
'Vektor Numerisch
|
||||
vektor = True
|
||||
Case 4099
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: 4099 Vektor Kommazahl")
|
||||
'Vektor Kommazahl
|
||||
vektor = True
|
||||
Case 4101
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: 4101 Vektor Date")
|
||||
'Vektor Kommazahl
|
||||
vektor = True
|
||||
Case 4103
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: 4103 Vektor DateTime")
|
||||
'Vektor DateTime
|
||||
vektor = True
|
||||
Case 4107
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: 4107 Integer 64bit")
|
||||
vektor = True
|
||||
Case 36865
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes: 36865 Vektor alphanumerisch")
|
||||
'Vektor Kommazahl
|
||||
vektor = True
|
||||
Case Else
|
||||
clsLogger.AddDetailLog("Typ des windream-Indexes konnte nicht bestimmt werden!")
|
||||
clsLogger.AddDetailLog("Versuch des Auslesens (vType): " & vType)
|
||||
'MsgBox(vType & vbNewLine & CStr(value), MsgBoxStyle.Exclamation, "Marlon-Case Else")
|
||||
convertValue = ""
|
||||
End Select
|
||||
If vektor = False Then
|
||||
If convertValue.ToString Is Nothing = False Then
|
||||
clsLogger.AddDetailLog("Konvertierter Wert: '" & convertValue.ToString & "'")
|
||||
End If
|
||||
End If
|
||||
'############################################################################################
|
||||
'####################### Der eigentliche Indexierungsvorgang ################################
|
||||
'############################################################################################
|
||||
If vektor = False Then
|
||||
If convertValue.ToString Is Nothing = False Then
|
||||
clsLogger.AddDetailLog("Versuch dem Dok einen Index zuzuweisen: oDocument.SetVariableValue(" & aName & ", " & convertValue & ")")
|
||||
If _int = True Then
|
||||
convertValue = convertValue.ToString.Replace(" ", "")
|
||||
oDocument.SetVariableValue(aName, CInt(convertValue))
|
||||
ElseIf _date = True Then
|
||||
oDocument.SetVariableValue(aName, CDate(convertValue))
|
||||
ElseIf _bool Then
|
||||
oDocument.SetVariableValue(aName, CBool(convertValue))
|
||||
ElseIf _dbl Then
|
||||
convertValue = convertValue.ToString.Replace(" ", "")
|
||||
oDocument.SetVariableValue(aName, CDbl(convertValue))
|
||||
Else
|
||||
oDocument.SetVariableValue(aName, convertValue)
|
||||
End If
|
||||
|
||||
clsLogger.Add(" >> Index '" & aName & "' wurde geschrieben", False)
|
||||
clsLogger.Add("", False)
|
||||
Else
|
||||
clsLogger.Add(" >> Kein Indexwert vorhanden", False)
|
||||
End If
|
||||
Else
|
||||
'VEKTORFELDER, ALSO ÜBERPRÜFEN OB ERGEBNIS-ARRAY GEFÜLLT IST
|
||||
clsLogger.AddDetailLog("VEKTORFELD: Vorbereiten des Arrays")
|
||||
|
||||
Dim myArray()
|
||||
'Dim DS As DataSet
|
||||
'Dim DT As DataTable
|
||||
'Dim DR As DataRow
|
||||
'' --- DataSet zuweisen
|
||||
'DS = New MyDataset
|
||||
'' --- Zugriff auf Tabelle
|
||||
'DT = DS.Tables("TBVEKTOR_INDEX")
|
||||
'DT.Clear()
|
||||
'For Each NewValue As Object In aValues
|
||||
|
||||
'Next
|
||||
'' --- den Filter auf den Indexnamen setzen
|
||||
'Dim expression As String
|
||||
'expression = "Indexname = '" & aName.ToString & "'"
|
||||
'Dim foundRows() As DataRow
|
||||
' Use the Select method to find all rows matching the filter.
|
||||
'foundRows = DT.Select(expression)
|
||||
'For Each row As DataRow In DT.Rows
|
||||
'MsgBox(aName & vbNewLine & row.Item("Indexname") & vbNewLine & CStr(row.Item("Wert")))
|
||||
'Next
|
||||
Dim Anzahl As Integer = aValues.Length
|
||||
'Vektorfeld wird mit EINEM Wert gefüllt
|
||||
If Anzahl = 1 Then
|
||||
clsLogger.AddDetailLog("Vektorfeld wird mit EINEM Wert gefüllt ")
|
||||
ReDim myArray(0)
|
||||
Select Case vType
|
||||
Case 36865
|
||||
'Umwandeln in String
|
||||
myArray(0) = CStr(value)
|
||||
Case 4097
|
||||
'Umwandeln in String
|
||||
myArray(0) = CStr(value)
|
||||
Case 4098
|
||||
'Umwandeln in Integer
|
||||
value = value.ToString.Replace(" ", "")
|
||||
myArray(0) = CInt(value)
|
||||
Case 4099
|
||||
Dim Str As String = value
|
||||
Str = Str.ToString.Replace(" ", "")
|
||||
'Umwandeln in Double
|
||||
myArray(0) = CDbl(Str.Replace(".", ","))
|
||||
Case 4101
|
||||
'Umwandeln in Date
|
||||
myArray(0) = CDate(value)
|
||||
Case 4107
|
||||
myArray(0) = Convert.ToInt64(value)
|
||||
Case 4103
|
||||
'Umwandeln in Datum Uhrzeit
|
||||
myArray(0) = value
|
||||
Case Else
|
||||
'Umwandeln in String
|
||||
myArray(0) = CStr(value)
|
||||
End Select
|
||||
clsLogger.AddDetailLog("Konvertierter Wert: " & myArray(0).ToString)
|
||||
Else
|
||||
clsLogger.AddDetailLog("Vektorfeld wird mit MEHREREN Werten gefüllt ")
|
||||
Select Case vType
|
||||
Case 36865
|
||||
'Vektortyp ALPHANUMERISCH
|
||||
'Die Größe des Arrays festlegen
|
||||
ReDim myArray(Anzahl - 1)
|
||||
Dim i1 As Integer = 0
|
||||
'Die Datatable durchlaufen und Werte für den Index in Array schreiben
|
||||
For Each NewValue As Object In aValues
|
||||
myArray(i1) = CStr(NewValue)
|
||||
clsLogger.AddDetailLog("Konvertierter Wert: (" & i1 & ")" & myArray(i1).ToString)
|
||||
i1 = i1 + 1
|
||||
Next
|
||||
For Each NewValue As Object In aValues
|
||||
myArray(i1) = CStr(NewValue)
|
||||
clsLogger.AddDetailLog("Konvertierter Wert: (" & i1 & ")" & myArray(i1).ToString)
|
||||
i1 = i1 + 1
|
||||
Next
|
||||
Case 4097
|
||||
'Vektortyp ALPHANUMERISCH
|
||||
'Die Größe des Arrays festlegen
|
||||
ReDim myArray(Anzahl - 1)
|
||||
Dim i1 As Integer = 0
|
||||
'Die Datatable durchlaufen und Werte für den Index in Array schreiben
|
||||
For Each NewValue As Object In aValues
|
||||
myArray(i1) = CStr(NewValue)
|
||||
clsLogger.AddDetailLog("Konvertierter Wert: (" & i1 & ")" & myArray(i1).ToString)
|
||||
i1 = i1 + 1
|
||||
Next
|
||||
Case 4107
|
||||
ReDim myArray(Anzahl - 1)
|
||||
Dim i1 As Integer = 0
|
||||
'Die Datatable durchlaufen und Werte für den Index in Array schreiben
|
||||
For Each NewValue As Object In aValues
|
||||
myArray(i1) = Convert.ToInt64((NewValue))
|
||||
i1 = i1 + 1
|
||||
Next
|
||||
Case 4098
|
||||
'Vektortyp NUMERISCH
|
||||
'Die Größe des Arrays festlegen
|
||||
ReDim myArray(Anzahl - 1)
|
||||
Dim i1 As Integer = 0
|
||||
'Die Datatable durchlaufen und Werte für den Index in Array schreiben
|
||||
For Each NewValue As Object In aValues
|
||||
Dim v As String = NewValue.ToString.Replace(" ", "")
|
||||
myArray(i1) = CInt(v)
|
||||
clsLogger.AddDetailLog("Konvertierter Wert: (" & i1 & ")" & myArray(i1).ToString)
|
||||
i1 = i1 + 1
|
||||
Next
|
||||
Case 4099
|
||||
'Vektortyp FLOAT
|
||||
'Die Größe des Arrays festlegen
|
||||
ReDim myArray(Anzahl - 1)
|
||||
Dim i1 As Integer = 0
|
||||
'Die Datatable durchlaufen und Werte für den Index in Array schreiben
|
||||
For Each NewValue As Object In aValues
|
||||
Dim Str As String = NewValue
|
||||
Str = Str.ToString.Replace(" ", "")
|
||||
myArray(i1) = CDbl(Str.Replace(".", ","))
|
||||
clsLogger.AddDetailLog("Konvertierter Wert: (" & i1 & ")" & myArray(i1).ToString)
|
||||
i1 = i1 + 1
|
||||
Next
|
||||
Case 4101
|
||||
'Vektortyp DATE
|
||||
'Die Größe des Arrays festlegen
|
||||
ReDim myArray(Anzahl - 1)
|
||||
Dim i1 As Integer = 0
|
||||
'Die Datatable durchlaufen und Werte für den Index in Array schreiben
|
||||
For Each NewValue As Object In aValues
|
||||
Dim Str As String = NewValue.ToString
|
||||
myArray(i1) = CDate(Str.Replace(".", ","))
|
||||
clsLogger.AddDetailLog("Konvertierter Wert: (" & i1 & ")" & myArray(i1).ToString)
|
||||
i1 = i1 + 1
|
||||
|
||||
Next
|
||||
Case Else
|
||||
'Vektortyp ALPHANUMERISCH
|
||||
'Die Größe des Arrays festlegen
|
||||
ReDim myArray(Anzahl - 1)
|
||||
Dim i1 As Integer = 0
|
||||
'Die Datatable durchlaufen und Werte für den Index in Array schreiben
|
||||
For Each NewValue As Object In aValues
|
||||
myArray(i1) = CStr(NewValue)
|
||||
clsLogger.AddDetailLog("Konvertierter Wert: (" & i1 & ")" & myArray(i1).ToString)
|
||||
i1 = i1 + 1
|
||||
Next
|
||||
End Select
|
||||
End If
|
||||
'Jetzt die Nachindexierung für Vektor-Felder
|
||||
oDocument.SetVariableValue(aName, myArray)
|
||||
clsLogger.AddDetailLog("'SetVariableValue' für VEKTOR erfolgreich")
|
||||
End If
|
||||
Else
|
||||
clsLogger.AddDetailLog("Array der Indexwerte ist leer/Nothing - Keine Nachindexierung")
|
||||
End If
|
||||
i += 1
|
||||
|
||||
Next
|
||||
|
||||
' oDocument.LockRights()
|
||||
|
||||
'SetRights(WMObject, User)
|
||||
oDocument.Save()
|
||||
oDocument.unlock()
|
||||
|
||||
clsLogger.AddDetailLog("Indexierung erfolgreich beendet (Save und Unlock durchgeführt)")
|
||||
clsLogger.AddDetailLog("")
|
||||
|
||||
|
||||
Return False
|
||||
Else
|
||||
clsLogger.Add(" >> Dokument ist gesperrt, Indexierung erst im nächsten Durchlauf!", False)
|
||||
'oDocument.unlock()
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError(ex.Message, "ClassSearchResult.RunIndexing")
|
||||
oDocument.Save()
|
||||
oDocument.unlock()
|
||||
Return True
|
||||
End Try
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "+++++ Allgemeine Funktionen die Informationen zurückliefern +++++"
|
||||
Public Function GetSearchDocuments(ByVal wdfLocation As String)
|
||||
|
||||
If System.IO.File.Exists(wdfLocation) Then
|
||||
|
||||
Try
|
||||
Dim ProfileName = wdfLocation.Substring(wdfLocation.LastIndexOf("\") + 1)
|
||||
Dim ProfilePath = wdfLocation.Substring(0, wdfLocation.Length - ProfileName.Length)
|
||||
|
||||
oController.CheckSearchProfile(wdfLocation.ToLower)
|
||||
Dim suchTyp = oController.SearchProfileTargetProgID
|
||||
Dim ExSettings As Object
|
||||
Dim oSearch As Object
|
||||
ExSettings = oController.SearchProfileExSettings
|
||||
If ExSettings = 0 Then ExSettings = 7
|
||||
|
||||
Dim srchQuick As WMOSRCHLib.WMQuickSearch = CreateObject("WMOSrch.WMQuickSearch")
|
||||
Dim srchIndex As WMOSRCHLib.WMIndexSearch = CreateObject("WMOSrch.WMIndexSearch")
|
||||
Dim srchObjectType As WMOSRCHLib.WMObjectTypeSearch = CreateObject("WMOSrch.WMObjectTypeSearch")
|
||||
|
||||
'' Der öffentliche Member CheckSearchProfile für den Typ IWMQuickSearch7 wurde nicht gefunden. [Microsoft.VisualBasic] => GetSearchDocuments()
|
||||
Select Case suchTyp.ToString.ToUpper
|
||||
Case "WMOSRCH.WMQUICKSEARCH"
|
||||
srchQuick.WMSession = CreateObject("Windream.WMSession", GetCurrentServer)
|
||||
|
||||
oConnect.LoginSession(srchQuick.WMSession)
|
||||
|
||||
srchQuick.ClearSearch()
|
||||
srchQuick.SearchProfilePath = ProfilePath
|
||||
srchQuick.LoadSearchProfile(ProfileName)
|
||||
|
||||
oSearch = srchQuick.GetSearch()
|
||||
|
||||
Case "WMOSRCH.WMINDEXSEARCH"
|
||||
srchIndex.WMSession = CreateObject("Windream.WMSession", GetCurrentServer)
|
||||
|
||||
oConnect.LoginSession(srchIndex.WMSession)
|
||||
|
||||
srchIndex.ClearSearch()
|
||||
srchIndex.SearchProfilePath = ProfilePath
|
||||
srchIndex.LoadSearchProfile(ProfileName)
|
||||
|
||||
oSearch = srchIndex.GetSearch()
|
||||
|
||||
Case "WMOSRCH.WMOBJECTTYPESEARCH"
|
||||
srchObjectType.WMSession = CreateObject("Windream.WMSession", GetCurrentServer)
|
||||
|
||||
oConnect.LoginSession(srchObjectType.WMSession)
|
||||
|
||||
srchObjectType.ClearSearch()
|
||||
srchObjectType.SearchProfilePath = ProfilePath
|
||||
srchObjectType.LoadSearchProfile(ProfileName)
|
||||
|
||||
oSearch = srchObjectType.GetSearch()
|
||||
|
||||
Case Else
|
||||
clsLogger.Add("KEIN GÜLTIGER WINDREAM-SUCHTYP", True, "GetSearchDocuments")
|
||||
Return Nothing
|
||||
End Select
|
||||
Dim WMObjects As Object
|
||||
WMObjects = oSearch.Execute
|
||||
Return oSearch.execute
|
||||
|
||||
Catch ex As Exception
|
||||
' bei einem Fehler einen Eintrag in der Logdatei machen
|
||||
clsLogger.AddError("Unvorhergesehener Fehler: " & ex.Message, "GetSearchDocuments")
|
||||
Return Nothing
|
||||
End Try
|
||||
|
||||
End If
|
||||
|
||||
Return Nothing
|
||||
|
||||
End Function
|
||||
''' Liefert den Wert eines Indexes als String
|
||||
''' _indexname = Name des zu überprüfenden Indexfeldes
|
||||
Public Function GetValueforIndex(ByVal _fullfilepath As String, _indexname As String)
|
||||
Try
|
||||
Const WMEntityDocument = 1
|
||||
Dim IndexwertAusWindream As Object = Nothing
|
||||
Dim _dok As WINDREAMLib.WMObject
|
||||
_dok = Nothing
|
||||
_dok = oSession.GetWMObjectByPath(WMEntityDocument, _fullfilepath) 'WINDREAMLib.WMEntity.WMEntityDocument
|
||||
IndexwertAusWindream = _dok.GetVariableValue(_indexname)
|
||||
Return IndexwertAusWindream.ToString
|
||||
Catch ex As Exception
|
||||
'MsgBox(ex.Message)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
#End Region
|
||||
End Class
|
||||
485
app/DDWDResultHandler/clsWindream_allgemein.vb
Normal file
485
app/DDWDResultHandler/clsWindream_allgemein.vb
Normal file
@@ -0,0 +1,485 @@
|
||||
|
||||
Imports WINDREAMLib
|
||||
Imports WINDREAMLib.WMCOMEvent
|
||||
Imports WINDREAMLib.WMEntity
|
||||
Imports WINDREAMLib.WMObjectEditMode
|
||||
Imports WINDREAMLib.WMSearchOperator
|
||||
Imports WINDREAMLib.WMSearchRelation
|
||||
Imports WMOBRWSLib
|
||||
Imports WMOSRCHLib
|
||||
Imports System.IO
|
||||
|
||||
Public Class clsWindream_allgemein
|
||||
|
||||
#Region "+++++ Konstanten +++++"
|
||||
Const DEBUG = AUS
|
||||
Const AUS = 0
|
||||
Const WINDREAM = 1
|
||||
Const VARIABLEN = 2
|
||||
#End Region
|
||||
|
||||
#Region "+++++ Variablen +++++"
|
||||
Public Shared oConnect ' der Typ darf nicht festgelegt werden (warum auch immer... geht sonst nicht)
|
||||
Public Shared oSession 'As WINDREAMLib.WMSession ' der Typ darf nicht festgelegt werden (warum auch immer... geht sonst nicht)
|
||||
Public Shared oBrowser As New WMOBRWSLib.ServerBrowser
|
||||
Public Shared oDokumentTypen As WINDREAMLib.WMObjects
|
||||
Private Shared oController As New WMOSearchController
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "+++++ Allgemeine Methoden und Funktionen +++++"
|
||||
|
||||
''' <summary>
|
||||
''' Konstruktor für die windream-Klasse
|
||||
''' </summary>
|
||||
''' <remarks></remarks>
|
||||
Sub New()
|
||||
' wenn ein Fehler bei der Initialisierung auftrat
|
||||
If Not Init() Then
|
||||
' Nachricht ausgeben
|
||||
clsLogger.Add("Es trat ein Fehler bei der Initialisierung der Klasse windream auf. Bitte prüfen Sie ob der windream-Server aktiv ist und alle Dienste gestartet sind", True, "clsWindream_allgemein.Init")
|
||||
' das Programm "abschießen"
|
||||
Process.GetCurrentProcess.Kill()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' Initialisiert die statische Klasse (Login, Session starten, usw.)
|
||||
''' </summary>
|
||||
''' <returns>Liefert True wenn das Anmelden erfolgreich war, sonst False</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function Init() As Boolean
|
||||
|
||||
Try
|
||||
Try
|
||||
' Session-Objekt instanziieren und mit dem im Client ausgewählten Server belegen
|
||||
oSession = CreateObject("Windream.WMSession", GetCurrentServer)
|
||||
' Connection-Objekt instanziieren
|
||||
oConnect = CreateObject("Windream.WMConnect")
|
||||
'MsgBox("windrem init 'ed")
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
End Try
|
||||
|
||||
' wenn windream nicht angemeldet ist
|
||||
If Not IsLoggedIn() Then
|
||||
' Art der Anmeldung an windream festlegen
|
||||
' 0x0L (also 0) = Standard windream Benutzer
|
||||
' WM_MODULE_ID_DOCTYPEEDITOR_LIC = ermöglicht Zugriff auf die windream Management Funktionen (Z.B. zur Verwaltung der windream Dokumententypen, Auswahllisten, etc.)
|
||||
' WM_MODULE_ID_INDEXSERVICE = ermöglicht der Session die Indexierungs-Events vom windream DMS-Service zu empfangen
|
||||
oConnect.ModuleID = 0
|
||||
|
||||
' setzt die minimal erwartete windream-Version
|
||||
oConnect.MinReqVersion = "3"
|
||||
' clsLogger.AddDetailLog("Personifizierung'")
|
||||
|
||||
' -- Impersonifizierung nur möglich mit registry-eintrag --
|
||||
'oConnect.UserName = "\digitaldata\SchreiberM"
|
||||
'oConnect.Password = "pw"
|
||||
|
||||
' Verbindung mit Session-Objekt (und dem ausgewählten Server) aufbauen
|
||||
oConnect.LoginSession(oSession)
|
||||
clsLogger.AddDetailLog("windream-Server: '" & GetCurrentServer() & "'")
|
||||
clsLogger.AddDetailLog("windream-UserName: '" & oConnect.UserName & "'")
|
||||
|
||||
If oSession.aLoggedin = False Then
|
||||
clsLogger.Add("Es konnte keine Verbindung mit dem windream-Server hergestellt werden", True, "clswindream.Init")
|
||||
Return False
|
||||
End If
|
||||
|
||||
' AUSGABE VON SYSTEMINFORMATIONEN
|
||||
' Gibt die Versionsart (Lizenztyp) also Small-Business-Edition (SBE), Small-Business-Extension (SBX)
|
||||
' oder Business-Edition (BE) aus
|
||||
'MsgBox("WindreamVersion: " & oSession.GetSystemInfo("WindreamVersion") & vbNewLine & "LicenceKey: " & oSession.GetSystemInfo("LicenceKey") & vbNewLine & _
|
||||
' vbNewLine & "LicenceName: " & oSession.GetSystemInfo("LicenceName"))
|
||||
|
||||
'Dim WMCtrl As AISCONTROLDATACOMLib.AISControlData
|
||||
'WMCtrl = New AISCONTROLDATACOMLib.AISControlData
|
||||
|
||||
'' liefert die Versionsnummer des Clients
|
||||
'MsgBox(WMCtrl.WMWorkstationBuildNo)
|
||||
'MsgBox(WMCtrl.W
|
||||
'' liefert den Servernamen des angemeldeten windreams
|
||||
'MsgBox(WMCtrl.WMServerName)
|
||||
|
||||
Try
|
||||
oSession.SwitchEvents(WMCOMEventWMSessionNeedIndex, False)
|
||||
' der Parameter WMEntityDocument definiert, dass nur Dokumenttypen und keine
|
||||
' Ordnertypen ausgelesen werden
|
||||
oDokumentTypen = oSession.GetWMObjectTypes(WINDREAMLib.WMEntity.WMEntityDocument)
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError("Problem beim Auslesen der Objekttypen", "clswindream.Init")
|
||||
Return False
|
||||
End Try
|
||||
End If
|
||||
|
||||
clsLogger.AddDetailLog("Alles OK - Erfolgreich angemeldet und Session aufgebaut")
|
||||
Return True
|
||||
|
||||
Catch ex As Exception
|
||||
If Err.Number = -2147220985 Then
|
||||
clsLogger.AddError("Die installierte windream-Version ist nicht ausreichend für den Betrieb", "clswindream.Init")
|
||||
Else
|
||||
clsLogger.AddError("Fehler beim Login an windream: " & ex.Message, "clswindream.Init")
|
||||
End If
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
#Region "+++++ Funktionen die für den Objekttyp relevate Informationen zurückliefern +++++"
|
||||
|
||||
''' <summary>
|
||||
''' Liefert alle Objekttypen des aktuellen Servers als windream-Objekte.
|
||||
''' </summary>
|
||||
''' <returns>Alle Objekttypen als WMObjects-Objekt</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function GetObjecttypesAsObjects() As WMObjects
|
||||
Try
|
||||
|
||||
Return oDokumentTypen
|
||||
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError("Fehler beim Auslesen der Objekttypen: " & ex.Message, "clswindream.GetObjecttypesAsObjects")
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Liefert alle Objekttypen des aktuellen Servers als Array aus Strings.
|
||||
''' </summary>
|
||||
''' <returns>Array mit allen Objekttypen als Strings</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function GetObjecttypesAsStrings() As String()
|
||||
|
||||
Try
|
||||
Dim objektTypenStr(oDokumentTypen.Count) As String
|
||||
|
||||
For i As Integer = 0 To oDokumentTypen.Count
|
||||
objektTypenStr(i) = oDokumentTypen.Item(i).aName
|
||||
Next
|
||||
|
||||
Return objektTypenStr
|
||||
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError("Fehler beim Auslesen der Objekttypen als String: " & ex.Message, "clswindream.GetObjecttypesAsStrings")
|
||||
Return Nothing
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Liefert alle Indexe eines Objekttypen.
|
||||
''' </summary>
|
||||
''' <param name="name">Name des Objekttyps</param>
|
||||
''' <returns>Array mit allen Objekttyp zugeordneten Indexen als String</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function GetIndicesByObjecttype(ByVal name As String) As String()
|
||||
Try
|
||||
Dim oObjectType As WMObject
|
||||
Dim oIndexAttributes As WMObjectRelation
|
||||
Dim oIndexAttribute As WMObject
|
||||
Dim oIndex As WMObject
|
||||
Dim oRelProperties As WMObjectRelationClass
|
||||
|
||||
' den Objekttyp laden
|
||||
oObjectType = oSession.GetWMObjectByName(WMEntityObjectType, name)
|
||||
|
||||
' Beziehung zu Indizes des Objekttyp auslesen
|
||||
oIndexAttributes = oObjectType.GetWMObjectRelationByName("TypeAttributes")
|
||||
|
||||
' Array für Indizes vorbereiten
|
||||
Dim aIndexNames(oIndexAttributes.Count - 1) As String
|
||||
|
||||
' alle Indizes durchlaufen
|
||||
For j As Integer = 0 To oIndexAttributes.Count - 1
|
||||
|
||||
' aktuellen Index auslesen
|
||||
oIndexAttribute = oIndexAttributes.Item(j)
|
||||
|
||||
' Eigenschaften des Index auslesen
|
||||
oRelProperties = oIndexAttribute.GetWMObjectRelationByName("Attribute")
|
||||
|
||||
' Index aus den Eigenschaften auslesen
|
||||
oIndex = oRelProperties.Item(0)
|
||||
|
||||
' Indexname speichern
|
||||
aIndexNames(j) = oIndex.aName
|
||||
Next
|
||||
|
||||
' Indexarray zurückgeben
|
||||
Return aIndexNames
|
||||
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError("Fehler beim Auslesen der windream-Indexe: " & ex.Message, "clswindream.GetIndicesByObjecttype")
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
''' <summary>
|
||||
''' Liefert einen Objekttyp als WMObject an Hand dessen Name.
|
||||
''' </summary>
|
||||
''' <param name="objekttypName">Name des Objekttyps</param>
|
||||
''' <returns>Objekttyp als WMObject</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function GetObjecttypeByName(ByVal objekttypName As String) As WMObject
|
||||
Try
|
||||
' alle Objekttypen auslesen
|
||||
Dim oObjectTypes As WMObjects = oSession.GetWMObjectTypes(WINDREAMLib.WMEntity.WMEntityDocument)
|
||||
|
||||
' alle Objekttypen durchlaufen und nach dem mit dem angegebenen Namen suchen
|
||||
For Each oObjectType As WMObject In oObjectTypes
|
||||
If oObjectType.aName = objekttypName Then
|
||||
Return oObjectType
|
||||
End If
|
||||
Next
|
||||
|
||||
Return Nothing
|
||||
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError("Ein Objekttyp kopnnte nicht erstellt werden. Fehler: " & ex.Message, "clswindream.GetObjecttypeByName")
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Überprüft ob der angegebene Index im Objekttyp existiert
|
||||
''' </summary>
|
||||
''' <param name="objekttyp">Name des zu durchsuchenden Objekttyps</param>
|
||||
''' <param name="indexname">Name des zu suchenden Indexes</param>
|
||||
''' <returns>Liefert True wenn der Index im Objekttyp existiert, sonst False</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function ExistIndexInObjekttyp(ByVal objekttyp As String, ByVal indexname As String) As Boolean
|
||||
Try
|
||||
Dim indexnamen() As String = GetIndicesByObjecttype(objekttyp)
|
||||
|
||||
If indexnamen Is Nothing Then Return False
|
||||
|
||||
For Each index As String In indexnamen
|
||||
If index = indexname Then Return True
|
||||
Next
|
||||
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError("Beim Prüfen ob ein Index für einen Objekttypen existiert, ist ein Fehler aufgetreten. Fehler: " & ex.Message, "clswindream.ExistIndexInObjekttyp")
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "+++++ Allgemeine Funktionen die Informationen zurückliefern +++++"
|
||||
|
||||
''' <summary>
|
||||
''' Liefert True wenn die windream-Session angemeldet ist und False für den Fall, dass die Session nicht eingeloggt ist.
|
||||
''' </summary>
|
||||
''' <returns>Anmeldestatus als Boolean</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function IsLoggedIn() As Boolean
|
||||
Try
|
||||
Return oSession.aLoggedin
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError("Es konnte nicht erfolgreich geprüft werden, ob das Programm am windream-Server angemeldet ist. Fehler: " & ex.Message, "clswindream.IsLoggedIn")
|
||||
End Try
|
||||
|
||||
Return False
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Liefert den Servernamen an dem windream aktuell angemeldet ist.
|
||||
''' </summary>
|
||||
''' <returns>Servername als String</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Shared Function GetCurrentServer() As String
|
||||
Try
|
||||
Return oBrowser.GetCurrentServer 'ClassWindream.oBrowser.GetCurrentServer
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError("Der aktuell gewählte windream-Server konnte nicht ausgelesen werden. Fehler: " & ex.Message, "clswindream.GetCurrentServer")
|
||||
End Try
|
||||
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
'Public Function GetSharedCurrentServer() As String
|
||||
' Try
|
||||
' Return ClassWindream.oBrowser.GetCurrentServer
|
||||
' Catch ex As Exception
|
||||
' MsgBox("Der aktuell gewählte windream-Server konnte nicht ausgelesen werden." & vbNewLine & vbNewLine & "Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler beim Auslesen des windream-Servers")
|
||||
' End Try
|
||||
|
||||
' Return ""
|
||||
'End Function
|
||||
|
||||
|
||||
'Liefert das Windream-Laufwerk des windream-Servers, in Form '[Laufwerksbuchstabe]:'. (z.B. 'W:')
|
||||
'Laufwerksbuchstabe mit Doppelpunkt als String</returns>
|
||||
'
|
||||
'Public Function GetWindreamDriveLetter() As String
|
||||
|
||||
' Try
|
||||
' Dim oControl As AISCONTROLDATACOMLib.AISControlData
|
||||
' Dim sDrive As String = ""
|
||||
|
||||
' ' oControl = New AISCONTROLDATACOMLib.AISControlData
|
||||
|
||||
' ' sDrive = oControl.GetStringValue(&H10040003)
|
||||
|
||||
' ' Return sDrive & ":"
|
||||
|
||||
' Catch ex As Exception
|
||||
' MsgBox("Fehlernachricht: " & ex.Message, MsgBoxStyle.Critical, "Fehler beim Auslesen des windream-Laufwerks")
|
||||
' End Try
|
||||
|
||||
' Return ""
|
||||
'End Function
|
||||
|
||||
''' <summary>
|
||||
''' Liefert den Typen eines Indexes als Integer.
|
||||
''' </summary>
|
||||
''' <param name="indexname">Name des zu überprüfenden Indexfeldes</param>
|
||||
''' <returns>Liefert eine Zahl, die einen Typen beschreibt</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function GetTypeOfIndexAsIntByName(ByVal indexname As String) As Integer
|
||||
Try
|
||||
Dim oAttribute = oSession.GetWMObjectByName(WINDREAMLib.WMEntity.WMEntityAttribute, indexname)
|
||||
Dim vType = oAttribute.getVariableValue("dwAttrType")
|
||||
Return vType
|
||||
Catch ex As Exception
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
Public Function GetValuesfromAuswahlliste(ByVal indexname As String) As Object
|
||||
Try
|
||||
'Dim oAttribute = oSession.GetWMObjectByName(WINDREAMLib.WMEntity.WMEntityAttribute, indexname)
|
||||
'Dim vType = oAttribute.getVariableValue("vItems")
|
||||
'Return vType
|
||||
Dim oChoiceList = oSession.GetWMObjectByName(WMEntityChoiceList, indexname)
|
||||
If Err.Number = 0 And TypeName(oChoiceList) <> "Nothing" Then
|
||||
Dim Values = oChoiceList
|
||||
Values = oChoiceList.GetVariableValue("vItems")
|
||||
Dim anz As Integer = 0
|
||||
|
||||
For Each CLItem In Values
|
||||
If oChoiceList.aName IsNot Nothing Then
|
||||
anz += 1
|
||||
End If
|
||||
Next
|
||||
Dim strListe(anz - 1)
|
||||
Dim zahl As Integer = 0
|
||||
For Each CLItem In Values
|
||||
If oChoiceList.aName IsNot Nothing Then
|
||||
strListe(zahl) = CLItem
|
||||
zahl += 1
|
||||
End If
|
||||
Next
|
||||
Return strListe
|
||||
Else
|
||||
clsLogger.Add("Auswahlliste: " & indexname & " nicht gefunden.", True, "clswindream.GetValuesfromAuswahlliste")
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
clsLogger.AddError("Fehler: " & ex.Message, "clswindream.GetValuesfromAuswahlliste")
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
Public Shared Function WDObject_exists(wdobj_location As String)
|
||||
Dim WDObject As WMObject
|
||||
Try
|
||||
WDObject = oSession.GetWMObjectByPath(WINDREAMLib.WMEntity.WMEntityDocument, wdobj_location.Substring(2))
|
||||
If WDObject Is Nothing Then
|
||||
Return False
|
||||
Else
|
||||
clsLogger.AddDetailLog("WDObject exists")
|
||||
Return True
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
' bei einem Fehler einen Eintrag in der Logdatei machen
|
||||
clsLogger.AddError("Es konnte kein windream-Object erzeugt werden - " & ex.Message, "clswindream.WDObject_exists")
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Public Shared Function GetSearchDocuments(ByVal wdfLocation As String)
|
||||
'wdfLocation = 'W:\System\Suchen\WDRH\TestPDF.wdf'
|
||||
Try
|
||||
Dim SearchName = wdfLocation.Substring(wdfLocation.LastIndexOf("\") + 1)
|
||||
Dim SearchPath = wdfLocation.Substring(0, wdfLocation.Length - SearchName.Length)
|
||||
|
||||
If System.IO.File.Exists(wdfLocation.ToLower) Then
|
||||
clsLogger.AddDetailLog("Search exists")
|
||||
Else
|
||||
clsLogger.AddError("windream-search not existing: " & wdfLocation)
|
||||
Return Nothing
|
||||
End If
|
||||
oController.CheckSearchProfile(wdfLocation.ToLower)
|
||||
clsLogger.AddDetailLog("oController erzeugt")
|
||||
Dim suchTyp = oController.SearchProfileTargetProgID
|
||||
Dim ExSettings As Object
|
||||
Dim oSearch As Object
|
||||
ExSettings = oController.SearchProfileExSettings
|
||||
If ExSettings = 0 Then ExSettings = 7
|
||||
|
||||
Dim srchQuick As WMOSRCHLib.WMQuickSearch = CreateObject("WMOSrch.WMQuickSearch")
|
||||
Dim srchIndex As WMOSRCHLib.WMIndexSearch = CreateObject("WMOSrch.WMIndexSearch")
|
||||
Dim srchObjectType As WMOSRCHLib.WMObjectTypeSearch = CreateObject("WMOSrch.WMObjectTypeSearch")
|
||||
clsLogger.AddDetailLog("WD Objekte in GetSearchDocuments erzeugt")
|
||||
If suchTyp Is Nothing Then
|
||||
clsLogger.AddError("suchTyp is nothing")
|
||||
Return Nothing
|
||||
End If
|
||||
clsLogger.AddDetailLog(suchTyp.ToString.ToUpper)
|
||||
'' Der öffentliche Member CheckSearchProfile für den Typ IWMQuickSearch7 wurde nicht gefunden. [Microsoft.VisualBasic] => GetSearchDocuments()
|
||||
Select Case suchTyp.ToString.ToUpper
|
||||
Case "WMOSRCH.WMQUICKSEARCH"
|
||||
srchQuick.WMSession = CreateObject("Windream.WMSession", GetCurrentServer)
|
||||
oConnect.LoginSession(srchQuick.WMSession)
|
||||
clsLogger.AddDetailLog("Session created...")
|
||||
srchQuick.ClearSearch()
|
||||
srchQuick.SearchProfilePath = SearchPath
|
||||
srchQuick.LoadSearchProfile(SearchName)
|
||||
oSearch = srchQuick.GetSearch()
|
||||
|
||||
Case "WMOSRCH.WMINDEXSEARCH"
|
||||
srchIndex.WMSession = CreateObject("Windream.WMSession", GetCurrentServer)
|
||||
clsLogger.AddDetailLog("Session created...")
|
||||
oConnect.LoginSession(srchIndex.WMSession)
|
||||
srchIndex.ClearSearch()
|
||||
srchIndex.SearchProfilePath = SearchPath
|
||||
srchIndex.LoadSearchProfile(SearchName)
|
||||
oSearch = srchIndex.GetSearch()
|
||||
|
||||
Case "WMOSRCH.WMOBJECTTYPESEARCH"
|
||||
srchObjectType.WMSession = CreateObject("Windream.WMSession", GetCurrentServer)
|
||||
oConnect.LoginSession(srchObjectType.WMSession)
|
||||
clsLogger.AddDetailLog("Session created...")
|
||||
srchObjectType.ClearSearch()
|
||||
srchObjectType.SearchProfilePath = SearchPath
|
||||
srchObjectType.LoadSearchProfile(SearchName)
|
||||
oSearch = srchObjectType.GetSearch()
|
||||
|
||||
Case Else
|
||||
clsLogger.Add("KEIN GÜLTIGER WINDREAM-SUCHTYP", True, "clswindream.GetSearchDocuments")
|
||||
|
||||
Return Nothing
|
||||
End Select
|
||||
Dim WMObjects As Object
|
||||
WMObjects = oSearch.Execute
|
||||
clsLogger.AddDetailLog("WD Objekte werden zurückgegeben")
|
||||
Return oSearch.execute
|
||||
|
||||
Catch ex As Exception
|
||||
' bei einem Fehler einen Eintrag in der Logdatei machen
|
||||
clsLogger.AddError(ex.Message, "clswindream.GetSearchDocuments")
|
||||
Return Nothing
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
8
app/DDWDResultHandler/packages.config
Normal file
8
app/DDWDResultHandler/packages.config
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="EntityFramework" version="6.1.1" targetFramework="net451" />
|
||||
<package id="System.Data.SQLite" version="1.0.94.1" targetFramework="net451" />
|
||||
<package id="System.Data.SQLite.Core" version="1.0.94.0" targetFramework="net451" />
|
||||
<package id="System.Data.SQLite.EF6" version="1.0.94.0" targetFramework="net451" />
|
||||
<package id="System.Data.SQLite.Linq" version="1.0.94.1" targetFramework="net451" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user