Compare commits
3 Commits
cee6a11c99
...
bca0002134
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bca0002134 | ||
|
|
b5ae672091 | ||
|
|
107a47a97e |
@@ -906,7 +906,8 @@ Public Class frmFormDesigner
|
||||
UpdateSingleValue("REGEX_MESSAGE_DE", newValue)
|
||||
|
||||
Case "Active"
|
||||
UpdateSingleValue("CONTROL_ACTIVE", IIf(newValue = True, 1, 0))
|
||||
Dim oActive As Boolean = IIf(newValue = True, 1, 0)
|
||||
UpdateSingleValue("CONTROL_ACTIVE", oActive)
|
||||
|
||||
Case "DISPLAY_SEP_FORM"
|
||||
UpdateSingleValue("DISPLAY_IN_SEPERATE_FORM", IIf(newValue = True, 1, 0))
|
||||
@@ -977,7 +978,8 @@ Public Class frmFormDesigner
|
||||
End If
|
||||
|
||||
Try
|
||||
If DatabaseFallback.ExecuteNonQueryECM($"UPDATE TBPM_PROFILE_CONTROLS SET {columnName} = {escapedValue}, CHANGED_WHO = '{USER_USERNAME}' WHERE GUID = {guid}") = True Then
|
||||
Dim oUPD = $"UPDATE TBPM_PROFILE_CONTROLS SET {columnName} = {escapedValue}, CHANGED_WHO = '{USER_USERNAME}' WHERE GUID = {guid}"
|
||||
If DatabaseFallback.ExecuteNonQueryECM(oUPD) = True Then
|
||||
tslblAenderungen.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
tslblAenderungen.Caption = "Änderungen gespeichert - " & Now
|
||||
If columnName.ToUpper = "CTRL_TEXT" Then
|
||||
@@ -986,6 +988,8 @@ Public Class frmFormDesigner
|
||||
End If
|
||||
CHANGES_FORM_DESIGN = True
|
||||
Return True
|
||||
Else
|
||||
_Logger.Info($"UpdateSingleValue - Fehler beim Speichern von Control (Id: {guid}): ExecuteNonQueryECM [{oUPD}] returned False")
|
||||
End If
|
||||
|
||||
Return False
|
||||
@@ -1155,16 +1159,22 @@ Public Class frmFormDesigner
|
||||
Dim label = ControlCreator.CreateNewLabel(cursorPosition)
|
||||
SetMovementHandlers(label)
|
||||
|
||||
TBPM_PROFILE_CONTROLSTableAdapter.cmdInsertAnlage(ProfileId, label.Name, "LBL", label.Text, label.Location.X, label.Location.Y, USER_USERNAME, label.Size.Height, label.Size.Width, label.TextAlign, "")
|
||||
CHANGES_FORM_DESIGN = True
|
||||
CurrentControl = label
|
||||
CurrentControl.Tag = New ClassControlCreator.ControlMetadata() With {
|
||||
.Guid = GetLastID(),
|
||||
.ReadOnly = False
|
||||
}
|
||||
|
||||
pnldesigner.Controls.Add(label)
|
||||
|
||||
Dim oInsert = $"INSERT INTO TBPM_PROFILE_CONTROLS
|
||||
(PROFIL_ID, NAME, CTRL_TYPE, CTRL_TEXT, X_LOC, Y_LOC, ADDED_WHO, HEIGHT, WIDTH, TEXT_ALIGNMENT, DISPLAY_IN_SEPERATE_FORM)
|
||||
VALUES ({ProfileId},'{label.Name}','LBL','{label.Text}','{label.Location.X}','{label.Location.Y}','{USER_USERNAME}',{label.Size.Height},{label.Size.Width},'{label.TextAlign}','')"
|
||||
If DatabaseFallback.ExecuteNonQueryECM(oInsert) Then
|
||||
'TBPM_PROFILE_CONTROLSTableAdapter.cmdInsertAnlage(ProfileId, label.Name, "LBL", label.Text, label.Location.X, label.Location.Y, USER_USERNAME, label.Size.Height, label.Size.Width, label.TextAlign, "")
|
||||
CHANGES_FORM_DESIGN = True
|
||||
CurrentControl = label
|
||||
CurrentControl.Tag = New ClassControlCreator.ControlMetadata() With {
|
||||
.Guid = GetLastID(),
|
||||
.ReadOnly = False
|
||||
}
|
||||
pnldesigner.Controls.Add(label)
|
||||
Else
|
||||
_Logger.Info($"Error while inserting new Label Control into TBPM_PROFILE_CONTROLS: {oInsert}")
|
||||
MsgBox("Fehler beim Erstellen des Labels. Bitte überprüfen Sie die Log-Datei für weitere Informationen.", MsgBoxStyle.Critical, "Fehler beim Erstellen des Labels")
|
||||
End If
|
||||
Case ClassControlCreator.PREFIX_TEXTBOX
|
||||
Dim txt = ControlCreator.CreateNewTextBox(cursorPosition)
|
||||
SetMovementHandlers(txt)
|
||||
@@ -1296,9 +1306,9 @@ Public Class frmFormDesigner
|
||||
RibPGCtrlWidth.Enabled = True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
_Logger.Info($"Error while Adding new control {NewControlSelected}:")
|
||||
_Logger.Info(ex)
|
||||
MsgBox($"Error while Adding new control {NewControlSelected}: {ex.Message}" & vbCrLf & "Check the log for further info", MsgBoxStyle.Critical)
|
||||
End Try
|
||||
Me.Cursor = Cursors.Default
|
||||
NewControlSelected = ""
|
||||
|
||||
@@ -3204,7 +3204,7 @@ FROM VWPM_PROFILE_ACTIVE T WHERE T.GUID IN (SELECT PROFILE_ID FROM [dbo].[FNPM_G
|
||||
})
|
||||
EnsureProfileSearchType(BASEDATA_DT_PROFILES_SEARCHES_DATA, "SQL", NameOf(BASEDATA_DT_PROFILES_SEARCHES_DATA))
|
||||
|
||||
oSQL = String.Format("SELECT [dbo].[FNPM_LANGUAGE_CONTROL_TEXT] (NAME,'{0}',CTRL_TYPE,CTRL_TEXT) CTRL_CAPTION_LANG, '{0}' as LANGUAGE, * FROM TBPM_PROFILE_CONTROLS WITH (NOLOCK)", {USER_LANGUAGE})
|
||||
oSQL = String.Format("SELECT [dbo].[FNPM_LANGUAGE_CONTROL_TEXT] (NAME,'{0}',CTRL_TYPE,CTRL_TEXT) CTRL_CAPTION_LANG, '{0}' as LANGUAGE, * FROM TBPM_PROFILE_CONTROLS WITH (NOLOCK) WHERE CONTROL_ACTIVE = 1", {USER_LANGUAGE})
|
||||
BASEDATA_TBPM_PROFILE_CONTROLS = DatabaseFallback.GetDatatable("TBPM_PROFILE_CONTROLS_LANGUAGE", New GetDatatableOptions(oSQL, DatabaseType.ECM) With {
|
||||
.FilterExpression = String.Format("LANGUAGE = '{0}'", {USER_LANGUAGE})
|
||||
})
|
||||
|
||||
@@ -1164,7 +1164,6 @@ Public Class frmMassValidator
|
||||
If CreateWMObject() = True Then
|
||||
If ClassFinalizeDoc.Write_Final_Metadata(CURRENT_WMFILE) = True Then
|
||||
Dim sql = $"EXEC PRTF_PROFILE_FILES_WORK {CURRENT_DOC_ID},{CURRENT_ProfilGUID},{USER_ID},'Worked'"
|
||||
|
||||
'String.Format("UPDATE TBPM_PROFILE_FILES SET IN_WORK = 0, WORK_USER = '{0}', EDIT = 1 WHERE GUID = {1}", USER_USERNAME, CURRENT_DOC_GUID)
|
||||
If DatabaseFallback.ExecuteNonQueryECM(sql) = True Then
|
||||
workedFiles += 1
|
||||
|
||||
@@ -1380,9 +1380,8 @@ Public Class frmValidator
|
||||
Next
|
||||
End If
|
||||
' ========== ENDE ==========
|
||||
|
||||
oSQL = $"SELECT IIF(LANG.CAPTION IS NULL,T.SPALTEN_HEADER,LANG.CAPTION) SPALTEN_HEADER_LANG, T.* from TBPM_CONTROL_TABLE T WITH (NOLOCK) INNER JOIN TBPM_PROFILE_CONTROLS T1 WITH (NOLOCK) ON T.CONTROL_ID = T1.GUID
|
||||
LEFT JOIN (SELECT * FROM TBPM_CONTOL_TABLE_LANG WHERE LANG_CODE = '{USER_LANGUAGE}') LANG ON T.GUID = LANG.COL_ID WHERE T1.CONTROL_ACTIVE = 1 AND T.CONTROL_ID = T1.GUID AND T1.PROFIL_ID = {CURRENT_ProfilGUID} ORDER BY T.SEQUENCE"
|
||||
LEFT JOIN (SELECT * FROM TBPM_CONTOL_TABLE_LANG WHERE LANG_CODE = '{USER_LANGUAGE}') LANG ON T.GUID = LANG.COL_ID WHERE T1.CONTROL_ACTIVE = 1 AND T.CONTROL_ID = T1.GUID AND T1.PROFIL_ID = {CURRENT_ProfilGUID} ORDER BY T.SEQUENCE"
|
||||
DT_COLUMNS_GRID = DatabaseFallback.GetDatatable("TBPM_CONTROL_TABLE", New GetDatatableOptions(oSQL, DatabaseType.ECM) With {
|
||||
.FilterExpression = $"PROFIL_ID = {CURRENT_ProfilGUID} AND LANG_CODE = '{USER_LANGUAGE}' ",
|
||||
.SortByColumn = "SEQUENCE"
|
||||
@@ -1792,6 +1791,7 @@ Public Class frmValidator
|
||||
Case Type = GetType(Windows.Forms.ComboBox)
|
||||
Dim cmb As Windows.Forms.ComboBox = inctrl
|
||||
cmb.SelectedIndex = -1
|
||||
cmb.Text = String.Empty
|
||||
Case Type = GetType(DataGridView)
|
||||
Dim dgv As DataGridView = inctrl
|
||||
If dgv.Rows.Count > 0 Then
|
||||
@@ -3780,9 +3780,9 @@ Public Class frmValidator
|
||||
' Fallback zu SQL
|
||||
Dim query As String
|
||||
If String.IsNullOrWhiteSpace(filter) Then
|
||||
query = "SELECT * FROM TBPM_PROFILE_CONTROLS"
|
||||
query = "SELECT * FROM TBPM_PROFILE_CONTROLS WHERE CONTROL_ACTIVE = 1"
|
||||
Else
|
||||
query = $"SELECT * FROM TBPM_PROFILE_CONTROLS WHERE {filter}"
|
||||
query = $"SELECT * FROM TBPM_PROFILE_CONTROLS WHERE CONTROL_ACTIVE = 1 AND {filter}"
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrWhiteSpace(SortBy) Then
|
||||
@@ -4241,7 +4241,7 @@ Public Class frmValidator
|
||||
End If
|
||||
|
||||
If Amount_Docs2Validate > 1 Then
|
||||
Dim omsg = String.Format(Translation_Strings.Verbleibende_Vorgänge___0_, Amount_Docs2Validate)
|
||||
Dim omsg = String.Format(Translation_Strings.Verbleibende_Vorgänge___0_, Amount_Docs2Validate - 1)
|
||||
bsiInformation.Caption = omsg
|
||||
bsiInformation.Caption = omsg
|
||||
If RbnPgGrpActions.Visible = False Then
|
||||
@@ -6994,7 +6994,7 @@ Public Class frmValidator
|
||||
Next
|
||||
Return odt
|
||||
End Function
|
||||
Function Check_UpdateIndexe() As Boolean
|
||||
Function Check_UpdateIndexe(Optional ByVal pRegularComplete As Boolean = True) As Boolean
|
||||
Dim oControlName
|
||||
Dim oControlId As String
|
||||
Try
|
||||
@@ -7084,12 +7084,12 @@ Public Class frmValidator
|
||||
Case oControl.GetType = GetType(LookupControl3)
|
||||
Try
|
||||
Dim lookup As LookupControl3 = oControl
|
||||
If lookup.Properties.SelectedValues.Count = 0 And oIsRequired = True Then
|
||||
If lookup.Properties.SelectedValues.Count = 0 And oIsRequired = True And pRegularComplete Then
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = $"Kein Auswahl getroffen in LookupGrid '{oControl.Name}'"
|
||||
MyValidationLogger.Warn($"⚠️ Kein Auswahl getroffen in LookupGrid '{oControl.Name}'")
|
||||
oErrMsgMissingInput = $"Pflichtfeld: Keine Auswahl getroffen in LookupGrid '{oControl.Name}'"
|
||||
MyValidationLogger.Warn($"⚠️ {oErrMsgMissingInput}")
|
||||
oControl.BackColor = Color.Red
|
||||
frmError.ShowDialog()
|
||||
OpenfrmError(oErrMsgMissingInput)
|
||||
Exit For
|
||||
Else
|
||||
If lookup.Properties.MultiSelect = True Then
|
||||
@@ -7144,10 +7144,11 @@ Public Class frmValidator
|
||||
Else
|
||||
' Single-Select Lookup
|
||||
oMyInput = lookup.Properties.SelectedValues.FirstOrDefault()
|
||||
If IsNothing(oMyInput) And oIsRequired = True Then
|
||||
If IsNothing(oMyInput) And oIsRequired = True And pRegularComplete Then
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = $"Could not get FirstOrDefault-Value of LookUpGrid! - LookUPGridName: {lookup.Name}"
|
||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||
OpenfrmError(oErrMsgMissingInput)
|
||||
Exit For
|
||||
ElseIf IsNothing(oMyInput) And oIsRequired = False Then
|
||||
For Each ochangedLookub In listChangedLookup
|
||||
@@ -7279,7 +7280,7 @@ Public Class frmValidator
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If Check_Missing_Control_Value(oControl, "txt") = True And oIsRequired = True Then
|
||||
If Check_Missing_Control_Value(oControl, "txt") = True And oIsRequired = True And pRegularComplete Then
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = oWrongInputMessage & " textbox '" & oControl.Name & "'"
|
||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||
@@ -7409,7 +7410,7 @@ Public Class frmValidator
|
||||
Try
|
||||
MyValidationLogger.Debug($"Working on Combobox...")
|
||||
Dim cmb As Windows.Forms.ComboBox = oControl
|
||||
If cmb.SelectedIndex = -1 And oIsRequired = True Then
|
||||
If cmb.SelectedIndex = -1 And oIsRequired = True And pRegularComplete Then
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = "Please Choose an entry out of ComboBox '" & cmb.Name & "'"
|
||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||
@@ -7544,7 +7545,7 @@ Public Class frmValidator
|
||||
Case oControl.GetType = GetType(DateTimePicker)
|
||||
Try
|
||||
Dim dtp As DateTimePicker = oControl
|
||||
If oIsRequired = True And dtp.Value.ToString = String.Empty Then
|
||||
If oIsRequired = True And dtp.Value.ToString = String.Empty And pRegularComplete Then
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = "Please Choose DateValue for field'" & dtp.Name & "'"
|
||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||
@@ -7640,7 +7641,7 @@ Public Class frmValidator
|
||||
Dim chk As CheckBox = oControl
|
||||
oMyInput = chk.Checked.ToString
|
||||
|
||||
If chk.CheckState = CheckState.Indeterminate And oIsRequired = True Then
|
||||
If chk.CheckState = CheckState.Indeterminate And oIsRequired = True And pRegularComplete Then
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = "Please set Checkbox value for field '" & chk.Name & "'"
|
||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||
@@ -7758,7 +7759,7 @@ Public Class frmValidator
|
||||
Zeilen += 1
|
||||
End If
|
||||
Next
|
||||
If oIsRequired = True And Zeilen = 0 Then
|
||||
If oIsRequired = True And Zeilen = 0 And pRegularComplete Then
|
||||
oMissing = True
|
||||
oErrMsgMissingInput = "Fehlende Eingabe in Vektorfeld '" & dgv.Name & "'"
|
||||
MyValidationLogger.Warn(oErrMsgMissingInput)
|
||||
@@ -8701,7 +8702,7 @@ Public Class frmValidator
|
||||
ShowOverlaySafe() ' ✅ Overlay hier öffnen
|
||||
Try
|
||||
' ========== FIX 2: Nur EINEN Check-Aufruf ==========
|
||||
If Check_UpdateIndexe() = True Then
|
||||
If Check_UpdateIndexe(False) = True Then
|
||||
SetStatusLabel("Data saved", "LimeGreen")
|
||||
MyValidationLogger.Info("Workflowdata saved manually!")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user