MS changes

This commit is contained in:
Digital Data - Marlon Schreiber 2018-04-11 08:56:35 +02:00
parent 0574ac1682
commit acc94a29e4
26 changed files with 798 additions and 292 deletions

1
.gitignore vendored
View File

@ -154,3 +154,4 @@ $RECYCLE.BIN/
# Mac desktop service store files # Mac desktop service store files
.DS_Store .DS_Store
/.vs/ToolCollection/v15/Server/sqlite3

View File

@ -267,10 +267,11 @@ Public Class ClassLoggerDI
Private Shared Sub ShowErrorMessage() Private Shared Sub ShowErrorMessage()
If Not ClassLoggerDI.HasInformedAboutError Then If Not ClassLoggerDI.HasInformedAboutError Then
My.Settings.errortext = "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 & _ My.Settings.errortext = "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 &
"Es wird keine Logdatei angelegt oder beschrieben." & vbNewLine & "Im Folgenden werden Sie über Fehler, den Log betreffend nicht weiter informiert, um den Ablauf der Nachindexierung nicht zu stören." "Es wird keine Logdatei angelegt oder beschrieben." & vbNewLine & "Im Folgenden werden Sie über Fehler, den Log betreffend nicht weiter informiert, um den Ablauf der Nachindexierung nicht zu stören."
My.Settings.Save() My.Settings.Save()
frmError.Show() clsHelper.Add_Application_log(My.Settings.errortext)
'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." & _ '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.", _ ' 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, "DI: Fehler beim Öffnen der Logdatei") ' MsgBoxStyle.Information, "DI: Fehler beim Öffnen der Logdatei")

View File

@ -68,10 +68,11 @@ Public Class ClassLoggerNI
Public Shared Sub SetSpeicherort(ByVal speicherort As String) Public Shared Sub SetSpeicherort(ByVal speicherort As String)
Dim log_folder As String = My.Application.Info.DirectoryPath & "\Log" Dim log_folder As String = My.Application.Info.DirectoryPath & "\Log"
Dim folder As New IO.DirectoryInfo(log_folder) Dim folder As New IO.DirectoryInfo(log_folder)
If speicherort = "" Then
If folder.Exists = False Then If folder.Exists = False Then
IO.Directory.CreateDirectory(log_folder) IO.Directory.CreateDirectory(log_folder)
End If End If
If speicherort = "" Then
ClassLoggerNI.DateiSpeicherort = log_folder ClassLoggerNI.DateiSpeicherort = log_folder
Else Else
ClassLoggerNI.DateiSpeicherort = speicherort ClassLoggerNI.DateiSpeicherort = speicherort
@ -285,10 +286,11 @@ Public Class ClassLoggerNI
Private Shared Sub ShowErrorMessage() Private Shared Sub ShowErrorMessage()
If Not ClassLoggerNI.HasInformedAboutError Then If Not ClassLoggerNI.HasInformedAboutError Then
My.Settings.errortext = "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 & _ My.Settings.errortext = "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 &
"Es wird keine Logdatei angelegt oder beschrieben." & vbNewLine & "Im Folgenden werden Sie über Fehler, den Log betreffend nicht weiter informiert, um den Ablauf der Nachindexierung nicht zu stören." "Es wird keine Logdatei angelegt oder beschrieben." & vbNewLine & "Im Folgenden werden Sie über Fehler, den Log betreffend nicht weiter informiert, um den Ablauf der Nachindexierung nicht zu stören."
My.Settings.Save() My.Settings.Save()
frmError.Show() clsHelper.Add_Application_log(My.Settings.errortext)
'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 & _ '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 der Nachindexierung nicht zu stören.", _ ' "Es wird keine Logdatei angelegt oder beschrieben." & vbNewLine & vbNewLine & "Im folgenden werden Sie über Fehler, den Log betreffend nicht weiter informiert, um den Ablauf der Nachindexierung nicht zu stören.", _
' MsgBoxStyle.Information, "NI: Fehler beim Öffnen der Logdatei") ' MsgBoxStyle.Information, "NI: Fehler beim Öffnen der Logdatei")

View File

@ -41,10 +41,9 @@ Public Class ClassWindream_allgemein
' wenn ein Fehler bei der Initialisierung auftrat ' wenn ein Fehler bei der Initialisierung auftrat
If Not Me.Init() Then If Not Me.Init() Then
' Nachricht ausgeben ' Nachricht ausgeben
MsgBox("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.", MsgBoxStyle.Exclamation, "Fehler bei Initialisierung")
' das Programm "abschießen" ' das Programm "abschießen"
Process.GetCurrentProcess.Kill() ' Process.GetCurrentProcess.Kill()
End If End If
End Sub End Sub
@ -65,6 +64,7 @@ Public Class ClassWindream_allgemein
Me.oConnect = CreateObject("Windream.WMConnect") Me.oConnect = CreateObject("Windream.WMConnect")
'MsgBox("windrem init 'ed") 'MsgBox("windrem init 'ed")
Catch ex As Exception Catch ex As Exception
clsHelper.Add_Application_log("Unexpected error in Windream.Init(CreateObjects): " & ex.Message)
Return False Return False
End Try End Try
@ -89,7 +89,8 @@ Public Class ClassWindream_allgemein
Me.oConnect.LoginSession(Me.oSession) Me.oConnect.LoginSession(Me.oSession)
If Me.oSession.aLoggedin = False Then If Me.oSession.aLoggedin = False Then
MsgBox("Es konnte keine Verbindung mit dem windream-Server hergestellt werden", MsgBoxStyle.Exclamation, "Verbindung konnte nicht hergestellt werden") clsHelper.Add_Application_log("Unexpected error in Windream.Init(oSession.aloggedIn): Could not check session-state")
Return False Return False
End If End If
@ -127,11 +128,12 @@ Public Class ClassWindream_allgemein
Catch ex As Exception Catch ex As Exception
If Err.Number = -2147220985 Then If Err.Number = -2147220985 Then
MsgBox("Die installierte windream-Version ist nicht ausreichend für den Betrieb der Tool Collection für windream." & vbNewLine & _ clsHelper.Add_Application_log("Unexpected error in Windream.Init(2147220985): " & ex.Message)
"Bitte kontaktieren Sie Digital Data." & vbNewLine & vbNewLine & "Fehlernachricht:" & vbNewLine & Err.Description, MsgBoxStyle.Exclamation, "Unzureichende windream-Version")
Else Else
If Not ex.Message.Contains("Already logged in") Then If Not ex.Message.Contains("Already logged in") Then
MsgBox("Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler beim Login an windream") clsHelper.Add_Application_log("Unexpected error in Windream.Init(Already logged in): " & ex.Message)
Else Else
Return True Return True
End If End If
@ -456,7 +458,8 @@ Public Class ClassWindream_allgemein
Try Try
Return Me.oSession.aLoggedin Return Me.oSession.aLoggedin
Catch ex As Exception Catch ex As Exception
MsgBox("Es konnte nicht erfolgreich geprüft werden, ob das Programm am windream-Server angemeldet ist." & vbNewLine & vbNewLine & "Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler bei Loggedin-Prüfung") clsHelper.Add_Application_log("Unexpected error in Windream.IsLoggedIn: " & ex.Message)
'MsgBox("Es konnte nicht erfolgreich geprüft werden, ob das Programm am windream-Server angemeldet ist." & vbNewLine & vbNewLine & "Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler bei Loggedin-Prüfung")
End Try End Try
Return False Return False
@ -471,7 +474,8 @@ Public Class ClassWindream_allgemein
Try Try
Return Me.oBrowser.GetCurrentServer 'ClassWindream.oBrowser.GetCurrentServer Return Me.oBrowser.GetCurrentServer 'ClassWindream.oBrowser.GetCurrentServer
Catch ex As Exception 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") clsHelper.Add_Application_log("Unexpected error in Windream.GetCurrentServer: " & ex.Message)
'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 End Try
Return "" Return ""
@ -558,6 +562,7 @@ Public Class ClassWindream_allgemein
End If End If
Catch ex As Exception Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler in GetValuesfromAuswahlliste:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler in GetValuesfromAuswahlliste:")
Return Nothing Return Nothing
End Try End Try

View File

@ -73,4 +73,50 @@ Public Class ClassxmlZugriff
Return Nothing Return Nothing
End Try End Try
End Function End Function
Public Function GetValueFromZugFerdxml(ByVal vfilename As String, ByVal vfullfilepath As String, ByVal KnotenString As String, ByVal Profil As String)
Dim returnvalue
Try
If My.Settings.vLogErrorsonly = False Then ClassLoggerNI.Add(" >> Auslesen des Indexwertes aus Indexfile: " & vfilename, False)
Dim _xmlDoc As New XmlDocument
_xmlDoc.Load(vfullfilepath)
Dim xml As New Xml.XmlTextReader(vfilename)
Dim TreeNode As TreeNode
Dim elemList As XmlNodeList = _xmlDoc.GetElementsByTagName("ram:SellerTradeParty")
Dim i As Integer
For i = 0 To elemList.Count - 1
' Console.WriteLine(elemList(i).InnerXml)
For Each Xml_Node As XmlNode In elemList
Dim z As Integer
For z = 0 To Xml_Node.ChildNodes.Count - 1
If Xml_Node.ChildNodes(z).Name = "ram:Name" And KnotenString = "SellerTradeParty:Name" Then
Dim xmlvalue = Xml_Node.ChildNodes(z).InnerText
If xmlvalue.Contains(vbLf&) Then
xmlvalue = xmlvalue.Replace(vbLf&, "")
End If
If xmlvalue.Contains(Chr(13)) Then
Dim arr As String() = xmlvalue.Split(Chr(13))
End If
returnvalue = xmlvalue
ElseIf Xml_Node.ChildNodes(z).Name = "ram:SpecifiedTaxRegistration" And KnotenString = "SpecifiedTaxRegistration" Then
returnvalue = Xml_Node.ChildNodes(z).InnerText
End If
Next z
Next
Next i
Return returnvalue
Catch ex As Exception
' an dieser Stelle sollte jeder unvorhergesehene Fehler der Funktion abgefangen werden
ClassLoggerNI.Add("ClassNIDatenbankzClassxmlZugriff", "Ein unbekannter Fehler in GetValueFromZugFerdxml.", ex)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("ClassxmlZugriff.GetValueFromZugFerdxml " & "<br> Profil: " & Profil & "<br> Datei: " & vfullfilepath & "<br> Ein unbekannter Fehler: " & ex.Message)
End If
Return Nothing
End Try
End Function
End Class End Class

View File

@ -11,4 +11,6 @@
Public DI_STREAMRESULTFILE As String Public DI_STREAMRESULTFILE As String
Public CURRENT_MOVE_FILEPATH As String Public CURRENT_MOVE_FILEPATH As String
Public CURRENT_APPLICATION_LOG As String = ""
End Module End Module

View File

@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.0.4.3")> <Assembly: AssemblyVersion("2.0.4.4")>
<Assembly: AssemblyFileVersion("1.5.1.0")> <Assembly: AssemblyFileVersion("1.5.1.0")>

View File

@ -211,10 +211,10 @@
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
<DependentUpon>DS_More.xsd</DependentUpon> <DependentUpon>DS_More.xsd</DependentUpon>
</Compile> </Compile>
<Compile Include="frmError.Designer.vb"> <Compile Include="frmApplicationLog.Designer.vb">
<DependentUpon>frmError.vb</DependentUpon> <DependentUpon>frmApplicationLog.vb</DependentUpon>
</Compile> </Compile>
<Compile Include="frmError.vb"> <Compile Include="frmApplicationLog.vb">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="frmGrundeinstellungen.Designer.vb"> <Compile Include="frmGrundeinstellungen.Designer.vb">
@ -420,8 +420,8 @@
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="frmError.resx"> <EmbeddedResource Include="frmApplicationLog.resx">
<DependentUpon>frmError.vb</DependentUpon> <DependentUpon>frmApplicationLog.vb</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="frmGrundeinstellungen.resx"> <EmbeddedResource Include="frmGrundeinstellungen.resx">
<DependentUpon>frmGrundeinstellungen.vb</DependentUpon> <DependentUpon>frmGrundeinstellungen.vb</DependentUpon>

View File

@ -54,4 +54,16 @@ Public Class clsHelper
End Function End Function
Public Shared Sub Add_Application_log(msg As String)
Try
If CURRENT_APPLICATION_LOG <> String.Empty Then
CURRENT_APPLICATION_LOG = CURRENT_APPLICATION_LOG & vbNewLine & Now.ToString & " >> " & msg
Else
CURRENT_APPLICATION_LOG = Now.ToString & " >> " & msg
End If
Catch ex As Exception
End Try
End Sub
End Class End Class

View File

@ -507,6 +507,26 @@ Public Class clsNI_WorkFile
ClassLoggerNI.LogEntry(" >> ACHTUNG 2: Nachindexdatei: " & _pathxmlfile & " existiert nicht!", False, True) ClassLoggerNI.LogEntry(" >> ACHTUNG 2: Nachindexdatei: " & _pathxmlfile & " existiert nicht!", False, True)
Return True Return True
End If End If
ElseIf aktivesProfil.xmlEnd = "xml (ZugFerd)" Then
ClassLoggerNI.LogEntry(" - Indexierung über XML-Dokument ZugFerd")
'Pfad für xml-File verketten
_pathxmlfile = _WDOrdnerpfad & "\" & Path.GetFileNameWithoutExtension(_WDFileINWORK.aPath) & ".xml"
'Dateipfad für xml-Datei zusammenbauen
If File.Exists(_pathxmlfile) Then
'Übergabe der Dateiparameter und des xml-Knotens
_NidxWert = Trim(_XML.GetValueFromZugFerdxml(System.IO.Path.GetFileNameWithoutExtension(_WDFileINWORK.aPath) & ".xml", _pathxmlfile, _Spalte, aktivesProfil.Profilname))
'wert aus Luratech darf nicht leer sein
If _NidxWert Is Nothing Then
File_SetBooleanIndex(True, _WDFileINWORK, aktivesProfil.IndexValidation)
ClassLoggerNI.LogEntry(">> ACHTUNG: Wert aus ZugFerd-Datei ist nothing", False, True)
Return True
End If
Else
ClassLoggerNI.LogEntry(" >> ACHTUNG 2: Nachindexdatei ZugFerd: " & _pathxmlfile & " existiert nicht!", False, True)
Return True
End If
End If End If
'wenn Wert geliefert und Index ist deskriptiver Index 'wenn Wert geliefert und Index ist deskriptiver Index
If aktivesProfil.Desk_windreamIndex = _Index And aktivesProfil.checkIndexsql <> "" Then If aktivesProfil.Desk_windreamIndex = _Index And aktivesProfil.checkIndexsql <> "" Then

View File

@ -0,0 +1,102 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmApplicationLog
Inherits System.Windows.Forms.Form
'Das Formular ü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
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
Me.txtlog = New System.Windows.Forms.TextBox()
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
Me.ToolStripStatusLabel1 = New System.Windows.Forms.ToolStripStatusLabel()
Me.Button1 = New System.Windows.Forms.Button()
Me.StatusStrip1.SuspendLayout()
Me.SuspendLayout()
'
'Timer1
'
Me.Timer1.Interval = 30000
'
'txtlog
'
Me.txtlog.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txtlog.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtlog.Location = New System.Drawing.Point(15, 73)
Me.txtlog.Multiline = True
Me.txtlog.Name = "txtlog"
Me.txtlog.ScrollBars = System.Windows.Forms.ScrollBars.Both
Me.txtlog.Size = New System.Drawing.Size(1001, 432)
Me.txtlog.TabIndex = 1
Me.txtlog.TabStop = False
'
'StatusStrip1
'
Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripStatusLabel1})
Me.StatusStrip1.Location = New System.Drawing.Point(0, 520)
Me.StatusStrip1.Name = "StatusStrip1"
Me.StatusStrip1.Size = New System.Drawing.Size(1028, 22)
Me.StatusStrip1.TabIndex = 2
Me.StatusStrip1.Text = "StatusStrip1"
'
'ToolStripStatusLabel1
'
Me.ToolStripStatusLabel1.Name = "ToolStripStatusLabel1"
Me.ToolStripStatusLabel1.Size = New System.Drawing.Size(0, 17)
'
'Button1
'
Me.Button1.Image = Global.ToolCollection.My.Resources.Resources.book_delete
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button1.Location = New System.Drawing.Point(15, 23)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(194, 44)
Me.Button1.TabIndex = 3
Me.Button1.Text = "Application Log leeren"
Me.Button1.UseVisualStyleBackColor = True
'
'frmApplicationLog
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(1028, 542)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.StatusStrip1)
Me.Controls.Add(Me.txtlog)
Me.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
Me.Name = "frmApplicationLog"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "ApplicationLog"
Me.StatusStrip1.ResumeLayout(False)
Me.StatusStrip1.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents Timer1 As Timer
Friend WithEvents txtlog As TextBox
Friend WithEvents StatusStrip1 As StatusStrip
Friend WithEvents ToolStripStatusLabel1 As ToolStripStatusLabel
Friend WithEvents Button1 As Button
End Class

View File

@ -117,4 +117,10 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="StatusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>106, 17</value>
</metadata>
</root> </root>

View File

@ -0,0 +1,34 @@
Public Class frmApplicationLog
Private Shared _Instance As frmApplicationLog = Nothing
Public Shared Function Instance() As frmApplicationLog
If _Instance Is Nothing OrElse _Instance.IsDisposed = True Then
_Instance = New frmApplicationLog
End If
_Instance.BringToFront()
Return _Instance
End Function
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Refresh_log
End Sub
Private Sub frmApplicationLog_Load(sender As Object, e As EventArgs) Handles Me.Load
Refresh_log()
Timer1.Start()
End Sub
Sub Refresh_log()
If CURRENT_APPLICATION_LOG <> String.Empty Then
txtlog.Text = ""
txtlog.Text = CURRENT_APPLICATION_LOG
ToolStripStatusLabel1.Text = Now.ToString & " - Log refreshed"
ToolStripStatusLabel1.BackColor = Color.LimeGreen
End If
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
CURRENT_APPLICATION_LOG = ""
txtlog.Text = ""
ToolStripStatusLabel1.Text = Now.ToString & " - Log was emptied manually!"
ToolStripStatusLabel1.BackColor = Color.Yellow
End Sub
End Class

View File

@ -512,6 +512,10 @@ Public Class frmDIHauptseite
If fileAusschliessen = False Then If fileAusschliessen = False Then
'Überprüfen ob Datei geöffnet ist?? 'Überprüfen ob Datei geöffnet ist??
In_Use = func_check_file_use(filenameQuelle) In_Use = func_check_file_use(filenameQuelle)
If In_Use = True And filenameQuelle.EndsWith(".pdf") Then
ClassLoggerDI.Add(" >> File might be an PDF/A ", False)
In_Use = False
End If
'Achtung Datei in Benutzung 'Achtung Datei in Benutzung
If In_Use = True Then If In_Use = True Then
If My.Settings.vLogErrorsonly = False Then If My.Settings.vLogErrorsonly = False Then

View File

@ -1,81 +0,0 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmError
Inherits System.Windows.Forms.Form
'Das Formular ü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
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.txtError = New System.Windows.Forms.TextBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.Button1 = New System.Windows.Forms.Button()
Me.SuspendLayout()
'
'txtError
'
Me.txtError.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.ToolCollection.My.MySettings.Default, "errortext", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.txtError.ForeColor = System.Drawing.Color.Red
Me.txtError.Location = New System.Drawing.Point(12, 33)
Me.txtError.Multiline = True
Me.txtError.Name = "txtError"
Me.txtError.ReadOnly = True
Me.txtError.Size = New System.Drawing.Size(469, 94)
Me.txtError.TabIndex = 1
Me.txtError.Text = Global.ToolCollection.My.MySettings.Default.errortext
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(12, 13)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(97, 17)
Me.Label1.TabIndex = 2
Me.Label1.Text = "Fehlermeldung:"
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(155, 133)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(184, 29)
Me.Button1.TabIndex = 3
Me.Button1.Text = "OK - Fenster schliessen"
Me.Button1.UseVisualStyleBackColor = True
'
'frmError
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 17.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(493, 174)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.txtError)
Me.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
Me.Name = "frmError"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Unvorhergesehener Fehler in ToolCollection"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents txtError As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Button1 As System.Windows.Forms.Button
End Class

View File

@ -1,6 +0,0 @@
Public Class frmError
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Me.Close()
End Sub
End Class

View File

@ -78,6 +78,7 @@ Partial Class frmNIHauptseite
Me.TBMO_RE_HISTORYBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.TBMO_RE_HISTORYBindingSource = New System.Windows.Forms.BindingSource(Me.components)
Me.TBMO_RE_HISTORYTableAdapter = New ToolCollection.DS_MoreTableAdapters.TBMO_RE_HISTORYTableAdapter() Me.TBMO_RE_HISTORYTableAdapter = New ToolCollection.DS_MoreTableAdapters.TBMO_RE_HISTORYTableAdapter()
Me.TimerRefresh = New System.Windows.Forms.Timer(Me.components) Me.TimerRefresh = New System.Windows.Forms.Timer(Me.components)
Me.lblNotWorking = New System.Windows.Forms.Label()
Me.tcmain.SuspendLayout() Me.tcmain.SuspendLayout()
Me.tpMain.SuspendLayout() Me.tpMain.SuspendLayout()
Me.StatusStrip1.SuspendLayout() Me.StatusStrip1.SuspendLayout()
@ -107,6 +108,7 @@ Partial Class frmNIHauptseite
'tpMain 'tpMain
' '
Me.tpMain.AutoScroll = True Me.tpMain.AutoScroll = True
Me.tpMain.Controls.Add(Me.lblNotWorking)
Me.tpMain.Controls.Add(Me.StatusStrip1) Me.tpMain.Controls.Add(Me.StatusStrip1)
Me.tpMain.Controls.Add(Me.Label1) Me.tpMain.Controls.Add(Me.Label1)
Me.tpMain.Controls.Add(Me.Label9) Me.tpMain.Controls.Add(Me.Label9)
@ -398,7 +400,7 @@ Partial Class frmNIHauptseite
Me.Label16.Name = "Label16" Me.Label16.Name = "Label16"
Me.Label16.Size = New System.Drawing.Size(503, 13) Me.Label16.Size = New System.Drawing.Size(503, 13)
Me.Label16.TabIndex = 14 Me.Label16.TabIndex = 14
Me.Label16.Text = "Standard Einleitungstext: (HTML fähig: <br> = Zeilenwechsel;<b>= Fett Formatiert;" & _ Me.Label16.Text = "Standard Einleitungstext: (HTML fähig: <br> = Zeilenwechsel;<b>= Fett Formatiert;" &
"</b>= Ende)" "</b>= Ende)"
' '
'txtBody 'txtBody
@ -455,7 +457,7 @@ Partial Class frmNIHauptseite
Me.Label12.AutoSize = True Me.Label12.AutoSize = True
Me.Label12.Location = New System.Drawing.Point(6, 150) Me.Label12.Location = New System.Drawing.Point(6, 150)
Me.Label12.Name = "Label12" Me.Label12.Name = "Label12"
Me.Label12.Size = New System.Drawing.Size(239, 13) Me.Label12.Size = New System.Drawing.Size(238, 13)
Me.Label12.TabIndex = 8 Me.Label12.TabIndex = 8
Me.Label12.Text = "Betreff: (Text für den Betreff der Fehler-Email)" Me.Label12.Text = "Betreff: (Text für den Betreff der Fehler-Email)"
' '
@ -611,6 +613,18 @@ Partial Class frmNIHauptseite
' '
Me.TimerRefresh.Interval = 10000 Me.TimerRefresh.Interval = 10000
' '
'lblNotWorking
'
Me.lblNotWorking.AutoSize = True
Me.lblNotWorking.BackColor = System.Drawing.Color.Yellow
Me.lblNotWorking.Font = New System.Drawing.Font("Segoe UI", 12.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblNotWorking.Location = New System.Drawing.Point(108, 192)
Me.lblNotWorking.Name = "lblNotWorking"
Me.lblNotWorking.Size = New System.Drawing.Size(67, 21)
Me.lblNotWorking.TabIndex = 46
Me.lblNotWorking.Text = "Label18"
Me.lblNotWorking.Visible = False
'
'frmNIHauptseite 'frmNIHauptseite
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@ -700,4 +714,5 @@ Partial Class frmNIHauptseite
Friend WithEvents StatusStrip1 As System.Windows.Forms.StatusStrip Friend WithEvents StatusStrip1 As System.Windows.Forms.StatusStrip
Friend WithEvents tslblStatus As System.Windows.Forms.ToolStripStatusLabel Friend WithEvents tslblStatus As System.Windows.Forms.ToolStripStatusLabel
Friend WithEvents TimerRefresh As System.Windows.Forms.Timer Friend WithEvents TimerRefresh As System.Windows.Forms.Timer
Friend WithEvents lblNotWorking As Label
End Class End Class

View File

@ -321,7 +321,8 @@ Public Class frmNIHauptseite
"<br> >> Mögliche Fehlerursache: Das W-Laufwerk ist nicht verfügbar!") "<br> >> Mögliche Fehlerursache: Das W-Laufwerk ist nicht verfügbar!")
End If End If
Abbruch_NI("Windream-Suche konnte nicht gefunden werden!", True, False) Abbruch_NI("Windream-Suche konnte nicht gefunden werden!", True, False)
MsgBox("Nachindexierung wurde abgebrochen, da eine Windream-Suche nicht gefunden werden konnte!" & vbNewLine & Now, MsgBoxStyle.Critical, "Hinweis") clsHelper.Add_Application_log("Nachindexierung wurde abgebrochen, da eine Windream-Suche (" & Me.aktivesProfil.WindreamSuche & ") nicht gefunden werden konnte")
Else Else
' wenn im aktuellen Suchergebnis Verknüpfungen vorhanden sind ' wenn im aktuellen Suchergebnis Verknüpfungen vorhanden sind
If Me.aktivesProfil.Verknüpfungen IsNot Nothing Then If Me.aktivesProfil.Verknüpfungen IsNot Nothing Then
@ -522,17 +523,21 @@ Public Class frmNIHauptseite
End Sub End Sub
Public aktivesProfil As ClassNIProfil Public aktivesProfil As ClassNIProfil
Private aktivesDokument As WMObject Private Shared aktivesDokument As WMObject
Public Sub Profile_Durchlaufen() Public Sub Profile_Durchlaufen()
Try Try
lblNotWorking.Visible = False
pnlInfos.Visible = True
ClassLoggerNI.Init(My.Application.Info.DirectoryPath & "\Log", My.Settings.vLogNI & "_", True) ClassLoggerNI.Init(My.Application.Info.DirectoryPath & "\Log", My.Settings.vLogNI & "_", True)
ClassLoggerNI.Add(" ", False) ClassLoggerNI.Add(" ", False)
ClassLoggerNI.Add(" ", False) ClassLoggerNI.Add(" ", False)
If My.Settings.Sleep_Begin > 0 And My.Settings.Sleep_End > 0 Then If My.Settings.Sleep_Begin > 0 And My.Settings.Sleep_End > 0 Then
If Now.Hour >= CInt(My.Settings.Sleep_Begin) And Now.Hour <= CInt(My.Settings.Sleep_End) Then If Now.Hour >= CInt(My.Settings.Sleep_Begin) And Now.Hour <= CInt(My.Settings.Sleep_End) Then
ClassLoggerNI.Add(String.Format(">> ToolCollection is in SleepMode - {0}-{1}-{2}", Now.Hour.ToString, My.Settings.Sleep_Begin.ToString, My.Settings.Sleep_End.ToString), False) ClassLoggerNI.Add(String.Format(">> ToolCollection is in SleepMode - {0}-{1}-{2}", Now.Hour.ToString, My.Settings.Sleep_Begin.ToString, My.Settings.Sleep_End.ToString), False)
lblStatus.Text = "In SleepMode" lblNotWorking.Text = "In SleepMode"
lblNotWorking.Visible = True
pnlInfos.Visible = False
Exit Sub Exit Sub
End If End If
End If End If
@ -545,8 +550,10 @@ Public Class frmNIHauptseite
End If End If
Next Next
If IsWorking_Hour = False Then If IsWorking_Hour = False Then
lblNotWorking.Text = "No working-slot - working hours are: " & My.Settings.NI_WORKING_HOURS & " - " & Now.ToString
lblNotWorking.Visible = True
pnlInfos.Visible = False
ClassLoggerNI.Add(String.Format(">> ToolCollection is not in WorkingMode - NowHour: {0} - Working hours are: {1}", Now.Hour.ToString, My.Settings.NI_WORKING_HOURS), False) ClassLoggerNI.Add(String.Format(">> ToolCollection is not in WorkingMode - NowHour: {0} - Working hours are: {1}", Now.Hour.ToString, My.Settings.NI_WORKING_HOURS), False)
lblStatus.Text = "No Working-Hour - Working hours are: " & My.Settings.NI_WORKING_HOURS
Exit Sub Exit Sub
End If End If
Else Else
@ -554,7 +561,8 @@ Public Class frmNIHauptseite
End If End If
If _windreamNI.Init() = False Then If _windreamNI.Init() = False Then
email.Send_EMail("Die Windream-Klasse konnte nicht initialisiert werden. Windream-Client unvollständig gestartert.") email.Send_EMail("Die Windream-Klasse konnte nicht initialisiert werden. Windream-Client unvollständig gestartert.")
MsgBox("Die Windream-Klasse konnte nicht initialisiert werden. Windream-Client unvollständig gestartert.", MsgBoxStyle.Critical) clsHelper.Add_Application_log("Die Windream-Klasse konnte nicht initialisiert werden. Windream-Client unvollständig gestartert?")
Exit Sub Exit Sub
End If End If
'nur weiter machen wenn kein BackgroundWorker mehr läuft 'nur weiter machen wenn kein BackgroundWorker mehr läuft
@ -763,7 +771,13 @@ Public Class frmNIHauptseite
End Try End Try
End If End If
Case "xml" '#### Indexierung über xml-Dokument Case "xml" '#### Indexierung über xml-Dokument
_pathxmlfile = ordnerpfad & "\" & System.IO.Path.GetFileNameWithoutExtension(dokument.aPath) & "." & aktivesProfil.xmlEnd 'aktivesProfil.xmlFolder _pathxmlfile = ordnerpfad & "\" & System.IO.Path.GetFileNameWithoutExtension(dokument.aPath) & "."
If aktivesProfil.xmlEnd = "xml (ZugFerd)" Then
_pathxmlfile &= "xml"
Else
_pathxmlfile &= aktivesProfil.xmlEnd
End If
If clsHelper.file_exists(_pathxmlfile, "NI") = False Then If clsHelper.file_exists(_pathxmlfile, "NI") = False Then
_pathxmlfile = ordnerpfad & "\" & System.IO.Path.GetFileNameWithoutExtension(dokument.aPath) & "." & "xfres" _pathxmlfile = ordnerpfad & "\" & System.IO.Path.GetFileNameWithoutExtension(dokument.aPath) & "." & "xfres"
If clsHelper.file_exists(_pathxmlfile, "NI") = False Then If clsHelper.file_exists(_pathxmlfile, "NI") = False Then
@ -981,6 +995,22 @@ Public Class frmNIHauptseite
error_in_Indexierung = True error_in_Indexierung = True
fehlermsg &= vbNewLine & " >> ACHTUNG 2: Datei: " & _pathxmlfile & " existiert nicht!" fehlermsg &= vbNewLine & " >> ACHTUNG 2: Datei: " & _pathxmlfile & " existiert nicht!"
End If End If
ElseIf aktivesProfil.xmlEnd = "xml (ZugFerd)" Then
Logger("Indexierung über XML-Dokument ZugFerd")
'Dateipfad für xffres/xml-Datei zusammenbauen
If File.Exists(_pathxmlfile) Then
'Übergabe der Dateiparameter und des xml-Knotens
_NidxWert = Trim(xml.GetValueFromZugFerdxml(System.IO.Path.GetFileNameWithoutExtension(_pathxmlfile), _pathxmlfile, INDEX_SQL_BEFEHL.Spalte, aktivesProfil.Profilname))
'wert aus Luratech darf nicht leer sein
If _NidxWert Is Nothing Then
File_SetBooleanIndex(True, aktivesDokument, aktivesProfil.IndexValidation)
SetErrorMeldung("Wert aus Formrec. ist nothing", aktivesDokument, My.Settings.ERROR_INDEX)
End If
Else
Logger("ACHTUNG 2: Nachindexdatei: " & _pathxmlfile & " existiert nicht!", False, True)
error_in_Indexierung = True
fehlermsg &= vbNewLine & " >> ACHTUNG 2: Datei: " & _pathxmlfile & " existiert nicht!"
End If
End If End If
'wenn kein error_in_Indexierung und wert geliefert und Index ist deskriptiver Index 'wenn kein error_in_Indexierung und wert geliefert und Index ist deskriptiver Index
If Not error_in_Indexierung And aktivesProfil.Desk_windreamIndex = INDEX_SQL_BEFEHL.Index And aktivesProfil.checkIndexsql <> "" Then If Not error_in_Indexierung And aktivesProfil.Desk_windreamIndex = INDEX_SQL_BEFEHL.Index And aktivesProfil.checkIndexsql <> "" Then
@ -1122,7 +1152,7 @@ Public Class frmNIHauptseite
'Logger("SQL-Abfrage ergab kein Ergebnis", False, True) 'Logger("SQL-Abfrage ergab kein Ergebnis", False, True)
If aktivesProfil.Ni_Art.ToLower = "xml" Then If aktivesProfil.Ni_Art.ToLower = "xml" Then
If clsHelper.file_exists(_pathxmlfile, "NI") Then If clsHelper.file_exists(_pathxmlfile, "NI") Then
' MsgBox(_pathxmlfile & vbNewLine & _path2xml)
If INDEX_SQL_BEFEHL.Index = aktivesProfil.Desk_windreamIndex Then If INDEX_SQL_BEFEHL.Index = aktivesProfil.Desk_windreamIndex Then
Logger("# Achtung: Der Deskriptive Index: " & aktivesProfil.Desk_windreamIndex & " sollte gesetzt werden! Wert konnte aber nicht gelesen werden bzw ist leer - Markierung des Doks", False, True) Logger("# Achtung: Der Deskriptive Index: " & aktivesProfil.Desk_windreamIndex & " sollte gesetzt werden! Wert konnte aber nicht gelesen werden bzw ist leer - Markierung des Doks", False, True)
'Kein Ergebnis für den Deskriptiven Index also Kennzeichnen des Dokumentes über den Index der das Dokument für die Validierung kennzeichnet 'Kein Ergebnis für den Deskriptiven Index also Kennzeichnen des Dokumentes über den Index der das Dokument für die Validierung kennzeichnet
@ -1168,13 +1198,62 @@ Public Class frmNIHauptseite
Logger("VB-Skript nach Indexierung", False, True) Logger("VB-Skript nach Indexierung", False, True)
Dim anweisung As String = Me.aktivesProfil.SQL_Anweisung.Replace("EXECUTEVB ", "") Dim anweisung As String = Me.aktivesProfil.SQL_Anweisung.Replace("EXECUTEVB ", "")
Dim arrAnweisung As String() = Split(anweisung, "#") Dim arrAnweisung As String() = Split(anweisung, "#")
Logger("> " & anweisung, False, True)
' Regulären Ausdruck zum Auslesen der windream-Indexe definieren
Dim preg As String = "\[%{1}[a-zA-Z0-9\!\$\&\/\(\)\=\?\,\.\-\;\:_öÖüÜäÄ\#\'\+\*\~\{\}\@\€\<\>\ ]+]{1}"
' SQL-String für aktuelles Profil laden
Dim VBSCRIPTCOMMAND As String = anweisung
' 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 elemente As System.Text.RegularExpressions.MatchCollection = regulärerAusdruck.Matches(VBSCRIPTCOMMAND)
' alle Vorkommen der windream-Indexe im SQL-String durchlaufen
For Each element As System.Text.RegularExpressions.Match In elemente
' die Zeichen [% und ] entfernen (liefert den wirklichen windream-Index)
Dim elementOhneSonderzeichen As String = element.Value.Replace("[%", "")
elementOhneSonderzeichen = elementOhneSonderzeichen.Replace("]", "")
If elementOhneSonderzeichen.StartsWith("ddv") Then
Dim ddvariable As String = ""
elementOhneSonderzeichen = elementOhneSonderzeichen.Replace("ddv", "")
Dim filepath = My.Settings.vWLaufwerk & ":" & dokument.aPath
Select Case elementOhneSonderzeichen
Case "FULLFILENAME"
ddvariable = filepath
Case "FOLDERNAME"
ddvariable = Path.GetDirectoryName(filepath)
End Select
VBSCRIPTCOMMAND = VBSCRIPTCOMMAND.Replace(element.Value, ddvariable)
Else
Try
' den Wert des deskriptiven Indexes für das aktuelle Dokument auslesen
IndexwertAusWindream = dokument.GetVariableValue(elementOhneSonderzeichen)
Catch ex As Exception
' wenn ein Fehler aufgetreten ist, muss das Flag gesetzt werden
error_in_Indexierung = True
Logger("Indexname/elementOhneSonderzeichen aus Regex: " & elementOhneSonderzeichen)
Logger("Indexwert aus Windream: " & IndexwertAusWindream.ToString)
Logger("Fehler in Get Indexwert aus windream bei Spezifischem SQL: ", True, True)
Logger(ex.Message, True, True)
End Try
VBSCRIPTCOMMAND = VBSCRIPTCOMMAND.Replace(element.Value, IndexwertAusWindream.ToString)
End If
'database.ExecuteonOracleDb(Sqlcommand, aktivesProfil.DataSource, aktivesProfil.UserId, aktivesProfil.Password)
'MsgBox(Me.aktivesDokument.aPath & vbNewLine & vbNewLine & Me.aktivesDokument.aName)
Next
Logger("VBSCRIPTCOMMAND: " & VBSCRIPTCOMMAND)
Try Try
Dim process As New System.Diagnostics.Process Dim process As New System.Diagnostics.Process
Dim psi As New ProcessStartInfo(anweisung.Trim) Dim psi As New ProcessStartInfo(VBSCRIPTCOMMAND.Trim)
psi.CreateNoWindow = True
Logger("VB-Skript nach Indexierung") Logger("VB-Skript nach Indexierung")
process.EnableRaisingEvents = True process.EnableRaisingEvents = True
process.StartInfo = psi process.StartInfo = psi
process.Start() process.Start()
@ -1814,19 +1893,66 @@ Public Class frmNIHauptseite
Return False Return False
End If End If
End Function
Private Shared Function REGEX_REPLACE(_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("]", "")
Logger("Indexwert aus Index/Variable '" & reg_element_Ohne_SZ & "' auslesen....", False)
Dim wdIndexwert
' den Wert des Indexes für das aktuelle Dokument auslesen
wdIndexwert = aktivesDokument.GetVariableValue(reg_element_Ohne_SZ)
If wdIndexwert Is Nothing = False Then
If Not wdIndexwert.GetType.ToString.Contains("System.Object") Then
Logger("Namenkonvention (" & i & ") " & _STRING, False)
wdIndexwert = wdIndexwert.ToString.TrimEnd
wdIndexwert = wdIndexwert.ToString.TrimStart
Logger("Ausgelesener Indexwert = '" & wdIndexwert & "'", False)
_STRING = _STRING.Replace(reg_element.Value, wdIndexwert.ToString)
i += 1
Else
ClassLoggerNI.Add(">> Achtung gelesener Wert ist ein Vektorfeld - keine Umbenennung möglich ", False)
Return Nothing
End If
End If
Next
Return _STRING
Catch ex As Exception
ClassLoggerNI.Add("REGEX_REPLACE", ex.Message)
Return Nothing
End Try
End Function End Function
Private Function Check_DeskIndexValue(ByVal _indexvalue As String, ByVal _sql As String) Private Function Check_DeskIndexValue(ByVal _indexvalue As String, ByVal _sql As String)
Try Try
Dim sql As String = _sql Dim sql As String = _sql
Dim _vsql As String Dim _vsql
Dim _replace As String Dim _replace As String
'LIKE UPPER('%[%String 01]')'
If IsNumeric(_indexvalue) Then If IsNumeric(_indexvalue) Then
_replace = _indexvalue _replace = _indexvalue
Else ' Else
_replace = "'" & _indexvalue & "'" ' _replace = "'" & _indexvalue & "'"
End If End If
_vsql = sql.Replace("[%" & aktivesProfil.Desk_windreamIndex & "]", _replace) _vsql = REGEX_REPLACE(sql)
Logger("Check Deskriptiven Index-Value - Select Scalar: " & _vsql, False) If _vsql = Nothing Then
Return 0
End If
Logger("Check_DeskIndexValue - Select Scalar: " & _vsql, False)
If aktivesProfil.DbArt = "Oracle" Then If aktivesProfil.DbArt = "Oracle" Then
Dim ergebnis As Integer = database.CheckIndex_oracle(_vsql, aktivesProfil.DataSource, aktivesProfil.InitialCatalog, aktivesProfil.UserId, aktivesProfil.Password) Dim ergebnis As Integer = database.CheckIndex_oracle(_vsql, aktivesProfil.DataSource, aktivesProfil.InitialCatalog, aktivesProfil.UserId, aktivesProfil.Password)

View File

@ -516,7 +516,7 @@ Partial Class frmNIProfileigenschaften
' '
Me.cmbEndung_xml.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.cmbEndung_xml.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.cmbEndung_xml.FormattingEnabled = True Me.cmbEndung_xml.FormattingEnabled = True
Me.cmbEndung_xml.Items.AddRange(New Object() {"xml", "xffres"}) Me.cmbEndung_xml.Items.AddRange(New Object() {"xml", "xml (ZugFerd)", "xffres"})
Me.cmbEndung_xml.Location = New System.Drawing.Point(133, 41) Me.cmbEndung_xml.Location = New System.Drawing.Point(133, 41)
Me.cmbEndung_xml.Name = "cmbEndung_xml" Me.cmbEndung_xml.Name = "cmbEndung_xml"
Me.cmbEndung_xml.Size = New System.Drawing.Size(121, 21) Me.cmbEndung_xml.Size = New System.Drawing.Size(121, 21)
@ -528,9 +528,9 @@ Partial Class frmNIProfileigenschaften
Me.lblDateiendung.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblDateiendung.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblDateiendung.Location = New System.Drawing.Point(130, 25) Me.lblDateiendung.Location = New System.Drawing.Point(130, 25)
Me.lblDateiendung.Name = "lblDateiendung" Me.lblDateiendung.Name = "lblDateiendung"
Me.lblDateiendung.Size = New System.Drawing.Size(93, 13) Me.lblDateiendung.Size = New System.Drawing.Size(113, 13)
Me.lblDateiendung.TabIndex = 3 Me.lblDateiendung.TabIndex = 3
Me.lblDateiendung.Text = "Dateiendungen*" Me.lblDateiendung.Text = "Dateiendungen/Typ*"
' '
'rbxls 'rbxls
' '
@ -680,8 +680,8 @@ Partial Class frmNIProfileigenschaften
Me.Label3.Name = "Label3" Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(516, 26) Me.Label3.Size = New System.Drawing.Size(516, 26)
Me.Label3.TabIndex = 68 Me.Label3.TabIndex = 68
Me.Label3.Text = "Wählen Sie hier den Index aus, der gesetzt wird, sobald ein Dokument nicht nachin" & _ Me.Label3.Text = "Wählen Sie hier den Index aus, der gesetzt wird, sobald ein Dokument nicht nachin" &
"dexiert werden kann bzw. " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "einen Startindex erhält, der nicht in der Datenbank e" & _ "dexiert werden kann bzw. " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "einen Startindex erhält, der nicht in der Datenbank e" &
"xistiert." "xistiert."
' '
'FolderBrowserDialog1 'FolderBrowserDialog1
@ -1060,8 +1060,8 @@ Partial Class frmNIProfileigenschaften
Me.Label21.Name = "Label21" Me.Label21.Name = "Label21"
Me.Label21.Size = New System.Drawing.Size(261, 65) Me.Label21.Size = New System.Drawing.Size(261, 65)
Me.Label21.TabIndex = 0 Me.Label21.TabIndex = 0
Me.Label21.Text = "Bei Aktivierung dieser Funktion wird nach " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "Indexierung das Modul 'Move and Renam" & _ Me.Label21.Text = "Bei Aktivierung dieser Funktion wird nach " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "Indexierung das Modul 'Move and Renam" &
"e' " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "ausgeführt. " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "Die Datei wird anhand der Dokumentartspezifikation " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "umbenann" & _ "e' " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "ausgeführt. " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "Die Datei wird anhand der Dokumentartspezifikation " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "umbenann" &
"t und in den Ordnerbaum verschoben" "t und in den Ordnerbaum verschoben"
' '
'lblHinweisKundenindex 'lblHinweisKundenindex
@ -1074,7 +1074,7 @@ Partial Class frmNIProfileigenschaften
Me.lblHinweisKundenindex.RightToLeft = System.Windows.Forms.RightToLeft.No Me.lblHinweisKundenindex.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lblHinweisKundenindex.Size = New System.Drawing.Size(359, 30) Me.lblHinweisKundenindex.Size = New System.Drawing.Size(359, 30)
Me.lblHinweisKundenindex.TabIndex = 44 Me.lblHinweisKundenindex.TabIndex = 44
Me.lblHinweisKundenindex.Text = "Dieser Index klassifiziert zu welchem Kunden ein Dokument gehört." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "(Eindeutige Ku" & _ Me.lblHinweisKundenindex.Text = "Dieser Index klassifiziert zu welchem Kunden ein Dokument gehört." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "(Eindeutige Ku" &
"ndennummer, Matchcode)" "ndennummer, Matchcode)"
Me.lblHinweisKundenindex.TextAlign = System.Drawing.ContentAlignment.MiddleRight Me.lblHinweisKundenindex.TextAlign = System.Drawing.ContentAlignment.MiddleRight
' '
@ -1264,7 +1264,7 @@ Partial Class frmNIProfileigenschaften
Me.Label14.Name = "Label14" Me.Label14.Name = "Label14"
Me.Label14.Size = New System.Drawing.Size(407, 26) Me.Label14.Size = New System.Drawing.Size(407, 26)
Me.Label14.TabIndex = 4 Me.Label14.TabIndex = 4
Me.Label14.Text = "Optional können Sie hier einen dedizierten Ordnerpfad angeben in welchem " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "anhand" & _ Me.Label14.Text = "Optional können Sie hier einen dedizierten Ordnerpfad angeben in welchem " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "anhand" &
" des gewählten Index ein Unterordner angelegt wird." " des gewählten Index ein Unterordner angelegt wird."
' '
'btbNBaddCrFolder 'btbNBaddCrFolder
@ -1325,7 +1325,7 @@ Partial Class frmNIProfileigenschaften
Me.Label4.Name = "Label4" Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(638, 15) Me.Label4.Size = New System.Drawing.Size(638, 15)
Me.Label4.TabIndex = 71 Me.Label4.TabIndex = 71
Me.Label4.Text = "Wählen Sie hier einen Ordner in windream, in welchen die Datei, nach erfolgreiche" & _ Me.Label4.Text = "Wählen Sie hier einen Ordner in windream, in welchen die Datei, nach erfolgreiche" &
"r Indexierung verschoben werden soll." "r Indexierung verschoben werden soll."
' '
'Label13 'Label13
@ -1336,7 +1336,7 @@ Partial Class frmNIProfileigenschaften
Me.Label13.Name = "Label13" Me.Label13.Name = "Label13"
Me.Label13.Size = New System.Drawing.Size(619, 15) Me.Label13.Size = New System.Drawing.Size(619, 15)
Me.Label13.TabIndex = 78 Me.Label13.TabIndex = 78
Me.Label13.Text = "Nachbearbeitungsfunktionen werden NACH erfolgreicher Nachindexierung für die ents" & _ Me.Label13.Text = "Nachbearbeitungsfunktionen werden NACH erfolgreicher Nachindexierung für die ents" &
"pr. Datei durchlaufen." "pr. Datei durchlaufen."
' '
'TabPage4 'TabPage4
@ -1456,7 +1456,7 @@ Partial Class frmNIProfileigenschaften
Me.Label5.Name = "Label5" Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(553, 13) Me.Label5.Size = New System.Drawing.Size(553, 13)
Me.Label5.TabIndex = 58 Me.Label5.TabIndex = 58
Me.Label5.Text = "Liest die Indexwerte des Ordners aus und überträgt Sie an den Index mit dem IDENT" & _ Me.Label5.Text = "Liest die Indexwerte des Ordners aus und überträgt Sie an den Index mit dem IDENT" &
"ISCHEN Indexnamen." "ISCHEN Indexnamen."
' '
'chkbxGetOrdnerRechte 'chkbxGetOrdnerRechte

View File

@ -161,7 +161,7 @@ einen Startindex erhält, der nicht in der Datenbank existiert. Diese Kennzeichn
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAK ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAK
CQAAAk1TRnQBSQFMAgEBAgEAAVgBAAFYAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo CQAAAk1TRnQBSQFMAgEBAgEAAWABAAFgAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

View File

@ -440,7 +440,7 @@ Partial Class frmNIProfilhinzufuegen
'cmbEndung_xml 'cmbEndung_xml
' '
Me.cmbEndung_xml.FormattingEnabled = True Me.cmbEndung_xml.FormattingEnabled = True
Me.cmbEndung_xml.Items.AddRange(New Object() {"xml", "xffres"}) Me.cmbEndung_xml.Items.AddRange(New Object() {"xml", "xml (ZugFerd)", "xffres"})
Me.cmbEndung_xml.Location = New System.Drawing.Point(133, 41) Me.cmbEndung_xml.Location = New System.Drawing.Point(133, 41)
Me.cmbEndung_xml.Name = "cmbEndung_xml" Me.cmbEndung_xml.Name = "cmbEndung_xml"
Me.cmbEndung_xml.Size = New System.Drawing.Size(121, 21) Me.cmbEndung_xml.Size = New System.Drawing.Size(121, 21)
@ -494,8 +494,8 @@ Partial Class frmNIProfilhinzufuegen
Me.Label3.Name = "Label3" Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(516, 26) Me.Label3.Size = New System.Drawing.Size(516, 26)
Me.Label3.TabIndex = 68 Me.Label3.TabIndex = 68
Me.Label3.Text = "Wählen Sie hier den Index aus, der gesetzt wird, sobald ein Dokument nicht nachin" & _ Me.Label3.Text = "Wählen Sie hier den Index aus, der gesetzt wird, sobald ein Dokument nicht nachin" &
"dexiert werden kann bzw. " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "einen Startindex erhält, der nicht in der Datenbank e" & _ "dexiert werden kann bzw. " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "einen Startindex erhält, der nicht in der Datenbank e" &
"xistiert." "xistiert."
' '
'GroupBox2 'GroupBox2
@ -575,7 +575,7 @@ Partial Class frmNIProfilhinzufuegen
Me.Label10.AutoSize = True Me.Label10.AutoSize = True
Me.Label10.Location = New System.Drawing.Point(6, 56) Me.Label10.Location = New System.Drawing.Point(6, 56)
Me.Label10.Name = "Label10" Me.Label10.Name = "Label10"
Me.Label10.Size = New System.Drawing.Size(293, 13) Me.Label10.Size = New System.Drawing.Size(292, 13)
Me.Label10.TabIndex = 0 Me.Label10.TabIndex = 0
Me.Label10.Text = "Bitte geben Sie hier den Indexnamen des Volltextes ein:" Me.Label10.Text = "Bitte geben Sie hier den Indexnamen des Volltextes ein:"
' '
@ -694,7 +694,7 @@ Partial Class frmNIProfilhinzufuegen
Me.Label8.Name = "Label8" Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(621, 13) Me.Label8.Size = New System.Drawing.Size(621, 13)
Me.Label8.TabIndex = 58 Me.Label8.TabIndex = 58
Me.Label8.Text = "Liest die Indexwerte des Ordners aus und überträgt Sie an Indizes des windream-Ob" & _ Me.Label8.Text = "Liest die Indexwerte des Ordners aus und überträgt Sie an Indizes des windream-Ob" &
"jektes mit identischen Indexnamen." "jektes mit identischen Indexnamen."
' '
'Label7 'Label7
@ -731,7 +731,7 @@ Partial Class frmNIProfilhinzufuegen
Me.rbVolltext.AutoSize = True Me.rbVolltext.AutoSize = True
Me.rbVolltext.Location = New System.Drawing.Point(366, 113) Me.rbVolltext.Location = New System.Drawing.Point(366, 113)
Me.rbVolltext.Name = "rbVolltext" Me.rbVolltext.Name = "rbVolltext"
Me.rbVolltext.Size = New System.Drawing.Size(84, 17) Me.rbVolltext.Size = New System.Drawing.Size(83, 17)
Me.rbVolltext.TabIndex = 74 Me.rbVolltext.TabIndex = 74
Me.rbVolltext.TabStop = True Me.rbVolltext.TabStop = True
Me.rbVolltext.Text = "per Volltext" Me.rbVolltext.Text = "per Volltext"

View File

@ -24,7 +24,7 @@ Partial Class frmNIVerknuepfungen
Private Sub InitializeComponent() Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container() Me.components = New System.ComponentModel.Container()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmNIVerknuepfungen)) Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmNIVerknuepfungen))
Me.txtUpdateAnweisung = New System.Windows.Forms.TextBox() Me.txtfinalSkriptUpdate = New System.Windows.Forms.TextBox()
Me.cmbDatenbankSpalten = New System.Windows.Forms.ComboBox() Me.cmbDatenbankSpalten = New System.Windows.Forms.ComboBox()
Me.Label8 = New System.Windows.Forms.Label() Me.Label8 = New System.Windows.Forms.Label()
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip() Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
@ -45,7 +45,8 @@ Partial Class frmNIVerknuepfungen
Me.clmIndex = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) Me.clmIndex = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
Me.cmbWindreamIndexe = New System.Windows.Forms.ComboBox() Me.cmbWindreamIndexe = New System.Windows.Forms.ComboBox()
Me.GroupBox1 = New System.Windows.Forms.GroupBox() Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.chkbSpeicherort = New System.Windows.Forms.CheckBox() Me.Button3 = New System.Windows.Forms.Button()
Me.Button1 = New System.Windows.Forms.Button()
Me.lvwVerknuepfungen = New System.Windows.Forms.ListView() Me.lvwVerknuepfungen = New System.Windows.Forms.ListView()
Me.btnStandardSQL = New System.Windows.Forms.Button() Me.btnStandardSQL = New System.Windows.Forms.Button()
Me.btnWindreamIndexEinfügenSQL = New System.Windows.Forms.Button() Me.btnWindreamIndexEinfügenSQL = New System.Windows.Forms.Button()
@ -57,7 +58,6 @@ Partial Class frmNIVerknuepfungen
Me.btnTestSQL = New System.Windows.Forms.Button() Me.btnTestSQL = New System.Windows.Forms.Button()
Me.Label9 = New System.Windows.Forms.Label() Me.Label9 = New System.Windows.Forms.Label()
Me.gbUpdate = New System.Windows.Forms.GroupBox() Me.gbUpdate = New System.Windows.Forms.GroupBox()
Me.btnSQL_Updatespeichern = New System.Windows.Forms.Button()
Me.cmbWindreamIndexeSQL = New System.Windows.Forms.ComboBox() Me.cmbWindreamIndexeSQL = New System.Windows.Forms.ComboBox()
Me.lblDescr_Verknüpfungen = New System.Windows.Forms.Label() Me.lblDescr_Verknüpfungen = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label()
@ -165,6 +165,8 @@ Partial Class frmNIVerknuepfungen
Me.rbvkt_add = New System.Windows.Forms.RadioButton() Me.rbvkt_add = New System.Windows.Forms.RadioButton()
Me.rbvkt_overwrite = New System.Windows.Forms.RadioButton() Me.rbvkt_overwrite = New System.Windows.Forms.RadioButton()
Me.SplitContainer1 = New System.Windows.Forms.SplitContainer() Me.SplitContainer1 = New System.Windows.Forms.SplitContainer()
Me.lblsaveSQLAnweisung = New System.Windows.Forms.Label()
Me.Label1 = New System.Windows.Forms.Label()
Me.StatusStrip1.SuspendLayout() Me.StatusStrip1.SuspendLayout()
Me.GroupBox1.SuspendLayout() Me.GroupBox1.SuspendLayout()
Me.Panel1.SuspendLayout() Me.Panel1.SuspendLayout()
@ -190,20 +192,20 @@ Partial Class frmNIVerknuepfungen
Me.SplitContainer1.SuspendLayout() Me.SplitContainer1.SuspendLayout()
Me.SuspendLayout() Me.SuspendLayout()
' '
'txtUpdateAnweisung 'txtfinalSkriptUpdate
' '
Me.txtUpdateAnweisung.AcceptsReturn = True Me.txtfinalSkriptUpdate.AcceptsReturn = True
Me.txtUpdateAnweisung.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ Me.txtfinalSkriptUpdate.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txtUpdateAnweisung.BackColor = System.Drawing.Color.LemonChiffon Me.txtfinalSkriptUpdate.BackColor = System.Drawing.Color.LemonChiffon
Me.txtUpdateAnweisung.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtfinalSkriptUpdate.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtUpdateAnweisung.Location = New System.Drawing.Point(6, 19) Me.txtfinalSkriptUpdate.Location = New System.Drawing.Point(6, 40)
Me.txtUpdateAnweisung.Multiline = True Me.txtfinalSkriptUpdate.Multiline = True
Me.txtUpdateAnweisung.Name = "txtUpdateAnweisung" Me.txtfinalSkriptUpdate.Name = "txtfinalSkriptUpdate"
Me.txtUpdateAnweisung.RightToLeft = System.Windows.Forms.RightToLeft.No Me.txtfinalSkriptUpdate.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.txtUpdateAnweisung.Size = New System.Drawing.Size(925, 166) Me.txtfinalSkriptUpdate.Size = New System.Drawing.Size(925, 145)
Me.txtUpdateAnweisung.TabIndex = 29 Me.txtfinalSkriptUpdate.TabIndex = 29
' '
'cmbDatenbankSpalten 'cmbDatenbankSpalten
' '
@ -406,26 +408,39 @@ Partial Class frmNIVerknuepfungen
'GroupBox1 'GroupBox1
' '
Me.GroupBox1.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.GroupBox1.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.GroupBox1.Controls.Add(Me.chkbSpeicherort) Me.GroupBox1.Controls.Add(Me.Button3)
Me.GroupBox1.Controls.Add(Me.Button1)
Me.GroupBox1.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.GroupBox1.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.GroupBox1.Location = New System.Drawing.Point(940, 22) Me.GroupBox1.Location = New System.Drawing.Point(942, 19)
Me.GroupBox1.Name = "GroupBox1" Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(205, 51) Me.GroupBox1.Size = New System.Drawing.Size(205, 83)
Me.GroupBox1.TabIndex = 50 Me.GroupBox1.TabIndex = 50
Me.GroupBox1.TabStop = False Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "windream Update-Variablen" Me.GroupBox1.Text = "Laufzeit-Variablen"
' '
'chkbSpeicherort 'Button3
' '
Me.chkbSpeicherort.AutoSize = True Me.Button3.Image = Global.ToolCollection.My.Resources.Resources.add
Me.chkbSpeicherort.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.chkbSpeicherort.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.Button3.Location = New System.Drawing.Point(3, 50)
Me.chkbSpeicherort.Location = New System.Drawing.Point(6, 16) Me.Button3.Name = "Button3"
Me.chkbSpeicherort.Name = "chkbSpeicherort" Me.Button3.Size = New System.Drawing.Size(132, 23)
Me.chkbSpeicherort.Size = New System.Drawing.Size(115, 17) Me.Button3.TabIndex = 2
Me.chkbSpeicherort.TabIndex = 0 Me.Button3.Text = "Folderpath File"
Me.chkbSpeicherort.Text = "Speicherort Datei" Me.Button3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.chkbSpeicherort.UseVisualStyleBackColor = True Me.Button3.UseVisualStyleBackColor = True
'
'Button1
'
Me.Button1.Image = Global.ToolCollection.My.Resources.Resources.add
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button1.Location = New System.Drawing.Point(3, 21)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(132, 23)
Me.Button1.TabIndex = 1
Me.Button1.Text = "Fullpath File"
Me.Button1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button1.UseVisualStyleBackColor = True
' '
'lvwVerknuepfungen 'lvwVerknuepfungen
' '
@ -461,7 +476,7 @@ Partial Class frmNIVerknuepfungen
Me.btnWindreamIndexEinfügenSQL.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.btnWindreamIndexEinfügenSQL.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.btnWindreamIndexEinfügenSQL.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnWindreamIndexEinfügenSQL.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnWindreamIndexEinfügenSQL.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.btnWindreamIndexEinfügenSQL.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.btnWindreamIndexEinfügenSQL.Location = New System.Drawing.Point(1123, 98) Me.btnWindreamIndexEinfügenSQL.Location = New System.Drawing.Point(1119, 134)
Me.btnWindreamIndexEinfügenSQL.Name = "btnWindreamIndexEinfügenSQL" Me.btnWindreamIndexEinfügenSQL.Name = "btnWindreamIndexEinfügenSQL"
Me.btnWindreamIndexEinfügenSQL.RightToLeft = System.Windows.Forms.RightToLeft.No Me.btnWindreamIndexEinfügenSQL.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.btnWindreamIndexEinfügenSQL.Size = New System.Drawing.Size(105, 21) Me.btnWindreamIndexEinfügenSQL.Size = New System.Drawing.Size(105, 21)
@ -544,20 +559,21 @@ Partial Class frmNIVerknuepfungen
Me.Label9.AutoSize = True Me.Label9.AutoSize = True
Me.Label9.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label9.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label9.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.Label9.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.Label9.Location = New System.Drawing.Point(943, 80) Me.Label9.Location = New System.Drawing.Point(939, 116)
Me.Label9.Name = "Label9" Me.Label9.Name = "Label9"
Me.Label9.RightToLeft = System.Windows.Forms.RightToLeft.No Me.Label9.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Label9.Size = New System.Drawing.Size(155, 13) Me.Label9.Size = New System.Drawing.Size(92, 13)
Me.Label9.TabIndex = 46 Me.Label9.TabIndex = 46
Me.Label9.Text = "Eindeutiger windream Index:" Me.Label9.Text = "windream Index:"
Me.Label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft Me.Label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
' '
'gbUpdate 'gbUpdate
' '
Me.gbUpdate.Controls.Add(Me.Label1)
Me.gbUpdate.Controls.Add(Me.lblsaveSQLAnweisung)
Me.gbUpdate.Controls.Add(Me.GroupBox1) Me.gbUpdate.Controls.Add(Me.GroupBox1)
Me.gbUpdate.Controls.Add(Me.txtUpdateAnweisung) Me.gbUpdate.Controls.Add(Me.txtfinalSkriptUpdate)
Me.gbUpdate.Controls.Add(Me.btnWindreamIndexEinfügenSQL) Me.gbUpdate.Controls.Add(Me.btnWindreamIndexEinfügenSQL)
Me.gbUpdate.Controls.Add(Me.btnSQL_Updatespeichern)
Me.gbUpdate.Controls.Add(Me.Label9) Me.gbUpdate.Controls.Add(Me.Label9)
Me.gbUpdate.Controls.Add(Me.cmbWindreamIndexeSQL) Me.gbUpdate.Controls.Add(Me.cmbWindreamIndexeSQL)
Me.gbUpdate.Dock = System.Windows.Forms.DockStyle.Fill Me.gbUpdate.Dock = System.Windows.Forms.DockStyle.Fill
@ -569,28 +585,13 @@ Partial Class frmNIVerknuepfungen
Me.gbUpdate.TabStop = False Me.gbUpdate.TabStop = False
Me.gbUpdate.Text = "SQL-Befehl oder Skript (ausgeführt nach jedem Dateidurchlauf)" Me.gbUpdate.Text = "SQL-Befehl oder Skript (ausgeführt nach jedem Dateidurchlauf)"
' '
'btnSQL_Updatespeichern
'
Me.btnSQL_Updatespeichern.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.btnSQL_Updatespeichern.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnSQL_Updatespeichern.Image = Global.ToolCollection.My.Resources.Resources.save
Me.btnSQL_Updatespeichern.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnSQL_Updatespeichern.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.btnSQL_Updatespeichern.Location = New System.Drawing.Point(946, 129)
Me.btnSQL_Updatespeichern.Name = "btnSQL_Updatespeichern"
Me.btnSQL_Updatespeichern.Size = New System.Drawing.Size(89, 23)
Me.btnSQL_Updatespeichern.TabIndex = 44
Me.btnSQL_Updatespeichern.Text = "Speichern"
Me.btnSQL_Updatespeichern.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnSQL_Updatespeichern.UseVisualStyleBackColor = True
'
'cmbWindreamIndexeSQL 'cmbWindreamIndexeSQL
' '
Me.cmbWindreamIndexeSQL.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.cmbWindreamIndexeSQL.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.cmbWindreamIndexeSQL.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList Me.cmbWindreamIndexeSQL.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbWindreamIndexeSQL.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.cmbWindreamIndexeSQL.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.cmbWindreamIndexeSQL.FormattingEnabled = True Me.cmbWindreamIndexeSQL.FormattingEnabled = True
Me.cmbWindreamIndexeSQL.Location = New System.Drawing.Point(946, 98) Me.cmbWindreamIndexeSQL.Location = New System.Drawing.Point(942, 134)
Me.cmbWindreamIndexeSQL.Name = "cmbWindreamIndexeSQL" Me.cmbWindreamIndexeSQL.Name = "cmbWindreamIndexeSQL"
Me.cmbWindreamIndexeSQL.RightToLeft = System.Windows.Forms.RightToLeft.No Me.cmbWindreamIndexeSQL.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmbWindreamIndexeSQL.Size = New System.Drawing.Size(164, 21) Me.cmbWindreamIndexeSQL.Size = New System.Drawing.Size(164, 21)
@ -1861,6 +1862,30 @@ Partial Class frmNIVerknuepfungen
Me.SplitContainer1.Size = New System.Drawing.Size(1265, 747) Me.SplitContainer1.Size = New System.Drawing.Size(1265, 747)
Me.SplitContainer1.SplitterDistance = 521 Me.SplitContainer1.SplitterDistance = 521
Me.SplitContainer1.TabIndex = 51 Me.SplitContainer1.TabIndex = 51
'
'lblsaveSQLAnweisung
'
Me.lblsaveSQLAnweisung.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.lblsaveSQLAnweisung.AutoSize = True
Me.lblsaveSQLAnweisung.BackColor = System.Drawing.Color.Yellow
Me.lblsaveSQLAnweisung.Font = New System.Drawing.Font("Segoe UI Semibold", 8.25!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblsaveSQLAnweisung.Location = New System.Drawing.Point(942, 172)
Me.lblsaveSQLAnweisung.Name = "lblsaveSQLAnweisung"
Me.lblsaveSQLAnweisung.Size = New System.Drawing.Size(38, 13)
Me.lblsaveSQLAnweisung.TabIndex = 51
Me.lblsaveSQLAnweisung.Text = "Label1"
Me.lblsaveSQLAnweisung.Visible = False
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.Location = New System.Drawing.Point(8, 18)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(457, 13)
Me.Label1.TabIndex = 52
Me.Label1.Text = "VB-Skript Command must start with prefix 'EXECUTEVB '. SQL-Command can be written" &
" like sql."
' '
'frmNIVerknuepfungen 'frmNIVerknuepfungen
' '
@ -1876,7 +1901,6 @@ Partial Class frmNIVerknuepfungen
Me.StatusStrip1.ResumeLayout(False) Me.StatusStrip1.ResumeLayout(False)
Me.StatusStrip1.PerformLayout() Me.StatusStrip1.PerformLayout()
Me.GroupBox1.ResumeLayout(False) Me.GroupBox1.ResumeLayout(False)
Me.GroupBox1.PerformLayout()
Me.Panel1.ResumeLayout(False) Me.Panel1.ResumeLayout(False)
Me.Panel1.PerformLayout() Me.Panel1.PerformLayout()
Me.gbUpdate.ResumeLayout(False) Me.gbUpdate.ResumeLayout(False)
@ -1914,7 +1938,7 @@ Partial Class frmNIVerknuepfungen
Me.PerformLayout() Me.PerformLayout()
End Sub End Sub
Friend WithEvents txtUpdateAnweisung As System.Windows.Forms.TextBox Friend WithEvents txtfinalSkriptUpdate As System.Windows.Forms.TextBox
Friend WithEvents btnSpalteEinfügen As System.Windows.Forms.Button Friend WithEvents btnSpalteEinfügen As System.Windows.Forms.Button
Friend WithEvents cmbDatenbankSpalten As System.Windows.Forms.ComboBox Friend WithEvents cmbDatenbankSpalten As System.Windows.Forms.ComboBox
Friend WithEvents Label8 As System.Windows.Forms.Label Friend WithEvents Label8 As System.Windows.Forms.Label
@ -1932,7 +1956,6 @@ Partial Class frmNIVerknuepfungen
Friend WithEvents clmIndex As System.Windows.Forms.ColumnHeader Friend WithEvents clmIndex As System.Windows.Forms.ColumnHeader
Friend WithEvents cmbWindreamIndexe As System.Windows.Forms.ComboBox Friend WithEvents cmbWindreamIndexe As System.Windows.Forms.ComboBox
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents chkbSpeicherort As System.Windows.Forms.CheckBox
Friend WithEvents lvwVerknuepfungen As System.Windows.Forms.ListView Friend WithEvents lvwVerknuepfungen As System.Windows.Forms.ListView
Friend WithEvents btnStandardSQL As System.Windows.Forms.Button Friend WithEvents btnStandardSQL As System.Windows.Forms.Button
Friend WithEvents btnTestSQL As System.Windows.Forms.Button Friend WithEvents btnTestSQL As System.Windows.Forms.Button
@ -1942,7 +1965,6 @@ Partial Class frmNIVerknuepfungen
Friend WithEvents btnWindreamIndexEinfügenSQL As System.Windows.Forms.Button Friend WithEvents btnWindreamIndexEinfügenSQL As System.Windows.Forms.Button
Friend WithEvents btnaddUniqueIndex As System.Windows.Forms.Button Friend WithEvents btnaddUniqueIndex As System.Windows.Forms.Button
Friend WithEvents lbxQuelle1 As System.Windows.Forms.ListBox Friend WithEvents lbxQuelle1 As System.Windows.Forms.ListBox
Friend WithEvents btnSQL_Updatespeichern As System.Windows.Forms.Button
Friend WithEvents btnEindIndex As System.Windows.Forms.Button Friend WithEvents btnEindIndex As System.Windows.Forms.Button
Friend WithEvents Panel1 As System.Windows.Forms.Panel Friend WithEvents Panel1 As System.Windows.Forms.Panel
Friend WithEvents lblSQLTest As System.Windows.Forms.Label Friend WithEvents lblSQLTest As System.Windows.Forms.Label
@ -2055,4 +2077,8 @@ Partial Class frmNIVerknuepfungen
Friend WithEvents rbvkt_overwrite As System.Windows.Forms.RadioButton Friend WithEvents rbvkt_overwrite As System.Windows.Forms.RadioButton
Friend WithEvents lblsave As System.Windows.Forms.Label Friend WithEvents lblsave As System.Windows.Forms.Label
Friend WithEvents SplitContainer1 As System.Windows.Forms.SplitContainer Friend WithEvents SplitContainer1 As System.Windows.Forms.SplitContainer
Friend WithEvents Button3 As Button
Friend WithEvents Button1 As Button
Friend WithEvents lblsaveSQLAnweisung As Label
Friend WithEvents Label1 As Label
End Class End Class

View File

@ -5,6 +5,7 @@ Imports System.Windows.Forms
Imports System.Xml Imports System.Xml
Imports System.DirectoryServices Imports System.DirectoryServices
Imports Oracle.ManagedDataAccess.Client Imports Oracle.ManagedDataAccess.Client
Imports System.IO
Public Class frmNIVerknuepfungen Public Class frmNIVerknuepfungen
Private _selectedProfil As ClassNIProfil Private _selectedProfil As ClassNIProfil
@ -206,7 +207,7 @@ Public Class frmNIVerknuepfungen
Me.txtCheckIndexSQL.Text = Me._selectedProfil.checkIndexsql Me.txtCheckIndexSQL.Text = Me._selectedProfil.checkIndexsql
'Move and Rename aktiv? 'Move and Rename aktiv?
If Me._selectedProfil.SQL_Anweisung <> "" Then If Me._selectedProfil.SQL_Anweisung <> "" Then
Me.txtUpdateAnweisung.Text = Me._selectedProfil.SQL_Anweisung Me.txtfinalSkriptUpdate.Text = Me._selectedProfil.SQL_Anweisung
End If End If
'################################################## '##################################################
@ -233,9 +234,14 @@ Public Class frmNIVerknuepfungen
Me.lvwVerknuepfungen.Items.Add(New Windows.Forms.ListViewItem(New String() {link.Index, link.Spalte, link.From})) Me.lvwVerknuepfungen.Items.Add(New Windows.Forms.ListViewItem(New String() {link.Index, link.Spalte, link.From}))
' wenn es den aktuellen Index noch in der Indexliste gibt ' wenn es den aktuellen Index noch in der Indexliste gibt
If Me.lbxIndex.Items.Contains(link.Index) Then If Me.lbxIndex.Items.Contains(link.Index) Then
Dim indextype As String = ClassNIWindream.GetIndex_Type(link.Index)
If Not indextype.StartsWith("Vektor") Then
' dann diesen Eintrag löschen ' dann diesen Eintrag löschen
Me.lbxIndex.Items.Remove(link.Index) Me.lbxIndex.Items.Remove(link.Index)
End If End If
End If
Next Next
Else Else
Me.grbFilterDB.Enabled = False Me.grbFilterDB.Enabled = False
@ -526,7 +532,7 @@ Public Class frmNIVerknuepfungen
' Add the root node's children to the TreeView. ' Add the root node's children to the TreeView.
trv.Nodes.Clear() trv.Nodes.Clear()
AddTreeViewChildNodes(trv.Nodes, _ AddTreeViewChildNodes(trv.Nodes,
xml_doc.DocumentElement) xml_doc.DocumentElement)
End Sub End Sub
Private Sub AddTreeViewChildNodes(ByVal parent_nodes As _ Private Sub AddTreeViewChildNodes(ByVal parent_nodes As _
@ -536,7 +542,7 @@ Public Class frmNIVerknuepfungen
'Case 'Case
End Select End Select
' Make the new TreeView node. ' Make the new TreeView node.
Dim new_node As TreeNode = _ Dim new_node As TreeNode =
parent_nodes.Add(child_node.Name) parent_nodes.Add(child_node.Name)
' Recursively make this node's descendants. ' Recursively make this node's descendants.
@ -804,7 +810,7 @@ Public Class frmNIVerknuepfungen
Dim conn As New OracleConnectionStringBuilder Dim conn As New OracleConnectionStringBuilder
Dim connstr As String Dim connstr As String
If Me._selectedProfil.DataSource <> "" And Me._selectedProfil.InitialCatalog <> "" Then If Me._selectedProfil.DataSource <> "" And Me._selectedProfil.InitialCatalog <> "" Then
connstr = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" & _selectedProfil.DataSource & ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" & _ connstr = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" & _selectedProfil.DataSource & ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" &
_selectedProfil.InitialCatalog & ")));User Id=" & Me._selectedProfil.UserId & ";Password=" & Me._selectedProfil.Password & ";" _selectedProfil.InitialCatalog & ")));User Id=" & Me._selectedProfil.UserId & ";Password=" & Me._selectedProfil.Password & ";"
Else Else
conn.DataSource = Me._selectedProfil.DataSource conn.DataSource = Me._selectedProfil.DataSource
@ -879,7 +885,7 @@ Public Class frmNIVerknuepfungen
Dim conn As New OracleConnectionStringBuilder Dim conn As New OracleConnectionStringBuilder
Dim connstr As String Dim connstr As String
If Me._selectedProfil.DataSource <> "" And Me._selectedProfil.InitialCatalog <> "" Then If Me._selectedProfil.DataSource <> "" And Me._selectedProfil.InitialCatalog <> "" Then
connstr = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" & _selectedProfil.DataSource & ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" & _ connstr = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" & _selectedProfil.DataSource & ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" &
_selectedProfil.InitialCatalog & ")));User Id=" & Me._selectedProfil.UserId & ";Password=" & Me._selectedProfil.Password & ";" _selectedProfil.InitialCatalog & ")));User Id=" & Me._selectedProfil.UserId & ";Password=" & Me._selectedProfil.Password & ";"
Else Else
conn.DataSource = Me._selectedProfil.DataSource conn.DataSource = Me._selectedProfil.DataSource
@ -1154,11 +1160,11 @@ Public Class frmNIVerknuepfungen
If return_views Then If return_views Then
' die Schema-Tabelle mit Informationen über Views auslesen ' die Schema-Tabelle mit Informationen über Views auslesen
schemaTable = Connection.GetOleDbSchemaTable(OleDbSchemaGuid.Views, _ schemaTable = Connection.GetOleDbSchemaTable(OleDbSchemaGuid.Views,
New Object() {Nothing, Nothing, Nothing}) New Object() {Nothing, Nothing, Nothing})
Else Else
' die Schema-Tabelle mit Informationen über Tabellen auslesen ' die Schema-Tabelle mit Informationen über Tabellen auslesen
schemaTable = Connection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, _ schemaTable = Connection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables,
New Object() {Nothing, Nothing, Nothing}) New Object() {Nothing, Nothing, Nothing})
End If End If
@ -1229,7 +1235,7 @@ Public Class frmNIVerknuepfungen
Connection = New OleDbConnection(ConnectionString.ConnectionString) Connection = New OleDbConnection(ConnectionString.ConnectionString)
Connection.Open() Connection.Open()
Dim schemaTable = Connection.GetOleDbSchemaTable(OleDbSchemaGuid.Columns, _ Dim schemaTable = Connection.GetOleDbSchemaTable(OleDbSchemaGuid.Columns,
New Object() {Nothing, Nothing, table, Nothing}) New Object() {Nothing, Nothing, table, Nothing})
If schemaTable.Rows.Count > 0 Then If schemaTable.Rows.Count > 0 Then
@ -1321,6 +1327,13 @@ Public Class frmNIVerknuepfungen
If Me.txtManIndexwert.Text <> "" Then If Me.txtManIndexwert.Text <> "" Then
_value = "%" & Me.txtManIndexwert.Text & "%" _value = "%" & Me.txtManIndexwert.Text & "%"
Me.txtManIndexwert.Text = "" Me.txtManIndexwert.Text = ""
Else
If _selectedProfil.xmlEnd = "xml (ZugFerd)" Then
If trvwxml.SelectedNode.Tag = "SellerTradeParty:Name" Then
_value = "SellerTradeParty:Name"
ElseIf trvwxml.SelectedNode.Tag = "SpecifiedTaxRegistration" Then
_value = "SpecifiedTaxRegistration"
End If
Else Else
If trvwxml.SelectedNode.Index = 0 Then If trvwxml.SelectedNode.Index = 0 Then
'Typ soll indexiert werden 'Typ soll indexiert werden
@ -1331,8 +1344,7 @@ Public Class frmNIVerknuepfungen
_value = "FreeFormField|" & trvwxml.SelectedNode.ToString.Replace("TreeNode: ", "") _value = "FreeFormField|" & trvwxml.SelectedNode.ToString.Replace("TreeNode: ", "")
End If End If
End If End If
End If
' Eintrag in ListView machen ' Eintrag in ListView machen
Me.lvwVerknuepfungen.Items.Add(New Windows.Forms.ListViewItem(New String() {Me.lbxIndex.SelectedItem, _value})) Me.lvwVerknuepfungen.Items.Add(New Windows.Forms.ListViewItem(New String() {Me.lbxIndex.SelectedItem, _value}))
@ -1907,7 +1919,7 @@ Public Class frmNIVerknuepfungen
' wenn im ListView eine Zeile selektiert wurde ' wenn im ListView eine Zeile selektiert wurde
If Me.lvwVerknuepfungen.SelectedItems.Count > 0 Then If Me.lvwVerknuepfungen.SelectedItems.Count > 0 Then
' Überprüfen ob eingegebener Wert gepeichert werden muß? ' Überprüfen ob eingegebener Wert gepeichert werden muß?
Dim SQL_ORIGIN As String = Me._selectedProfil._links.getLinkByValues(Me.lvwVerknuepfungen.SelectedItems(0).SubItems(0).Text, Me.lvwVerknuepfungen.SelectedItems(0).SubItems(1).Text, _ Dim SQL_ORIGIN As String = Me._selectedProfil._links.getLinkByValues(Me.lvwVerknuepfungen.SelectedItems(0).SubItems(0).Text, Me.lvwVerknuepfungen.SelectedItems(0).SubItems(1).Text,
Me.lvwVerknuepfungen.SelectedItems(0).SubItems(2).Text).getSelectAnweisung().ToString Me.lvwVerknuepfungen.SelectedItems(0).SubItems(2).Text).getSelectAnweisung().ToString
If SQL_ORIGIN <> Me.txtSelectAnweisung.Text Then If SQL_ORIGIN <> Me.txtSelectAnweisung.Text Then
With btnsave_select With btnsave_select
@ -1916,7 +1928,7 @@ Public Class frmNIVerknuepfungen
End With End With
End If End If
' die Informationen der selektierten Verknüpfung auslesen ' die Informationen der selektierten Verknüpfung auslesen
Me._selectedProfil._links.getLinkByValues(Me.lvwVerknuepfungen.SelectedItems(0).SubItems(0).Text, Me.lvwVerknuepfungen.SelectedItems(0).SubItems(1).Text, _ Me._selectedProfil._links.getLinkByValues(Me.lvwVerknuepfungen.SelectedItems(0).SubItems(0).Text, Me.lvwVerknuepfungen.SelectedItems(0).SubItems(1).Text,
Me.lvwVerknuepfungen.SelectedItems(0).SubItems(2).Text).setSelectAnweisung(Me.txtSelectAnweisung.Text) Me.lvwVerknuepfungen.SelectedItems(0).SubItems(2).Text).setSelectAnweisung(Me.txtSelectAnweisung.Text)
' das Profil auf den Status 'geändert' setzen ' das Profil auf den Status 'geändert' setzen
Me._selectedProfil.setChanged() Me._selectedProfil.setChanged()
@ -2016,60 +2028,56 @@ Public Class frmNIVerknuepfungen
Me._selectedProfil._links.RenewLinks(Me.lvwVerknuepfungen, vktState) Me._selectedProfil._links.RenewLinks(Me.lvwVerknuepfungen, vktState)
End If End If
End Sub End Sub
Private Sub btnSQL_Updatespeichern_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSQL_Updatespeichern.Click 'Private Sub btnSQL_Updatespeichern_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSQL_Updatespeichern.Click
Try ' Try
' die Änderungen speichern ' ' die Änderungen speichern
If Me._selectedProfil.Save(True) = True Then ' wenn das Speichern erfolgreich war ' If Me._selectedProfil.Save(True) = True Then ' wenn das Speichern erfolgreich war
' den Speichern-Button deaktivieren ' ' den Speichern-Button deaktivieren
Me.btnSQL_Updatespeichern.Enabled = False ' Me.btnSQL_Updatespeichern.Enabled = False
Else ' Else
MsgBox("Das Profil konnte nicht erfolgreich gespeichert werden.", MsgBoxStyle.Exclamation, "Fehler beim Speichern eines Profils") ' MsgBox("Das Profil konnte nicht erfolgreich gespeichert werden.", MsgBoxStyle.Exclamation, "Fehler beim Speichern eines Profils")
End If ' End If
Catch ex As Exception ' Catch ex As Exception
MsgBox("Fehler beim Speichern des SQL-Befehles." & vbNewLine & vbNewLine & "Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler beim Speichern eines SQL-Befehls.") ' MsgBox("Fehler beim Speichern des SQL-Befehles." & vbNewLine & vbNewLine & "Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler beim Speichern eines SQL-Befehls.")
End Try ' End Try
'End Sub
Private Sub txtUpdateAnweisung_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtfinalSkriptUpdate.LostFocus
'If Me.txtfinalSkriptUpdate.Text <> "" Then
' Try
' ' die Änderungen speichern
' If Me._selectedProfil.Save(True) = True Then ' wenn das Speichern erfolgreich war
' Me._selectedProfil.setChanged()
' Else
' MsgBox("Das Profil konnte nicht erfolgreich gespeichert werden.", MsgBoxStyle.Exclamation, "Fehler beim Speichern eines Profils")
' End If
' Catch ex As Exception
' MsgBox("Fehler beim Speichern des SQL-Befehles." & vbNewLine & vbNewLine & "Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler beim Speichern eines SQL-Befehls.")
' End Try
'End If
End Sub End Sub
Private Sub txtUpdateAnweisung_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtUpdateAnweisung.LostFocus Private Sub txtUpdateAnweisung_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtfinalSkriptUpdate.TextChanged
If Me.txtUpdateAnweisung.Text <> "" Then
Try
' die Änderungen speichern
If Me._selectedProfil.Save(True) = True Then ' wenn das Speichern erfolgreich war
' den Speichern-Button deaktivieren
Me.btnSQL_Updatespeichern.Enabled = False
Else
MsgBox("Das Profil konnte nicht erfolgreich gespeichert werden.", MsgBoxStyle.Exclamation, "Fehler beim Speichern eines Profils")
End If
Catch ex As Exception
MsgBox("Fehler beim Speichern des SQL-Befehles." & vbNewLine & vbNewLine & "Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler beim Speichern eines SQL-Befehls.")
End Try
End If
End Sub
Private Sub txtUpdateAnweisung_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtUpdateAnweisung.TextChanged
If Me._selectedProfil IsNot Nothing Then If Me._selectedProfil IsNot Nothing Then
Me._selectedProfil.SQL_Anweisung = Me.txtUpdateAnweisung.Text Me._selectedProfil.SQL_Anweisung = Me.txtfinalSkriptUpdate.Text
If Not Me.txtUpdateAnweisung.Text = Me._selectedProfil.OriginalSQL_Anweisung Then If Not Me.txtfinalSkriptUpdate.Text = Me._selectedProfil.OriginalSQL_Anweisung Then
Me.btnSQL_Updatespeichern.Enabled = True Me._selectedProfil.setChanged()
Else
Me.btnSQL_Updatespeichern.Enabled = False
End If End If
End If End If
End Sub End Sub
Private Sub btnWindreamIndexEinfügenSQL_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnWindreamIndexEinfügenSQL.Click Private Sub btnWindreamIndexEinfügenSQL_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnWindreamIndexEinfügenSQL.Click
If Not Me.cmbWindreamIndexeSQL.SelectedItem = "" Then If Not Me.cmbWindreamIndexeSQL.SelectedItem = "" Then
Dim text As String = "[%" & Me.cmbWindreamIndexeSQL.SelectedItem & "]" Dim text As String = "[%" & Me.cmbWindreamIndexeSQL.SelectedItem & "]"
Dim altePosition As Integer = Me.txtUpdateAnweisung.SelectionStart() Dim altePosition As Integer = Me.txtfinalSkriptUpdate.SelectionStart()
Me.txtUpdateAnweisung.Text = Me.txtUpdateAnweisung.Text.Insert(altePosition, text) Me.txtfinalSkriptUpdate.Text = Me.txtfinalSkriptUpdate.Text.Insert(altePosition, text)
Me.txtUpdateAnweisung.SelectionStart = altePosition + text.Length Me.txtfinalSkriptUpdate.SelectionStart = altePosition + text.Length
If Me._selectedProfil IsNot Nothing Then If Me._selectedProfil IsNot Nothing Then
Me._selectedProfil.Desk_windreamIndex = "[%" & Me.cmbWindreamIndexeSQL.SelectedItem & "]" Me._selectedProfil.SQL_Anweisung = Me.txtfinalSkriptUpdate.Text
If Not "[%" & Me.cmbWindreamIndexeSQL.SelectedItem & "]" = Me._selectedProfil.OriginalwindreamIndex Then If Not Me._selectedProfil.SQL_Anweisung = Me._selectedProfil.OriginalSQL_Anweisung Then
Me.btnSQL_Updatespeichern.Enabled = True Me._selectedProfil.setChanged()
Else
Me.btnSQL_Updatespeichern.Enabled = False
End If End If
End If End If
@ -2077,15 +2085,6 @@ Public Class frmNIVerknuepfungen
End Sub End Sub
Private Sub chkbSpeicherort_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkbSpeicherort.CheckedChanged
If Me.chkbSpeicherort.Checked Then
Dim text As String = "= vSpeicherort"
Dim altePosition As Integer = Me.txtUpdateAnweisung.SelectionStart()
Me.txtUpdateAnweisung.Text = Me.txtUpdateAnweisung.Text.Insert(altePosition, text)
Me.txtUpdateAnweisung.SelectionStart = altePosition + text.Length
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnaddUniqueIndex.Click Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnaddUniqueIndex.Click
If (Me.lbxIndex.SelectedItems.Count > 0) Then If (Me.lbxIndex.SelectedItems.Count > 0) Then
@ -2197,6 +2196,11 @@ Public Class frmNIVerknuepfungen
Me.cmbIndex_Statusfertig.Items.Add(index) Me.cmbIndex_Statusfertig.Items.Add(index)
Next Next
End If End If
If Not IsNothing(Me._selectedProfil.finalerIndex) Then
cmbIndex_Statusfertig.SelectedIndex = cmbIndex_Statusfertig.FindStringExact(Me._selectedProfil.finalerIndex)
End If
Catch ex As Exception Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Laden der windream-Indexe in die Auswahlliste 'cmbIndex_Statusfertig'") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Laden der windream-Indexe in die Auswahlliste 'cmbIndex_Statusfertig'")
End Try End Try
@ -2242,7 +2246,11 @@ Public Class frmNIVerknuepfungen
If IO.File.Exists(txtxml_Beispieldatei.Text) Then If IO.File.Exists(txtxml_Beispieldatei.Text) Then
If txtxml_Beispieldatei.Text.EndsWith(".xffres") Or txtxml_Beispieldatei.Text.EndsWith(".xfres") Then If txtxml_Beispieldatei.Text.EndsWith(".xffres") Or txtxml_Beispieldatei.Text.EndsWith(".xfres") Then
XML_getTagsxffres(txtxml_Beispieldatei.Text) XML_getTagsxffres(txtxml_Beispieldatei.Text)
ElseIf txtxml_Beispieldatei.Text.EndsWith(".xml") And _selectedProfil.xmlEnd = "xml" Then
XML_Regular(txtxml_Beispieldatei.Text)
ElseIf txtxml_Beispieldatei.Text.EndsWith(".xml") And _selectedProfil.xmlEnd = "xml (ZugFerd)" Then
XML_ZugFerd(txtxml_Beispieldatei.Text)
End If End If
End If End If
@ -2336,7 +2344,116 @@ Public Class frmNIVerknuepfungen
'End If 'End If
End Sub End Sub
Sub XML_Regular(ByVal filename As String)
Dim xmldoc As New XmlDataDocument()
Dim xmlnode As XmlNode
Dim fs As New FileStream(filename, FileMode.Open, FileAccess.Read)
xmldoc.Load(fs)
xmlnode = xmldoc.ChildNodes(1)
trvwxml.Nodes.Clear()
trvwxml.Nodes.Add(New TreeNode(xmldoc.DocumentElement.Name))
Dim tNode As TreeNode
tNode = trvwxml.Nodes(0)
AddNode(xmlnode, tNode)
End Sub
Private Sub AddNode(ByVal inXmlNode As XmlNode, ByVal inTreeNode As TreeNode)
Dim xNode As XmlNode
Dim tNode As TreeNode
Dim nodeList As XmlNodeList
Dim i As Integer
If inXmlNode.HasChildNodes Then
nodeList = inXmlNode.ChildNodes
For i = 0 To nodeList.Count - 1
xNode = inXmlNode.ChildNodes(i)
inTreeNode.Nodes.Add(New TreeNode(xNode.Name))
tNode = inTreeNode.Nodes(i)
AddNode(xNode, tNode)
Next
Else
inTreeNode.Text = inXmlNode.InnerText.ToString
End If
End Sub
Sub XML_ZugFerd(ByVal filename As String)
Dim _xmlDoc As New XmlDocument
_xmlDoc.Load(filename)
Dim xml As New Xml.XmlTextReader(filename)
While xml.Read
If xml.NodeType = XmlNodeType.Element Then
Console.WriteLine(xml.Name)
End If
End While
trvwxml.Nodes.Clear() ' Clear any existing items
trvwxml.BeginUpdate() ' Begin updating the treeview
Dim TreeNode As TreeNode
TreeNode = trvwxml.Nodes.Add("SellerTradeParty")
Dim elemList As XmlNodeList = _xmlDoc.GetElementsByTagName("ram:SellerTradeParty")
Dim i As Integer
For i = 0 To elemList.Count - 1
' Console.WriteLine(elemList(i).InnerXml)
For Each Xml_Node As XmlNode In elemList
Dim z As Integer
For z = 0 To Xml_Node.ChildNodes.Count - 1
If Xml_Node.ChildNodes(z).Name = "ram:Name" Then
Dim xmlvalue = Xml_Node.ChildNodes(z).InnerText
If xmlvalue.Contains(vbLf&) Then
xmlvalue = xmlvalue.Replace(vbLf&, "")
End If
If xmlvalue.Contains(Chr(13)) Then
Dim arr As String() = xmlvalue.Split(Chr(13))
End If
Dim newNode As TreeNode = New TreeNode(xmlvalue)
newNode.Tag = "SellerTradeParty:Name"
TreeNode.Nodes.Add(newNode)
ElseIf Xml_Node.ChildNodes(z).Name = "ram:SpecifiedTaxRegistration" Then
Dim newNode As TreeNode = New TreeNode(Xml_Node.ChildNodes(z).InnerText)
newNode.Tag = "SpecifiedTaxRegistration"
TreeNode.Nodes.Add(newNode)
End If
Next z
Next
Next i
Dim TreeNode1 As TreeNode
TreeNode1 = trvwxml.Nodes.Add("MonetarySummation")
Dim elemList1 As XmlNodeList = _xmlDoc.GetElementsByTagName("ram:SpecifiedTradeSettlementMonetarySummation")
For i = 0 To elemList1.Count - 1
' Console.WriteLine(elemList(i).InnerXml)
For Each Xml_Node As XmlNode In elemList1
Dim z As Integer
For z = 0 To Xml_Node.ChildNodes.Count - 1
If Xml_Node.ChildNodes(z).Name = "ram:GrandTotalAmount" Then
Dim xmlvalue = Xml_Node.ChildNodes(z).InnerText
Dim newNode As TreeNode = New TreeNode(xmlvalue)
newNode.Tag = "GrandTotalAmount"
TreeNode1.Nodes.Add(newNode)
End If
Next z
Next
Next i
trvwxml.EndUpdate()
trvwxml.Refresh()
' foreach(XmlNode xmlnode In baseNodeList)
'// loop through all base <folder> nodes
'{
' String title = XmlNode.Attributes["title"].Value;
' TreeNode = treeViewMenu.Nodes.Add(title); // add it To the tree
' populateChildNodes(XmlNode, TreeNode); // Get the children
'}
'treeViewMenu.EndUpdate(); // Stop updating the tree
'treeViewMenu.Refresh(); // refresh the treeview display
End Sub
Private Sub frmNIVerknuepfungen_Shown(sender As Object, e As System.EventArgs) Handles Me.Shown Private Sub frmNIVerknuepfungen_Shown(sender As Object, e As System.EventArgs) Handles Me.Shown
_formloaded = True _formloaded = True
End Sub End Sub
@ -3227,5 +3344,59 @@ Public Class frmNIVerknuepfungen
End Sub End Sub
Private Sub trvwxml_AfterSelect(sender As Object, e As TreeViewEventArgs) Handles trvwxml.AfterSelect
End Sub
Private Sub tabctrlbottom_SelectedIndexChanged(sender As Object, e As EventArgs) Handles tabctrlbottom.SelectedIndexChanged
Select Case tabctrlbottom.SelectedIndex
Case 1
lblsaveSQLAnweisung.Text = ""
Case 2
If Me._selectedProfil IsNot Nothing Then
chbxStatusfertig.Checked = True
End If
End Select
End Sub
Private Sub Button1_Click_1(sender As Object, e As EventArgs) Handles Button1.Click
Dim text As String = "[%ddvFULLFILENAME]"
Dim altePosition As Integer = Me.txtfinalSkriptUpdate.SelectionStart()
Me.txtfinalSkriptUpdate.Text = Me.txtfinalSkriptUpdate.Text.Insert(altePosition, text)
Me.txtfinalSkriptUpdate.SelectionStart = altePosition + text.Length
Me._selectedProfil.SQL_Anweisung = Me.txtfinalSkriptUpdate.Text
If Not Me._selectedProfil.SQL_Anweisung = Me._selectedProfil.OriginalSQL_Anweisung Then
Me._selectedProfil.setChanged()
If Me._selectedProfil.Save(True) = True Then
Me.lblsaveSQLAnweisung.Text = "Data saved - " & Now.ToString
End If
End If
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Dim text As String = "[%ddvFOLDERNAME]"
Dim altePosition As Integer = Me.txtfinalSkriptUpdate.SelectionStart()
Me.txtfinalSkriptUpdate.Text = Me.txtfinalSkriptUpdate.Text.Insert(altePosition, text)
Me.txtfinalSkriptUpdate.SelectionStart = altePosition + text.Length
Me._selectedProfil.SQL_Anweisung = Me.txtfinalSkriptUpdate.Text
If Not Me._selectedProfil.SQL_Anweisung = Me._selectedProfil.OriginalSQL_Anweisung Then
Me._selectedProfil.setChanged()
If Me._selectedProfil.Save(True) = True Then
Me.lblsaveSQLAnweisung.Text = "Data saved - " & Now.ToString
End If
End If
End Sub
Private Sub lblsaveSQLAnweisung_TextChanged(sender As Object, e As EventArgs) Handles lblsaveSQLAnweisung.TextChanged
If lblsaveSQLAnweisung.Text <> String.Empty Then
lblsaveSQLAnweisung.Visible = True
Else
lblsaveSQLAnweisung.Visible = False
End If
End Sub
End Class End Class

View File

@ -26,6 +26,7 @@ Partial Class frmStart
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmStart)) Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmStart))
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip() Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
Me.Status_Machine = New System.Windows.Forms.ToolStripStatusLabel() Me.Status_Machine = New System.Windows.Forms.ToolStripStatusLabel()
Me.ToolStripStatusLabel2 = New System.Windows.Forms.ToolStripStatusLabel()
Me.tslblVersion = New System.Windows.Forms.ToolStripStatusLabel() Me.tslblVersion = New System.Windows.Forms.ToolStripStatusLabel()
Me.Status_Clock = New System.Windows.Forms.ToolStripStatusLabel() Me.Status_Clock = New System.Windows.Forms.ToolStripStatusLabel()
Me.timUhrzeit = New System.Windows.Forms.Timer(Me.components) Me.timUhrzeit = New System.Windows.Forms.Timer(Me.components)
@ -61,7 +62,7 @@ Partial Class frmStart
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.EinblendenAusblendenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.EinblendenAusblendenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.TimerNIRestart = New System.Windows.Forms.Timer(Me.components) Me.TimerNIRestart = New System.Windows.Forms.Timer(Me.components)
Me.ToolStripStatusLabel2 = New System.Windows.Forms.ToolStripStatusLabel() Me.TimerErrorLog = New System.Windows.Forms.Timer(Me.components)
Me.StatusStrip1.SuspendLayout() Me.StatusStrip1.SuspendLayout()
Me.menHauptmenü.SuspendLayout() Me.menHauptmenü.SuspendLayout()
Me.Panel1.SuspendLayout() Me.Panel1.SuspendLayout()
@ -92,17 +93,28 @@ Partial Class frmStart
Me.Status_Machine.Image = CType(resources.GetObject("Status_Machine.Image"), System.Drawing.Image) Me.Status_Machine.Image = CType(resources.GetObject("Status_Machine.Image"), System.Drawing.Image)
Me.Status_Machine.Margin = New System.Windows.Forms.Padding(10, 3, 0, 2) Me.Status_Machine.Margin = New System.Windows.Forms.Padding(10, 3, 0, 2)
Me.Status_Machine.Name = "Status_Machine" Me.Status_Machine.Name = "Status_Machine"
Me.Status_Machine.Size = New System.Drawing.Size(141, 20) Me.Status_Machine.Size = New System.Drawing.Size(140, 20)
Me.Status_Machine.Text = "ToolStripStatusLabel1" Me.Status_Machine.Text = "ToolStripStatusLabel1"
Me.Status_Machine.ToolTipText = "Client-Name" Me.Status_Machine.ToolTipText = "Client-Name"
' '
'ToolStripStatusLabel2
'
Me.ToolStripStatusLabel2.BorderSides = CType((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) _
Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) _
Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom), System.Windows.Forms.ToolStripStatusLabelBorderSides)
Me.ToolStripStatusLabel2.Image = CType(resources.GetObject("ToolStripStatusLabel2.Image"), System.Drawing.Image)
Me.ToolStripStatusLabel2.Name = "ToolStripStatusLabel2"
Me.ToolStripStatusLabel2.Size = New System.Drawing.Size(140, 20)
Me.ToolStripStatusLabel2.Text = "ToolStripStatusLabel1"
Me.ToolStripStatusLabel2.ToolTipText = "Aktueller Benutzer"
'
'tslblVersion 'tslblVersion
' '
Me.tslblVersion.BorderSides = CType((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) _ Me.tslblVersion.BorderSides = CType((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) _
Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) _ Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) _
Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom), System.Windows.Forms.ToolStripStatusLabelBorderSides) Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom), System.Windows.Forms.ToolStripStatusLabelBorderSides)
Me.tslblVersion.Name = "tslblVersion" Me.tslblVersion.Name = "tslblVersion"
Me.tslblVersion.Size = New System.Drawing.Size(125, 20) Me.tslblVersion.Size = New System.Drawing.Size(124, 20)
Me.tslblVersion.Text = "ToolStripStatusLabel1" Me.tslblVersion.Text = "ToolStripStatusLabel1"
Me.tslblVersion.ToolTipText = "Aktueller Benutzer" Me.tslblVersion.ToolTipText = "Aktueller Benutzer"
' '
@ -111,7 +123,7 @@ Partial Class frmStart
Me.Status_Clock.Image = CType(resources.GetObject("Status_Clock.Image"), System.Drawing.Image) Me.Status_Clock.Image = CType(resources.GetObject("Status_Clock.Image"), System.Drawing.Image)
Me.Status_Clock.ImageAlign = System.Drawing.ContentAlignment.MiddleRight Me.Status_Clock.ImageAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Status_Clock.Name = "Status_Clock" Me.Status_Clock.Name = "Status_Clock"
Me.Status_Clock.Size = New System.Drawing.Size(805, 20) Me.Status_Clock.Size = New System.Drawing.Size(808, 20)
Me.Status_Clock.Spring = True Me.Status_Clock.Spring = True
Me.Status_Clock.Text = "ToolStripStatusLabel1" Me.Status_Clock.Text = "ToolStripStatusLabel1"
Me.Status_Clock.TextAlign = System.Drawing.ContentAlignment.MiddleRight Me.Status_Clock.TextAlign = System.Drawing.ContentAlignment.MiddleRight
@ -438,16 +450,9 @@ Partial Class frmStart
' '
Me.TimerNIRestart.Interval = 60000 Me.TimerNIRestart.Interval = 60000
' '
'ToolStripStatusLabel2 'TimerErrorLog
' '
Me.ToolStripStatusLabel2.BorderSides = CType((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) _ Me.TimerErrorLog.Interval = 60000
Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) _
Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom), System.Windows.Forms.ToolStripStatusLabelBorderSides)
Me.ToolStripStatusLabel2.Image = CType(resources.GetObject("ToolStripStatusLabel2.Image"), System.Drawing.Image)
Me.ToolStripStatusLabel2.Name = "ToolStripStatusLabel2"
Me.ToolStripStatusLabel2.Size = New System.Drawing.Size(141, 20)
Me.ToolStripStatusLabel2.Text = "ToolStripStatusLabel1"
Me.ToolStripStatusLabel2.ToolTipText = "Aktueller Benutzer"
' '
'frmStart 'frmStart
' '
@ -515,5 +520,5 @@ Partial Class frmStart
Public WithEvents TimerNIRestart As System.Windows.Forms.Timer Public WithEvents TimerNIRestart As System.Windows.Forms.Timer
Friend WithEvents CriticalEmailTestToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents CriticalEmailTestToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripStatusLabel2 As System.Windows.Forms.ToolStripStatusLabel Friend WithEvents ToolStripStatusLabel2 As System.Windows.Forms.ToolStripStatusLabel
Friend WithEvents TimerErrorLog As Timer
End Class End Class

View File

@ -172,7 +172,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAO ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAO
FAAAAk1TRnQBSQFMAgEBCQEAARgBAwEYAQMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo FAAAAk1TRnQBSQFMAgEBCQEAASABAwEgAQMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAATADAAEBAQABCAYAAQwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AwABQAMAATADAAEBAQABCAYAAQwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@ -653,6 +653,9 @@
<metadata name="TimerNIRestart.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="TimerNIRestart.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>787, 17</value> <value>787, 17</value>
</metadata> </metadata>
<metadata name="TimerErrorLog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>920, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>102</value> <value>102</value>
</metadata> </metadata>

View File

@ -48,6 +48,8 @@ Public Class frmStart
'Aktuelle Machine 'Aktuelle Machine
Me.Status_Machine.Text = My.Computer.Name Me.Status_Machine.Text = My.Computer.Name
timUhrzeit.Start() timUhrzeit.Start()
TimerErrorLog.Start()
If Not My.Settings.licensekey = "" Then If Not My.Settings.licensekey = "" Then
' Lizenz-Manager initialisieren ' Lizenz-Manager initialisieren
Me.licenseManager = New ClassLicenseManager("#DigitalData9731258!#", My.Settings.licensekey) Me.licenseManager = New ClassLicenseManager("#DigitalData9731258!#", My.Settings.licensekey)
@ -353,4 +355,14 @@ Public Class frmStart
ClassNIEmail.Send_Urgent("Dies ist eine Test-Email!", True) ClassNIEmail.Send_Urgent("Dies ist eine Test-Email!", True)
Cursor = Cursors.Default Cursor = Cursors.Default
End Sub End Sub
Private Sub TimerErrorLog_Tick(sender As Object, e As EventArgs) Handles TimerErrorLog.Tick
If CURRENT_APPLICATION_LOG <> String.Empty Then
Dim frm As New frmApplicationLog
frm = frmApplicationLog.Instance
frm.Show()
End If
End Sub
End Class End Class