massValidator
This commit is contained in:
parent
7476639397
commit
74cb20b4ec
@ -240,10 +240,12 @@ LOGGER.Error(ex)
|
|||||||
|
|
||||||
If Path.StartsWith("\\windream") Then
|
If Path.StartsWith("\\windream") Then
|
||||||
oNormalizedPath = Path.Replace("\\windream\objects\", "")
|
oNormalizedPath = Path.Replace("\\windream\objects\", "")
|
||||||
ElseIf Path.StartsWith("\") Then
|
ElseIf Path.StartsWith("\\") Then
|
||||||
oNormalizedPath = Path.Substring(1)
|
oNormalizedPath = Path.Substring(1)
|
||||||
Else
|
ElseIf Path.StartsWith("\") Then
|
||||||
Return Path
|
Return Path
|
||||||
|
Else
|
||||||
|
Return "\" & Path
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return oNormalizedPath
|
Return oNormalizedPath
|
||||||
|
|||||||
40
app/DD_PM_WINDREAM/frmKonfig.Designer.vb
generated
40
app/DD_PM_WINDREAM/frmKonfig.Designer.vb
generated
@ -22,6 +22,7 @@ Partial Class frmKonfig
|
|||||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||||
<System.Diagnostics.DebuggerStepThrough()> _
|
<System.Diagnostics.DebuggerStepThrough()> _
|
||||||
Private Sub InitializeComponent()
|
Private Sub InitializeComponent()
|
||||||
|
Me.components = New System.ComponentModel.Container()
|
||||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmKonfig))
|
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmKonfig))
|
||||||
Me.btnuniversalview = New System.Windows.Forms.Button()
|
Me.btnuniversalview = New System.Windows.Forms.Button()
|
||||||
Me.Label13 = New System.Windows.Forms.Label()
|
Me.Label13 = New System.Windows.Forms.Label()
|
||||||
@ -44,6 +45,8 @@ Partial Class frmKonfig
|
|||||||
Me.lblSumatra = New System.Windows.Forms.Label()
|
Me.lblSumatra = New System.Windows.Forms.Label()
|
||||||
Me.txtUniversalViewer = New System.Windows.Forms.TextBox()
|
Me.txtUniversalViewer = New System.Windows.Forms.TextBox()
|
||||||
Me.TabPage2 = New System.Windows.Forms.TabPage()
|
Me.TabPage2 = New System.Windows.Forms.TabPage()
|
||||||
|
Me.RadioAlternativeConnection = New System.Windows.Forms.RadioButton()
|
||||||
|
Me.RadioDefaultConnection = New System.Windows.Forms.RadioButton()
|
||||||
Me.chkbxUserAut = New System.Windows.Forms.CheckBox()
|
Me.chkbxUserAut = New System.Windows.Forms.CheckBox()
|
||||||
Me.Label5 = New System.Windows.Forms.Label()
|
Me.Label5 = New System.Windows.Forms.Label()
|
||||||
Me.cmbDatenbank = New System.Windows.Forms.ComboBox()
|
Me.cmbDatenbank = New System.Windows.Forms.ComboBox()
|
||||||
@ -68,11 +71,10 @@ Partial Class frmKonfig
|
|||||||
Me.Button1 = New System.Windows.Forms.Button()
|
Me.Button1 = New System.Windows.Forms.Button()
|
||||||
Me.btnLogMail = New System.Windows.Forms.Button()
|
Me.btnLogMail = New System.Windows.Forms.Button()
|
||||||
Me.DD_DMSLiteDataSet = New DD_PM_WINDREAM.DD_DMSLiteDataSet()
|
Me.DD_DMSLiteDataSet = New DD_PM_WINDREAM.DD_DMSLiteDataSet()
|
||||||
Me.TBPM_KONFIGURATIONBindingSource = New System.Windows.Forms.BindingSource()
|
Me.TBPM_KONFIGURATIONBindingSource = New System.Windows.Forms.BindingSource(Me.components)
|
||||||
Me.TBPM_KONFIGURATIONTableAdapter = New DD_PM_WINDREAM.DD_DMSLiteDataSetTableAdapters.TBPM_KONFIGURATIONTableAdapter()
|
Me.TBPM_KONFIGURATIONTableAdapter = New DD_PM_WINDREAM.DD_DMSLiteDataSetTableAdapters.TBPM_KONFIGURATIONTableAdapter()
|
||||||
Me.TableAdapterManager = New DD_PM_WINDREAM.DD_DMSLiteDataSetTableAdapters.TableAdapterManager()
|
Me.TableAdapterManager = New DD_PM_WINDREAM.DD_DMSLiteDataSetTableAdapters.TableAdapterManager()
|
||||||
Me.RadioDefaultConnection = New System.Windows.Forms.RadioButton()
|
Me.Button4 = New System.Windows.Forms.Button()
|
||||||
Me.RadioAlternativeConnection = New System.Windows.Forms.RadioButton()
|
|
||||||
Me.TabControl1.SuspendLayout()
|
Me.TabControl1.SuspendLayout()
|
||||||
Me.TabPage1.SuspendLayout()
|
Me.TabPage1.SuspendLayout()
|
||||||
Me.GroupBox1.SuspendLayout()
|
Me.GroupBox1.SuspendLayout()
|
||||||
@ -240,6 +242,20 @@ Partial Class frmKonfig
|
|||||||
Me.TabPage2.Name = "TabPage2"
|
Me.TabPage2.Name = "TabPage2"
|
||||||
Me.TabPage2.UseVisualStyleBackColor = True
|
Me.TabPage2.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
|
'RadioAlternativeConnection
|
||||||
|
'
|
||||||
|
resources.ApplyResources(Me.RadioAlternativeConnection, "RadioAlternativeConnection")
|
||||||
|
Me.RadioAlternativeConnection.Name = "RadioAlternativeConnection"
|
||||||
|
Me.RadioAlternativeConnection.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'RadioDefaultConnection
|
||||||
|
'
|
||||||
|
resources.ApplyResources(Me.RadioDefaultConnection, "RadioDefaultConnection")
|
||||||
|
Me.RadioDefaultConnection.Checked = True
|
||||||
|
Me.RadioDefaultConnection.Name = "RadioDefaultConnection"
|
||||||
|
Me.RadioDefaultConnection.TabStop = True
|
||||||
|
Me.RadioDefaultConnection.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
'chkbxUserAut
|
'chkbxUserAut
|
||||||
'
|
'
|
||||||
resources.ApplyResources(Me.chkbxUserAut, "chkbxUserAut")
|
resources.ApplyResources(Me.chkbxUserAut, "chkbxUserAut")
|
||||||
@ -312,6 +328,7 @@ Partial Class frmKonfig
|
|||||||
'
|
'
|
||||||
'TabPage3
|
'TabPage3
|
||||||
'
|
'
|
||||||
|
Me.TabPage3.Controls.Add(Me.Button4)
|
||||||
Me.TabPage3.Controls.Add(Me.Label7)
|
Me.TabPage3.Controls.Add(Me.Label7)
|
||||||
Me.TabPage3.Controls.Add(Me.txtIntervall)
|
Me.TabPage3.Controls.Add(Me.txtIntervall)
|
||||||
Me.TabPage3.Controls.Add(Me.Label6)
|
Me.TabPage3.Controls.Add(Me.Label6)
|
||||||
@ -416,19 +433,11 @@ Partial Class frmKonfig
|
|||||||
Me.TableAdapterManager.TBPM_TYPETableAdapter = Nothing
|
Me.TableAdapterManager.TBPM_TYPETableAdapter = Nothing
|
||||||
Me.TableAdapterManager.UpdateOrder = DD_PM_WINDREAM.DD_DMSLiteDataSetTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete
|
Me.TableAdapterManager.UpdateOrder = DD_PM_WINDREAM.DD_DMSLiteDataSetTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete
|
||||||
'
|
'
|
||||||
'RadioDefaultConnection
|
'Button4
|
||||||
'
|
'
|
||||||
resources.ApplyResources(Me.RadioDefaultConnection, "RadioDefaultConnection")
|
resources.ApplyResources(Me.Button4, "Button4")
|
||||||
Me.RadioDefaultConnection.Checked = True
|
Me.Button4.Name = "Button4"
|
||||||
Me.RadioDefaultConnection.Name = "RadioDefaultConnection"
|
Me.Button4.UseVisualStyleBackColor = True
|
||||||
Me.RadioDefaultConnection.TabStop = True
|
|
||||||
Me.RadioDefaultConnection.UseVisualStyleBackColor = True
|
|
||||||
'
|
|
||||||
'RadioAlternativeConnection
|
|
||||||
'
|
|
||||||
resources.ApplyResources(Me.RadioAlternativeConnection, "RadioAlternativeConnection")
|
|
||||||
Me.RadioAlternativeConnection.Name = "RadioAlternativeConnection"
|
|
||||||
Me.RadioAlternativeConnection.UseVisualStyleBackColor = True
|
|
||||||
'
|
'
|
||||||
'frmKonfig
|
'frmKonfig
|
||||||
'
|
'
|
||||||
@ -501,4 +510,5 @@ Partial Class frmKonfig
|
|||||||
Friend WithEvents Label6 As System.Windows.Forms.Label
|
Friend WithEvents Label6 As System.Windows.Forms.Label
|
||||||
Friend WithEvents RadioAlternativeConnection As RadioButton
|
Friend WithEvents RadioAlternativeConnection As RadioButton
|
||||||
Friend WithEvents RadioDefaultConnection As RadioButton
|
Friend WithEvents RadioDefaultConnection As RadioButton
|
||||||
|
Friend WithEvents Button4 As Button
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -19,6 +19,7 @@ Public Class frmKonfig
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub frmKonfig_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Private Sub frmKonfig_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
Try
|
Try
|
||||||
|
|
||||||
If VIEWER_ALL = "uviewer" Then
|
If VIEWER_ALL = "uviewer" Then
|
||||||
rbuviewer.Checked = True
|
rbuviewer.Checked = True
|
||||||
Else
|
Else
|
||||||
@ -377,4 +378,26 @@ Public Class frmKonfig
|
|||||||
Private Sub RadioAlternativeConnection_CheckedChanged(sender As Object, e As EventArgs) Handles RadioAlternativeConnection.CheckedChanged
|
Private Sub RadioAlternativeConnection_CheckedChanged(sender As Object, e As EventArgs) Handles RadioAlternativeConnection.CheckedChanged
|
||||||
txtActualConnection.Text = MaskConnectionStringPassword(CONFIG.Config.ConnectionStringTest)
|
txtActualConnection.Text = MaskConnectionStringPassword(CONFIG.Config.ConnectionStringTest)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
|
||||||
|
Dim di As New IO.DirectoryInfo(Application.UserAppDataPath())
|
||||||
|
Dim diar1 As IO.FileInfo() = di.GetFiles()
|
||||||
|
Dim dra As IO.FileInfo
|
||||||
|
|
||||||
|
'list the names of all files in the specified directory
|
||||||
|
For Each dra In diar1
|
||||||
|
If dra.Name <> "UserConfig.xml" Then
|
||||||
|
Try
|
||||||
|
System.IO.File.Delete(dra.FullName)
|
||||||
|
LOGGER.Info($"ConfigFile {dra.FullName} has been deleted!")
|
||||||
|
Catch ex As Exception
|
||||||
|
|
||||||
|
End Try
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
MsgBox("The UserConfiguration has been set back to default!", MsgBoxStyle.OkOnly)
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
@ -936,18 +936,22 @@ Public Class frmMain
|
|||||||
Else
|
Else
|
||||||
CMFileStart.Enabled = True
|
CMFileStart.Enabled = True
|
||||||
End If
|
End If
|
||||||
|
If CURRENT_CLICKED_PROFILE_ID > 0 Then
|
||||||
|
CMGroupStart.Enabled = True
|
||||||
|
End If
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CMFileStart_Click(sender As Object, e As EventArgs) Handles CMFileStart.Click
|
Private Sub CMFileStart_Click(sender As Object, e As EventArgs) Handles CMFileStart.Click
|
||||||
Item_Scope()
|
Item_Scope("CMROW")
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub Item_Scope()
|
Private Sub Item_Scope(startedFrom As String)
|
||||||
Try
|
Try
|
||||||
'GridView_Docs.EndSelection()
|
'GridView_Docs.EndSelection()
|
||||||
CURRENT_JUMP_DOC_GUID = 0
|
CURRENT_JUMP_DOC_GUID = 0
|
||||||
Dim hitInfo As GridHitInfo = GridView_Docs.CalcHitInfo(GridCursorLocation)
|
Dim hitInfo As GridHitInfo = GridView_Docs.CalcHitInfo(GridCursorLocation)
|
||||||
|
|
||||||
Dim groupRowText
|
Dim groupRowText
|
||||||
Dim PROFIL_ID
|
Dim PROFIL_ID
|
||||||
If hitInfo.InGroupRow Then
|
If hitInfo.InGroupRow Then
|
||||||
@ -987,7 +991,7 @@ Public Class frmMain
|
|||||||
|
|
||||||
Dim expression As String
|
Dim expression As String
|
||||||
expression = "PROFILE_ID = " & PROFIL_ID
|
expression = "PROFILE_ID = " & PROFIL_ID
|
||||||
If hitInfo.InGroupRow Then
|
If hitInfo.InGroupRow Or (startedFrom = "CMGROUP" And hitInfo.InDataRow) Then
|
||||||
CURRENT_JUMP_DOC_GUID = 0
|
CURRENT_JUMP_DOC_GUID = 0
|
||||||
CURRENT_DOC_GUID = 0
|
CURRENT_DOC_GUID = 0
|
||||||
CURRENT_ProfilGUID = PROFIL_ID
|
CURRENT_ProfilGUID = PROFIL_ID
|
||||||
@ -1123,7 +1127,7 @@ Public Class frmMain
|
|||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CMGroupStart_Click(sender As Object, e As EventArgs) Handles CMGroupStart.Click
|
Private Sub CMGroupStart_Click(sender As Object, e As EventArgs) Handles CMGroupStart.Click
|
||||||
Item_Scope()
|
Item_Scope("CMGROUP")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub NavBarItemOverview_LinkClicked(sender As Object, e As NavBarLinkEventArgs) Handles NavBarItemOverview.LinkClicked
|
Private Sub NavBarItemOverview_LinkClicked(sender As Object, e As NavBarLinkEventArgs) Handles NavBarItemOverview.LinkClicked
|
||||||
@ -1427,7 +1431,7 @@ Public Class frmMain
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub GridView_Docs_DoubleClick(sender As Object, e As EventArgs) Handles GridView_Docs.DoubleClick
|
Private Sub GridView_Docs_DoubleClick(sender As Object, e As EventArgs) Handles GridView_Docs.DoubleClick
|
||||||
Item_Scope()
|
Item_Scope("DOUBLECLICK")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub GridView_Docs_CustomDrawGroupRow(sender As Object, e As Views.Base.RowObjectCustomDrawEventArgs) Handles GridView_Docs.CustomDrawGroupRow
|
Private Sub GridView_Docs_CustomDrawGroupRow(sender As Object, e As Views.Base.RowObjectCustomDrawEventArgs) Handles GridView_Docs.CustomDrawGroupRow
|
||||||
@ -1478,8 +1482,10 @@ Public Class frmMain
|
|||||||
' Ein/Ausklappen verhindern
|
' Ein/Ausklappen verhindern
|
||||||
DXMouseEventArgs.GetMouseArgs(e).Handled = True
|
DXMouseEventArgs.GetMouseArgs(e).Handled = True
|
||||||
GridViewItem_Clicked = "GROUP"
|
GridViewItem_Clicked = "GROUP"
|
||||||
|
CURRENT_CLICKED_PROFILE_ID = GridView_Docs.GetRowCellValue(GridView_Docs.GetDataRowHandleByGroupRowHandle(hi.RowHandle), GridView_Docs.Columns("PROFILE_ID"))
|
||||||
ElseIf hi.InDataRow Then
|
ElseIf hi.InDataRow Then
|
||||||
GridViewItem_Clicked = "ROW"
|
GridViewItem_Clicked = "ROW"
|
||||||
|
Dim profileid = CURRENT_CLICKED_PROFILE_ID
|
||||||
Else
|
Else
|
||||||
GridViewItem_Clicked = Nothing
|
GridViewItem_Clicked = Nothing
|
||||||
End If
|
End If
|
||||||
|
|||||||
@ -5,7 +5,7 @@ Imports DD_LIB_Standards
|
|||||||
Imports DigitalData.Controls.LookupGrid
|
Imports DigitalData.Controls.LookupGrid
|
||||||
|
|
||||||
Public Class frmMassValidator
|
Public Class frmMassValidator
|
||||||
Dim DT_PROFILE_CONTROLS As DataTable
|
Private DTCONTROLS As DataTable
|
||||||
|
|
||||||
Private Delimiter As String
|
Private Delimiter As String
|
||||||
Private PROFIL_VEKTORINDEX As String
|
Private PROFIL_VEKTORINDEX As String
|
||||||
@ -18,7 +18,7 @@ Public Class frmMassValidator
|
|||||||
Private FORM_Shown As Boolean = False
|
Private FORM_Shown As Boolean = False
|
||||||
Private _dependingControl_in_action As Boolean = False
|
Private _dependingControl_in_action As Boolean = False
|
||||||
|
|
||||||
Private errmessage As String
|
Private oErrorMessage As String
|
||||||
Private _windream As New ClassWindream_allgemein
|
Private _windream As New ClassWindream_allgemein
|
||||||
'Private _windreamPM As New ClassPMWindream
|
'Private _windreamPM As New ClassPMWindream
|
||||||
Private _allgFunk As New ClassAllgemeineFunktionen
|
Private _allgFunk As New ClassAllgemeineFunktionen
|
||||||
@ -54,7 +54,7 @@ Public Class frmMassValidator
|
|||||||
Size = My.Settings.frmMassValidatorSize
|
Size = My.Settings.frmMassValidatorSize
|
||||||
End If
|
End If
|
||||||
Try
|
Try
|
||||||
DT_PROFILE_CONTROLS = ClassDatabase.Return_Datatable("SELECT * FROM TBPM_PROFILE_CONTROLS WHERE SQL_UEBERPRUEFUNG NOT LIKE '%WMI%' AND PROFIL_ID = " & CURRENT_ProfilGUID)
|
DTCONTROLS = ClassDatabase.Return_Datatable("SELECT * FROM TBPM_PROFILE_CONTROLS WHERE SQL_UEBERPRUEFUNG NOT LIKE '%WMI%' AND PROFIL_ID = " & CURRENT_ProfilGUID)
|
||||||
LOGGER.Debug("Profile Data geladen")
|
LOGGER.Debug("Profile Data geladen")
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
@ -125,10 +125,10 @@ Public Class frmMassValidator
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Sub Load_Controls()
|
Sub Load_Controls()
|
||||||
'Try
|
Try
|
||||||
pnldesigner.Controls.Clear()
|
pnldesigner.Controls.Clear()
|
||||||
|
|
||||||
For Each oControlRow As DataRow In DT_PROFILE_CONTROLS.Rows
|
For Each oControlRow As DataRow In DTCONTROLS.Rows
|
||||||
Dim ctrl As Control
|
Dim ctrl As Control
|
||||||
|
|
||||||
Select Case oControlRow.Item("CTRL_TYPE").ToString.ToUpper
|
Select Case oControlRow.Item("CTRL_TYPE").ToString.ToUpper
|
||||||
@ -151,7 +151,7 @@ Public Class frmMassValidator
|
|||||||
|
|
||||||
AddHandler cmb.SelectedValueChanged, AddressOf OnCmbselectedIndex
|
AddHandler cmb.SelectedValueChanged, AddressOf OnCmbselectedIndex
|
||||||
#Region "CONTROL LIST"
|
#Region "CONTROL LIST"
|
||||||
If ClassControlCreator.GET_CONTROL_PROPERTIES(DT_PROFILE_CONTROLS, cmb.Name) = 0 Then
|
If ClassControlCreator.GET_CONTROL_PROPERTIES(DTCONTROLS, cmb.Name) = 0 Then
|
||||||
MsgBox("Unexpected Error in getting control-properties (CMB load) - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
|
MsgBox("Unexpected Error in getting control-properties (CMB load) - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@ -287,13 +287,32 @@ Public Class frmMassValidator
|
|||||||
Case "CHK"
|
Case "CHK"
|
||||||
LOGGER.Debug("Versuch Checkbox zu laden")
|
LOGGER.Debug("Versuch Checkbox zu laden")
|
||||||
|
|
||||||
ctrl = ClassControlCreator.CreateExisingCheckbox(oControlRow, False)
|
ctrl = ClassControlCreator.CreateExisingCheckbox(oControlRow, False)
|
||||||
Case "LINE"
|
Case "LINE"
|
||||||
LOGGER.Debug("Versuch Linie zu laden")
|
LOGGER.Debug("Versuch Linie zu laden")
|
||||||
|
|
||||||
ctrl = ClassControlCreator.CreateExistingLine(oControlRow, False)
|
ctrl = ClassControlCreator.CreateExistingLine(oControlRow, False)
|
||||||
Case "LOOKUP"
|
Case "LOOKUP"
|
||||||
ctrl = ClassControlCreator.CreateExistingLookupControl(oControlRow, False)
|
Dim lookup As LookupControl2 = ClassControlCreator.CreateExistingLookupControl(oControlRow, False)
|
||||||
|
ctrl = lookup
|
||||||
|
lookup.PreventDuplicates = oControlRow.Item("VKT_PREVENT_MULTIPLE_VALUES")
|
||||||
|
lookup.AllowAddNewValues = oControlRow.Item("VKT_ADD_ITEM")
|
||||||
|
lookup.MultiSelect = oControlRow.Item("MULTISELECT")
|
||||||
|
|
||||||
|
'If NotNull(oControlRow.Item("DEFAULT_VALUE"), "") <> "" Then
|
||||||
|
' lookup.SelectedValues = New List(Of String) From {oControlRow.Item("DEFAULT_VALUE")}
|
||||||
|
'End If
|
||||||
|
|
||||||
|
''Wenn Multiselect false dann prüfen ob abhängiges Control
|
||||||
|
If CBool(oControlRow.Item("MULTISELECT")) = False Then
|
||||||
|
Dim filteredData As DataTable = DTCONTROLS.Clone()
|
||||||
|
Dim oExpression = $"SQL_UEBERPRUEFUNG like '%#CTRL#{ctrl.Name}%'"
|
||||||
|
DTCONTROLS.Select(oExpression).CopyToDataTable(filteredData, LoadOption.PreserveChanges)
|
||||||
|
If filteredData.Rows.Count = 1 Then
|
||||||
|
AddHandler lookup.EditValueChanged, AddressOf onLookUp1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Case "TABLE"
|
Case "TABLE"
|
||||||
LOGGER.Debug("Versuch Tabelle zu laden")
|
LOGGER.Debug("Versuch Tabelle zu laden")
|
||||||
|
|
||||||
@ -325,16 +344,66 @@ Public Class frmMassValidator
|
|||||||
For Each oControl As Control In pnldesigner.Controls
|
For Each oControl As Control In pnldesigner.Controls
|
||||||
LoadSimpleData(oControl, oControl.Tag)
|
LoadSimpleData(oControl, oControl.Tag)
|
||||||
Next
|
Next
|
||||||
'Catch ex As Exception
|
Catch ex As Exception
|
||||||
' If LogErrorsOnly = False Then MsgBox("Error Load_Controls: " & ex.Message, MsgBoxStyle.Critical, "Attention error:")
|
LOGGER.Info("Unvorhergesehener Fehler bei Load_Controls:" & ex.Message)
|
||||||
' allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Error Load_Controls: " & ex.Message, Environment.UserName)
|
LOGGER.Info("")
|
||||||
' LOGGER.Info("Unvorhergesehener Fehler bei Load_Controls:" & ex.Message)
|
|
||||||
' LOGGER.Info("")
|
|
||||||
|
|
||||||
'End Try
|
End Try
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
Public Sub onLookUp1(sender As Object, e As System.EventArgs)
|
||||||
|
If FORM_Shown = False Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
Dim oLookup As LookupControl2 = sender
|
||||||
|
Try
|
||||||
|
If Not IsNothing(oLookup.SelectedValues) Then
|
||||||
|
If oLookup.SelectedValues.Count = 1 Then
|
||||||
|
Dim oLOOKUPValue = oLookup.SelectedValues.Item(0)
|
||||||
|
Dim oLOOKUPName = oLookup.Name
|
||||||
|
|
||||||
|
Dim oControlID = oLookup.Tag
|
||||||
|
Dim filteredData As DataTable = DTCONTROLS.Clone()
|
||||||
|
Dim oExpression = $"SQL_UEBERPRUEFUNG like '%#CTRL#{oLOOKUPName}%'"
|
||||||
|
DTCONTROLS.Select(oExpression).CopyToDataTable(filteredData, LoadOption.PreserveChanges)
|
||||||
|
If filteredData.Rows.Count = 1 Then
|
||||||
|
Dim oDEPENDING_GUID = filteredData.Rows(0).Item("GUID")
|
||||||
|
Dim oDEPENDING_CtrlName = filteredData.Rows(0).Item("NAME")
|
||||||
|
If _dependingControl_in_action = True Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not IsDBNull(filteredData.Rows(0).Item("CONNECTION_ID")) And Not IsDBNull(filteredData.Rows(0).Item("SQL_UEBERPRUEFUNG")) Then
|
||||||
|
Dim oSqlCommand = IIf(IsDBNull(filteredData.Rows(0).Item("SQL_UEBERPRUEFUNG")), "", filteredData.Rows(0).Item("SQL_UEBERPRUEFUNG"))
|
||||||
|
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, pnldesigner, CURRENT_WMFILE, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL)
|
||||||
|
LOGGER.Debug(">>> sql after ReplaceAllValues: " & oSqlCommand)
|
||||||
|
_dependingControl_in_action = True
|
||||||
|
Dim oDTDEPENDING_RESULT As DataTable = ClassDatabase.Return_Datatable(oSqlCommand)
|
||||||
|
Try
|
||||||
|
Dim oDependingLookup As LookupControl2 = pnldesigner.Controls.Find(oDEPENDING_CtrlName, False).FirstOrDefault()
|
||||||
|
For Each oControl As Control In pnldesigner.Controls
|
||||||
|
If oControl.Tag = oDEPENDING_GUID Then
|
||||||
|
Dim oDependingLookup1 As LookupControl2 = oControl
|
||||||
|
oDependingLookup1.DataSource = oDTDEPENDING_RESULT
|
||||||
|
_dependingControl_in_action = False
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
LOGGER.Warn($"Could not get the lookupconbtrol for name {oDEPENDING_CtrlName}")
|
||||||
|
_dependingControl_in_action = False
|
||||||
|
End Try
|
||||||
|
SendKeys.Send("{TAB}")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
LOGGER.Error(ex)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
Sub FillIndexValues()
|
Sub FillIndexValues()
|
||||||
Dim controltype As String
|
Dim controltype As String
|
||||||
Dim indexname As String
|
Dim indexname As String
|
||||||
@ -344,7 +413,7 @@ Public Class frmMassValidator
|
|||||||
For Each inctrl As Control In Me.pnldesigner.Controls
|
For Each inctrl As Control In Me.pnldesigner.Controls
|
||||||
|
|
||||||
Dim CONTROL_ID = inctrl.Tag
|
Dim CONTROL_ID = inctrl.Tag
|
||||||
Dim controlRow = (From form In DT_PROFILE_CONTROLS.AsEnumerable' DD_DMSLiteDataSet.VWPM_CONTROL_INDEX.AsEnumerable()
|
Dim controlRow = (From form In DTCONTROLS.AsEnumerable' DD_DMSLiteDataSet.VWPM_CONTROL_INDEX.AsEnumerable()
|
||||||
Select form
|
Select form
|
||||||
Where form.Item("GUID") = CONTROL_ID).Single()
|
Where form.Item("GUID") = CONTROL_ID).Single()
|
||||||
|
|
||||||
@ -736,12 +805,12 @@ Public Class frmMassValidator
|
|||||||
|
|
||||||
If (e.KeyCode = Keys.Return) Or (e.KeyCode = Keys.Tab) Or (e.KeyCode = Keys.Enter) Then
|
If (e.KeyCode = Keys.Return) Or (e.KeyCode = Keys.Tab) Or (e.KeyCode = Keys.Enter) Then
|
||||||
Try
|
Try
|
||||||
If ClassControlCreator.GET_CONTROL_PROPERTIES(DT_PROFILE_CONTROLS, box.Name) = 0 Then
|
If ClassControlCreator.GET_CONTROL_PROPERTIES(DTCONTROLS, box.Name) = 0 Then
|
||||||
MsgBox("Unexpected Error in getting control-properties - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
|
MsgBox("Unexpected Error in getting control-properties - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ClassControlCreator.GET_DEPENDING_CONTROLS(DT_PROFILE_CONTROLS, box.Name) = False Then
|
If ClassControlCreator.GET_DEPENDING_CONTROLS(DTCONTROLS, box.Name) = False Then
|
||||||
MsgBox("Unexpected Error in getting dependent controls - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
|
MsgBox("Unexpected Error in getting dependent controls - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@ -761,7 +830,7 @@ Public Class frmMassValidator
|
|||||||
LOGGER.Info("Unexpected Error in displaying SQL-result for control: " & ROW.Item(0).ToString & " - ERROR: " & ex.Message)
|
LOGGER.Info("Unexpected Error in displaying SQL-result for control: " & ROW.Item(0).ToString & " - ERROR: " & ex.Message)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
@ -808,12 +877,12 @@ Public Class frmMassValidator
|
|||||||
Dim cmb As ComboBox = sender
|
Dim cmb As ComboBox = sender
|
||||||
If cmb.SelectedIndex <> -1 And CTRLS_Loaded = True And FORM_Shown = True Then
|
If cmb.SelectedIndex <> -1 And CTRLS_Loaded = True And FORM_Shown = True Then
|
||||||
' Try
|
' Try
|
||||||
If ClassControlCreator.GET_CONTROL_PROPERTIES(DT_PROFILE_CONTROLS, cmb.Name) = 0 Then
|
If ClassControlCreator.GET_CONTROL_PROPERTIES(DTCONTROLS, cmb.Name) = 0 Then
|
||||||
MsgBox("Unexpected Error in getting control-properties CMB - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
|
MsgBox("Unexpected Error in getting control-properties CMB - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ClassControlCreator.GET_DEPENDING_CONTROLS(DT_PROFILE_CONTROLS, cmb.Name) = False Then
|
If ClassControlCreator.GET_DEPENDING_CONTROLS(DTCONTROLS, cmb.Name) = False Then
|
||||||
MsgBox("Unexpected Error in getting dependent controls CMB- Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
|
MsgBox("Unexpected Error in getting dependent controls CMB- Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@ -851,12 +920,12 @@ Public Class frmMassValidator
|
|||||||
Public Sub onDGVRowValidating(ByVal sender As Object, ByVal e As DataGridViewCellCancelEventArgs)
|
Public Sub onDGVRowValidating(ByVal sender As Object, ByVal e As DataGridViewCellCancelEventArgs)
|
||||||
Dim dgv As DataGridView = sender
|
Dim dgv As DataGridView = sender
|
||||||
Try
|
Try
|
||||||
If ClassControlCreator.GET_CONTROL_PROPERTIES(DT_PROFILE_CONTROLS, dgv.Name) = 0 Then
|
If ClassControlCreator.GET_CONTROL_PROPERTIES(DTCONTROLS, dgv.Name) = 0 Then
|
||||||
MsgBox("Unexpected Error in getting control-properties DGV - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
|
MsgBox("Unexpected Error in getting control-properties DGV - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ClassControlCreator.GET_DEPENDING_CONTROLS(DT_PROFILE_CONTROLS, dgv.Name) = False Then
|
If ClassControlCreator.GET_DEPENDING_CONTROLS(DTCONTROLS, dgv.Name) = False Then
|
||||||
MsgBox("Unexpected Error in getting dependent controls DGV- Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
|
MsgBox("Unexpected Error in getting dependent controls DGV- Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@ -1014,7 +1083,7 @@ Public Class frmMassValidator
|
|||||||
btnSave.Enabled = False
|
btnSave.Enabled = False
|
||||||
|
|
||||||
'Eingaben auf Form überprüfen
|
'Eingaben auf Form überprüfen
|
||||||
If Check_UpdateIndexe() = False Then
|
If CheckAndUpdateIndices() = False Then
|
||||||
|
|
||||||
Dim workedFiles As Integer
|
Dim workedFiles As Integer
|
||||||
For Each docrow As DataRow In CURRENT_DT_MASS_CHANGE_DOCS.Rows
|
For Each docrow As DataRow In CURRENT_DT_MASS_CHANGE_DOCS.Rows
|
||||||
@ -1022,7 +1091,14 @@ Public Class frmMassValidator
|
|||||||
CURRENT_DOC_GUID = docrow.Item("DOC_GUID")
|
CURRENT_DOC_GUID = docrow.Item("DOC_GUID")
|
||||||
Dim WMDOC As WMObject
|
Dim WMDOC As WMObject
|
||||||
Try
|
Try
|
||||||
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH"))
|
Dim oRelPath = docrow.Item("FULL_PATH").ToString
|
||||||
|
If oRelPath.StartsWith("\\") Then
|
||||||
|
oRelPath = oRelPath.Replace("\\", "\")
|
||||||
|
If oRelPath.StartsWith("\") = False Then
|
||||||
|
oRelPath = "\" & oRelPath
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, oRelPath)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
LOGGER.Info("error while creating WMObject in (IndexVKTMultipleFiles): " & ex.Message)
|
LOGGER.Info("error while creating WMObject in (IndexVKTMultipleFiles): " & ex.Message)
|
||||||
@ -1198,59 +1274,132 @@ Public Class frmMassValidator
|
|||||||
Else
|
Else
|
||||||
'lblerror.Visible = True
|
'lblerror.Visible = True
|
||||||
'lblerror.Text = errmessage
|
'lblerror.Text = errmessage
|
||||||
errormessage = errmessage
|
errormessage = oErrorMessage
|
||||||
frmError.ShowDialog()
|
frmError.ShowDialog()
|
||||||
End If
|
End If
|
||||||
btnSave.Enabled = True
|
btnSave.Enabled = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Function Check_UpdateIndexe()
|
Function CheckAndUpdateIndices()
|
||||||
' Try
|
' Try
|
||||||
|
|
||||||
Dim missing As Boolean = False
|
Dim oMissing As Boolean = False
|
||||||
'Jedes Control auf panel durchlaufen
|
'Jedes Control auf panel durchlaufen
|
||||||
For Each inctrl As Control In Me.pnldesigner.Controls
|
For Each oControl As Control In Me.pnldesigner.Controls
|
||||||
'Der input der Box,Cmb muss jedes mal geleert werden
|
'Der input der Box,Cmb muss jedes mal geleert werden
|
||||||
Dim input As String = ""
|
Dim input As String = ""
|
||||||
'Jedes Control in Konfig Tab durchlaufn
|
'Jedes Control in Konfig Tab durchlaufn
|
||||||
For Each dr As DataRow In DT_PROFILE_CONTROLS.Rows
|
For Each dr As DataRow In DTCONTROLS.Rows
|
||||||
If dr.Item("CTRL_TYPE") = "LBL" Or dr.Item("CTRL_TYPE") = "LINE" Then
|
If dr.Item("CTRL_TYPE") = "LBL" Or dr.Item("CTRL_TYPE") = "LINE" Then
|
||||||
Continue For
|
Continue For
|
||||||
End If
|
End If
|
||||||
'Den Indexnamen auslesen
|
'Den Indexnamen auslesen
|
||||||
Dim _IDXName As String = dr.Item("INDEX_NAME")
|
Dim oIndexname As String = dr.Item("INDEX_NAME")
|
||||||
Dim _MUSSEINGABE As Boolean = CBool(dr.Item("VALIDATION"))
|
Dim _MUSSEINGABE As Boolean = CBool(dr.Item("VALIDATION"))
|
||||||
Dim _READ_ONLY As Boolean = CBool(dr.Item("READ_ONLY"))
|
Dim _READ_ONLY As Boolean = CBool(dr.Item("READ_ONLY"))
|
||||||
Dim Typ As String = dr.Item("CTRL_TYPE")
|
Dim Typ As String = dr.Item("CTRL_TYPE")
|
||||||
Dim CONTROL_ID As String = dr.Item("GUID")
|
Dim CONTROL_ID As String = dr.Item("GUID")
|
||||||
Dim ctrl = dr.Item("NAME")
|
Dim ctrl = dr.Item("NAME")
|
||||||
'Nur wenn der Name der Zeile entspricht und der Index READ_ONLY FALSE ist
|
'Nur wenn der Name der Zeile entspricht und der Index READ_ONLY FALSE ist
|
||||||
If dr.Item("NAME") = inctrl.Name And (_READ_ONLY = False Or dr.Item("SQL_UEBERPRUEFUNG") <> "") And _IDXName <> "DD PM-ONLY FOR DISPLAY" Then
|
If dr.Item("NAME") = oControl.Name And (_READ_ONLY = False Or dr.Item("SQL_UEBERPRUEFUNG") <> "") And oIndexname <> "DD PM-ONLY FOR DISPLAY" Then
|
||||||
LOGGER.Debug("Indexierung für Control (" & CONTROL_ID & ") '" & ctrl & "' gestartet. Indexname '" & _IDXName & "'")
|
LOGGER.Debug("Indexierung für Control (" & CONTROL_ID & ") '" & ctrl & "' gestartet. Indexname '" & oIndexname & "'")
|
||||||
If _IDXName = "" Then
|
If oIndexname = "" Then
|
||||||
LOGGER.Info(" >> Indexname is unexpected empty.")
|
LOGGER.Info(" >> Indexname is unexpected empty.")
|
||||||
Continue For
|
Continue For
|
||||||
End If
|
End If
|
||||||
Dim Type As String = inctrl.GetType.ToString
|
Dim Type As String = oControl.GetType.ToString
|
||||||
Select Case Type
|
Select Case Type
|
||||||
|
Case "DigitalData.Controls.LookupGrid.LookupControl2"
|
||||||
|
Try
|
||||||
|
Dim myLookup As LookupControl2 = oControl
|
||||||
|
|
||||||
|
'Wenn kein Wert ausgewählt wurde und der Index aber gesetzt werden muss
|
||||||
|
If myLookup.SelectedValues.Count = 0 And _MUSSEINGABE = True Then
|
||||||
|
oMissing = True
|
||||||
|
oErrorMessage = $"No selection in LookUpGrid '{oControl.Name}'"
|
||||||
|
oControl.BackColor = Color.Red
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
If myLookup.MultiSelect = True Then
|
||||||
|
Dim Zeilen As Integer = myLookup.SelectedValues.Count
|
||||||
|
|
||||||
|
'Wenn kein Wert ausgewählt wurde und der Index aber gesetzt werden muss
|
||||||
|
If Zeilen > 0 Then
|
||||||
|
Dim ZeilenGrid As Integer = 0
|
||||||
|
Dim myVektorArr As String()
|
||||||
|
'Jeden Werte des Datagridviews durchlaufen
|
||||||
|
For Each value As String In myLookup.SelectedValues
|
||||||
|
If value Is Nothing = False Then
|
||||||
|
'Das Array anpassen
|
||||||
|
ReDim Preserve myVektorArr(ZeilenGrid)
|
||||||
|
'Den Wert im Array speichern
|
||||||
|
myVektorArr(ZeilenGrid) = value
|
||||||
|
ZeilenGrid += 1
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
'Jetzt die Datei indexieren
|
||||||
|
If IndexMultipleFiles(oIndexname, myVektorArr) = False Then
|
||||||
|
oMissing = True
|
||||||
|
oErrorMessage = "Fehler beim Indexieren von LookupGrid - 1337: "
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Dim oValues As New List(Of Object) From {String.Empty}
|
||||||
|
If IndexMultipleFiles(oIndexname, "") = False Then
|
||||||
|
oMissing = True
|
||||||
|
oErrorMessage = "Fehler beim Indexieren von LookupGrid - 1345: "
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
input = myLookup.SelectedValues.FirstOrDefault()
|
||||||
|
If oIndexname.StartsWith("[%VKT") Then
|
||||||
|
input = Return_PM_VEKTOR(input, oIndexname)
|
||||||
|
'Hier muss nun separat als Vektorfeld indexiert werden
|
||||||
|
If IndexVKTMultipleFiles(input, PROFIL_VEKTORINDEX) = True Then
|
||||||
|
oMissing = True
|
||||||
|
oErrorMessage = "Error while indexing LookupGrid with VEKTOR - Check the log and inform Your sysadmin"
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Dim result() As String
|
||||||
|
ReDim Preserve result(0)
|
||||||
|
result(0) = input
|
||||||
|
If IndexMultipleFiles(oIndexname, result) = False Then
|
||||||
|
oMissing = True
|
||||||
|
oErrorMessage = "Error while indexing LookupGrid - Check the log and inform Your sysadmin"
|
||||||
|
Exit For
|
||||||
|
Else
|
||||||
|
'Nun das Logging
|
||||||
|
If PROFIL_LOGINDEX <> "" Then
|
||||||
|
input = Return_LOGString(input, input, oIndexname)
|
||||||
|
IndexVKTMultipleFiles(input, PROFIL_LOGINDEX)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
LOGGER.Error(ex)
|
||||||
|
End Try
|
||||||
Case "System.Windows.Forms.TextBox"
|
Case "System.Windows.Forms.TextBox"
|
||||||
Try
|
Try
|
||||||
'Als erstes überprüfen ob überhaupt etwas eingetragen worden ist
|
'Als erstes überprüfen ob überhaupt etwas eingetragen worden ist
|
||||||
If Check_Missing(inctrl, "txt") = True And _MUSSEINGABE = True Then 'NICHTS EINGETRAGEN
|
If Check_Missing(oControl, "txt") = True And _MUSSEINGABE = True Then 'NICHTS EINGETRAGEN
|
||||||
missing = True
|
oMissing = True
|
||||||
errmessage = "Missing input in textbox '" & inctrl.Name & "'"
|
oErrorMessage = "Missing input in textbox '" & oControl.Name & "'"
|
||||||
inctrl.BackColor = Color.Red
|
oControl.BackColor = Color.Red
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
Else
|
||||||
input = inctrl.Text
|
input = oControl.Text
|
||||||
'Wenn der Wert in ein Vektorfeld geschrieben wird
|
'Wenn der Wert in ein Vektorfeld geschrieben wird
|
||||||
If _IDXName.StartsWith("[%VKT") Then
|
If oIndexname.StartsWith("[%VKT") Then
|
||||||
input = Return_PM_VEKTOR(input, _IDXName)
|
input = Return_PM_VEKTOR(input, oIndexname)
|
||||||
'Hier muss nun separat als Vektorfeld indexiert werden
|
'Hier muss nun separat als Vektorfeld indexiert werden
|
||||||
If IndexVKTMultipleFiles(input, PROFIL_VEKTORINDEX) = True Then
|
If IndexVKTMultipleFiles(input, PROFIL_VEKTORINDEX) = True Then
|
||||||
missing = True
|
oMissing = True
|
||||||
errmessage = "Error while indexing Textbox with VEKTOR - Check the log and inform Your sysadmin"
|
oErrorMessage = "Error while indexing Textbox with VEKTOR - Check the log and inform Your sysadmin"
|
||||||
|
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@ -1258,14 +1407,14 @@ Public Class frmMassValidator
|
|||||||
ReDim Preserve result(0)
|
ReDim Preserve result(0)
|
||||||
|
|
||||||
result(0) = input
|
result(0) = input
|
||||||
If IndexMultipleFiles(_IDXName, result) = False Then
|
If IndexMultipleFiles(oIndexname, result) = False Then
|
||||||
missing = True
|
oMissing = True
|
||||||
errmessage = "error while indexing Textbox - Check the log and inform Your sysadmin"
|
oErrorMessage = "error while indexing Textbox - Check the log and inform Your sysadmin"
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
Else
|
||||||
'Nun das Logging
|
'Nun das Logging
|
||||||
If PROFIL_LOGINDEX <> "" Then
|
If PROFIL_LOGINDEX <> "" Then
|
||||||
input = Return_LOGString(input, input, _IDXName)
|
input = Return_LOGString(input, input, oIndexname)
|
||||||
IndexVKTMultipleFiles(input, PROFIL_LOGINDEX)
|
IndexVKTMultipleFiles(input, PROFIL_LOGINDEX)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@ -1281,59 +1430,24 @@ Public Class frmMassValidator
|
|||||||
Return True
|
Return True
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Case "System.Windows.Forms.ComboBox"
|
|
||||||
Dim cmb As ComboBox = inctrl
|
|
||||||
'Wenn kein Wert ausgewählt wurde und der Index aber gesetzt werden muss
|
|
||||||
If cmb.SelectedIndex = -1 And _MUSSEINGABE = True Then
|
|
||||||
missing = True
|
|
||||||
errmessage = "Please Choose an entry out of ComboBox '" & cmb.Name & "'"
|
|
||||||
Exit For
|
|
||||||
ElseIf cmb.SelectedIndex <> -1 Then
|
|
||||||
input = cmb.Text
|
|
||||||
'Wenn der Wert in ein Vektorfeld geschrieben wird
|
|
||||||
If _IDXName.StartsWith("[%VKT") Then
|
|
||||||
input = Return_PM_VEKTOR(input, _IDXName)
|
|
||||||
'Hier muss nun separat als Vektorfeld indexiert werden
|
|
||||||
If IndexVKTMultipleFiles(input, PROFIL_VEKTORINDEX) = True Then
|
|
||||||
missing = True
|
|
||||||
errmessage = "Error while indexing Combobox with VEKTOR - Check the log and inform Your sysadmin"
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
Dim result() As String
|
|
||||||
ReDim Preserve result(0)
|
|
||||||
result(0) = input
|
|
||||||
If IndexMultipleFiles(_IDXName, result) = False Then
|
|
||||||
cmb.DroppedDown = True
|
|
||||||
missing = True
|
|
||||||
errmessage = "error while indexing Combobox - Check the log and inform Your sysadmin"
|
|
||||||
Exit For
|
|
||||||
Else
|
|
||||||
'Nun das Logging
|
|
||||||
If PROFIL_LOGINDEX <> "" Then
|
|
||||||
input = Return_LOGString(input, input, _IDXName)
|
|
||||||
IndexVKTMultipleFiles(input, PROFIL_LOGINDEX)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Case "System.Windows.Forms.DateTimePicker"
|
Case "System.Windows.Forms.DateTimePicker"
|
||||||
Dim dtp As DateTimePicker = inctrl
|
Dim dtp As DateTimePicker = oControl
|
||||||
'Wenn kein Wert ausgewählt wurde und der Index aber gesetzt werden muss
|
'Wenn kein Wert ausgewählt wurde und der Index aber gesetzt werden muss
|
||||||
If _MUSSEINGABE = True And dtp.Value.ToString = String.Empty Then
|
If _MUSSEINGABE = True And dtp.Value.ToString = String.Empty Then
|
||||||
missing = True
|
oMissing = True
|
||||||
errmessage = "Please Choose DateValue for field'" & dtp.Name & "'"
|
oErrorMessage = "Please Choose DateValue for field'" & dtp.Name & "'"
|
||||||
Exit For
|
Exit For
|
||||||
ElseIf dtp.Value.ToString <> "01.01.0001 00:00:00" Then
|
ElseIf dtp.Value.ToString <> "01.01.0001 00:00:00" Then
|
||||||
input = CDate(dtp.Value)
|
input = CDate(dtp.Value)
|
||||||
'Wenn der WErt in ein Vektorfeld geschrieben wird
|
'Wenn der WErt in ein Vektorfeld geschrieben wird
|
||||||
If _IDXName.StartsWith("[%VKT") Then
|
If oIndexname.StartsWith("[%VKT") Then
|
||||||
'Input = die String komponente als String
|
'Input = die String komponente als String
|
||||||
input = Return_PM_VEKTOR(input, _IDXName)
|
input = Return_PM_VEKTOR(input, oIndexname)
|
||||||
'Hier muss nun separat als Vektorfeld indexiert werden
|
'Hier muss nun separat als Vektorfeld indexiert werden
|
||||||
If IndexVKTMultipleFiles(input, PROFIL_VEKTORINDEX) = True Then
|
If IndexVKTMultipleFiles(input, PROFIL_VEKTORINDEX) = True Then
|
||||||
missing = True
|
oMissing = True
|
||||||
errmessage = "Error while indexing DatePicker with VEKTOR - Check the log and inform Your sysadmin"
|
oErrorMessage = "Error while indexing DatePicker with VEKTOR - Check the log and inform Your sysadmin"
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@ -1341,14 +1455,14 @@ Public Class frmMassValidator
|
|||||||
ReDim Preserve result(0)
|
ReDim Preserve result(0)
|
||||||
result(0) = CDate(input)
|
result(0) = CDate(input)
|
||||||
'MsgBox(_IDXName)
|
'MsgBox(_IDXName)
|
||||||
If IndexMultipleFiles(_IDXName, result) = False Then
|
If IndexMultipleFiles(oIndexname, result) = False Then
|
||||||
missing = True
|
oMissing = True
|
||||||
errmessage = "Error while indexing DatePicker - Check the log and inform Your sysadmin"
|
oErrorMessage = "Error while indexing DatePicker - Check the log and inform Your sysadmin"
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
Else
|
||||||
'Nun das Logging
|
'Nun das Logging
|
||||||
If PROFIL_LOGINDEX <> "" Then
|
If PROFIL_LOGINDEX <> "" Then
|
||||||
input = Return_LOGString(input, input, _IDXName)
|
input = Return_LOGString(input, input, oIndexname)
|
||||||
IndexVKTMultipleFiles(input, PROFIL_LOGINDEX)
|
IndexVKTMultipleFiles(input, PROFIL_LOGINDEX)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@ -1358,12 +1472,12 @@ Public Class frmMassValidator
|
|||||||
LOGGER.Debug("DateValue is 01.01.0001 00:00:00")
|
LOGGER.Debug("DateValue is 01.01.0001 00:00:00")
|
||||||
End If
|
End If
|
||||||
Case "System.Windows.Forms.CheckBox"
|
Case "System.Windows.Forms.CheckBox"
|
||||||
Dim chk As CheckBox = inctrl
|
Dim chk As CheckBox = oControl
|
||||||
input = chk.Checked.ToString
|
input = chk.Checked.ToString
|
||||||
|
|
||||||
If chk.Checked = False And _MUSSEINGABE = True Then
|
If chk.Checked = False And _MUSSEINGABE = True Then
|
||||||
missing = True
|
oMissing = True
|
||||||
errmessage = "Option '" & chk.Name & "' is required."
|
oErrorMessage = "Option '" & chk.Name & "' is required."
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -1376,32 +1490,32 @@ Public Class frmMassValidator
|
|||||||
result(0) = 0
|
result(0) = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If _IDXName.StartsWith("[%VKT") Then
|
If oIndexname.StartsWith("[%VKT") Then
|
||||||
'Input = die String komponente mit Boolean als String
|
'Input = die String komponente mit Boolean als String
|
||||||
input = Return_PM_VEKTOR(chk.Checked.ToString, _IDXName)
|
input = Return_PM_VEKTOR(chk.Checked.ToString, oIndexname)
|
||||||
'Hier muss nun separat als Vektorfeld indexiert werden
|
'Hier muss nun separat als Vektorfeld indexiert werden
|
||||||
If IndexVKTMultipleFiles(input, PROFIL_VEKTORINDEX) = True Then
|
If IndexVKTMultipleFiles(input, PROFIL_VEKTORINDEX) = True Then
|
||||||
missing = True
|
oMissing = True
|
||||||
errmessage = "Error while indexing Checkbox with VEKTOR - Check the log and inform Your sysadmin"
|
oErrorMessage = "Error while indexing Checkbox with VEKTOR - Check the log and inform Your sysadmin"
|
||||||
|
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If IndexMultipleFiles(_IDXName, result) = False Then
|
If IndexMultipleFiles(oIndexname, result) = False Then
|
||||||
missing = True
|
oMissing = True
|
||||||
errmessage = "error while indexing Checkbox - Check the log and inform Your sysadmin"
|
oErrorMessage = "error while indexing Checkbox - Check the log and inform Your sysadmin"
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
Else
|
||||||
'Nun das Logging
|
'Nun das Logging
|
||||||
If PROFIL_LOGINDEX <> "" Then
|
If PROFIL_LOGINDEX <> "" Then
|
||||||
input = Return_LOGString(CBool(result(0)).ToString, result(0).ToString, _IDXName)
|
input = Return_LOGString(CBool(result(0)).ToString, result(0).ToString, oIndexname)
|
||||||
IndexVKTMultipleFiles(input, PROFIL_LOGINDEX)
|
IndexVKTMultipleFiles(input, PROFIL_LOGINDEX)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Case "System.Windows.Forms.DataGridView"
|
Case "System.Windows.Forms.DataGridView"
|
||||||
Dim dgv As DataGridView = inctrl
|
Dim dgv As DataGridView = oControl
|
||||||
|
|
||||||
Dim Zeilen As Integer = 0
|
Dim Zeilen As Integer = 0
|
||||||
For Each row As DataGridViewRow In dgv.Rows
|
For Each row As DataGridViewRow In dgv.Rows
|
||||||
@ -1413,8 +1527,8 @@ Public Class frmMassValidator
|
|||||||
Next
|
Next
|
||||||
'Wenn kein Wert ausgewählt wurde und der Index aber gesetzt werden muss
|
'Wenn kein Wert ausgewählt wurde und der Index aber gesetzt werden muss
|
||||||
If _MUSSEINGABE = True And Zeilen = 0 Then
|
If _MUSSEINGABE = True And Zeilen = 0 Then
|
||||||
missing = True
|
oMissing = True
|
||||||
errmessage = "Missing input in vectorfield'" & dgv.Name & "'"
|
oErrorMessage = "Missing input in vectorfield'" & dgv.Name & "'"
|
||||||
Exit For
|
Exit For
|
||||||
ElseIf Zeilen > 0 Then
|
ElseIf Zeilen > 0 Then
|
||||||
Dim ZeilenGrid As Integer = 0
|
Dim ZeilenGrid As Integer = 0
|
||||||
@ -1455,9 +1569,9 @@ Public Class frmMassValidator
|
|||||||
|
|
||||||
Next
|
Next
|
||||||
'Jetzt die Datei indexieren
|
'Jetzt die Datei indexieren
|
||||||
If IndexMultipleFiles(_IDXName, myVektorArr) = False Then
|
If IndexMultipleFiles(oIndexname, myVektorArr) = False Then
|
||||||
missing = True
|
oMissing = True
|
||||||
errmessage = "error while indexing Vektorfeld - Check the log and inform Your sysadmin"
|
oErrorMessage = "error while indexing Vektorfeld - Check the log and inform Your sysadmin"
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@ -1466,7 +1580,7 @@ Public Class frmMassValidator
|
|||||||
Next
|
Next
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Return missing
|
Return oMissing
|
||||||
|
|
||||||
'Catch ex As Exception
|
'Catch ex As Exception
|
||||||
' Dim st As New StackTrace(True)
|
' Dim st As New StackTrace(True)
|
||||||
@ -1491,9 +1605,19 @@ Public Class frmMassValidator
|
|||||||
Dim _allfine As Boolean = True
|
Dim _allfine As Boolean = True
|
||||||
Try
|
Try
|
||||||
For Each docrow As DataRow In CURRENT_DT_MASS_CHANGE_DOCS.Rows
|
For Each docrow As DataRow In CURRENT_DT_MASS_CHANGE_DOCS.Rows
|
||||||
|
If docrow.Item("DOC_ID") = 0 Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
Dim WMDOC As WMObject
|
Dim WMDOC As WMObject
|
||||||
Try
|
Try
|
||||||
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH"))
|
Dim oRelPath = docrow.Item("FULL_PATH").ToString
|
||||||
|
If oRelPath.StartsWith("\\") Then
|
||||||
|
oRelPath = oRelPath.Replace("\\", "\")
|
||||||
|
ElseIf oRelPath.StartsWith("\") = False Then
|
||||||
|
oRelPath = "\" & oRelPath
|
||||||
|
|
||||||
|
End If
|
||||||
|
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, oRelPath)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
LOGGER.Info("error while creating WMObject in (IndexMultipleFiles): " & ex.Message)
|
LOGGER.Info("error while creating WMObject in (IndexMultipleFiles): " & ex.Message)
|
||||||
|
|||||||
@ -58,6 +58,7 @@ Public Class frmValidator
|
|||||||
Private _frmValidatorSearch As frmValidatorSearch 'You need a reference to Form1
|
Private _frmValidatorSearch As frmValidatorSearch 'You need a reference to Form1
|
||||||
Private _dependingControl_in_action As Boolean = False
|
Private _dependingControl_in_action As Boolean = False
|
||||||
Private DTCONTROLS As DataTable
|
Private DTCONTROLS As DataTable
|
||||||
|
Private FormLoaded As Boolean = False
|
||||||
|
|
||||||
<DllImport("user32.dll", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)>
|
<DllImport("user32.dll", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)>
|
||||||
Public Shared Function SetForegroundWindow(ByVal hwnd As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean
|
Public Shared Function SetForegroundWindow(ByVal hwnd As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean
|
||||||
@ -305,7 +306,7 @@ Public Class frmValidator
|
|||||||
pdfxchange = False
|
pdfxchange = False
|
||||||
sumatra = False
|
sumatra = False
|
||||||
RibbonControl1.Minimized = True
|
RibbonControl1.Minimized = True
|
||||||
|
FormLoaded = False
|
||||||
|
|
||||||
|
|
||||||
If My.Settings.frmValidatorPosition.IsEmpty = False Then
|
If My.Settings.frmValidatorPosition.IsEmpty = False Then
|
||||||
@ -1002,6 +1003,9 @@ Public Class frmValidator
|
|||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub onLookUp1(sender As Object, e As System.EventArgs)
|
Public Sub onLookUp1(sender As Object, e As System.EventArgs)
|
||||||
|
If FormLoaded = False Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
Dim oLookup As LookupControl2 = sender
|
Dim oLookup As LookupControl2 = sender
|
||||||
Try
|
Try
|
||||||
If Not IsNothing(oLookup.SelectedValues) Then
|
If Not IsNothing(oLookup.SelectedValues) Then
|
||||||
@ -1492,6 +1496,7 @@ Public Class frmValidator
|
|||||||
|
|
||||||
LOGGER.Debug("Dokument-GUID: '" & CURRENT_DOC_GUID.ToString & "'")
|
LOGGER.Debug("Dokument-GUID: '" & CURRENT_DOC_GUID.ToString & "'")
|
||||||
If CURRENT_DOC_GUID > 0 Then
|
If CURRENT_DOC_GUID > 0 Then
|
||||||
|
|
||||||
'Beschriftung des Navigators
|
'Beschriftung des Navigators
|
||||||
'lblNavigator_anzDok.Text = position & " of " & Anzahl_ValDoks & " files"
|
'lblNavigator_anzDok.Text = position & " of " & Anzahl_ValDoks & " files"
|
||||||
If myWMDocumentPath <> String.Empty Then
|
If myWMDocumentPath <> String.Empty Then
|
||||||
@ -1505,7 +1510,6 @@ Public Class frmValidator
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
CURRENT_WMFILE = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, WINDREAM.NormalizePath(myWMDocumentPath))
|
CURRENT_WMFILE = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, WINDREAM.NormalizePath(myWMDocumentPath))
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Fehler bei Erzeugen windream-Objekt - DocGUID: " & CURRENT_DOC_GUID & " - ERROR: " & ex.Message, Environment.UserName)
|
allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Fehler bei Erzeugen windream-Objekt - DocGUID: " & CURRENT_DOC_GUID & " - ERROR: " & ex.Message, Environment.UserName)
|
||||||
@ -2553,6 +2557,7 @@ Public Class frmValidator
|
|||||||
Refresh_FileList()
|
Refresh_FileList()
|
||||||
Load_Next_Document(True)
|
Load_Next_Document(True)
|
||||||
_dependingControl_in_action = False
|
_dependingControl_in_action = False
|
||||||
|
FormLoaded = True
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub btnSave_Click(sender As System.Object, e As System.EventArgs) Handles btnSave.Click
|
Private Sub btnSave_Click(sender As System.Object, e As System.EventArgs) Handles btnSave.Click
|
||||||
btnSave.Enabled = False
|
btnSave.Enabled = False
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user