MS correct sync

This commit is contained in:
Digital Data - Marlon Schreiber 2018-04-10 15:39:43 +02:00
commit 7f6dbd66db
14 changed files with 1588 additions and 2076 deletions

View File

@ -0,0 +1,338 @@
Imports DD_LIB_Standards
Public Class ClassControlCreator
''' <summary>
''' Konstanten
''' </summary>
Private Const DEFAULT_TEXT = "Bezeichnung definieren"
Private Const DEFAULT_FONT_SIZE As Integer = 10
Private Const DEFAULT_FONT_FAMILY As String = "Arial"
Private Const DEFAULT_FONT_STYLE As FontStyle = FontStyle.Regular
Private Const DEFAULT_COLOR As Integer = 0
Private Const DEFAULT_WIDTH As Integer = 170
Private Const DEFAULT_HEIGHT As Integer = 20
Private Const DEFAULT_HEIGHT_TABLE As Integer = 150
Public Const PREFIX_TEXTBOX = "TXT"
Public Const PREFIX_LABEL = "LBL"
Public Const PREFIX_CHECKBOX = "CHK"
Public Const PREFIX_COMBOBOX = "CMB"
Public Const PREFIX_DATETIMEPICKER = "DTP"
Public Const PREFIX_DATAGRIDVIEW = "DGV"
Public Const PREFIX_TABLE = "TB"
Public Const PREFIX_LINE = "LINE"
''' <summary>
''' Standard Eigenschaften für alle Controls
''' </summary>
Private Class ControlDBProps
Public Guid As Integer
Public Name As String
Public Location As Point
Public [Font] As Font
Public [Color] As Color
End Class
Private Shared Function TransformDataRow(row As DataRow) As ControlDBProps
Dim x As Integer = row.Item("X_LOC")
Dim y As Integer = row.Item("Y_LOC")
Dim style As FontStyle = NotNull(row.Item("FONT_STYLE"), DEFAULT_FONT_STYLE)
Dim size As Single = NotNull(row.Item("FONT_SIZE"), DEFAULT_FONT_SIZE)
Dim familyString As String = NotNull(row.Item("FONT_FAMILY"), DEFAULT_FONT_FAMILY)
Dim family As FontFamily = New FontFamily(familyString)
Dim Guid As Integer = row.Item("GUID")
Dim Name As String = row.Item("NAME")
Dim Location As New Point(x, y)
Dim Font As New Font(family, size, style, GraphicsUnit.Point)
Dim Color As Color = IntToColor(NotNull(row.Item("FONT_COLOR"), DEFAULT_COLOR))
Return New ControlDBProps() With {
.Guid = Guid,
.Name = Name,
.Location = Location,
.Font = Font,
.Color = Color
}
End Function
Public Shared Function CreateBaseControl(ctrl As Control, row As DataRow, designMode As Boolean) As Control
Dim props As ControlDBProps = TransformDataRow(row)
ctrl.Tag = props.Guid
ctrl.Name = props.Name
ctrl.Location = props.Location
ctrl.Font = props.Font
ctrl.ForeColor = props.Color
If designMode Then
ctrl.Cursor = Cursors.Hand
End If
Return ctrl
End Function
' ----------------------- NEW CONTROLS -----------------------
Public Shared Function CreateNewTextBox(location As Point) As TextBox
Dim control As New TextBox With {
.Name = $"{PREFIX_TEXTBOX}_{clsTools.ShortGUID()}",
.Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT),
.Location = location,
.ReadOnly = True,
.BackColor = Color.White,
.Cursor = Cursors.Hand
}
Return control
End Function
Public Shared Function CreateNewLabel(location As Point) As Label
Dim control As New Label With {
.Name = $"{PREFIX_LABEL}_{clsTools.ShortGUID}",
.Text = DEFAULT_TEXT,
.AutoSize = True,
.Location = location,
.Cursor = Cursors.Hand
}
Return control
End Function
Public Shared Function CreateNewCheckbox(location As Point) As CheckBox
Dim control As New CheckBox With {
.Name = $"{PREFIX_CHECKBOX}_{clsTools.ShortGUID}",
.AutoSize = True,
.Text = DEFAULT_TEXT,
.Cursor = Cursors.Hand,
.Location = location
}
Return control
End Function
Public Shared Function CreateNewCombobox(location As Point) As ComboBox
Dim control As New ComboBox With {
.Name = $"{PREFIX_COMBOBOX}_{clsTools.ShortGUID}",
.Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT),
.Cursor = Cursors.Hand,
.Location = location
}
Return control
End Function
Public Shared Function CreateNewDatetimepicker(location As Point) As DateTimePicker
Dim control As New DateTimePicker With {
.Name = $"{PREFIX_DATETIMEPICKER}_{clsTools.ShortGUID}",
.Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT),
.Cursor = Cursors.Hand,
.Location = location,
.Format = DateTimePickerFormat.Short
}
Return control
End Function
Public Shared Function CreateNewDatagridview(location As Point) As DataGridView
Dim control As New DataGridView With {
.Name = $"{PREFIX_DATAGRIDVIEW}_{clsTools.ShortGUID}",
.Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT_TABLE),
.Cursor = Cursors.Hand,
.Location = location,
.AllowUserToAddRows = False,
.AllowUserToDeleteRows = False,
.AllowUserToResizeColumns = False,
.AllowUserToResizeRows = False
}
control.Columns.Add(New DataGridViewTextBoxColumn With {
.HeaderText = "",
.Name = "column1"
})
Return control
End Function
Public Shared Function CreateNewTable(location As Point) As DataGridView
Dim control As New DataGridView With {
.Name = $"{PREFIX_TABLE}_{clsTools.ShortGUID}",
.Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT_TABLE),
.Cursor = Cursors.Hand,
.Location = location,
.AllowUserToAddRows = False,
.AllowUserToDeleteRows = False,
.AllowUserToResizeColumns = False,
.AllowUserToResizeRows = False
}
control.Columns.Add(New DataGridViewTextBoxColumn With {
.HeaderText = "Column1",
.Name = "column1"
})
control.Columns.Add(New DataGridViewTextBoxColumn With {
.HeaderText = "Column2",
.Name = "column2"
})
Return control
End Function
Public Shared Function CreateNewLine(location As Point) As LineLabel
Dim control As New LineLabel With {
.Name = $"{PREFIX_LINE}_{clsTools.ShortGUID}",
.Text = "---------------------------------",
.Size = New Size(100, 5),
.Location = location
}
Return control
End Function
' ----------------------- EXISITING CONTROLS -----------------------
Public Shared Function CreateExistingTextbox(row As DataRow, designMode As Boolean) As TextBox
Dim control As TextBox = CreateBaseControl(New TextBox(), row, designMode)
control.BackColor = Color.White
If row.Item("HEIGHT") > 27 Then
control.Multiline = True
End If
control.Height = row.Item("HEIGHT")
control.Width = row.Item("WIDTH")
If Not designMode Then
control.AcceptsReturn = True
control.ReadOnly = row.Item("READ_ONLY")
control.TabStop = Not row.Item("READ_ONLY")
Else
control.ReadOnly = True
End If
Return control
End Function
Public Shared Function CreateExistingLabel(row As DataRow, designMode As Boolean) As Label
Dim control As Label = CreateBaseControl(New Label(), row, designMode)
control.Text = row.Item("CTRL_TEXT")
control.AutoSize = True
Return control
End Function
Public Shared Function CreateExistingCombobox(row As DataRow, designMode As Boolean) As ComboBox
Dim control As ComboBox = CreateBaseControl(New ComboBox(), row, designMode)
control.Size = New Size(row.Item("WIDTH"), row.Item("HEIGHT"))
If Not designMode Then
control.Enabled = Not row.Item("READ_ONLY")
control.TabStop = Not row.Item("READ_ONLY")
control.AutoCompleteMode = AutoCompleteMode.SuggestAppend
control.AutoCompleteSource = AutoCompleteSource.ListItems
End If
Return control
End Function
Public Shared Function CreateExistingDatepicker(row As DataRow, designMode As Boolean) As DateTimePicker
Dim control As DateTimePicker = CreateBaseControl(New DateTimePicker(), row, designMode)
control.Size = New Size(row.Item("WIDTH"), row.Item("HEIGHT"))
control.Format = DateTimePickerFormat.Short
If Not designMode Then
control.Enabled = Not row.Item("READ_ONLY")
control.TabStop = Not row.Item("READ_ONLY")
End If
Return control
End Function
Public Shared Function CreateExisingCheckbox(row As DataRow, designMode As Boolean) As CheckBox
Dim control As CheckBox = CreateBaseControl(New CheckBox(), row, designMode)
control.AutoSize = True
control.Text = row.Item("CTRL_TEXT")
Return control
End Function
Public Shared Function CreateExistingDataGridView(row As DataRow, designMode As Boolean) As DataGridView
Dim control As DataGridView = CreateBaseControl(New DataGridView(), row, designMode)
control.Size = New Size(row.Item("WIDTH"), row.Item("HEIGHT"))
control.AllowUserToAddRows = False
control.AllowUserToDeleteRows = False
control.AllowUserToResizeColumns = False
control.AllowUserToResizeRows = False
control.AlternatingRowsDefaultCellStyle.BackColor = Color.Aqua
Dim col As New DataGridViewTextBoxColumn
col.HeaderText = ""
col.Name = "column1"
col.Width = control.Width - 30
control.Columns.Add(col)
Return control
End Function
Public Shared Function CreateExistingTable(row As DataRow, columns As List(Of DD_DMSLiteDataSet.TBPM_CONTROL_TABLERow), designMode As Boolean) As DataGridView
Dim control As DataGridView = CreateBaseControl(New DataGridView(), row, designMode)
control.Size = New Size(row.Item("WIDTH"), row.Item("HEIGHT"))
control.AllowUserToAddRows = False
control.AllowUserToDeleteRows = False
control.AllowUserToResizeColumns = False
control.AllowUserToResizeRows = False
For Each column As DD_DMSLiteDataSet.TBPM_CONTROL_TABLERow In columns
Dim col As New DataGridViewTextBoxColumn() With {
.HeaderText = column.SPALTEN_HEADER,
.Name = column.SPALTENNAME,
.Width = column.SPALTENBREITE
}
control.Columns.Add(col)
Next
Return control
End Function
Public Shared Function CreateExistingLine(row As DataRow, designMode As Boolean) As LineLabel
Dim control As LineLabel = CreateBaseControl(New LineLabel(), row, designMode)
control.Text = "------------------------------"
control.BorderStyle = BorderStyle.None
control.AutoSize = False
control.BackColor = IntToColor(NotNull(row.Item("FONT_COLOR"), DEFAULT_COLOR))
control.Size = New Size(row.Item("WIDTH"), row.Item("HEIGHT"))
Return control
End Function
' ----------------------- CUSTOM LABEL/LINE CLASS -----------------------
Public Class LineLabel
Inherits Label
Protected Overrides Sub OnPaint(e As PaintEventArgs)
'MyBase.OnPaint(e)
Dim size As New Size(e.ClipRectangle.Width, 2)
Dim rect As New Rectangle(New Point(0, 0), size)
'ControlPaint.DrawBorder(e.Graphics, rect, Me.ForeColor, ButtonBorderStyle.Solid)
e.Graphics.DrawLine(New Pen(ForeColor, 100), New Point(0, 0), New Point(e.ClipRectangle.Width, 2))
End Sub
End Class
End Class

View File

@ -56,6 +56,7 @@ Public Class ClassWindream_allgemein
Me.oConnect = CreateObject("Windream.WMConnect")
'MsgBox("windrem init 'ed")
Catch ex As Exception
If LogErrorsOnly = False Then ClassLogger.Add($"Error while creating WMConnect Object: {vbCrLf}{ex.Message}", False)
Return False
End Try
@ -83,7 +84,9 @@ Public Class ClassWindream_allgemein
Return False
End If
If LogErrorsOnly = False Then ClassLogger.Add(" >> windream-Version: '" & oSession.GetSystemInfo("WindreamVersion") & "'", False)
If LogErrorsOnly = False Then
ClassLogger.Add(" >> windream-Version: '" & oSession.GetSystemInfo("WindreamVersion") & "'", False)
End If
' AUSGABE VON SYSTEMINFORMATIONEN
' Gibt die Versionsart (Lizenztyp) also Small-Business-Edition (SBE), Small-Business-Extension (SBX)
@ -111,7 +114,8 @@ Public Class ClassWindream_allgemein
End Try
End If
If LogErrorsOnly = False Then ClassLogger.Add(" >> windream initialized completely", False)
If LogErrorsOnly = False Then ClassLogger.Add($" >> windream login successful", False)
Return True
Catch ex As Exception

View File

@ -19658,7 +19658,7 @@ Namespace DD_DMSLiteDataSetTableAdapters
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
Private Sub InitCommandCollection()
Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(3) {}
Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(4) {}
Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand()
Me._commandCollection(0).Connection = Me.Connection
Me._commandCollection(0).CommandText = "SELECT GUID, CONTROL_ID, SPALTENNAME, SPALTEN_HEADER, SPALTENBREITE, VALID"& _
@ -19685,19 +19685,23 @@ Namespace DD_DMSLiteDataSetTableAdapters
Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
Me._commandCollection(2) = New Global.System.Data.SqlClient.SqlCommand()
Me._commandCollection(2).Connection = Me.Connection
Me._commandCollection(2).CommandText = "SELECT GUID, CONTROL_ID, SPALTENNAME, SPALTEN_HEADER, SPALTENBREITE, VALID"& _
Me._commandCollection(2).CommandText = "SELECT *"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM TBPM_CONTROL_TABLE"
Me._commandCollection(2).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(3) = New Global.System.Data.SqlClient.SqlCommand()
Me._commandCollection(3).Connection = Me.Connection
Me._commandCollection(3).CommandText = "SELECT GUID, CONTROL_ID, SPALTENNAME, SPALTEN_HEADER, SPALTENBREITE, VALID"& _
"ATION, CHOICE_LIST, CONNECTION_ID, SQL_COMMAND, READ_ONLY, LOAD_IDX_VALUE, ADDED"& _
"_WHO, ADDED_WHEN, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" CHANGED_WHO, CHANGED_WHEN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM "& _
" TBPM_CONTROL_TABLE"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (GUID = @GUID)"
Me._commandCollection(2).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
Me._commandCollection(3) = New Global.System.Data.SqlClient.SqlCommand()
Me._commandCollection(3).Connection = Me.Connection
Me._commandCollection(3).CommandText = "SELECT GUID FROM TBPM_CONTROL_TABLE where Control_ID = @control_id and Spaltennam"& _
"e = @spaltenname"
Me._commandCollection(3).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(3).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@control_id", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "CONTROL_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
Me._commandCollection(3).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@spaltenname", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "SPALTENNAME", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
Me._commandCollection(3).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
Me._commandCollection(4) = New Global.System.Data.SqlClient.SqlCommand()
Me._commandCollection(4).Connection = Me.Connection
Me._commandCollection(4).CommandText = "SELECT GUID FROM TBPM_CONTROL_TABLE where Control_ID = @control_id and Spaltennam"& _
"e = @spaltenname"
Me._commandCollection(4).CommandType = Global.System.Data.CommandType.Text
Me._commandCollection(4).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@control_id", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "CONTROL_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
Me._commandCollection(4).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@spaltenname", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "SPALTENNAME", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
End Sub
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
@ -19730,8 +19734,32 @@ Namespace DD_DMSLiteDataSetTableAdapters
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, false)> _
Public Overloads Overridable Function FillByGUID(ByVal dataTable As DD_DMSLiteDataSet.TBPM_CONTROL_TABLEDataTable, ByVal GUID As Integer) As Integer
Public Overloads Overridable Function FillAll(ByVal dataTable As DD_DMSLiteDataSet.TBPM_CONTROL_TABLEDataTable) As Integer
Me.Adapter.SelectCommand = Me.CommandCollection(2)
If (Me.ClearBeforeFill = true) Then
dataTable.Clear
End If
Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
Return returnValue
End Function
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], false)> _
Public Overloads Overridable Function GetDataAll() As DD_DMSLiteDataSet.TBPM_CONTROL_TABLEDataTable
Me.Adapter.SelectCommand = Me.CommandCollection(2)
Dim dataTable As DD_DMSLiteDataSet.TBPM_CONTROL_TABLEDataTable = New DD_DMSLiteDataSet.TBPM_CONTROL_TABLEDataTable()
Me.Adapter.Fill(dataTable)
Return dataTable
End Function
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, false)> _
Public Overloads Overridable Function FillByGUID(ByVal dataTable As DD_DMSLiteDataSet.TBPM_CONTROL_TABLEDataTable, ByVal GUID As Integer) As Integer
Me.Adapter.SelectCommand = Me.CommandCollection(3)
Me.Adapter.SelectCommand.Parameters(0).Value = CType(GUID,Integer)
If (Me.ClearBeforeFill = true) Then
dataTable.Clear
@ -19745,7 +19773,7 @@ Namespace DD_DMSLiteDataSetTableAdapters
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], false)> _
Public Overloads Overridable Function GetDataByGUID(ByVal GUID As Integer) As DD_DMSLiteDataSet.TBPM_CONTROL_TABLEDataTable
Me.Adapter.SelectCommand = Me.CommandCollection(2)
Me.Adapter.SelectCommand = Me.CommandCollection(3)
Me.Adapter.SelectCommand.Parameters(0).Value = CType(GUID,Integer)
Dim dataTable As DD_DMSLiteDataSet.TBPM_CONTROL_TABLEDataTable = New DD_DMSLiteDataSet.TBPM_CONTROL_TABLEDataTable()
Me.Adapter.Fill(dataTable)
@ -20074,7 +20102,7 @@ Namespace DD_DMSLiteDataSetTableAdapters
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
Public Overloads Overridable Function getColumnID(ByVal control_id As Integer, ByVal spaltenname As String) As Global.System.Nullable(Of Integer)
Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(3)
Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(4)
command.Parameters(0).Value = CType(control_id,Integer)
If (spaltenname Is Nothing) Then
Throw New Global.System.ArgumentNullException("spaltenname")

View File

@ -1925,6 +1925,15 @@ WHERE (GUID = @Original_GUID)</CommandText>
</DbCommand>
</UpdateCommand>
</DbSource>
<DbSource ConnectionRef="ConnectionString (MySettings)" DbObjectName="DD_ECM_TEST.dbo.TBPM_CONTROL_TABLE" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="FillAll" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetDataAll" GeneratorSourceName="FillAll" GetMethodModifier="Public" GetMethodName="GetDataAll" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataAll" UserSourceName="FillAll">
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="true">
<CommandText>SELECT *
FROM TBPM_CONTROL_TABLE</CommandText>
<Parameters />
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="ConnectionString (MySettings)" DbObjectName="DD_DMS.dbo.TBPM_CONTROL_TABLE" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="FillByGUID" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetDataByGUID" GeneratorSourceName="FillByGUID" GetMethodModifier="Public" GetMethodName="GetDataByGUID" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataByGUID" UserSourceName="FillByGUID">
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="true">

View File

@ -20,7 +20,7 @@
<Shape ID="DesignTable:TBPM_PROFILE" ZOrder="17" X="215" Y="319" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:TBWH_CHECK_PROFILE_CONTROLS" ZOrder="12" X="0" Y="-72" Height="168" Width="158" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="78" />
<Shape ID="DesignTable:TBPM_PROFILE_CONTROLS" ZOrder="10" X="595" Y="421" Height="476" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:TBPM_CONTROL_TABLE" ZOrder="5" X="940" Y="517" Height="324" Width="284" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:TBPM_CONTROL_TABLE" ZOrder="5" X="861" Y="110" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="24" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:TBWH_CONNECTION" ZOrder="13" X="625" Y="114" Height="276" Width="189" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="272" />
</Shapes>
<Connectors>
@ -67,32 +67,32 @@
<Connector ID="DesignRelation:FK_TBPM_CONTROL_TABLE_CONTROL1" ZOrder="9" LineWidth="11">
<RoutePoints>
<Point>
<X>895</X>
<Y>565</Y>
<X>844</X>
<Y>421</Y>
</Point>
<Point>
<X>940</X>
<Y>565</Y>
<X>844</X>
<Y>394</Y>
</Point>
<Point>
<X>861</X>
<Y>394</Y>
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_TBPM_CONTROL_TABLE_CONTROL" ZOrder="8" LineWidth="11">
<RoutePoints>
<Point>
<X>118</X>
<Y>0</Y>
<X>141</X>
<Y>96</Y>
</Point>
<Point>
<X>118</X>
<Y>-30</Y>
<X>141</X>
<Y>127</Y>
</Point>
<Point>
<X>118</X>
<Y>-30</Y>
</Point>
<Point>
<X>118</X>
<Y>0</Y>
<X>861</X>
<Y>127</Y>
</Point>
</RoutePoints>
</Connector>

View File

@ -58,7 +58,7 @@
<ItemGroup>
<Reference Include="DD_LIB_Standards, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\DDLibStandards\DD_LIB_Standards\bin\Debug\DD_LIB_Standards.dll</HintPath>
<HintPath>P:\Visual Studio Projekte\Bibliotheken\DD_LIB_Standards.dll</HintPath>
</Reference>
<Reference Include="DevExpress.Charts.v15.2.Core, Version=15.2.16.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Data.v15.2, Version=15.2.16.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
@ -154,6 +154,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="ClassAnnotation.vb" />
<Compile Include="ClassControlCreator.vb" />
<Compile Include="ClassInit.vb" />
<Compile Include="ClassLogger.vb" />
<Compile Include="ClassSQLEditor.vb" />

View File

@ -15,6 +15,30 @@ Public Module ModuleControlProperties
Private _size As Size
Private _font As Font
Private _text_color As Color
Private _changed_at As Date
Private _changed_who As String
<Category("Allgemein")>
<[ReadOnly](True)>
Public Property ChangedAt As Date
Get
Return _changed_at
End Get
Set(value As Date)
_changed_at = value
End Set
End Property
<Category("Allgemein")>
<[ReadOnly](True)>
Public Property ChangedWho As String
Get
Return _changed_who
End Get
Set(value As String)
_changed_who = value
End Set
End Property
<Category("Allgemein")>
<[ReadOnly](True)>
@ -53,13 +77,21 @@ Public Module ModuleControlProperties
Return _size
End Get
Set(value As Size)
If (value.Height <= 0) Then
value.Height = 1
End If
If (value.Width <= 20) Then
value.Width = 20
End If
_size = value
End Set
End Property
<Category("Anzeige")>
<TypeConverter(GetType(FontConverter))>
Public Property Font As Font
Public Overridable Property Font As Font
Get
Return _font
End Get
@ -116,6 +148,7 @@ Public Module ModuleControlProperties
End Set
End Property
<Browsable(False)>
<Category("Indexierung")>
Public Property IndexType() As IndexTypes
Get
@ -326,4 +359,17 @@ Public Module ModuleControlProperties
Public Class GridViewProperties
Inherits InputProperties
End Class
Public Class LineLabelProperties
Inherits BaseProperties
<Browsable(False)>
Public Overrides Property Font As Font
Get
Return Nothing
End Get
Set(value As Font)
End Set
End Property
End Class
End Module

File diff suppressed because it is too large Load Diff

View File

@ -117,38 +117,30 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="CHANGED_WHOLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="CHANGED_WHENLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="btnLine.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAA0SURBVEhLYxgF
o2AUEAe8gDiICpgbiFHACyD+TwWsCMQoIA2IC6iA+YF4FIyCUTAAgIEBAJUPH6VVzyeQAAAAAElFTkSu
QmCC
</value>
</data>
<metadata name="TBPM_PROFILE_CONTROLSBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>179, 17</value>
</metadata>
<metadata name="DD_DMSLiteDataSet.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>898, 56</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="btnEditor.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAANtJREFUOE+tkzsSgjAURbMEl+TQswDWg8M2LKSWggW4DrWhUBuKaAGUTw5DMASU
z5iZw0zeu/cmmRDljqqqtmVZJjW6Rhx0URR7NK38M7TWm7p5yrJMoiiSIAjE87we1OihQYuntStFIU1T
8X1f4kMsl/NVnvrVgxo9NGjxNGaS8jxvGvfbY2B0QcOOONZ/AhhMKM49wteAJTQBfKYYMwO9yZVnB7jn
BSOyTTaDgOSYdM1VAVxPGO66uREZg8sggCsihJ2sCnAxIttk6H7lXyuA3R99TAgW4Dxnpd6OS61yelZ6
QAAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="TBPM_CONNECTIONBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1021, 17</value>
</metadata>
<metadata name="StatusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>904, 17</value>
</metadata>
<metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>898, 56</value>
</metadata>
<metadata name="TBPM_PROFILE_CONTROLSTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>458, 17</value>
</metadata>

File diff suppressed because it is too large Load Diff

View File

@ -185,6 +185,7 @@ Public Class frmProfileDesigner
Private Sub TBPM_PROFILEBindingSource_AddingNew(sender As Object, e As System.ComponentModel.AddingNewEventArgs) Handles TBPM_PROFILEBindingSource.AddingNew
DD_DMSLiteDataSet.TBPM_PROFILE.ADDED_WHOColumn.DefaultValue = Environment.UserName
DD_DMSLiteDataSet.TBPM_PROFILE.ADDED_WHENColumn.DefaultValue = Date.Now
DD_DMSLiteDataSet.TBPM_PROFILE.TYPEColumn.DefaultValue = 1
End Sub
@ -221,7 +222,12 @@ Public Class frmProfileDesigner
My.Settings.Save()
CURRENT_OBJECTTYPE = cmbObjekttypen.Text
CURRENT_ProfilName = NAMETextBox.Text
frmFormDesigner.ProfileId = CURRENT_ProfilGUID
frmFormDesigner.ProfileName = CURRENT_ProfilName
frmFormDesigner.ProfileObjectType = cmbObjekttypen.Text
frmFormDesigner.ShowDialog()
Else
MsgBox("Eindeutiges Profil konnte nicht an den FormDesigner weitergegeben werden:", MsgBoxStyle.Exclamation)
End If

View File

@ -396,6 +396,7 @@ Partial Class frmValidator
'TableAdapterManager
'
Me.TableAdapterManager.BackupDataSetBeforeUpdate = False
Me.TableAdapterManager.TBDD_USERTableAdapter = Nothing
Me.TableAdapterManager.TBPM_CONNECTIONTableAdapter = Me.TBPM_CONNECTIONTableAdapter
Me.TableAdapterManager.TBPM_CONTROL_TABLETableAdapter = Me.TBPM_CONTROL_TABLETableAdapter
Me.TableAdapterManager.TBPM_ERROR_LOGTableAdapter = Nothing
@ -406,7 +407,6 @@ Partial Class frmValidator
Me.TableAdapterManager.TBPM_PROFILE_FINAL_INDEXINGTableAdapter = Me.TBPM_PROFILE_FINAL_INDEXINGTableAdapter
Me.TableAdapterManager.TBPM_PROFILETableAdapter = Me.TBPM_PROFILETableAdapter
Me.TableAdapterManager.TBPM_TYPETableAdapter = Nothing
Me.TableAdapterManager.TBDD_USERTableAdapter = Nothing
Me.TableAdapterManager.UpdateOrder = DD_PM_WINDREAM.DD_DMSLiteDataSetTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete
'
'TBPM_CONNECTIONTableAdapter
@ -709,7 +709,7 @@ Partial Class frmValidator
Me.RibbonControl1.ExpandCollapseItem.Id = 0
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.PdfFilePrintBarItem1, Me.PdfPreviousPageBarItem1, Me.PdfNextPageBarItem1, Me.PdfFindTextBarItem1, Me.PdfZoomOutBarItem1, Me.PdfZoomInBarItem1, Me.PdfExactZoomListBarSubItem1, Me.PdfZoom10CheckItem1, Me.PdfZoom25CheckItem1, Me.PdfZoom50CheckItem1, Me.PdfZoom75CheckItem1, Me.PdfZoom100CheckItem1, Me.PdfZoom125CheckItem1, Me.PdfZoom150CheckItem1, Me.PdfZoom200CheckItem1, Me.PdfZoom400CheckItem1, Me.PdfZoom500CheckItem1, Me.PdfSetActualSizeZoomModeCheckItem1, Me.PdfSetPageLevelZoomModeCheckItem1, Me.PdfSetFitWidthZoomModeCheckItem1, Me.PdfSetFitVisibleZoomModeCheckItem1})
Me.RibbonControl1.Location = New System.Drawing.Point(0, 0)
Me.RibbonControl1.MaxItemId = 25
Me.RibbonControl1.MaxItemId = 26
Me.RibbonControl1.Name = "RibbonControl1"
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.PdfRibbonPage1})
Me.RibbonControl1.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonControlStyle.Office2010
@ -966,6 +966,7 @@ Partial Class frmValidator
Me.SplitContainer1.Size = New System.Drawing.Size(962, 593)
Me.SplitContainer1.SplitterDistance = 477
Me.SplitContainer1.TabIndex = 37
Me.SplitContainer1.TabStop = False
'
'grpbxMailBody
'

View File

@ -290,11 +290,11 @@ Public Class frmValidator
sumatra = False
If My.Settings.frmValidatorPosition.IsEmpty = False Then
If My.Settings.frmValidatorPosition.X > 0 And My.Settings.frmValidatorPosition.Y > 0 Then
Me.Location = My.Settings.frmValidatorPosition
Location = My.Settings.frmValidatorPosition
End If
End If
If My.Settings.frmValidatorSize.IsEmpty = False Then
Me.Size = My.Settings.frmValidatorSize
Size = My.Settings.frmValidatorSize
End If
Try
DTPROFIL = ClassDatabase.Return_Datatable("SELECT * FROM TBPM_PROFILE WHERE GUID = " & CURRENT_ProfilGUID)
@ -304,14 +304,14 @@ Public Class frmValidator
TBPM_PROFILE_FILESTableAdapter.Connection.ConnectionString = MyConnectionString
TBPM_PROFILE_FINAL_INDEXINGTableAdapter.Connection.ConnectionString = MyConnectionString
TBPM_PROFILETableAdapter.Connection.ConnectionString = MyConnectionString
Me.TBPM_KONFIGURATIONTableAdapter.Connection.ConnectionString = MyConnectionString
TBPM_KONFIGURATIONTableAdapter.Connection.ConnectionString = MyConnectionString
VWPM_CONTROL_INDEXTableAdapter.Connection.ConnectionString = MyConnectionString
VWPM_PROFILE_USERTableAdapter.Connection.ConnectionString = MyConnectionString
Me.TBPM_CONTROL_TABLETableAdapter.Connection.ConnectionString = MyConnectionString
Me.VWPM_PROFILE_USERTableAdapter.FillByName(Me.DD_DMSLiteDataSet.VWPM_PROFILE_USER, CURRENT_ProfilName, Environment.UserName)
TBPM_CONTROL_TABLETableAdapter.Connection.ConnectionString = MyConnectionString
VWPM_PROFILE_USERTableAdapter.FillByName(DD_DMSLiteDataSet.VWPM_PROFILE_USER, CURRENT_ProfilName, Environment.UserName)
Me.VWPM_CONTROL_INDEXTableAdapter.Fill(Me.DD_DMSLiteDataSet.VWPM_CONTROL_INDEX, CURRENT_ProfilName)
Me.TBPM_CONNECTIONTableAdapter.Fill(Me.DD_DMSLiteDataSet.TBPM_CONNECTION)
VWPM_CONTROL_INDEXTableAdapter.Fill(DD_DMSLiteDataSet.VWPM_CONTROL_INDEX, CURRENT_ProfilName)
TBPM_CONNECTIONTableAdapter.Fill(DD_DMSLiteDataSet.TBPM_CONNECTION)
If LogErrorsOnly = False Then ClassLogger.Add(" >> Profile Data geladen", False)
Catch ex As Exception
MsgBox("Error LOADING profile-data:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
@ -368,9 +368,9 @@ Public Class frmValidator
If LogErrorsOnly = False Then ClassLogger.Add(" >> PROFIL_sortbynewest: " & PROFIL_sortbynewest.ToString, False)
'Delete Button anzeigen ja/nein
If Right_Delete = True Then
Me.ToolStripButtonDeleteFile.Enabled = True
ToolStripButtonDeleteFile.Enabled = True
Else
Me.ToolStripButtonDeleteFile.Enabled = False
ToolStripButtonDeleteFile.Enabled = False
End If
If LogErrorsOnly = False Then ClassLogger.Add(" >> Right_Delete: " & Right_Delete.ToString, False)
@ -405,37 +405,298 @@ Public Class frmValidator
End Try
End Sub
Sub ComboBoxData(profileId As Integer, controlName As String)
' Informationen über Profil und Control holen
Dim ControlId As Integer = TBPM_PROFILE_CONTROLSTableAdapter.cmdGetGUID(profileId, controlName)
Dim ConnectionId As Integer
Dim SQLCommand As String
If ControlId = 0 Then
Exit Sub
End If
ConnectionId = TBPM_PROFILE_CONTROLSTableAdapter.cmdgetConnectionID(ControlId)
If ConnectionId = 0 Then
Exit Sub
End If
SQLCommand = TBPM_PROFILE_CONTROLSTableAdapter.cmdGetSQL(ControlId)
If SQLCommand = String.Empty Then
Exit Sub
End If
TBPM_CONNECTIONTableAdapter.FillByID(DD_DMSLiteDataSet.TBPM_CONNECTION, ConnectionId)
Dim connectionString As String
For Each row As DataRow In DD_DMSLiteDataSet.TBPM_CONNECTION.Rows
Select Case row.Item("SQL_PROVIDER").ToString().ToLower()
Case "ms-sql"
If row.Item("USERNAME") = "WINAUTH" Then
connectionString = $"Data Source={row.Item("SERVER")};Initial Catalog=${row.Item("DATENBANK")};Trusted_Connection=True;"
Else
connectionString = $"Data Source={row.Item("SERVER")};Initial Catalog=${row.Item("DATENBANK")};User Id={row.Item("USERNAME")};Password={row.Item("PASSWORD")}"
End If
Case "oracle"
Dim csBuilder As New OracleConnectionStringBuilder()
If row.Item("SERVER") <> String.Empty And Not IsDBNull(row.Item("SERVER")) Then
connectionString = $"""
Data Source=(
DESCRIPTION=
ADDRESS_LIST=
(ADDRESS=
(PROTOCOL=TCP)
(HOST={row.Item("SERVER")})
(PORT=1521)
)
)
(CONNECT_DATA=
(SERVER=DEDICATED)
(SERVICE_NAME={row.Item("DATENBANK")})
)
)
);User Id={row.Item("USERNAME")};Password={row.Item("PASSWORD")}
"""
Else
csBuilder.DataSource = row.Item("SERVER")
csBuilder.UserID = row.Item("USERNAME")
csBuilder.Password = row.Item("PASSWORD")
csBuilder.PersistSecurityInfo = True
csBuilder.ConnectionTimeout = 120
connectionString = csBuilder.ConnectionString
End If
Case Else
Exit Sub
End Select
Next
Dim items As New List(Of String)
Using adapter As New SqlClient.SqlDataAdapter()
Using conn As New SqlClient.SqlConnection(connectionString)
conn.Open()
Using cmd As New SqlClient.SqlCommand(SQLCommand, conn)
Dim dataSet As New DataSet()
adapter.SelectCommand = cmd
adapter.Fill(dataSet)
Dim table = dataSet.Tables(0)
For Each row As DataRow In table.Rows
items.Add(row.Item(0))
Next
End Using
End Using
End Using
End Sub
Sub Load_Controls()
Try
pnldesigner.Controls.Clear()
Dim dt As DataTable = DD_DMSLiteDataSet.VWPM_CONTROL_INDEX
'Dim dt As DataTable = DD_DMSLiteDataSet.VWPM_CONTROL_INDEX
TBPM_PROFILE_CONTROLSTableAdapter.FillByProfil(DD_DMSLiteDataSet.TBPM_PROFILE_CONTROLS, CURRENT_ProfilGUID)
Dim dt As DataTable = DD_DMSLiteDataSet.TBPM_PROFILE_CONTROLS
For Each dr As DataRow In dt.Rows
Dim ctrl As Control
Select Case dr.Item("CTRL_TYPE").ToString.ToUpper
Case "TXT"
If LogErrorsOnly = False Then ClassLogger.Add(" >> Versuch TXT zu laden", False)
add_textbox(dr.Item("GUID"), dr.Item("CTRL_NAME"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), CInt(dr.Item("WIDTH")), CInt(dr.Item("HEIGHT")), dr.Item("READ_ONLY"), dr.Item("LOAD_IDX_VALUE")) 'dr.Item("INDEX_NAME"),
Dim txt As TextBox = ClassControlCreator.CreateExistingTextbox(dr, False)
AddHandler txt.GotFocus, AddressOf OnTextBoxFocus
AddHandler txt.LostFocus, AddressOf OnTextBoxLostFocus
AddHandler txt.KeyUp, AddressOf OnTextBoxKeyUp
ctrl = txt
'add_textbox(dr.Item("GUID"), dr.Item("CTRL_NAME"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), CInt(dr.Item("WIDTH")), CInt(dr.Item("HEIGHT")), dr.Item("READ_ONLY"), dr.Item("LOAD_IDX_VALUE")) 'dr.Item("INDEX_NAME"),
Case "LBL"
If LogErrorsOnly = False Then ClassLogger.Add(" >> Versuch LBL zu laden", False)
add_label(dr.Item("GUID"), dr.Item("CTRL_NAME"), dr.Item("CTRL_TEXT"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")))
ctrl = ClassControlCreator.CreateExistingLabel(dr, False)
'add_label(dr.Item("GUID"), dr.Item("CTRL_NAME"), dr.Item("CTRL_TEXT"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")))
Case "CMB"
If LogErrorsOnly = False Then ClassLogger.Add(" >> Versuch CMB zu laden", False)
add_ComboBox(dr.Item("GUID"), dr.Item("CTRL_NAME"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), CInt(dr.Item("WIDTH")), CInt(dr.Item("HEIGHT")), dr.Item("READ_ONLY"), dr.Item("LOAD_IDX_VALUE")) 'dr.Item("INDEX_NAME"),
Dim cmb = ClassControlCreator.CreateExistingCombobox(dr, False)
AddHandler cmb.SelectedValueChanged, AddressOf OnCmbselectedIndex
#Region "CONTROL LIST"
Dim ControlID = TBPM_PROFILE_CONTROLSTableAdapter.cmdGetGUID(CURRENT_ProfilGUID, cmb.Name)
If LogErrorsOnly = False Then ClassLogger.Add(" >> In add_ComboBox - GUID: " & ControlID, False)
If ControlID > 0 Then
If LogErrorsOnly = False Then ClassLogger.Add(" >>ControlID > 0", False)
Dim ConID = Me.TBPM_PROFILE_CONTROLSTableAdapter.cmdgetConnectionID(ControlID)
If ConID Is Nothing = False Then
Dim commandsql = TBPM_PROFILE_CONTROLSTableAdapter.cmdGetSQL(ControlID)
If LogErrorsOnly = False Then ClassLogger.Add(" >> ConID Is Nothing = False", False)
If ConID > 0 And commandsql <> "" Then
If LogErrorsOnly = False Then ClassLogger.Add(" >> CConID > 0 And TBPM_PROFILE_CONTROLSTableAdapter.cmdGetSQL(ControlID)", False)
Dim connectionString As String
TBPM_CONNECTIONTableAdapter.FillByID(DD_DMSLiteDataSet.TBPM_CONNECTION, ConID)
Dim DTConnection As DataTable = DD_DMSLiteDataSet.TBPM_CONNECTION
Dim drConnection As DataRow
For Each drConnection In DTConnection.Rows
Select Case drConnection.Item("SQL_PROVIDER").ToString.ToLower
Case "ms-sql"
If drConnection.Item("USERNAME") = "WINAUTH" Then
connectionString = "Data Source=" & drConnection.Item("SERVER") & ";Initial Catalog=" & drConnection.Item("DATENBANK") & ";Trusted_Connection=True;"
Else
connectionString = "Data Source=" & drConnection.Item("SERVER") & ";Initial Catalog= " & drConnection.Item("DATENBANK") & ";User Id=" & drConnection.Item("USERNAME") & ";Password=" & drConnection.Item("PASSWORD") & ";"
End If
If LogErrorsOnly = False Then ClassLogger.Add(" >> ConnString Sql-Server: " & connectionString)
Case "oracle"
Dim conn As New OracleConnectionStringBuilder
Dim connstr As String
If drConnection.Item("SERVER") <> "" And drConnection.Item("DATENBANK").GetType.ToString <> "system.dbnull" Then
connstr = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" & drConnection.Item("SERVER") & ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" &
drConnection.Item("DATENBANK") & ")));User Id=" & drConnection.Item("USERNAME") & ";Password=" & drConnection.Item("PASSWORD") & ";"
Else
conn.DataSource = drConnection.Item("SERVER")
conn.UserID = drConnection.Item("USERNAME")
conn.Password = drConnection.Item("PASSWORD")
conn.PersistSecurityInfo = True
conn.ConnectionTimeout = 120
connstr = conn.ConnectionString
End If
connectionString = connstr
Case Else
ClassLogger.Add(" - ConnectionType nicht integriert", False)
MsgBox("ConnectionType nicht integriert", MsgBoxStyle.Critical, "Bitte Konfiguration Connection überprüfen!")
End Select
Next
If connectionString Is Nothing = False Then
Try
Dim sqlCnn As SqlClient.SqlConnection
Dim sqlCmd As SqlClient.SqlCommand
Dim adapter As New SqlClient.SqlDataAdapter
Dim NewDataset As New DataSet
Dim i As Integer
Dim sql As String
sql = TBPM_PROFILE_CONTROLSTableAdapter.cmdGetSQL(ControlID)
sqlCnn = New SqlClient.SqlConnection(connectionString)
' Try
sqlCnn.Open()
sqlCmd = New SqlClient.SqlCommand(sql, sqlCnn)
adapter.SelectCommand = sqlCmd
adapter.Fill(NewDataset)
Dim msg As String
For i = 0 To NewDataset.Tables(0).Rows.Count - 1
cmb.Items.Add(NewDataset.Tables(0).Rows(i).Item(0))
Next
adapter.Dispose()
sqlCmd.Dispose()
sqlCnn.Close()
Catch ex As Exception
ClassLogger.Add(" - Unvorhergesehener Fehler bei GetValues SQL - Fehler: " & vbNewLine & ex.Message)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei GetValues SQL:")
End Try
End If
Else
If LogErrorsOnly = False Then ClassLogger.Add(" >> Else Row 571", False)
End If
Else
If LogErrorsOnly = False Then ClassLogger.Add(" >> AListe Handling", False)
Dim AListe As String = TBPM_PROFILE_CONTROLSTableAdapter.cmdGetChoiceListName(ControlID)
If LogErrorsOnly = False Then ClassLogger.Add(" >> In add_ComboBox - AListe: " & AListe, False)
If AListe Is Nothing = False Then
Dim liste = _windream.GetValuesfromAuswahlliste(AListe)
If liste IsNot Nothing Then
cmb.Items.Add("")
For Each index As String In liste
cmb.Items.Add(index)
Next
cmb.SelectedIndex = -1
Else
MsgBox("Resultliste windream is nothing!", MsgBoxStyle.Exclamation, AListe)
End If
Else
MsgBox("AListe from database is nothing!", MsgBoxStyle.Exclamation, AListe)
End If
End If
End If
#End Region
Dim maxWith As Integer = cmb.Width
Using g As Graphics = Me.CreateGraphics
For Each oItem As Object In cmb.Items 'Für alle Einträge...
Dim g1 As Graphics = cmb.CreateGraphics
If g1.MeasureString(Text, cmb.Font).Width + 30 > maxWith Then
maxWith = g1.MeasureString(Text, cmb.Font).Width + 30
End If
g1.Dispose()
Next oItem
End Using
cmb.DropDownWidth = maxWith
ctrl = cmb
'add_ComboBox(dr.Item("GUID"), dr.Item("CTRL_NAME"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), CInt(dr.Item("WIDTH")), CInt(dr.Item("HEIGHT")), dr.Item("READ_ONLY"), dr.Item("LOAD_IDX_VALUE")) 'dr.Item("INDEX_NAME"),
Case "DTP"
If LogErrorsOnly = False Then ClassLogger.Add(" >> Versuch DTP zu laden", False)
add_DTP(dr.Item("GUID"), dr.Item("CTRL_NAME"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), CInt(dr.Item("WIDTH")), CInt(dr.Item("HEIGHT")), dr.Item("READ_ONLY"), dr.Item("LOAD_IDX_VALUE")) 'dr.Item("INDEX_NAME"),
ctrl = ClassControlCreator.CreateExistingDatepicker(dr, False)
'add_DTP(dr.Item("GUID"), dr.Item("NAME"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), CInt(dr.Item("WIDTH")), CInt(dr.Item("HEIGHT")), dr.Item("READ_ONLY"), dr.Item("LOAD_IDX_VALUE")) 'dr.Item("INDEX_NAME"),
Case "DGV"
If LogErrorsOnly = False Then ClassLogger.Add(" >> Versuch DGV zu laden", False)
add_DGV(dr.Item("GUID"), dr.Item("CTRL_NAME"), dr.Item("HEIGHT"), dr.Item("WIDTH"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), dr.Item("READ_ONLY"), dr.Item("LOAD_IDX_VALUE")) 'dr.Item("INDEX_NAME"),
Dim dgv = ClassControlCreator.CreateExistingDataGridView(dr, False)
AddHandler dgv.RowValidating, AddressOf onDGVRowValidating
ctrl = dgv
'add_DGV(dr.Item("GUID"), dr.Item("CTRL_NAME"), dr.Item("HEIGHT"), dr.Item("WIDTH"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), dr.Item("READ_ONLY"), dr.Item("LOAD_IDX_VALUE")) 'dr.Item("INDEX_NAME"),
Case "CHK"
If LogErrorsOnly = False Then ClassLogger.Add(" >> Versuch Checkbox zu laden", False)
add_Checkbox(dr.Item("GUID"), dr.Item("CTRL_NAME"), dr.Item("CTRL_TEXT"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), dr.Item("READ_ONLY"), dr.Item("LOAD_IDX_VALUE"))
ctrl = ClassControlCreator.CreateExisingCheckbox(dr, False)
'add_Checkbox(dr.Item("GUID"), dr.Item("CTRL_NAME"), dr.Item("CTRL_TEXT"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), dr.Item("READ_ONLY"), dr.Item("LOAD_IDX_VALUE"))
Case "TABLE"
If LogErrorsOnly = False Then ClassLogger.Add(" >> Versuch Tabelle zu laden", False)
add_TABLE(dr.Item("GUID"), dr.Item("CTRL_NAME"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), dr.Item("WIDTH"), CInt(dr.Item("HEIGHT")), dr.Item("READ_ONLY"))
Dim columns As List(Of DD_DMSLiteDataSet.TBPM_CONTROL_TABLERow) = (From r As DD_DMSLiteDataSet.TBPM_CONTROL_TABLERow In DD_DMSLiteDataSet.TBPM_CONTROL_TABLE
Where r.CONTROL_ID = dr.Item("GUID")
Select r).ToList()
ctrl = ClassControlCreator.CreateExistingTable(dr, columns, False)
'add_TABLE(dr.Item("GUID"), dr.Item("CTRL_NAME"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), dr.Item("WIDTH"), CInt(dr.Item("HEIGHT")), dr.Item("READ_ONLY"))
Case "LINE"
If LogErrorsOnly = False Then ClassLogger.Add(" >> Versuch Linie zu laden", False)
ctrl = ClassControlCreator.CreateExistingLine(dr, False)
End Select
If TypeOf ctrl IsNot Label Then
If first_control Is Nothing Then
first_control = ctrl
End If
last_control = ctrl
End If
pnldesigner.Controls.Add(ctrl)
Next
If LogErrorsOnly = False Then ClassLogger.Add(" >> Controls geladen", False)
If LogErrorsOnly = False Then ClassLogger.Add(" >> Controls geladen", False)
ClassLogger.Add("", False)
Catch ex As Exception
@ -448,18 +709,18 @@ Public Class frmValidator
End Sub
Function add_label(CONTROL_ID As Integer, lblname As String, text As String, x As Integer, y As Integer)
If LogErrorsOnly = False Then ClassLogger.Add(" >> In add_label - lblname: " & lblname & " x/y: " & x.ToString & "/" & y.ToString, False)
Dim lbl As New Label
lbl.Name = lblname
lbl.Text = text
lbl.AutoSize = True
lbl.Tag = CONTROL_ID
'lbl.Size = New Size(CInt(lbl.Text.Length * 10), 16)
lbl.Location = New Point(x, y)
pnldesigner.Controls.Add(lbl)
If LogErrorsOnly = False Then ClassLogger.Add(" >> LBL: " & lblname & " hinzugefügt", False)
End Function
'Function add_label(CONTROL_ID As Integer, lblname As String, text As String, x As Integer, y As Integer)
' If LogErrorsOnly = False Then ClassLogger.Add(" >> In add_label - lblname: " & lblname & " x/y: " & x.ToString & "/" & y.ToString, False)
' Dim lbl As New Label
' lbl.Name = lblname
' lbl.Text = text
' lbl.AutoSize = True
' lbl.Tag = CONTROL_ID
' 'lbl.Size = New Size(CInt(lbl.Text.Length * 10), 16)
' lbl.Location = New Point(x, y)
' pnldesigner.Controls.Add(lbl)
' If LogErrorsOnly = False Then ClassLogger.Add(" >> LBL: " & lblname & " hinzugefügt", False)
'End Function
Function add_textbox(CONTROL_ID As Integer, ByVal txtname As String, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer, ByVal read_only As Boolean, loadindex As Boolean) 'idxName As String,
If LogErrorsOnly = False Then ClassLogger.Add(" >> In add_textbox - txtname: " & txtname & " x/y: " & x.ToString & "/" & y.ToString, False)
Dim txt As New TextBox
@ -515,8 +776,8 @@ Public Class frmValidator
If ConID > 0 And commandsql <> "" Then
If LogErrorsOnly = False Then ClassLogger.Add(" >> CConID > 0 And TBPM_PROFILE_CONTROLSTableAdapter.cmdGetSQL(ControlID)", False)
Dim connectionString As String
Me.TBPM_CONNECTIONTableAdapter.FillByID(Me.DD_DMSLiteDataSet.TBPM_CONNECTION, ConID)
Dim DT As DataTable = Me.DD_DMSLiteDataSet.TBPM_CONNECTION
TBPM_CONNECTIONTableAdapter.FillByID(DD_DMSLiteDataSet.TBPM_CONNECTION, ConID)
Dim DT As DataTable = DD_DMSLiteDataSet.TBPM_CONNECTION
Dim drConnection As DataRow
For Each drConnection In DT.Rows
Select Case drConnection.Item("SQL_PROVIDER").ToString.ToLower
@ -763,7 +1024,7 @@ Public Class frmValidator
End Sub
Public Sub OnTextBoxFocus(sender As System.Object, e As System.EventArgs)
Public Sub OnTextBoxFocus(sender As Object, e As EventArgs)
Dim box As TextBox = sender
box.BackColor = Color.Lime
box.SelectAll()
@ -811,21 +1072,21 @@ Public Class frmValidator
' Regulären Ausdruck zum Auslesen der 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)
Dim regulärerAusdruck As Text.RegularExpressions.Regex = New Text.RegularExpressions.Regex(preg)
' die Vorkommen im SQL-String auslesen
Dim elemente As System.Text.RegularExpressions.MatchCollection = regulärerAusdruck.Matches(sql_Statement)
Dim elemente As Text.RegularExpressions.MatchCollection = regulärerAusdruck.Matches(sql_Statement)
'####
' alle Vorkommen innerhalbd er Namenkonvention durchlaufen
For Each element As System.Text.RegularExpressions.Match In elemente
For Each element As Text.RegularExpressions.Match In elemente
Try
If LogErrorsOnly = False Then ClassLogger.Add(" >> element in RegeX: " & element.Value, False)
Dim MyPattern = element.Value.Substring(2, element.Value.Length - 3)
Dim input_value
If MyPattern.Contains("txt") Then
Dim txt As TextBox = CType(Me.pnldesigner.Controls(MyPattern), TextBox)
Dim txt As TextBox = CType(pnldesigner.Controls(MyPattern), TextBox)
input_value = txt.Text
ElseIf MyPattern.Contains("cmb") Then
Dim cmb As ComboBox = CType(Me.pnldesigner.Controls(MyPattern), ComboBox)
Dim cmb As ComboBox = CType(pnldesigner.Controls(MyPattern), ComboBox)
input_value = cmb.Text
End If
sql_Statement = sql_Statement.ToString.Replace(element.Value, input_value)
@ -1892,121 +2153,121 @@ Public Class frmValidator
'lblerror.Visible = False
'Try
Dim _error As Boolean = False
Me.TBPM_PROFILE_FINAL_INDEXINGTableAdapter.Fill(Me.DD_DMSLiteDataSet.TBPM_PROFILE_FINAL_INDEXING, CURRENT_ProfilName)
Dim dtfinal As DataTable = DD_DMSLiteDataSet.TBPM_PROFILE_FINAL_INDEXING
If dtfinal.Rows.Count > 0 Then
'Jetzt finale Indexe setzen
If LogErrorsOnly = False Then ClassLogger.Add(" >> Finale(r) Index(e) für Dok: " & aktivesDokument.aName & " soll gesetzt werden", False)
For Each dr As DataRow In dtfinal.Rows
Dim value As String = dr.Item("VALUE").ToString
If value.ToUpper = "SQL-Command".ToUpper Then '###### Indexierung mit variablen SQL ###
If LogErrorsOnly = False Then ClassLogger.Add(" >> Indexierung mit dynamischem SQL!", False)
Dim SQL_COMMAND = dr.Item("SQL_COMMAND")
' Regulären Ausdruck zum Auslesen der 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 elemente As System.Text.RegularExpressions.MatchCollection = regulärerAusdruck.Matches(SQL_COMMAND)
'####
' alle Vorkommen innerhalbd er Namenkonvention durchlaufen
For Each element As System.Text.RegularExpressions.Match In elemente
Try
If LogErrorsOnly = False Then ClassLogger.Add(" >> element in RegeX: " & element.Value, False)
Dim WDINDEXNAME = element.Value.Substring(2, element.Value.Length - 3)
Dim wertWD = aktivesDokument.GetVariableValue(WDINDEXNAME)
If Not IsNothing(wertWD) Then
SQL_COMMAND = SQL_COMMAND.ToString.Replace(element.Value, wertWD)
Else
ClassLogger.Add(">> Achtung Indexwert ist nothing!", False)
End If
Catch ex As Exception
ClassLogger.Add("Unexpected Error in Checking control values for Variable SQL Result - ERROR: " & ex.Message)
End Try
Next
Dim dynamic_value = ClassDatabase.Execute_Scalar(SQL_COMMAND, MyConnectionString, True)
If Not IsNothing(dynamic_value) Then
value = dynamic_value
End If
Else
If value.StartsWith("v") Then
Select Case dr.Item("VALUE").ToString
Case "vDate"
value = Now.ToShortDateString
Case "vUserName"
value = Environment.UserName
Case Else
value = dr.Item("VALUE")
End Select
End If
End If
Dim result() As String
ReDim Preserve result(0)
result(0) = value
If dr.Item("INDEXNAME").ToString.StartsWith("[%VKT") Then
Dim PM_String = Return_PM_VEKTOR(value, dr.Item("INDEXNAME"))
'Hier muss nun separat als Vektorfeld indexiert werden
If Indexiere_VektorfeldPM(PM_String, PROFIL_VEKTORINDEX) = False Then
If LogErrorsOnly = False Then ClassLogger.Add(" >> FINALER INDEX '" & dr.Item("INDEXNAME").ToString.Replace("[%VKT", "") & "' WURDE ERFOLGREICH GESETZT", False)
Else
errormessage = "Fehler beim finalen Indexieren:" & vbNewLine & idxerr_message
My.Settings.Save()
frmError.ShowDialog()
_error = True
End If
Else
If LogErrorsOnly = False Then ClassLogger.Add(" >> Jetzt das indexieren", False)
If Indexiere_File(aktivesDokument, dr.Item("INDEXNAME"), result) = True Then
If LogErrorsOnly = False Then ClassLogger.Add(" >> FINALER INDEX '" & dr.Item("INDEXNAME") & "' WURDE ERFOLGREICH GESETZT", False)
If LogErrorsOnly = False Then ClassLogger.Add("")
'Nun das Logging
If PROFIL_LOGINDEX <> "" Then
Dim logstr = Return_LOGString(value, "DDFINALINDEX", dr.Item("INDEXNAME"))
Indexiere_VektorfeldPM(logstr, PROFIL_LOGINDEX)
Me.TBPM_PROFILE_FINAL_INDEXINGTableAdapter.Fill(Me.DD_DMSLiteDataSet.TBPM_PROFILE_FINAL_INDEXING, CURRENT_ProfilName)
Dim dtfinal As DataTable = DD_DMSLiteDataSet.TBPM_PROFILE_FINAL_INDEXING
If dtfinal.Rows.Count > 0 Then
'Jetzt finale Indexe setzen
If LogErrorsOnly = False Then ClassLogger.Add(" >> Finale(r) Index(e) für Dok: " & aktivesDokument.aName & " soll gesetzt werden", False)
For Each dr As DataRow In dtfinal.Rows
Dim value As String = dr.Item("VALUE").ToString
If value.ToUpper = "SQL-Command".ToUpper Then '###### Indexierung mit variablen SQL ###
If LogErrorsOnly = False Then ClassLogger.Add(" >> Indexierung mit dynamischem SQL!", False)
Dim SQL_COMMAND = dr.Item("SQL_COMMAND")
' Regulären Ausdruck zum Auslesen der 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 elemente As System.Text.RegularExpressions.MatchCollection = regulärerAusdruck.Matches(SQL_COMMAND)
'####
' alle Vorkommen innerhalbd er Namenkonvention durchlaufen
For Each element As System.Text.RegularExpressions.Match In elemente
Try
If LogErrorsOnly = False Then ClassLogger.Add(" >> element in RegeX: " & element.Value, False)
Dim WDINDEXNAME = element.Value.Substring(2, element.Value.Length - 3)
Dim wertWD = aktivesDokument.GetVariableValue(WDINDEXNAME)
If Not IsNothing(wertWD) Then
SQL_COMMAND = SQL_COMMAND.ToString.Replace(element.Value, wertWD)
Else
ClassLogger.Add(">> Achtung Indexwert ist nothing!", False)
End If
Catch ex As Exception
ClassLogger.Add("Unexpected Error in Checking control values for Variable SQL Result - ERROR: " & ex.Message)
End Try
Next
Dim dynamic_value = ClassDatabase.Execute_Scalar(SQL_COMMAND, MyConnectionString, True)
If Not IsNothing(dynamic_value) Then
value = dynamic_value
End If
Else
If value.StartsWith("v") Then
Select Case dr.Item("VALUE").ToString
Case "vDate"
value = Now.ToShortDateString
Case "vUserName"
value = Environment.UserName
Case Else
value = dr.Item("VALUE")
End Select
End If
End If
Else
errormessage = "Fehler beim finalen Indexieren:" & vbNewLine & idxerr_message
My.Settings.Save()
frmError.ShowDialog()
_error = True
Dim result() As String
ReDim Preserve result(0)
result(0) = value
If dr.Item("INDEXNAME").ToString.StartsWith("[%VKT") Then
Dim PM_String = Return_PM_VEKTOR(value, dr.Item("INDEXNAME"))
'Hier muss nun separat als Vektorfeld indexiert werden
If Indexiere_VektorfeldPM(PM_String, PROFIL_VEKTORINDEX) = False Then
If LogErrorsOnly = False Then ClassLogger.Add(" >> FINALER INDEX '" & dr.Item("INDEXNAME").ToString.Replace("[%VKT", "") & "' WURDE ERFOLGREICH GESETZT", False)
Else
errormessage = "Fehler beim finalen Indexieren:" & vbNewLine & idxerr_message
My.Settings.Save()
frmError.ShowDialog()
_error = True
End If
Else
If LogErrorsOnly = False Then ClassLogger.Add(" >> Jetzt das indexieren", False)
If Indexiere_File(aktivesDokument, dr.Item("INDEXNAME"), result) = True Then
If LogErrorsOnly = False Then ClassLogger.Add(" >> FINALER INDEX '" & dr.Item("INDEXNAME") & "' WURDE ERFOLGREICH GESETZT", False)
If LogErrorsOnly = False Then ClassLogger.Add("")
'Nun das Logging
If PROFIL_LOGINDEX <> "" Then
Dim logstr = Return_LOGString(value, "DDFINALINDEX", dr.Item("INDEXNAME"))
Indexiere_VektorfeldPM(logstr, PROFIL_LOGINDEX)
End If
End If
If _error = True Then
Exit For
End If
Next
End If
'Wenn kein Fehler nach der finalen Indexierung gesetzt wurde
If _error = False Then
If LogErrorsOnly = False Then ClassLogger.Add(" >> Tabelle updaten und co", False)
'Das Dokument freigeben und als editiert markieren
Dim sql = String.Format("UPDATE TBPM_PROFILE_FILES SET IN_WORK = 0, WORK_USER = '{0}', EDIT = 1 WHERE GUID = {1}", Environment.UserName, CURRENT_DOC_GUID)
ClassDatabase.Execute_non_Query(sql)
'TBPM_PROFILE_FILESTableAdapter.CmdSETWORK(False, "", Document_ID)
''Das Dokument
'TBPM_PROFILE_FILESTableAdapter.CmdSetEdit(Document_ID)
Dim WORK_HISTORY_ENTRY = Nothing
Try
WORK_HISTORY_ENTRY = DTPROFIL.Rows(0).Item("WORK_HISTORY_ENTRY")
If IsDBNull(WORK_HISTORY_ENTRY) Then
WORK_HISTORY_ENTRY = Nothing
Else
errormessage = "Fehler beim finalen Indexieren:" & vbNewLine & idxerr_message
My.Settings.Save()
frmError.ShowDialog()
_error = True
End If
Catch ex As Exception
End If
If _error = True Then
Exit For
End If
Next
End If
'Wenn kein Fehler nach der finalen Indexierung gesetzt wurde
If _error = False Then
If LogErrorsOnly = False Then ClassLogger.Add(" >> Tabelle updaten und co", False)
'Das Dokument freigeben und als editiert markieren
Dim sql = String.Format("UPDATE TBPM_PROFILE_FILES SET IN_WORK = 0, WORK_USER = '{0}', EDIT = 1 WHERE GUID = {1}", Environment.UserName, CURRENT_DOC_GUID)
ClassDatabase.Execute_non_Query(sql)
'TBPM_PROFILE_FILESTableAdapter.CmdSETWORK(False, "", Document_ID)
''Das Dokument
'TBPM_PROFILE_FILESTableAdapter.CmdSetEdit(Document_ID)
Dim WORK_HISTORY_ENTRY = Nothing
Try
WORK_HISTORY_ENTRY = DTPROFIL.Rows(0).Item("WORK_HISTORY_ENTRY")
If IsDBNull(WORK_HISTORY_ENTRY) Then
WORK_HISTORY_ENTRY = Nothing
End Try
End If
Catch ex As Exception
WORK_HISTORY_ENTRY = Nothing
End Try
If Not IsNothing(WORK_HISTORY_ENTRY) Then
If WORK_HISTORY_ENTRY <> String.Empty Then
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 elemente As System.Text.RegularExpressions.MatchCollection = regulärerAusdruck.Matches(WORK_HISTORY_ENTRY)
If Not IsNothing(WORK_HISTORY_ENTRY) Then
If WORK_HISTORY_ENTRY <> String.Empty Then
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 elemente As System.Text.RegularExpressions.MatchCollection = regulärerAusdruck.Matches(WORK_HISTORY_ENTRY)
'####
' alle Vorkommen innerhalbd er Namenkonvention durchlaufen
For Each element As System.Text.RegularExpressions.Match In elemente
@ -2070,15 +2331,15 @@ Public Class frmValidator
WORK_HISTORY_ENTRY.ToString.Replace("@USERNAME", Environment.UserName)
End If
Else
WORK_HISTORY_ENTRY = ""
End If
WORK_HISTORY_ENTRY = ""
End If
Dim ins = String.Format("INSERT INTO TBPM_FILES_WORK_HISTORY (PROFIL_ID, DOC_ID,WORKED_BY,WORKED_WHERE,STATUS_COMMENT) VALUES ({0},{1},'{2}','{3}','{4}')", CURRENT_ProfilGUID, CURRENT_DOC_ID, Environment.UserName, Environment.MachineName, WORK_HISTORY_ENTRY)
ClassDatabase.Execute_non_Query(ins)
End If
Dim ins = String.Format("INSERT INTO TBPM_FILES_WORK_HISTORY (PROFIL_ID, DOC_ID,WORKED_BY,WORKED_WHERE,STATUS_COMMENT) VALUES ({0},{1},'{2}','{3}','{4}')", CURRENT_ProfilGUID, CURRENT_DOC_ID, Environment.UserName, Environment.MachineName, WORK_HISTORY_ENTRY)
ClassDatabase.Execute_non_Query(ins)
Close_document_viewer()
If Document_Path.ToLower.EndsWith(".pdf") Then
If Not IsNothing(WORK_HISTORY_ENTRY) Then
Close_document_viewer()
If Document_Path.ToLower.EndsWith(".pdf") Then
If Not IsNothing(WORK_HISTORY_ENTRY) Then
If CBool(DTPROFIL.Rows(0).Item("ANNOTATE_WORK_HISTORY_ENTRY")) = True Then
sql = String.Format("SELECT * FROM TBPM_FILES_WORK_HISTORY WHERE GUID = (SELECT MAX(GUID) FROM TBPM_FILES_WORK_HISTORY WHERE PROFIL_ID = {0} AND DOC_ID = {1})", CURRENT_ProfilGUID, CURRENT_DOC_ID)
Dim DT_ENTRY As DataTable = ClassDatabase.Return_Datatable(sql, True)
@ -2104,46 +2365,46 @@ Public Class frmValidator
End If
End If
End If
End If
'wenn Move2Folder aktiviert wurde
If Move2Folder <> "" Then
idxerr_message = allgFunk.Move2Folder(Document_Path, Move2Folder, CURRENT_ProfilGUID)
If idxerr_message <> "" Then
errormessage = "Fehler bei Move2Folder:" & vbNewLine & idxerr_message
My.Settings.Save()
frmError.ShowDialog()
_error = True
End If
End If
'Validierungsfile löschen wenn vorhanden
allgFunk.Delete_xffres(Document_Path)
If LogErrorsOnly = False Then ClassLogger.Add(" >> Delete_xffres ausgeführt", False)
If LogErrorsOnly = False Then ClassLogger.Add(" >> All Input clear", False)
Anzahl_validierte_Dok += 1
'tstrlbl_Info.Text = "Anzahl Dateien: " & TBPM_PROFILE_FILESTableAdapter.cmdGet_Anzahl(PROFIL_ID)
If LogErrorsOnly = False Then ClassLogger.Add(" >> Anzahl hochgesetzt", False)
If LogErrorsOnly = False Then ClassLogger.Add(" >> Validierung erfolgreich abgeschlossen", False)
ClassLogger.Add("", False)
If CURRENT_JUMP_DOC_GUID <> 0 Then
Me.Close()
Else
'Das nächste Dokument laden
Load_Next_Document(False)
set_foreground()
If first_control Is Nothing = False Then first_control.Focus()
End If
End If
'Catch ex As Exception
' errormessage = "Unvorhergesehener Fehler bei Abschluss:" & ex.Message
' My.Settings.Save()
' frmError.ShowDialog()
' ClassLogger.Add(">> Unvorhergesehener Fehler bei Abschluss: " & ex.Message, True)
'End Try
'wenn Move2Folder aktiviert wurde
If Move2Folder <> "" Then
idxerr_message = allgFunk.Move2Folder(Document_Path, Move2Folder, CURRENT_ProfilGUID)
If idxerr_message <> "" Then
errormessage = "Fehler bei Move2Folder:" & vbNewLine & idxerr_message
My.Settings.Save()
frmError.ShowDialog()
_error = True
End If
End If
'Validierungsfile löschen wenn vorhanden
allgFunk.Delete_xffres(Document_Path)
If LogErrorsOnly = False Then ClassLogger.Add(" >> Delete_xffres ausgeführt", False)
If LogErrorsOnly = False Then ClassLogger.Add(" >> All Input clear", False)
Anzahl_validierte_Dok += 1
'tstrlbl_Info.Text = "Anzahl Dateien: " & TBPM_PROFILE_FILESTableAdapter.cmdGet_Anzahl(PROFIL_ID)
If LogErrorsOnly = False Then ClassLogger.Add(" >> Anzahl hochgesetzt", False)
If LogErrorsOnly = False Then ClassLogger.Add(" >> Validierung erfolgreich abgeschlossen", False)
ClassLogger.Add("", False)
If CURRENT_JUMP_DOC_GUID <> 0 Then
Me.Close()
Else
'Das nächste Dokument laden
Load_Next_Document(False)
set_foreground()
If first_control Is Nothing = False Then first_control.Focus()
End If
End If
'Catch ex As Exception
' errormessage = "Unvorhergesehener Fehler bei Abschluss:" & ex.Message
' My.Settings.Save()
' frmError.ShowDialog()
' ClassLogger.Add(">> Unvorhergesehener Fehler bei Abschluss: " & ex.Message, True)
'End Try
Else
'lblerror.Visible = True
'lblerror.Text = errmessage
errormessage = errmessage

View File

@ -50,18 +50,18 @@
</Directory>
<DirectoryRef Id="INSTALLDIR">
<Component Id="MainApplicationExe" Guid="71B06048-F595-40CE-B429-79C2F2D6001B">
<File Id="MainApplicationExe" Source="..\$(var.ProgramName)\bin\$(var.Configuration)\$(var.ProgramName).exe" Name="$(var.ProgramName).exe" KeyPath="yes" Checksum="yes">
<Shortcut Id="DesktopShortcut" Directory="DesktopFolder" Name="$(var.ProductName)" WorkingDirectory="INSTALLDIR" Icon="AppIcon.exe" IconIndex="0" Advertise="yes" />
<Shortcut Id="StartMenuShortcut" Directory="ProgramMenuDir" Name="$(var.ProductName)" WorkingDirectory="INSTALLDIR" Icon="AppIcon.exe" IconIndex="0" Advertise="yes" />
</File>
</File>
</Component>
<Component Id="ReleaseNotes" Guid="D1496E4D-98C2-4849-9914-DB47D47CC6BE">
<Component Id="ReleaseNotes" Guid="D1496E4D-98C2-4849-9914-DB47D47CC6BE">
<File Id="ReleaseNote" Name="Release Notes.txt" Source="P:\Projekte DIGITAL DATA\DIGITAL DATA - Entwicklung\DD_MODULE\DD Process Manager\Release_Notes.txt" KeyPath="yes">
</File>
</Component>
<Component Id="WindreamLibs" Guid="4D11FC99-50D9-4E54-B18A-8885C9112646">
@ -77,6 +77,7 @@
<Component Id="DDLibs" Guid="BA2979E3-3778-48B8-B0D8-4B77825B9293">
<File Id="DLLLicenseManager" Name="DLLLicenseManager.dll" Source="P:\Visual Studio Projekte\Bibliotheken\DLLLicenseManager.dll" KeyPath="yes"/>
<File Id="DDLibStandards" Name="DD_LIB_Standards.dll" Source="P:\Visual Studio Projekte\Bibliotheken\DD_LIB_Standards.dll" />
</Component>
<Component Id="Oracle" Guid="CF76DB5D-3263-450F-96C6-F02F5447A0A1">
@ -88,17 +89,17 @@
</Component>
<Component Id="DevExpressLibs" Guid="CB40DAAE-348E-4BD3-B275-9A526EB8F191">
<File Id="DevExpress.Charts.v15.2.Core" Name="DevExpress.Charts.v15.2.Core.dll" Source="D:\ProgramFiles\DevExpress 15.2\Bin\Framework\DevExpress.Charts.v15.2.Core.dll"/>
<File Id="DevExpress.Data.v15.2" Name="DevExpress.Data.v15.2.dll" Source="D:\ProgramFiles\DevExpress 15.2\Bin\Framework\DevExpress.Data.v15.2.dll" KeyPath="yes"/>
<File Id="DevExpress.Images.v15.2" Name="DevExpress.Images.v15.2.dll" Source="D:\ProgramFiles\DevExpress 15.2\Bin\Framework\DevExpress.Images.v15.2.dll"/>
<File Id="DevExpress.Images.v15.2" Name="DevExpress.Images.v15.2.dll" Source="D:\ProgramFiles\DevExpress 15.2\Bin\Framework\DevExpress.Images.v15.2.dll" KeyPath="yes"/>
<File Id="DevExpress.Data.v15.2" Name="DevExpress.Data.v15.2.dll" Source="D:\ProgramFiles\DevExpress 15.2\Bin\Framework\DevExpress.Data.v15.2.dll"/>
<File Id="DevExpress.Pdf.v15.2.Core" Name="DevExpress.Pdf.v15.2.Core.dll" Source="D:\ProgramFiles\DevExpress 15.2\Bin\Framework\DevExpress.Pdf.v15.2.Core.dll"/>
<File Id="DevExpress.Pdf.v15.2.Drawing" Name="DevExpress.Pdf.v15.2.Drawing.dll" Source="D:\ProgramFiles\DevExpress 15.2\Bin\Framework\DevExpress.Pdf.v15.2.Drawing.dll" />
<File Id="DevExpress.Charts.v15.2.Core" Name="DevExpress.Charts.v15.2.Core.dll" Source="D:\ProgramFiles\DevExpress 15.2\Bin\Framework\DevExpress.Charts.v15.2.Core.dll"/>
<File Id="DevExpress.Printing.v15.2.Core" Name="DevExpress.Printing.v15.2.Core.dll" Source="D:\ProgramFiles\DevExpress 15.2\Bin\Framework\DevExpress.Printing.v15.2.Core.dll"/>
<File Id="DevExpress.Utils.v15.2" Name="DevExpress.Utils.v15.2.dll" Source="D:\ProgramFiles\DevExpress 15.2\Bin\Framework\DevExpress.Utils.v15.2.dll"/>
<File Id="DevExpress.XtraBars.v15.2" Name="DevExpress.XtraBars.v15.2.dll" Source="D:\ProgramFiles\DevExpress 15.2\Bin\Framework\DevExpress.XtraBars.v15.2.dll"/>
<File Id="DevExpress.XtraCharts.v15.2" Name="DevExpress.XtraCharts.v15.2.dll" Source="D:\ProgramFiles\DevExpress 15.2\Bin\Framework\DevExpress.XtraCharts.v15.2.dll"/>
<File Id="DevExpress.XtraCharts.v15.2.UI" Name="DevExpress.XtraCharts.v15.2.UI.dll" Source="D:\ProgramFiles\DevExpress 15.2\Bin\Framework\DevExpress.XtraCharts.v15.2.UI.dll"/>
<File Id="DevExpress.XtraCharts.v15.2.Wizard" Name="DevExpress.XtraCharts.v15.2.Wizard.dll" Source="D:\ProgramFiles\DevExpress 15.2\Bin\Framework\DevExpress.XtraCharts.v15.2.Wizard.dll"/>
<File Id="DevExpress.XtraCharts.v15.2.UI" Name="DevExpress.XtraCharts.v15.2.UI.dll" Source="D:\ProgramFiles\DevExpress 15.2\Bin\Framework\DevExpress.XtraCharts.v15.2.UI.dll"/>
<File Id="DevExpress.XtraEditors.v15.2" Name="DevExpress.XtraEditors.v15.2.dll" Source="D:\ProgramFiles\DevExpress 15.2\Bin\Framework\DevExpress.XtraEditors.v15.2.dll"/>
<File Id="DevExpress.XtraGrid.v15.2" Name="DevExpress.XtraGrid.v15.2.dll" Source="D:\ProgramFiles\DevExpress 15.2\Bin\Framework\DevExpress.XtraGrid.v15.2.dll"/>
<File Id="DevExpress.XtraLayout.v15.2" Name="DevExpress.XtraLayout.v15.2.dll" Source="D:\ProgramFiles\DevExpress 15.2\Bin\Framework\DevExpress.XtraLayout.v15.2.dll"/>