Messpunkte integriert
This commit is contained in:
@@ -93,7 +93,7 @@ Public Class ClassControlCreator
|
|||||||
Public Attribute As String
|
Public Attribute As String
|
||||||
Public [ReadOnly] As Boolean = False
|
Public [ReadOnly] As Boolean = False
|
||||||
Public BackColor As Color = Color.White
|
Public BackColor As Color = Color.White
|
||||||
|
Public Property IsDirty As Boolean = False
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Public Sub New(pLogConfig As LogConfig)
|
Public Sub New(pLogConfig As LogConfig)
|
||||||
|
|||||||
@@ -73,6 +73,8 @@ Public Class ClassParamRefresh
|
|||||||
ElseIf oMode = "PM.DEBUG_LOG" Then
|
ElseIf oMode = "PM.DEBUG_LOG" Then
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
LOGCONFIG.Debug = True
|
LOGCONFIG.Debug = True
|
||||||
|
ElseIf oMode = "PM.LOG_HOTSPOTS" Then
|
||||||
|
LOG_HOTSPOTS = True
|
||||||
ElseIf oMode.StartsWith("OPERATION_MODE_FS") Then
|
ElseIf oMode.StartsWith("OPERATION_MODE_FS") Then
|
||||||
OPERATION_MODE_FS = oMode.Replace("OPERATION_MODE_FS=", "")
|
OPERATION_MODE_FS = oMode.Replace("OPERATION_MODE_FS=", "")
|
||||||
If OPERATION_MODE_FS = ClassConstants.OpModeFS_IDBWM Then
|
If OPERATION_MODE_FS = ClassConstants.OpModeFS_IDBWM Then
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
Public Property NO_DETAIL_PROFILES As Boolean = False
|
Public Property NO_DETAIL_PROFILES As Boolean = False
|
||||||
' Debug Settings
|
' Debug Settings
|
||||||
Public Property DEBUG As Boolean = False
|
Public Property DEBUG As Boolean = False
|
||||||
|
Public Property LOG_HOTSPOTS As Boolean = False
|
||||||
Public Property INDEX_DMS_ERSTELLT = "DMS erstellt"
|
Public Property INDEX_DMS_ERSTELLT = "DMS erstellt"
|
||||||
Public Property INDEX_DMS_ERSTELLT_ZEIT = "DMS erstellt (Zeit)"
|
Public Property INDEX_DMS_ERSTELLT_ZEIT = "DMS erstellt (Zeit)"
|
||||||
|
|
||||||
|
|||||||
@@ -2544,10 +2544,10 @@ FROM VWPM_PROFILE_ACTIVE T WHERE T.GUID IN (SELECT PROFILE_ID FROM [dbo].[FNPM_G
|
|||||||
|
|
||||||
Handling_DEBUG_USER()
|
Handling_DEBUG_USER()
|
||||||
|
|
||||||
Dim oSQL = $"SELECT * FROM TBDD_NOTIFICATIONS_SYSTEM NOTE
|
Dim oSQL = $"SELECT * FROM TBDD_NOTIFICATIONS_SYSTEM NOTE WITH (NOLOCK)
|
||||||
INNER JOIN (SELECT * FROM TBDD_NOTIFICATIONS_SYSTEM WHERE LANG_CODE = '{USER_LANGUAGE}' OR LANG_CODE = 'ALL') LANG ON NOTE.GUID = LANG.GUID
|
INNER JOIN (SELECT * FROM TBDD_NOTIFICATIONS_SYSTEM WITH (NOLOCK) WHERE LANG_CODE = '{USER_LANGUAGE}' OR LANG_CODE = 'ALL') LANG ON NOTE.GUID = LANG.GUID
|
||||||
where (CONVERT(DATE,GETDATE()) <= NOTE.DISPLAY_UNTIL or NOTE.DISPLAY_UNTIL IS NULL) AND NOTE.MODULE = 'PM'
|
where (CONVERT(DATE,GETDATE()) <= NOTE.DISPLAY_UNTIL or NOTE.DISPLAY_UNTIL IS NULL) AND NOTE.MODULE = 'PM'
|
||||||
AND NOTE.GUID NOT IN (SELECT NOTIFY_ID FROM TBDD_NOTIFICATIONS_USER_HISTORY WHERE USR_ID = {USER_ID})"
|
AND NOTE.GUID NOT IN (SELECT NOTIFY_ID FROM TBDD_NOTIFICATIONS_USER_HISTORY WITH (NOLOCK) WHERE USR_ID = {USER_ID})"
|
||||||
Dim oDT As DataTable = DatabaseFallback.GetDatatable("TBDD_NOTIFICATIONS_SYSTEM", New GetDatatableOptions(oSQL, DatabaseType.ECM))
|
Dim oDT As DataTable = DatabaseFallback.GetDatatable("TBDD_NOTIFICATIONS_SYSTEM", New GetDatatableOptions(oSQL, DatabaseType.ECM))
|
||||||
|
|
||||||
If Not IsNothing(oDT) Then
|
If Not IsNothing(oDT) Then
|
||||||
|
|||||||
@@ -178,16 +178,15 @@ Public Class frmValidator
|
|||||||
Return False ' Punkt ist außerhalb aller sichtbaren Bereiche
|
Return False ' Punkt ist außerhalb aller sichtbaren Bereiche
|
||||||
End Function
|
End Function
|
||||||
Private Sub frmValidation_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Private Sub frmValidation_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
' === MESSPUNKT 1: Start ===
|
||||||
|
Dim perfStart As DateTime = If(LOG_HOTSPOTS, DateTime.Now, Nothing)
|
||||||
|
Dim perfLastCheck As DateTime = perfStart
|
||||||
|
If LOG_HOTSPOTS Then MyValidationLogger.Info($"[PERF] frmValidation_Load START")
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|
||||||
|
|
||||||
If LOG_PERF Then PerformanceLogger.Info("frmValidation_Load")
|
|
||||||
MyValidationLogger.Debug("###frmValidation_Load###")
|
MyValidationLogger.Debug("###frmValidation_Load###")
|
||||||
MyValidationLogger.Debug("Current User Language: [{0}]", USER_LANGUAGE)
|
MyValidationLogger.Debug("Current User Language: [{0}]", USER_LANGUAGE)
|
||||||
|
|
||||||
' Operation mode is either guessed from service settings
|
|
||||||
' or explictly set from OperationModeOverride in Params
|
|
||||||
OperationMode = GetOperationMode()
|
OperationMode = GetOperationMode()
|
||||||
|
|
||||||
DD_Documentloader = New Loader(LOGCONFIG, OperationMode, Environment.Service.Client, Environment.User)
|
DD_Documentloader = New Loader(LOGCONFIG, OperationMode, Environment.Service.Client, Environment.User)
|
||||||
@@ -198,18 +197,21 @@ Public Class frmValidator
|
|||||||
SplitContainer1.Panel2Collapsed = True
|
SplitContainer1.Panel2Collapsed = True
|
||||||
first_control = Nothing
|
first_control = Nothing
|
||||||
_FormClosing = False
|
_FormClosing = False
|
||||||
|
|
||||||
_FormLoaded = False
|
_FormLoaded = False
|
||||||
|
|
||||||
|
If LOG_HOTSPOTS Then
|
||||||
|
MyValidationLogger.Info($"[PERF] Nach Initialisierung: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
|
||||||
|
perfLastCheck = DateTime.Now
|
||||||
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MyValidationLogger.Warn($"Error in frmValidation_load1: {ex.Message}")
|
MyValidationLogger.Warn($"Error in frmValidation_load1: {ex.Message}")
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
' === MESSPUNKT 3: Form-Position wiederherstellen ===
|
||||||
If My.Settings.frmValidatorPosition.IsEmpty = False Then
|
If My.Settings.frmValidatorPosition.IsEmpty = False Then
|
||||||
|
|
||||||
If IsPositionVisible(My.Settings.frmValidatorPosition) Then
|
If IsPositionVisible(My.Settings.frmValidatorPosition) Then
|
||||||
' Position ist sichtbar, das Formular wird dort angezeigt
|
|
||||||
Try
|
Try
|
||||||
ScreenEx.RestoreFormPosition(Me, My.Settings.frmValidatorPosition)
|
ScreenEx.RestoreFormPosition(Me, My.Settings.frmValidatorPosition)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@@ -222,17 +224,13 @@ Public Class frmValidator
|
|||||||
Try
|
Try
|
||||||
MyValidationLogger.Debug($"!! Invalid PositionData X({My.Settings.frmValidatorPosition.X}), Y({My.Settings.frmValidatorPosition.Y})")
|
MyValidationLogger.Debug($"!! Invalid PositionData X({My.Settings.frmValidatorPosition.X}), Y({My.Settings.frmValidatorPosition.Y})")
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
' Position ist unsichtbar, Standardposition verwenden
|
|
||||||
Me.StartPosition = FormStartPosition.CenterScreen
|
Me.StartPosition = FormStartPosition.CenterScreen
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
If My.Settings.frmValidatorSize.IsEmpty = False Then
|
If My.Settings.frmValidatorSize.IsEmpty = False Then
|
||||||
If My.Settings.frmValidatorSize.Width > 0 And My.Settings.frmValidatorSize.Height > 0 Then
|
If My.Settings.frmValidatorSize.Width > 0 And My.Settings.frmValidatorSize.Height > 0 Then
|
||||||
If My.Settings.frmValidatorWindowState = "Normal" Then
|
If My.Settings.frmValidatorWindowState = "Normal" Then
|
||||||
@@ -242,12 +240,19 @@ Public Class frmValidator
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If LOG_HOTSPOTS Then
|
||||||
|
MyValidationLogger.Info($"[PERF] Nach Position/Size: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
|
||||||
|
perfLastCheck = DateTime.Now
|
||||||
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MyValidationLogger.Info($"Error loading position: {ex.Message}")
|
MyValidationLogger.Info($"Error loading position: {ex.Message}")
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Dim _step = 0
|
Dim _step = 0
|
||||||
Try
|
Try
|
||||||
|
' === MESSPUNKT 4: DocumentViewer Init ===
|
||||||
Dim oDVSettings As New DigitalData.Controls.DocumentViewer.DocumentViewer.ToolbarSettings() With {
|
Dim oDVSettings As New DigitalData.Controls.DocumentViewer.DocumentViewer.ToolbarSettings() With {
|
||||||
.ShowPrintButton = True,
|
.ShowPrintButton = True,
|
||||||
.ShowRotateButton = True,
|
.ShowRotateButton = True,
|
||||||
@@ -256,27 +261,40 @@ Public Class frmValidator
|
|||||||
}
|
}
|
||||||
DocumentViewer1.Init(LOGCONFIG, GDPICTURE_LICENSE, oDVSettings)
|
DocumentViewer1.Init(LOGCONFIG, GDPICTURE_LICENSE, oDVSettings)
|
||||||
|
|
||||||
|
If LOG_HOTSPOTS Then
|
||||||
|
MyValidationLogger.Info($"[PERF] Nach DocumentViewer.Init: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
|
||||||
|
perfLastCheck = DateTime.Now
|
||||||
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MyValidationLogger.Error(ex)
|
MyValidationLogger.Error(ex)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Try
|
Try
|
||||||
_step = 1
|
_step = 1
|
||||||
_step = 2
|
_step = 2
|
||||||
|
|
||||||
|
' === MESSPUNKT 5: Profile Data laden (KRITISCH) ===
|
||||||
DTVWCONTROL_INDEX.Clear()
|
DTVWCONTROL_INDEX.Clear()
|
||||||
Dim oExpression = $"PROFIL_ID = {CURRENT_ProfilGUID}"
|
Dim oExpression = $"PROFIL_ID = {CURRENT_ProfilGUID}"
|
||||||
DTVWCONTROLS_INDEX.Select(oExpression, "Y_LOC, X_LOC").CopyToDataTable(DTVWCONTROL_INDEX, LoadOption.PreserveChanges)
|
DTVWCONTROLS_INDEX.Select(oExpression, "Y_LOC, X_LOC").CopyToDataTable(DTVWCONTROL_INDEX, LoadOption.PreserveChanges)
|
||||||
|
|
||||||
|
If LOG_HOTSPOTS Then
|
||||||
|
MyValidationLogger.Info($"[PERF] Nach DTVWCONTROL_INDEX laden ({DTVWCONTROL_INDEX.Rows.Count} Rows): {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
|
||||||
|
perfLastCheck = DateTime.Now
|
||||||
|
End If
|
||||||
|
|
||||||
_step = 3
|
_step = 3
|
||||||
MyValidationLogger.Debug("Profile Data loaded")
|
MyValidationLogger.Debug("Profile Data loaded")
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MyValidationLogger.Error(ex)
|
MyValidationLogger.Error(ex)
|
||||||
MsgBox("Error LOADING profile-data(" & _step.ToString & "):" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
|
MsgBox("Error LOADING profile-data(" & _step.ToString & "):" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
|
||||||
MyValidationLogger.Info(">> Error in LOADING profile-data: " & ex.Message, True)
|
MyValidationLogger.Info(">> Error in LOADING profile-data: " & ex.Message, True)
|
||||||
Me.Close()
|
Me.Close()
|
||||||
End Try
|
End Try
|
||||||
MyValidationLogger.Debug("frmValidation_Load finished till Step 3!")
|
|
||||||
|
|
||||||
|
MyValidationLogger.Debug("frmValidation_Load finished till Step 3!")
|
||||||
|
|
||||||
Try
|
Try
|
||||||
If CURRENT_DT_PROFILE.Rows.Count = 0 Then
|
If CURRENT_DT_PROFILE.Rows.Count = 0 Then
|
||||||
@@ -284,16 +302,21 @@ Public Class frmValidator
|
|||||||
MsgBox("ProfileData could not be loaded - Profile: " & CURRENT_ProfilName, MsgBoxStyle.Critical, "Attention:")
|
MsgBox("ProfileData could not be loaded - Profile: " & CURRENT_ProfilName, MsgBoxStyle.Critical, "Attention:")
|
||||||
Me.Close()
|
Me.Close()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
_step = 4
|
_step = 4
|
||||||
MyValidationLogger.Debug("Step 4")
|
MyValidationLogger.Debug("Step 4")
|
||||||
|
|
||||||
If CURRENT_DT_PROFILE.Rows.Count > 1 Then
|
If CURRENT_DT_PROFILE.Rows.Count > 1 Then
|
||||||
MsgBox("More than 1 profile (" & CURRENT_DT_PROFILE.Rows.Count & ") returned!!", MsgBoxStyle.Critical, "Attention:")
|
MsgBox("More than 1 profile (" & CURRENT_DT_PROFILE.Rows.Count & ") returned!!", MsgBoxStyle.Critical, "Attention:")
|
||||||
Else
|
Else
|
||||||
_step = 5
|
_step = 5
|
||||||
MyValidationLogger.Debug("Step 5")
|
MyValidationLogger.Debug("Step 5")
|
||||||
|
|
||||||
If CURRENT_DT_PROFILE.Rows.Count = 1 Then
|
If CURRENT_DT_PROFILE.Rows.Count = 1 Then
|
||||||
_step = 6
|
_step = 6
|
||||||
MyValidationLogger.Debug("Step 6")
|
MyValidationLogger.Debug("Step 6")
|
||||||
|
|
||||||
|
' === MESSPUNKT 6: Profile-Properties verarbeiten ===
|
||||||
For Each oProfileRow As DataRow In CURRENT_DT_PROFILE.Rows
|
For Each oProfileRow As DataRow In CURRENT_DT_PROFILE.Rows
|
||||||
PROFIL_FINISH_SQL = oProfileRow.Item("SQL_BTN_FINISH")
|
PROFIL_FINISH_SQL = oProfileRow.Item("SQL_BTN_FINISH")
|
||||||
PROFIL_VEKTORINDEX = oProfileRow.Item("PM_VEKTOR_INDEX")
|
PROFIL_VEKTORINDEX = oProfileRow.Item("PM_VEKTOR_INDEX")
|
||||||
@@ -305,6 +328,13 @@ Public Class frmValidator
|
|||||||
REJECTION_ACTIVE = False
|
REJECTION_ACTIVE = False
|
||||||
PROFIL_LOGINDEX = oProfileRow.Item("LOG_INDEX")
|
PROFIL_LOGINDEX = oProfileRow.Item("LOG_INDEX")
|
||||||
CURRENT_PROFILE_LOG_INDEX = PROFIL_LOGINDEX
|
CURRENT_PROFILE_LOG_INDEX = PROFIL_LOGINDEX
|
||||||
|
|
||||||
|
If LOG_HOTSPOTS Then
|
||||||
|
MyValidationLogger.Info($"[PERF] Nach Profile-Properties: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
|
||||||
|
perfLastCheck = DateTime.Now
|
||||||
|
End If
|
||||||
|
|
||||||
|
' === MESSPUNKT 7: Language-Strings laden (potentiell langsam) ===
|
||||||
Dim oProfileTitle As String = ""
|
Dim oProfileTitle As String = ""
|
||||||
Dim oProfileDescription As String = ""
|
Dim oProfileDescription As String = ""
|
||||||
|
|
||||||
@@ -327,6 +357,11 @@ Public Class frmValidator
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
If LOG_HOTSPOTS Then
|
||||||
|
MyValidationLogger.Info($"[PERF] Nach Language-Loop ({CURRENT_DT_PROFILE_LANGUAGE.Rows.Count} Rows): {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
|
||||||
|
perfLastCheck = DateTime.Now
|
||||||
|
End If
|
||||||
|
|
||||||
If oProfileTitle = "" Then
|
If oProfileTitle = "" Then
|
||||||
oProfileTitle = oProfileRow.Item("TITLE")
|
oProfileTitle = oProfileRow.Item("TITLE")
|
||||||
End If
|
End If
|
||||||
@@ -355,6 +390,8 @@ Public Class frmValidator
|
|||||||
|
|
||||||
finalProfile = oProfileRow.Item("FINAL_PROFILE")
|
finalProfile = oProfileRow.Item("FINAL_PROFILE")
|
||||||
Move2Folder = IIf(IsDBNull(oProfileRow.Item("MOVE2Folder")), "", oProfileRow.Item("MOVE2Folder"))
|
Move2Folder = IIf(IsDBNull(oProfileRow.Item("MOVE2Folder")), "", oProfileRow.Item("MOVE2Folder"))
|
||||||
|
|
||||||
|
' === MESSPUNKT 8: Button-Texte setzen ===
|
||||||
Try
|
Try
|
||||||
If finalProfile = True Then
|
If finalProfile = True Then
|
||||||
If oProfileFinalText = "" Then
|
If oProfileFinalText = "" Then
|
||||||
@@ -362,41 +399,45 @@ Public Class frmValidator
|
|||||||
Else
|
Else
|
||||||
oProfileFinalText = $"{oProfileFinalText} (F2)"
|
oProfileFinalText = $"{oProfileFinalText} (F2)"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
btnSave.Text = oProfileFinalText
|
btnSave.Text = oProfileFinalText
|
||||||
Else
|
Else
|
||||||
oProfileFinalText = IIf(IsDBNull(oProfileRow.Item("FINAL_TEXT")), "", oProfileRow.Item("FINAL_TEXT") & (" (F2)"))
|
oProfileFinalText = IIf(IsDBNull(oProfileRow.Item("FINAL_TEXT")), "", oProfileRow.Item("FINAL_TEXT") & (" (F2)"))
|
||||||
'btnSave.Text = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("frmValidator.ValidationButton")
|
|
||||||
If oProfileFinalText = String.Empty Then
|
If oProfileFinalText = String.Empty Then
|
||||||
oProfileFinalText = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("frmValidator.ValidationButton")
|
oProfileFinalText = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("frmValidator.ValidationButton")
|
||||||
End If
|
End If
|
||||||
btnSave.Text = oProfileFinalText
|
btnSave.Text = oProfileFinalText
|
||||||
End If
|
End If
|
||||||
MyValidationLogger.Debug("Buttontext validation loaded")
|
MyValidationLogger.Debug("Buttontext validation loaded")
|
||||||
|
|
||||||
|
If LOG_HOTSPOTS Then
|
||||||
|
MyValidationLogger.Info($"[PERF] Nach Button-Setup: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
|
||||||
|
perfLastCheck = DateTime.Now
|
||||||
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MyValidationLogger.Error(ex)
|
MyValidationLogger.Error(ex)
|
||||||
MsgBox("Error loading final profile text:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
|
MsgBox("Error loading final profile text:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
|
||||||
MyValidationLogger.Info(">> Error loading final profile text: " & ex.Message, True)
|
MyValidationLogger.Info(">> Error loading final profile text: " & ex.Message, True)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
' === MESSPUNKT 9: Rejection/NotResponsible-Buttons konfigurieren ===
|
||||||
Dim PROF_BTN_RE_CAPT = oProfileRow.Item("BTN_REJECT_CAPTION")
|
Dim PROF_BTN_RE_CAPT = oProfileRow.Item("BTN_REJECT_CAPTION")
|
||||||
Dim PROF_SQL_BTN_REJECT = oProfileRow.Item("SQL_BTN_REJECT")
|
Dim PROF_SQL_BTN_REJECT = oProfileRow.Item("SQL_BTN_REJECT")
|
||||||
oProfile_REJECT_SQL_REASONS = oProfileRow.Item("REJECT_SQL_REASONS")
|
oProfile_REJECT_SQL_REASONS = oProfileRow.Item("REJECT_SQL_REASONS")
|
||||||
oProfile_NOT_RESP_SQL = oProfileRow.Item("NOT_RESP_SQL")
|
oProfile_NOT_RESP_SQL = oProfileRow.Item("NOT_RESP_SQL")
|
||||||
|
|
||||||
|
|
||||||
If oProfileRejectionText = String.Empty Then
|
If oProfileRejectionText = String.Empty Then
|
||||||
oProfileRejectionText = PROF_BTN_RE_CAPT
|
oProfileRejectionText = PROF_BTN_RE_CAPT
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MyValidationLogger.Debug($"oProfileRejectionText: " + oProfileRejectionText)
|
MyValidationLogger.Debug($"oProfileRejectionText: " + oProfileRejectionText)
|
||||||
MyValidationLogger.Debug($"oProfile_REJECT_SQL_REASONS: " + oProfile_REJECT_SQL_REASONS)
|
MyValidationLogger.Debug($"oProfile_REJECT_SQL_REASONS: " + oProfile_REJECT_SQL_REASONS)
|
||||||
MyValidationLogger.Debug($"oProfileNotResponsibleText: " + oProfileNotResponsibleText)
|
MyValidationLogger.Debug($"oProfileNotResponsibleText: " + oProfileNotResponsibleText)
|
||||||
MyValidationLogger.Debug($"oProfile_NOT_RESP_SQL: " + oProfile_NOT_RESP_SQL)
|
MyValidationLogger.Debug($"oProfile_NOT_RESP_SQL: " + oProfile_NOT_RESP_SQL)
|
||||||
MyValidationLogger.Debug($"oProfileRejectionText: " + oProfileRejectionText)
|
|
||||||
Dim functBtnReject As Boolean = False
|
Dim functBtnReject As Boolean = False
|
||||||
Dim functBtnNR As Boolean = False
|
Dim functBtnNR As Boolean = False
|
||||||
|
|
||||||
If oProfileRejectionText <> String.Empty And oProfile_REJECT_SQL_REASONS <> String.Empty Then
|
If oProfileRejectionText <> String.Empty And oProfile_REJECT_SQL_REASONS <> String.Empty Then
|
||||||
functBtnReject = True
|
functBtnReject = True
|
||||||
End If
|
End If
|
||||||
@@ -405,6 +446,7 @@ Public Class frmValidator
|
|||||||
functBtnNR = True
|
functBtnNR = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If functBtnReject = False And functBtnNR = False Then
|
If functBtnReject = False And functBtnNR = False Then
|
||||||
MyValidationLogger.Debug($"!Keine Ablehnung und Nicht zuständig Funktion konfiguriert!")
|
MyValidationLogger.Debug($"!Keine Ablehnung und Nicht zuständig Funktion konfiguriert!")
|
||||||
SplitContainerReject_NotResp.Visible = False
|
SplitContainerReject_NotResp.Visible = False
|
||||||
@@ -454,16 +496,20 @@ Public Class frmValidator
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If LOG_HOTSPOTS Then
|
||||||
|
MyValidationLogger.Info($"[PERF] Nach Rejection/NR-Setup: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
|
||||||
|
perfLastCheck = DateTime.Now
|
||||||
|
End If
|
||||||
|
|
||||||
bbtniNext.Visibility = BarItemVisibility.Never
|
bbtniNext.Visibility = BarItemVisibility.Never
|
||||||
If CURRENT_JUMP_DOC_GUID <> 0 Then
|
If CURRENT_JUMP_DOC_GUID <> 0 Then
|
||||||
Amount_Docs2Validate = 1
|
Amount_Docs2Validate = 1
|
||||||
Else
|
Else
|
||||||
|
|
||||||
Amount_Docs2Validate = 0
|
Amount_Docs2Validate = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
MyValidationLogger.Debug(" >> profiledata saved:")
|
MyValidationLogger.Debug(" >> profiledata saved:")
|
||||||
MyValidationLogger.Debug(" >> finalProfile: " & finalProfile)
|
MyValidationLogger.Debug(" >> finalProfile: " & finalProfile)
|
||||||
MyValidationLogger.Debug(" >> Move2Folder: " & Move2Folder)
|
MyValidationLogger.Debug(" >> Move2Folder: " & Move2Folder)
|
||||||
@@ -471,38 +517,43 @@ Public Class frmValidator
|
|||||||
|
|
||||||
PROFIL_sortbynewest = CURRENT_DT_PROFILE.Rows(0).Item("SORT_BY_LATEST")
|
PROFIL_sortbynewest = CURRENT_DT_PROFILE.Rows(0).Item("SORT_BY_LATEST")
|
||||||
MyValidationLogger.Debug("PROFIL_sortbynewest: " & PROFIL_sortbynewest.ToString)
|
MyValidationLogger.Debug("PROFIL_sortbynewest: " & PROFIL_sortbynewest.ToString)
|
||||||
'Delete Button anzeigen ja/nein
|
|
||||||
If USER_RIGHT_FILE_DELETE = True Then
|
If USER_RIGHT_FILE_DELETE = True Then
|
||||||
bbtniDelete.Visibility = BarItemVisibility.Always
|
bbtniDelete.Visibility = BarItemVisibility.Always
|
||||||
|
|
||||||
Else
|
Else
|
||||||
bbtniDelete.Visibility = BarItemVisibility.Never
|
bbtniDelete.Visibility = BarItemVisibility.Never
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CBool(CURRENT_DT_PROFILE.Rows(0).Item("ANNOTATE_WORK_HISTORY_ENTRY")) = True Then
|
If CBool(CURRENT_DT_PROFILE.Rows(0).Item("ANNOTATE_WORK_HISTORY_ENTRY")) = True Then
|
||||||
bbtniAnnotation.Visibility = BarItemVisibility.Always
|
bbtniAnnotation.Visibility = BarItemVisibility.Always
|
||||||
|
|
||||||
Else
|
Else
|
||||||
bbtniAnnotation.Visibility = BarItemVisibility.Never
|
bbtniAnnotation.Visibility = BarItemVisibility.Never
|
||||||
End If
|
End If
|
||||||
|
|
||||||
MyValidationLogger.Debug("Right_Delete: " & USER_RIGHT_FILE_DELETE.ToString)
|
MyValidationLogger.Debug("Right_Delete: " & USER_RIGHT_FILE_DELETE.ToString)
|
||||||
|
|
||||||
|
' === MESSPUNKT 10: Create_Controls (KRITISCH - wahrscheinlich größter Hotspot) ===
|
||||||
|
If LOG_HOTSPOTS Then MyValidationLogger.Info($"[PERF] Vor Create_Controls")
|
||||||
Create_Controls()
|
Create_Controls()
|
||||||
|
If LOG_HOTSPOTS Then
|
||||||
|
MyValidationLogger.Info($"[PERF] Nach Create_Controls: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
|
||||||
|
perfLastCheck = DateTime.Now
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
'oErrMsgMissingInput = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("frmValidator.MissingInput")
|
|
||||||
' oErrMsgMissingInput = S.Bitte_validieren_Sie_die_rot_markierten_Felder_
|
|
||||||
|
|
||||||
' frmError.ShowDialog()
|
|
||||||
MyValidationLogger.Debug("frmValidation_Load finished!")
|
MyValidationLogger.Debug("frmValidation_Load finished!")
|
||||||
|
|
||||||
|
' === MESSPUNKT 11: Gesamt-Zeit ===
|
||||||
|
If LOG_HOTSPOTS Then
|
||||||
|
MyValidationLogger.Info($"[PERF] GESAMT frmValidation_Load: {(DateTime.Now - perfStart).TotalMilliseconds}ms")
|
||||||
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MyValidationLogger.Error(ex)
|
MyValidationLogger.Error(ex)
|
||||||
MsgBox("Error LOADING Profile-Data1:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
|
MsgBox("Error LOADING Profile-Data1:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
|
||||||
MyValidationLogger.Info("Unexpected error in LOADING Profile-Data1: " & ex.Message)
|
MyValidationLogger.Info("Unexpected error in LOADING Profile-Data1: " & ex.Message)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
@@ -936,6 +987,7 @@ Public Class frmValidator
|
|||||||
AddHandler txt.GotFocus, AddressOf OnTextBoxFocus
|
AddHandler txt.GotFocus, AddressOf OnTextBoxFocus
|
||||||
AddHandler txt.LostFocus, AddressOf OnTextBoxLostFocus
|
AddHandler txt.LostFocus, AddressOf OnTextBoxLostFocus
|
||||||
AddHandler txt.KeyUp, AddressOf OnTextBoxKeyUp
|
AddHandler txt.KeyUp, AddressOf OnTextBoxKeyUp
|
||||||
|
AddHandler txt.EditValueChanged, AddressOf OnTextBoxEditValueChanged
|
||||||
|
|
||||||
oMyControl = txt
|
oMyControl = txt
|
||||||
MyValidationLogger.Debug($"[{oControlInfo}] - TXT Created!!")
|
MyValidationLogger.Debug($"[{oControlInfo}] - TXT Created!!")
|
||||||
@@ -1144,7 +1196,8 @@ Public Class frmValidator
|
|||||||
|
|
||||||
Dim oGrid = ControlCreator.CreateExistingGridControl(oControlRow, oFilteredDatatable, False, DocCurrency)
|
Dim oGrid = ControlCreator.CreateExistingGridControl(oControlRow, oFilteredDatatable, False, DocCurrency)
|
||||||
oMyControl = oGrid
|
oMyControl = oGrid
|
||||||
'AddHandler oGrid.Views(0).c AddressOf GridView_CustomColumnDisplayText
|
' NEU: GridView Event registrieren
|
||||||
|
AddHandler DirectCast(oGrid.MainView, GridView).CellValueChanged, AddressOf GridView_CellValueChanged
|
||||||
Case "LINE"
|
Case "LINE"
|
||||||
|
|
||||||
oMyControl = ControlCreator.CreateExistingLine(oControlRow, False)
|
oMyControl = ControlCreator.CreateExistingLine(oControlRow, False)
|
||||||
@@ -1243,13 +1296,19 @@ Public Class frmValidator
|
|||||||
If oMeta.ReadOnly = False Then
|
If oMeta.ReadOnly = False Then
|
||||||
oTextbox.BackColor = oMeta.BackColor
|
oTextbox.BackColor = oMeta.BackColor
|
||||||
oTextbox.ForeColor = GraphicsEx.GetContrastedColor(oMeta.BackColor)
|
oTextbox.ForeColor = GraphicsEx.GetContrastedColor(oMeta.BackColor)
|
||||||
|
End If
|
||||||
|
|
||||||
|
' NEU: Dirty-Flag setzen - OHNE .Modified Property
|
||||||
|
' Stattdessen prüfen wir, ob das Control bereits als dirty markiert wurde
|
||||||
|
' oder setzen es bei jedem LostFocus (einfachste Lösung)
|
||||||
|
If Not oMeta.IsDirty Then
|
||||||
|
oMeta.IsDirty = True
|
||||||
|
MyValidationLogger.Debug($"Control [{oMeta.Name}] marked as dirty")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
SetControlValues_FromControl(oTextbox)
|
SetControlValues_FromControl(oTextbox)
|
||||||
Controls2beEnabled(oTextbox.Name)
|
Controls2beEnabled(oTextbox.Name)
|
||||||
ControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER)
|
ControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function GetControlID(ByVal PROFILEID As Integer, Controlname As String)
|
Private Function GetControlID(ByVal PROFILEID As Integer, Controlname As String)
|
||||||
@@ -1257,7 +1316,19 @@ Public Class frmValidator
|
|||||||
|
|
||||||
Next
|
Next
|
||||||
End Function
|
End Function
|
||||||
|
Private Sub OnTextBoxEditValueChanged(sender As Object, e As EventArgs)
|
||||||
|
If _FormLoaded = False Or _Indexe_Loaded = False Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oTextbox As BaseEdit = sender
|
||||||
|
Dim oMeta As ClassControlCreator.ControlMetadata = oTextbox.Tag
|
||||||
|
|
||||||
|
If Not oMeta.IsDirty Then
|
||||||
|
oMeta.IsDirty = True
|
||||||
|
MyValidationLogger.Debug($"TextBox [{oMeta.Name}] marked as dirty")
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Public Sub OnTextBoxKeyUp(sender As Object, e As KeyEventArgs)
|
Public Sub OnTextBoxKeyUp(sender As Object, e As KeyEventArgs)
|
||||||
If _ControlHandleStarted = True Then
|
If _ControlHandleStarted = True Then
|
||||||
@@ -1566,6 +1637,18 @@ Public Class frmValidator
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
Dim oLookup As RepositoryItemLookupControl3 = sender
|
Dim oLookup As RepositoryItemLookupControl3 = sender
|
||||||
|
' NEU: Dirty-Flag setzen - Suche den zugehörigen LookupControl
|
||||||
|
For Each oControl In PanelValidatorControl.Controls
|
||||||
|
If TypeOf oControl Is LookupControl3 Then
|
||||||
|
Dim oLookupControl As LookupControl3 = DirectCast(oControl, LookupControl3)
|
||||||
|
If oLookupControl.Properties Is oLookup Then
|
||||||
|
Dim oMeta As ClassControlCreator.ControlMetadata = oLookupControl.Tag
|
||||||
|
oMeta.IsDirty = True
|
||||||
|
MyValidationLogger.Debug($"LookupControl [{oMeta.Name}] marked as dirty")
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
listChangedLookup.Add(oLookup.Name)
|
listChangedLookup.Add(oLookup.Name)
|
||||||
|
|
||||||
ControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER)
|
ControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER)
|
||||||
@@ -1589,7 +1672,14 @@ Public Class frmValidator
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Sub GridView_CellValueChanged(sender As Object, e As DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs)
|
||||||
|
Dim oView As GridView = sender
|
||||||
|
Dim oGrid As GridControl = oView.GridControl
|
||||||
|
Dim oMeta As ClassControlCreator.ControlMetadata = oGrid.Tag
|
||||||
|
|
||||||
|
oMeta.IsDirty = True
|
||||||
|
MyValidationLogger.Debug($"GridControl [{oMeta.Name}] marked as dirty (Row {e.RowHandle}, Col {e.Column.FieldName})")
|
||||||
|
End Sub
|
||||||
Public Sub onCheckBox_CheckedChange(sender As Object, e As EventArgs)
|
Public Sub onCheckBox_CheckedChange(sender As Object, e As EventArgs)
|
||||||
MyValidationLogger.Debug("onCheckBox_CheckedChange")
|
MyValidationLogger.Debug("onCheckBox_CheckedChange")
|
||||||
|
|
||||||
@@ -1597,6 +1687,11 @@ Public Class frmValidator
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Dim oCheckbox As CheckBox = sender
|
Dim oCheckbox As CheckBox = sender
|
||||||
|
' Dirty-Flag setzen
|
||||||
|
Dim oMeta As ClassControlCreator.ControlMetadata = oCheckbox.Tag
|
||||||
|
oMeta.IsDirty = True
|
||||||
|
MyValidationLogger.Debug($"CheckBox [{oMeta.Name}] marked as dirty")
|
||||||
|
|
||||||
Try
|
Try
|
||||||
CheckBox_DependingControls(oCheckbox)
|
CheckBox_DependingControls(oCheckbox)
|
||||||
Checkbox_EnablingControls(oCheckbox)
|
Checkbox_EnablingControls(oCheckbox)
|
||||||
@@ -2189,6 +2284,10 @@ Public Class frmValidator
|
|||||||
Public Sub OnCmbselectedIndex(sender As System.Object, e As System.EventArgs)
|
Public Sub OnCmbselectedIndex(sender As System.Object, e As System.EventArgs)
|
||||||
Dim oCombobox As Windows.Forms.ComboBox = sender
|
Dim oCombobox As Windows.Forms.ComboBox = sender
|
||||||
If oCombobox.SelectedIndex <> -1 And _Indexe_Loaded = True Then
|
If oCombobox.SelectedIndex <> -1 And _Indexe_Loaded = True Then
|
||||||
|
' Dirty-Flag setzen
|
||||||
|
Dim oMeta As ClassControlCreator.ControlMetadata = oCombobox.Tag
|
||||||
|
oMeta.IsDirty = True
|
||||||
|
MyValidationLogger.Debug($"ComboBox [{oMeta.Name}] marked as dirty")
|
||||||
If oCombobox.Name = last_control.Name Then
|
If oCombobox.Name = last_control.Name Then
|
||||||
'Abschluss()
|
'Abschluss()
|
||||||
Else
|
Else
|
||||||
@@ -4894,41 +4993,59 @@ Public Class frmValidator
|
|||||||
Dim oControlId As String
|
Dim oControlId As String
|
||||||
Try
|
Try
|
||||||
Dim oMissing As Boolean = False
|
Dim oMissing As Boolean = False
|
||||||
'Jedes Control auf panel durchlaufen
|
|
||||||
|
' ========== OPTIMIERUNG: Nur geänderte Controls durchlaufen ==========
|
||||||
For Each oControl As Control In Me.PanelValidatorControl.Controls
|
For Each oControl As Control In Me.PanelValidatorControl.Controls
|
||||||
'Der input der Box,Cmb muss jedes mal geleert werden
|
Dim oMeta As ClassControlCreator.ControlMetadata = Nothing
|
||||||
Dim oMyInput As String = ""
|
Try
|
||||||
'Jedes Control in Konfig Tab durchlaufn
|
oMeta = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata)
|
||||||
For Each oControlRow As DataRow In DTVWCONTROL_INDEX.Rows
|
Catch
|
||||||
|
Continue For ' Control ohne Metadata überspringen
|
||||||
|
End Try
|
||||||
|
|
||||||
|
' Suche die Control-Definition
|
||||||
|
Dim oControlRow = (From form In DTVWCONTROL_INDEX.AsEnumerable()
|
||||||
|
Where form.Item("GUID") = oMeta.Guid).SingleOrDefault()
|
||||||
|
|
||||||
|
If oControlRow Is Nothing Then Continue For
|
||||||
|
|
||||||
Dim oCtrlType = oControlRow.Item("CTRL_TYPE").ToString
|
Dim oCtrlType = oControlRow.Item("CTRL_TYPE").ToString
|
||||||
'Den Indexnamen auslesen
|
|
||||||
Dim oIndexName As String = oControlRow.Item("INDEX_NAME")
|
Dim oIndexName As String = oControlRow.Item("INDEX_NAME")
|
||||||
|
Dim oIsRequired As Boolean = CBool(oControlRow.Item("VALIDATION"))
|
||||||
|
Dim oIsReadOnly As Boolean = CBool(oControlRow.Item("READ_ONLY"))
|
||||||
|
Dim oSaveChangeEnabledFalse As Boolean = CBool(oControlRow.Item("SAVE_CHANGE_ON_ENABLED"))
|
||||||
|
|
||||||
|
' Überspringe System-Controls
|
||||||
If oCtrlType = "LBL" Or oCtrlType = "LINE" Or oCtrlType = "BUTTON" Then
|
If oCtrlType = "LBL" Or oCtrlType = "LINE" Or oCtrlType = "BUTTON" Then
|
||||||
Continue For
|
Continue For
|
||||||
End If
|
End If
|
||||||
If oIndexName = "@@DISPLAY_ONLY" Then
|
If oIndexName = "@@DISPLAY_ONLY" Then
|
||||||
'Logger.Debug($"Index [{oIndexName}] will be skipped")
|
|
||||||
Continue For
|
Continue For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' Überspringe ReadOnly-Controls (außer SAVE_CHANGE_ON_ENABLED)
|
||||||
|
If oIsReadOnly = True And oSaveChangeEnabledFalse = False Then
|
||||||
|
MyValidationLogger.Debug($"Skipping ReadOnly ControlName [{oControl.Name}]!")
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
|
||||||
Dim oDBControlName = oControlRow.Item("CTRL_NAME").ToString
|
' ========== KERN-OPTIMIERUNG: Dirty-Check ==========
|
||||||
Dim oIsRequired As Boolean = CBool(oControlRow.Item("VALIDATION"))
|
' Überspringe unveränderte, nicht-required Controls
|
||||||
Dim oSQLCheckCommand As String = IIf(IsDBNull(oControlRow.Item("SQL_UEBERPRUEFUNG")), "", oControlRow.Item("SQL_UEBERPRUEFUNG"))
|
If Not oMeta.IsDirty And Not oIsRequired Then
|
||||||
Dim oIsReadOnly As Boolean = CBool(oControlRow.Item("READ_ONLY"))
|
MyValidationLogger.Debug($"Skipping unchanged control [{oMeta.Name}]")
|
||||||
Dim oSaveChangeEnabledFalse As Boolean = CBool(oControlRow.Item("SAVE_CHANGE_ON_ENABLED"))
|
Continue For
|
||||||
'Wenn eine Ablehnung aktiv ist und der Index identisch ist, dann skipping
|
End If
|
||||||
|
' ========== ENDE OPTIMIERUNG ==========
|
||||||
|
|
||||||
|
' Rejection-Handling
|
||||||
If REJECTION_ACTIVE = True And (oIndexName = PROFIL_REJECT_ACTIONS_ATTRIBUTE Or oIndexName = PROFIL_REJECT_COMMENT_ATTRIBUTE) Then
|
If REJECTION_ACTIVE = True And (oIndexName = PROFIL_REJECT_ACTIONS_ATTRIBUTE Or oIndexName = PROFIL_REJECT_COMMENT_ATTRIBUTE) Then
|
||||||
MyValidationLogger.Debug($"Index [{oIndexName}] will be skipped as Rejection is in progress!")
|
MyValidationLogger.Debug($"Index [{oIndexName}] will be skipped as Rejection is in progress!")
|
||||||
Continue For
|
Continue For
|
||||||
End If
|
End If
|
||||||
'Readonly felder werden über finale indexe gefüllt, nicht mit SetControlData
|
|
||||||
If oIsReadOnly = True And oSaveChangeEnabledFalse = False Then
|
|
||||||
MyValidationLogger.Debug($"Skipping ReadOnly ControlName [{oDBControlName}] !")
|
|
||||||
Continue For
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
|
' ========== AB HIER: Bestehender Validierungs-Code ==========
|
||||||
|
Dim oMyInput As String = ""
|
||||||
|
Dim oSQLCheckCommand As String = IIf(IsDBNull(oControlRow.Item("SQL_UEBERPRUEFUNG")), "", oControlRow.Item("SQL_UEBERPRUEFUNG"))
|
||||||
Dim oControlType As String = oControlRow.Item("CTRL_TYPE")
|
Dim oControlType As String = oControlRow.Item("CTRL_TYPE")
|
||||||
Dim oIDBTyp As Integer
|
Dim oIDBTyp As Integer
|
||||||
If IDB_ACTIVE Then
|
If IDB_ACTIVE Then
|
||||||
@@ -4941,13 +5058,14 @@ Public Class frmValidator
|
|||||||
oControlName = oControlRow.Item("CTRL_NAME")
|
oControlName = oControlRow.Item("CTRL_NAME")
|
||||||
Dim oOVERWRITE_DATA = oControlRow.Item("OVERWRITE_DATA")
|
Dim oOVERWRITE_DATA = oControlRow.Item("OVERWRITE_DATA")
|
||||||
|
|
||||||
'Nur wenn der Name der Zeile entspricht und der Index READ_ONLY FALSE ist
|
|
||||||
If oDBControlName = oControl.Name And Not {"@@DISPLAY_ONLY", "DD PM-ONLY FOR DISPLAY"}.Contains(oIndexName) Then
|
|
||||||
MyValidationLogger.Debug("Indexierung für Control (" & oControlId & ") '" & oControlName & "' gestartet. Indexname '" & oIndexName & "'")
|
MyValidationLogger.Debug("Indexierung für Control (" & oControlId & ") '" & oControlName & "' gestartet. Indexname '" & oIndexName & "'")
|
||||||
|
|
||||||
If oIndexName = "" Then
|
If oIndexName = "" Then
|
||||||
MyValidationLogger.Info(">> Indexname is unexpected empty.")
|
MyValidationLogger.Info(">> Indexname is unexpected empty.")
|
||||||
Continue For
|
Continue For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' ========== SELECT CASE: Control-Type-Handling (wie bisher) ==========
|
||||||
Select Case True
|
Select Case True
|
||||||
Case oControl.GetType = GetType(LookupControl3)
|
Case oControl.GetType = GetType(LookupControl3)
|
||||||
Try
|
Try
|
||||||
@@ -4960,27 +5078,19 @@ Public Class frmValidator
|
|||||||
frmError.ShowDialog()
|
frmError.ShowDialog()
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
Else
|
||||||
|
|
||||||
If lookup.Properties.MultiSelect = True Then
|
If lookup.Properties.MultiSelect = True Then
|
||||||
Dim oLookupRows As Integer = lookup.Properties.SelectedValues.Count
|
Dim oLookupRows As Integer = lookup.Properties.SelectedValues.Count
|
||||||
|
|
||||||
'Wenn kein Wert ausgewählt wurde und der Index aber gesetzt werden muss
|
|
||||||
If oLookupRows > 0 Then
|
If oLookupRows > 0 Then
|
||||||
Dim ZeilenGrid As Integer = 0
|
Dim ZeilenGrid As Integer = 0
|
||||||
Dim myVektorArr As String()
|
Dim myVektorArr As String()
|
||||||
'Jeden Werte des Datagridviews durchlaufen
|
|
||||||
For Each value As String In lookup.Properties.SelectedValues
|
For Each value As String In lookup.Properties.SelectedValues
|
||||||
If value Is Nothing = False Then
|
If value Is Nothing = False Then
|
||||||
'Das Array anpassen
|
|
||||||
ReDim Preserve myVektorArr(ZeilenGrid)
|
ReDim Preserve myVektorArr(ZeilenGrid)
|
||||||
'Den Wert im Array speichern
|
|
||||||
myVektorArr(ZeilenGrid) = value
|
myVektorArr(ZeilenGrid) = value
|
||||||
ZeilenGrid += 1
|
ZeilenGrid += 1
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
If IDB_ACTIVE = False Then
|
If IDB_ACTIVE = False Then
|
||||||
|
|
||||||
If Indexiere_File(CURRENT_WMFILE, oIndexName, myVektorArr) = False Then
|
If Indexiere_File(CURRENT_WMFILE, oIndexName, myVektorArr) = False Then
|
||||||
oMissing = True
|
oMissing = True
|
||||||
oErrMsgMissingInput = "Error while indexing von LookupGrid - ERROR: " & idxerr_message
|
oErrMsgMissingInput = "Error while indexing von LookupGrid - ERROR: " & idxerr_message
|
||||||
@@ -4990,7 +5100,6 @@ Public Class frmValidator
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Dim oMyDT = DT_FOR_ARRAY(myVektorArr)
|
Dim oMyDT = DT_FOR_ARRAY(myVektorArr)
|
||||||
|
|
||||||
If IDBData.SetVariableValue(oIndexName, oMyDT, oOVERWRITE_DATA, oIDBTyp) = False Then
|
If IDBData.SetVariableValue(oIndexName, oMyDT, oOVERWRITE_DATA, oIDBTyp) = False Then
|
||||||
oMissing = True
|
oMissing = True
|
||||||
oErrMsgMissingInput = "Error while indexing IDB-Object LookupGrid"
|
oErrMsgMissingInput = "Error while indexing IDB-Object LookupGrid"
|
||||||
@@ -5018,9 +5127,8 @@ Public Class frmValidator
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
' Single-Select Lookup
|
||||||
oMyInput = lookup.Properties.SelectedValues.FirstOrDefault()
|
oMyInput = lookup.Properties.SelectedValues.FirstOrDefault()
|
||||||
If IsNothing(oMyInput) And oIsRequired = True Then
|
If IsNothing(oMyInput) And oIsRequired = True Then
|
||||||
oMissing = True
|
oMissing = True
|
||||||
@@ -5036,21 +5144,19 @@ Public Class frmValidator
|
|||||||
Next
|
Next
|
||||||
Continue For
|
Continue For
|
||||||
End If
|
End If
|
||||||
'den aktuellen Wert in windream auslesen
|
|
||||||
Dim oValueFromObject
|
|
||||||
|
|
||||||
|
Dim oValueFromObject
|
||||||
If oIndexName.StartsWith("[%VKT") Then
|
If oIndexName.StartsWith("[%VKT") Then
|
||||||
oValueFromObject = ReturnVektor_IndexValue(oIndexName)
|
oValueFromObject = ReturnVektor_IndexValue(oIndexName)
|
||||||
Else
|
Else
|
||||||
oValueFromObject = GetVariableValuefromSource(oIndexName, oIDBTyp)
|
oValueFromObject = GetVariableValuefromSource(oIndexName, oIDBTyp)
|
||||||
Dim oValueIsIndifferent As Boolean = False
|
Dim oValueIsIndifferent As Boolean = False
|
||||||
If Not IsNothing(oValueFromObject) Then
|
If Not IsNothing(oValueFromObject) Then
|
||||||
|
|
||||||
If IDB_ACTIVE = False Then
|
If IDB_ACTIVE = False Then
|
||||||
If oValueFromObject.ToString = "System.Object[]" Then
|
If oValueFromObject.ToString = "System.Object[]" Then
|
||||||
If oValueFromObject.Length = 1 Then
|
If oValueFromObject.Length = 1 Then
|
||||||
oValueFromObject = oValueFromObject(0)
|
oValueFromObject = oValueFromObject(0)
|
||||||
Else '
|
Else
|
||||||
MyValidationLogger.Info(" >> Vectorfield " & oIndexName & "' contains more then one value - First value will be used")
|
MyValidationLogger.Info(" >> Vectorfield " & oIndexName & "' contains more then one value - First value will be used")
|
||||||
oValueFromObject = oValueFromObject(0)
|
oValueFromObject = oValueFromObject(0)
|
||||||
End If
|
End If
|
||||||
@@ -5070,6 +5176,7 @@ Public Class frmValidator
|
|||||||
oValueIsIndifferent = True
|
oValueIsIndifferent = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim oValueSourceIsDifferent As Boolean = False
|
Dim oValueSourceIsDifferent As Boolean = False
|
||||||
If oValueIsIndifferent = False Then
|
If oValueIsIndifferent = False Then
|
||||||
MyValidationLogger.Debug($"CheckUpdateIndex.LookUpGrid: oValueFromObject is [{oValueFromObject}]")
|
MyValidationLogger.Debug($"CheckUpdateIndex.LookUpGrid: oValueFromObject is [{oValueFromObject}]")
|
||||||
@@ -5082,18 +5189,11 @@ Public Class frmValidator
|
|||||||
oValueSourceIsDifferent = True
|
oValueSourceIsDifferent = True
|
||||||
MyValidationLogger.Debug($"oValueFromObject <> oMyInput not possible as one object might be a multiple row object")
|
MyValidationLogger.Debug($"oValueFromObject <> oMyInput not possible as one object might be a multiple row object")
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Else
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'wenn Wert in Windream <> der Eingabe darf indexiert werden
|
|
||||||
'IsNothing(oValueFromObject) Or oValueFromObject <> oMyInput
|
|
||||||
If (oValueIsIndifferent = True Or oValueSourceIsDifferent = True) Then
|
If (oValueIsIndifferent = True Or oValueSourceIsDifferent = True) Then
|
||||||
'Wenn der Wert in ein Vektorfeld geschrieben wird
|
|
||||||
If oIndexName.StartsWith("[%VKT") Then
|
If oIndexName.StartsWith("[%VKT") Then
|
||||||
oMyInput = Return_PM_VEKTOR(oMyInput, oIndexName)
|
oMyInput = Return_PM_VEKTOR(oMyInput, oIndexName)
|
||||||
'Hier muss nun separat as Vektorfeld indexiert werden
|
|
||||||
If WMIndexVectofield(oMyInput, PROFIL_VEKTORINDEX) = True Then
|
If WMIndexVectofield(oMyInput, PROFIL_VEKTORINDEX) = True Then
|
||||||
oMissing = True
|
oMissing = True
|
||||||
oErrMsgMissingInput = "Error while indexing Textbox as VEKTOR - ERROR: " & idxerr_message
|
oErrMsgMissingInput = "Error while indexing Textbox as VEKTOR - ERROR: " & idxerr_message
|
||||||
@@ -5122,34 +5222,25 @@ Public Class frmValidator
|
|||||||
If PROFIL_LOGINDEX <> "" Then
|
If PROFIL_LOGINDEX <> "" Then
|
||||||
Dim oLogStr = Return_LOGString(oMyInput, oValueFromObject, oIndexName)
|
Dim oLogStr = Return_LOGString(oMyInput, oValueFromObject, oIndexName)
|
||||||
WMIndexVectofield(oLogStr, PROFIL_LOGINDEX)
|
WMIndexVectofield(oLogStr, PROFIL_LOGINDEX)
|
||||||
'Else
|
|
||||||
' IDBData.SetVariableValue(PROFIL_LOGINDEX, oLogStr)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
'Nun das Logging
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MyValidationLogger.Error(ex)
|
MyValidationLogger.Error(ex)
|
||||||
|
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Case oControl.GetType = GetType(DevExpress.XtraEditors.TextEdit) Or oControl.GetType = GetType(MemoEdit)
|
Case oControl.GetType = GetType(DevExpress.XtraEditors.TextEdit) Or oControl.GetType = GetType(MemoEdit)
|
||||||
Try
|
Try
|
||||||
'Dim oWrongInputMessage = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("frmValidator.WrongInputControl")
|
|
||||||
Dim oWrongInputMessage = S.Falsche_Eingabe
|
Dim oWrongInputMessage = S.Falsche_Eingabe
|
||||||
Dim oDevexpressTextEdit As DevExpress.XtraEditors.TextEdit = oControl
|
Dim oDevexpressTextEdit As DevExpress.XtraEditors.TextEdit = oControl
|
||||||
MyValidationLogger.Debug("Validating Textbox..")
|
MyValidationLogger.Debug("Validating Textbox..")
|
||||||
|
|
||||||
If oRegexMatch <> String.Empty AndAlso Not Regex.IsMatch(oDevexpressTextEdit.EditValue, oRegexMatch) Then
|
If oRegexMatch <> String.Empty AndAlso Not Regex.IsMatch(oDevexpressTextEdit.EditValue, oRegexMatch) Then
|
||||||
oMissing = True
|
oMissing = True
|
||||||
|
|
||||||
oErrMsgMissingInput = oWrongInputMessage & " textbox '" & oControl.Name & "'"
|
oErrMsgMissingInput = oWrongInputMessage & " textbox '" & oControl.Name & "'"
|
||||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||||
If oRegexMessage <> String.Empty Then
|
If oRegexMessage <> String.Empty Then
|
||||||
@@ -5160,8 +5251,7 @@ Public Class frmValidator
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'as erstes überprüfen ob überhaupt etwas eingetragen worden ist
|
If Check_Missing_Control_Value(oControl, "txt") = True And oIsRequired = True Then
|
||||||
If Check_Missing_Control_Value(oControl, "txt") = True And oIsRequired = True Then 'NICHTS EINGETRAGEN
|
|
||||||
oMissing = True
|
oMissing = True
|
||||||
oErrMsgMissingInput = oWrongInputMessage & " textbox '" & oControl.Name & "'"
|
oErrMsgMissingInput = oWrongInputMessage & " textbox '" & oControl.Name & "'"
|
||||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||||
@@ -5170,26 +5260,21 @@ Public Class frmValidator
|
|||||||
Exit For
|
Exit For
|
||||||
Else
|
Else
|
||||||
MyValidationLogger.Debug("Reading current value from Textbox")
|
MyValidationLogger.Debug("Reading current value from Textbox")
|
||||||
|
|
||||||
Dim oTextEdit As BaseEdit = DirectCast(oControl, BaseEdit)
|
Dim oTextEdit As BaseEdit = DirectCast(oControl, BaseEdit)
|
||||||
oMyInput = ClassFormat.GetStringValue(oTextEdit.EditValue)
|
oMyInput = ClassFormat.GetStringValue(oTextEdit.EditValue)
|
||||||
|
|
||||||
MyValidationLogger.Debug("Form Value: [{0}]", oMyInput)
|
MyValidationLogger.Debug("Form Value: [{0}]", oMyInput)
|
||||||
|
|
||||||
'den aktuellen Wert in windream auslesen
|
|
||||||
Dim oSourceValue = GetVariableValuefromSource(oIndexName, oIDBTyp)
|
Dim oSourceValue = GetVariableValuefromSource(oIndexName, oIDBTyp)
|
||||||
|
|
||||||
MyValidationLogger.Debug("Current Value: [{0}]", oSourceValue)
|
MyValidationLogger.Debug("Current Value: [{0}]", oSourceValue)
|
||||||
|
|
||||||
If oIndexName.StartsWith("[%VKT") Then
|
If oIndexName.StartsWith("[%VKT") Then
|
||||||
oSourceValue = ReturnVektor_IndexValue(oIndexName)
|
oSourceValue = ReturnVektor_IndexValue(oIndexName)
|
||||||
Else
|
Else
|
||||||
'wertWD = CURRENT_WMFILE.GetVariableValue(oIndexName)
|
|
||||||
If Not IsNothing(oSourceValue) Then
|
If Not IsNothing(oSourceValue) Then
|
||||||
If oSourceValue.ToString = "System.Object[]" Then
|
If oSourceValue.ToString = "System.Object[]" Then
|
||||||
If oSourceValue.Length = 1 Then
|
If oSourceValue.Length = 1 Then
|
||||||
oSourceValue = oSourceValue(0)
|
oSourceValue = oSourceValue(0)
|
||||||
Else '
|
Else
|
||||||
MyValidationLogger.Info(" >> Vectorfield " & oIndexName & "' contains more then one value - First value will be used")
|
MyValidationLogger.Info(" >> Vectorfield " & oIndexName & "' contains more then one value - First value will be used")
|
||||||
oSourceValue = oSourceValue(0)
|
oSourceValue = oSourceValue(0)
|
||||||
End If
|
End If
|
||||||
@@ -5198,6 +5283,7 @@ Public Class frmValidator
|
|||||||
oSourceValue = ""
|
oSourceValue = ""
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim oSetValue As Boolean = False
|
Dim oSetValue As Boolean = False
|
||||||
If IsDBNull(oSourceValue) Then
|
If IsDBNull(oSourceValue) Then
|
||||||
oSetValue = True
|
oSetValue = True
|
||||||
@@ -5219,12 +5305,9 @@ Public Class frmValidator
|
|||||||
|
|
||||||
MyValidationLogger.Debug("Preparing Indexing for Textbox")
|
MyValidationLogger.Debug("Preparing Indexing for Textbox")
|
||||||
|
|
||||||
'wenn Wert in Windream <> der Eingabe darf indexiert werden
|
|
||||||
If oSetValue = True Then
|
If oSetValue = True Then
|
||||||
'Wenn der Wert in ein Vektorfeld geschrieben wird
|
|
||||||
If oIndexName.StartsWith("[%VKT") Then
|
If oIndexName.StartsWith("[%VKT") Then
|
||||||
oMyInput = Return_PM_VEKTOR(oMyInput, oIndexName)
|
oMyInput = Return_PM_VEKTOR(oMyInput, oIndexName)
|
||||||
'Hier muss nun separat as Vektorfeld indexiert werden
|
|
||||||
If WMIndexVectofield(oMyInput, PROFIL_VEKTORINDEX) = True Then
|
If WMIndexVectofield(oMyInput, PROFIL_VEKTORINDEX) = True Then
|
||||||
oMissing = True
|
oMissing = True
|
||||||
oErrMsgMissingInput = $"Error while indexing Textbox {oControl} - Attribute {oIndexName} as VEKTOR - ERROR: " & idxerr_message
|
oErrMsgMissingInput = $"Error while indexing Textbox {oControl} - Attribute {oIndexName} as VEKTOR - ERROR: " & idxerr_message
|
||||||
@@ -5237,9 +5320,7 @@ Public Class frmValidator
|
|||||||
Dim result() As String
|
Dim result() As String
|
||||||
ReDim Preserve result(0)
|
ReDim Preserve result(0)
|
||||||
result(0) = oMyInput
|
result(0) = oMyInput
|
||||||
|
|
||||||
MyValidationLogger.Debug("Indexing Index [{0}] with value [{1}]", oMyInput, oIndexName)
|
MyValidationLogger.Debug("Indexing Index [{0}] with value [{1}]", oMyInput, oIndexName)
|
||||||
|
|
||||||
If Indexiere_File(CURRENT_WMFILE, oIndexName, result) = False Then
|
If Indexiere_File(CURRENT_WMFILE, oIndexName, result) = False Then
|
||||||
oMissing = True
|
oMissing = True
|
||||||
oErrMsgMissingInput = $"Error while indexing Textbox {oControl} - Attribute {oIndexName} - ERROR: " & idxerr_message
|
oErrMsgMissingInput = $"Error while indexing Textbox {oControl} - Attribute {oIndexName} - ERROR: " & idxerr_message
|
||||||
@@ -5256,8 +5337,6 @@ Public Class frmValidator
|
|||||||
If PROFIL_LOGINDEX <> "" Then
|
If PROFIL_LOGINDEX <> "" Then
|
||||||
Dim oMyLogString = Return_LOGString(oMyInput, oSourceValue, oIndexName)
|
Dim oMyLogString = Return_LOGString(oMyInput, oSourceValue, oIndexName)
|
||||||
WMIndexVectofield(oMyLogString, PROFIL_LOGINDEX)
|
WMIndexVectofield(oMyLogString, PROFIL_LOGINDEX)
|
||||||
'Else
|
|
||||||
'IDBData.SetVariableValue(PROFIL_LOGINDEX, oMyLogString)
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -5270,26 +5349,27 @@ Public Class frmValidator
|
|||||||
st = New StackTrace(ex, True)
|
st = New StackTrace(ex, True)
|
||||||
MyValidationLogger.Warn("Unexpected error in Check_UpdateIndexe TextBox :" & ex.Message, True)
|
MyValidationLogger.Warn("Unexpected error in Check_UpdateIndexe TextBox :" & ex.Message, True)
|
||||||
OpenfrmError(oErrMsgMissingInput)
|
OpenfrmError(oErrMsgMissingInput)
|
||||||
|
|
||||||
|
' Nach Fehler: Dirty-Flag zurücksetzen
|
||||||
|
oMeta.IsDirty = False
|
||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Case oControl.GetType = GetType(System.Windows.Forms.ComboBox)
|
Case oControl.GetType = GetType(System.Windows.Forms.ComboBox)
|
||||||
|
' ... (Dein bestehender ComboBox-Code bleibt gleich) ...
|
||||||
Try
|
Try
|
||||||
MyValidationLogger.Debug($"Working on Combobox...")
|
MyValidationLogger.Debug($"Working on Combobox...")
|
||||||
Dim cmb As Windows.Forms.ComboBox = oControl
|
Dim cmb As Windows.Forms.ComboBox = oControl
|
||||||
'Wenn kein Wert ausgewählt wurde und der Index aber gesetzt werden muss
|
|
||||||
If cmb.SelectedIndex = -1 And oIsRequired = True Then
|
If cmb.SelectedIndex = -1 And oIsRequired = True Then
|
||||||
oMissing = True
|
oMissing = True
|
||||||
oErrMsgMissingInput = "Please Choose an entry out of ComboBox '" & cmb.Name & "'"
|
oErrMsgMissingInput = "Please Choose an entry out of ComboBox '" & cmb.Name & "'"
|
||||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||||
OpenfrmError(oErrMsgMissingInput)
|
OpenfrmError(oErrMsgMissingInput)
|
||||||
Exit For
|
Exit For
|
||||||
'ElseIf cmb.SelectedIndex <> -1 Then
|
Else
|
||||||
Else 'Änderung 28.08.2018: Ein leerer Wert in der Combobox wird in den Index geschrieben
|
|
||||||
oMyInput = cmb.Text
|
oMyInput = cmb.Text
|
||||||
MyValidationLogger.Debug($"inputvalue Combobox: {cmb.Text}")
|
MyValidationLogger.Debug($"inputvalue Combobox: {cmb.Text}")
|
||||||
Dim oValue
|
Dim oValue
|
||||||
'den aktuellen Wert in windream auslesen
|
|
||||||
If oIndexName.StartsWith("[%VKT") Then
|
If oIndexName.StartsWith("[%VKT") Then
|
||||||
oValue = ReturnVektor_IndexValue(oIndexName)
|
oValue = ReturnVektor_IndexValue(oIndexName)
|
||||||
Else
|
Else
|
||||||
@@ -5311,7 +5391,7 @@ Public Class frmValidator
|
|||||||
MyValidationLogger.Debug($"Control with ID{oControlId} is a vectorfield...")
|
MyValidationLogger.Debug($"Control with ID{oControlId} is a vectorfield...")
|
||||||
If oValue.Length = 1 Then
|
If oValue.Length = 1 Then
|
||||||
oValue = oValue(0).ToString
|
oValue = oValue(0).ToString
|
||||||
Else '
|
Else
|
||||||
MyValidationLogger.Info(" >> Vectorfield " & oIndexName & "' contains more then one value - First value will be used")
|
MyValidationLogger.Info(" >> Vectorfield " & oIndexName & "' contains more then one value - First value will be used")
|
||||||
oValue = oValue(0).ToString
|
oValue = oValue(0).ToString
|
||||||
End If
|
End If
|
||||||
@@ -5327,13 +5407,10 @@ Public Class frmValidator
|
|||||||
MyValidationLogger.Error(ex.Message)
|
MyValidationLogger.Error(ex.Message)
|
||||||
oitsadifference = True
|
oitsadifference = True
|
||||||
End Try
|
End Try
|
||||||
'wenn Wert in Windream <> der Eingabe darf indexiert werden
|
|
||||||
If oitsadifference = True Then
|
If oitsadifference = True Then
|
||||||
MyValidationLogger.Debug($"Index with ID{oControlId} will now be indexed...")
|
MyValidationLogger.Debug($"Index with ID{oControlId} will now be indexed...")
|
||||||
'Wenn der Wert in ein Vektorfeld geschrieben wird
|
|
||||||
If oIndexName.StartsWith("[%VKT") Then
|
If oIndexName.StartsWith("[%VKT") Then
|
||||||
oMyInput = Return_PM_VEKTOR(oMyInput, oIndexName)
|
oMyInput = Return_PM_VEKTOR(oMyInput, oIndexName)
|
||||||
'Hier muss nun separat as Vektorfeld indexiert werden
|
|
||||||
If WMIndexVectofield(oMyInput, PROFIL_VEKTORINDEX) = True Then
|
If WMIndexVectofield(oMyInput, PROFIL_VEKTORINDEX) = True Then
|
||||||
oMissing = True
|
oMissing = True
|
||||||
oErrMsgMissingInput = "Error while indexing Combobox as VEKTOR - ERROR: " & idxerr_message
|
oErrMsgMissingInput = "Error while indexing Combobox as VEKTOR - ERROR: " & idxerr_message
|
||||||
@@ -5368,22 +5445,13 @@ Public Class frmValidator
|
|||||||
If PROFIL_LOGINDEX <> "" Then
|
If PROFIL_LOGINDEX <> "" Then
|
||||||
Dim ologStr = Return_LOGString(oMyInput, oValue, oIndexName)
|
Dim ologStr = Return_LOGString(oMyInput, oValue, oIndexName)
|
||||||
WMIndexVectofield(ologStr, PROFIL_LOGINDEX)
|
WMIndexVectofield(ologStr, PROFIL_LOGINDEX)
|
||||||
'Else
|
|
||||||
'IDBData.SetVariableValue(PROFIL_LOGINDEX, ologStr)
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
'Nun das Logging
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
MyValidationLogger.Debug($"oitsadifference = False...Index with ID {oControlId} will not be indexed...")
|
MyValidationLogger.Debug($"oitsadifference = False...Index with ID {oControlId} will not be indexed...")
|
||||||
'Wenn der Wert in ein Vektorfeld geschrieben wird
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MyValidationLogger.Error(ex)
|
MyValidationLogger.Error(ex)
|
||||||
@@ -5391,13 +5459,14 @@ Public Class frmValidator
|
|||||||
st = New StackTrace(ex, True)
|
st = New StackTrace(ex, True)
|
||||||
MsgBox($"Unexpected error in Check_UpdateIndexe Combobox : ID{oControlId} " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Error:")
|
MsgBox($"Unexpected error in Check_UpdateIndexe Combobox : ID{oControlId} " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Error:")
|
||||||
MyValidationLogger.Info($"Unexpected error in Check_UpdateIndexe Combobox : ID{oControlId}" & ex.Message)
|
MyValidationLogger.Info($"Unexpected error in Check_UpdateIndexe Combobox : ID{oControlId}" & ex.Message)
|
||||||
|
oMeta.IsDirty = False
|
||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Case oControl.GetType = GetType(DateTimePicker)
|
Case oControl.GetType = GetType(DateTimePicker)
|
||||||
|
' ... (Dein bestehender DateTimePicker-Code) ...
|
||||||
Try
|
Try
|
||||||
Dim dtp As DateTimePicker = oControl
|
Dim dtp As DateTimePicker = oControl
|
||||||
'Wenn kein Wert ausgewählt wurde und der Index aber gesetzt werden muss
|
|
||||||
If oIsRequired = True And dtp.Value.ToString = String.Empty Then
|
If oIsRequired = True And dtp.Value.ToString = String.Empty Then
|
||||||
oMissing = True
|
oMissing = True
|
||||||
oErrMsgMissingInput = "Please Choose DateValue for field'" & dtp.Name & "'"
|
oErrMsgMissingInput = "Please Choose DateValue for field'" & dtp.Name & "'"
|
||||||
@@ -5406,8 +5475,6 @@ Public Class frmValidator
|
|||||||
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
|
||||||
oMyInput = CDate(dtp.Value)
|
oMyInput = CDate(dtp.Value)
|
||||||
'den aktuellen Wert in windream auslesen
|
|
||||||
' Dim wertWD As String = CURRENT_WMFILE.GetVariableValue(_IDXName)
|
|
||||||
Dim oObjectValue
|
Dim oObjectValue
|
||||||
If oIndexName.StartsWith("[%VKT") Then
|
If oIndexName.StartsWith("[%VKT") Then
|
||||||
oObjectValue = ReturnVektor_IndexValue(oIndexName)
|
oObjectValue = ReturnVektor_IndexValue(oIndexName)
|
||||||
@@ -5417,13 +5484,9 @@ Public Class frmValidator
|
|||||||
If IsNothing(oObjectValue) Or IsDBNull(oObjectValue) Then
|
If IsNothing(oObjectValue) Or IsDBNull(oObjectValue) Then
|
||||||
oObjectValue = CDate("01.01.1900")
|
oObjectValue = CDate("01.01.1900")
|
||||||
End If
|
End If
|
||||||
'wenn Wert in Windream <> der Eingabe darf indexiert werden
|
|
||||||
If oObjectValue <> oMyInput Then
|
If oObjectValue <> oMyInput Then
|
||||||
'Wenn der WErt in ein Vektorfeld geschrieben wird
|
|
||||||
If oIndexName.StartsWith("[%VKT") Then
|
If oIndexName.StartsWith("[%VKT") Then
|
||||||
'Input = die String komponente as String
|
|
||||||
oMyInput = Return_PM_VEKTOR(oMyInput, oIndexName)
|
oMyInput = Return_PM_VEKTOR(oMyInput, oIndexName)
|
||||||
'Hier muss nun separat as Vektorfeld indexiert werden
|
|
||||||
If WMIndexVectofield(oMyInput, PROFIL_VEKTORINDEX) = True Then
|
If WMIndexVectofield(oMyInput, PROFIL_VEKTORINDEX) = True Then
|
||||||
oMissing = True
|
oMissing = True
|
||||||
oErrMsgMissingInput = "Error while indexing DatePicker as VEKTOR - ERROR: " & idxerr_message
|
oErrMsgMissingInput = "Error while indexing DatePicker as VEKTOR - ERROR: " & idxerr_message
|
||||||
@@ -5456,23 +5519,22 @@ Public Class frmValidator
|
|||||||
If PROFIL_LOGINDEX <> "" Then
|
If PROFIL_LOGINDEX <> "" Then
|
||||||
Dim oLogstr = Return_LOGString(oMyInput, oObjectValue, oIndexName)
|
Dim oLogstr = Return_LOGString(oMyInput, oObjectValue, oIndexName)
|
||||||
WMIndexVectofield(oLogstr, PROFIL_LOGINDEX)
|
WMIndexVectofield(oLogstr, PROFIL_LOGINDEX)
|
||||||
'Else
|
|
||||||
'IDBData.SetVariableValue(PROFIL_LOGINDEX, oLogstr)
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
MyValidationLogger.Debug("Value WD ('" & oObjectValue.ToString & "') = Input-value ('" & oMyInput.ToString & "')")
|
MyValidationLogger.Debug("Value WD ('" & oObjectValue.ToString & "') = Input-value ('" & oMyInput.ToString & "')")
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
MyValidationLogger.Debug("DateValue is 01.01.0001 00:00:00")
|
MyValidationLogger.Debug("DateValue is 01.01.0001 00:00:00")
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MyValidationLogger.Error(ex)
|
MyValidationLogger.Error(ex)
|
||||||
|
oMeta.IsDirty = False
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Case oControl.GetType = GetType(CheckBox)
|
Case oControl.GetType = GetType(CheckBox)
|
||||||
|
' ... (Dein bestehender CheckBox-Code) ...
|
||||||
Try
|
Try
|
||||||
Dim chk As CheckBox = oControl
|
Dim chk As CheckBox = oControl
|
||||||
oMyInput = chk.Checked.ToString
|
oMyInput = chk.Checked.ToString
|
||||||
@@ -5485,7 +5547,6 @@ Public Class frmValidator
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'den aktuellen Wert in windream auslesen
|
|
||||||
Dim WertWD As String
|
Dim WertWD As String
|
||||||
Dim oBoolValue As Boolean
|
Dim oBoolValue As Boolean
|
||||||
If oIndexName.StartsWith("[%VKT") Then
|
If oIndexName.StartsWith("[%VKT") Then
|
||||||
@@ -5498,14 +5559,13 @@ Public Class frmValidator
|
|||||||
Else
|
Else
|
||||||
Dim _Value
|
Dim _Value
|
||||||
Dim oObjectCheck = GetVariableValuefromSource(oIndexName, oIDBTyp)
|
Dim oObjectCheck = GetVariableValuefromSource(oIndexName, oIDBTyp)
|
||||||
|
|
||||||
If IsNothing(oObjectCheck) Or IsDBNull(oObjectCheck) Then
|
If IsNothing(oObjectCheck) Or IsDBNull(oObjectCheck) Then
|
||||||
oBoolValue = False
|
oBoolValue = False
|
||||||
Else
|
Else
|
||||||
If oObjectCheck.ToString = "System.Object[]" Then
|
If oObjectCheck.ToString = "System.Object[]" Then
|
||||||
If oObjectCheck.Length = 1 Then
|
If oObjectCheck.Length = 1 Then
|
||||||
_Value = oObjectCheck(0)
|
_Value = oObjectCheck(0)
|
||||||
Else '
|
Else
|
||||||
MyValidationLogger.Info(" >> Vectorfield " & oIndexName & "' contains more then one value - First value will be used")
|
MyValidationLogger.Info(" >> Vectorfield " & oIndexName & "' contains more then one value - First value will be used")
|
||||||
_Value = oObjectCheck(0)
|
_Value = oObjectCheck(0)
|
||||||
End If
|
End If
|
||||||
@@ -5514,13 +5574,8 @@ Public Class frmValidator
|
|||||||
End If
|
End If
|
||||||
oBoolValue = CBool(_Value)
|
oBoolValue = CBool(_Value)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
' Dim Bool_WD = CBool(CURRENT_WMFILE.GetVariableValue(_IDXName))
|
|
||||||
'wenn Wert in Windream <> der Eingabe darf indexiert werden
|
|
||||||
If oBoolValue <> chk.Checked Then
|
If oBoolValue <> chk.Checked Then
|
||||||
Dim result() As String
|
Dim result() As String
|
||||||
ReDim Preserve result(0)
|
ReDim Preserve result(0)
|
||||||
@@ -5531,9 +5586,7 @@ Public Class frmValidator
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If oIndexName.StartsWith("[%VKT") Then
|
If oIndexName.StartsWith("[%VKT") Then
|
||||||
'Input = die String komponente mit Boolean as String
|
|
||||||
oMyInput = Return_PM_VEKTOR(chk.Checked.ToString, oIndexName)
|
oMyInput = Return_PM_VEKTOR(chk.Checked.ToString, oIndexName)
|
||||||
'Hier muss nun separat as Vektorfeld indexiert werden
|
|
||||||
If WMIndexVectofield(oMyInput, PROFIL_VEKTORINDEX) = True Then
|
If WMIndexVectofield(oMyInput, PROFIL_VEKTORINDEX) = True Then
|
||||||
oMissing = True
|
oMissing = True
|
||||||
oErrMsgMissingInput = "Error while indexing Checkbox as VEKTOR - ERROR: " & idxerr_message
|
oErrMsgMissingInput = "Error while indexing Checkbox as VEKTOR - ERROR: " & idxerr_message
|
||||||
@@ -5561,30 +5614,26 @@ Public Class frmValidator
|
|||||||
If PROFIL_LOGINDEX <> "" Then
|
If PROFIL_LOGINDEX <> "" Then
|
||||||
Dim oLogstr = Return_LOGString(CBool(result(0)).ToString, WertWD, oIndexName)
|
Dim oLogstr = Return_LOGString(CBool(result(0)).ToString, WertWD, oIndexName)
|
||||||
WMIndexVectofield(oLogstr, PROFIL_LOGINDEX)
|
WMIndexVectofield(oLogstr, PROFIL_LOGINDEX)
|
||||||
'Else
|
|
||||||
'IDBData.SetVariableValue(PROFIL_LOGINDEX, oLogstr)
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MyValidationLogger.Error(ex)
|
MyValidationLogger.Error(ex)
|
||||||
|
oMeta.IsDirty = False
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Case oControl.GetType = GetType(DataGridView)
|
Case oControl.GetType = GetType(DataGridView)
|
||||||
|
' ... (Dein bestehender DataGridView-Code) ...
|
||||||
Try
|
Try
|
||||||
Dim dgv As DataGridView = oControl
|
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
|
||||||
Dim exists = False
|
Dim exists = False
|
||||||
' MsgBox(row.Cells(0).Value.GetType.ToString)
|
|
||||||
If row.Cells(0).Value Is Nothing = False Then
|
If row.Cells(0).Value Is Nothing = False Then
|
||||||
Zeilen += 1
|
Zeilen += 1
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
'Wenn kein Wert ausgewählt wurde und der Index aber gesetzt werden muss
|
|
||||||
If oIsRequired = True And Zeilen = 0 Then
|
If oIsRequired = True And Zeilen = 0 Then
|
||||||
oMissing = True
|
oMissing = True
|
||||||
oErrMsgMissingInput = "Fehlende Eingabe in Vektorfeld '" & dgv.Name & "'"
|
oErrMsgMissingInput = "Fehlende Eingabe in Vektorfeld '" & dgv.Name & "'"
|
||||||
@@ -5594,15 +5643,12 @@ Public Class frmValidator
|
|||||||
ElseIf Zeilen > 0 Then
|
ElseIf Zeilen > 0 Then
|
||||||
Dim ZeilenGrid As Integer = 0
|
Dim ZeilenGrid As Integer = 0
|
||||||
Dim myVektorArr As String()
|
Dim myVektorArr As String()
|
||||||
'Jeden Werte des Datagridviews durchlaufen
|
|
||||||
For Each row As DataGridViewRow In dgv.Rows
|
For Each row As DataGridViewRow In dgv.Rows
|
||||||
Dim exists = False
|
Dim exists = False
|
||||||
Select Case oControlType
|
Select Case oControlType
|
||||||
Case "TABLE"
|
Case "TABLE"
|
||||||
' MsgBox(row.Cells(0).Value.GetType.ToString)
|
|
||||||
Dim str As String
|
Dim str As String
|
||||||
If row.Cells(0).Value Is Nothing = False Then
|
If row.Cells(0).Value Is Nothing = False Then
|
||||||
'Das Array anpassen
|
|
||||||
ReDim Preserve myVektorArr(ZeilenGrid)
|
ReDim Preserve myVektorArr(ZeilenGrid)
|
||||||
For i = 0 To row.Cells.Count - 1
|
For i = 0 To row.Cells.Count - 1
|
||||||
Select Case i
|
Select Case i
|
||||||
@@ -5611,24 +5657,17 @@ Public Class frmValidator
|
|||||||
Case Else
|
Case Else
|
||||||
str = str & PMDelimiter & row.Cells(i).Value
|
str = str & PMDelimiter & row.Cells(i).Value
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
Next
|
Next
|
||||||
'Den Wert im Array speichern
|
|
||||||
myVektorArr(ZeilenGrid) = str
|
myVektorArr(ZeilenGrid) = str
|
||||||
ZeilenGrid += 1
|
ZeilenGrid += 1
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Case Else
|
Case Else
|
||||||
' MsgBox(row.Cells(0).Value.GetType.ToString)
|
|
||||||
If row.Cells(0).Value Is Nothing = False Then
|
If row.Cells(0).Value Is Nothing = False Then
|
||||||
'Das Array anpassen
|
|
||||||
ReDim Preserve myVektorArr(ZeilenGrid)
|
ReDim Preserve myVektorArr(ZeilenGrid)
|
||||||
'Den Wert im Array speichern
|
|
||||||
myVektorArr(ZeilenGrid) = row.Cells(0).Value.ToString
|
myVektorArr(ZeilenGrid) = row.Cells(0).Value.ToString
|
||||||
ZeilenGrid += 1
|
ZeilenGrid += 1
|
||||||
End If
|
End If
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
Next
|
Next
|
||||||
If IDB_ACTIVE = False Then
|
If IDB_ACTIVE = False Then
|
||||||
If Indexiere_File(CURRENT_WMFILE, oIndexName, myVektorArr) = False Then
|
If Indexiere_File(CURRENT_WMFILE, oIndexName, myVektorArr) = False Then
|
||||||
@@ -5650,10 +5689,10 @@ Public Class frmValidator
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
'Jetzt die Datei indexieren
|
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MyValidationLogger.Error(ex)
|
MyValidationLogger.Error(ex)
|
||||||
|
oMeta.IsDirty = False
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Case oControl.GetType = GetType(GridControl)
|
Case oControl.GetType = GetType(GridControl)
|
||||||
@@ -5673,18 +5712,13 @@ Public Class frmValidator
|
|||||||
If oResult = False Then
|
If oResult = False Then
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
End If 'End If für Control und ReadOnly = False
|
|
||||||
Next
|
|
||||||
|
|
||||||
' If Error happened in inner For, exit the outer as well
|
' ========== NEU: Dirty-Flag nach erfolgreicher Indexierung zurücksetzen ==========
|
||||||
If oMissing = True Then
|
oMeta.IsDirty = False
|
||||||
MyValidationLogger.Info("oMissing = True...Exiting")
|
|
||||||
Exit For
|
Next ' End For Each oControl
|
||||||
End If
|
|
||||||
Next
|
|
||||||
If oMissing = True Then
|
If oMissing = True Then
|
||||||
MyValidationLogger.Warn("Check_UpdateIndexe: ERROR or Missing Indexing - returning False")
|
MyValidationLogger.Warn("Check_UpdateIndexe: ERROR or Missing Indexing - returning False")
|
||||||
Return False
|
Return False
|
||||||
|
|||||||
Reference in New Issue
Block a user