MS
This commit is contained in:
parent
3dcca628a6
commit
977e358eaf
@ -129,6 +129,17 @@
|
|||||||
Return Nothing
|
Return Nothing
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
End Function
|
||||||
|
Public Function Delete_AttributeData(pIDB_OBJID As Int64, pAttributeName As String) As Object
|
||||||
|
Try
|
||||||
|
Dim oDELSQL = $"EXEC PRIDB_DELETE_ATTRIBUTE_DATA {pIDB_OBJID},'{pAttributeName}','{USER_USERNAME}'"
|
||||||
|
ClassDatabase.Execute_non_Query_ConStr(oDELSQL, CONNECTION_STRING_IDB)
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
LOGGER.Error(ex)
|
||||||
|
Return Nothing
|
||||||
|
End Try
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function SetVariableValue(oAttributeName As String, oNewValue As Object, Optional CheckDeleted As Boolean = False, Optional oIDBTyp As Integer = 0)
|
Public Function SetVariableValue(oAttributeName As String, oNewValue As Object, Optional CheckDeleted As Boolean = False, Optional oIDBTyp As Integer = 0)
|
||||||
@ -136,10 +147,12 @@
|
|||||||
Dim omytype = oNewValue.GetType.ToString
|
Dim omytype = oNewValue.GetType.ToString
|
||||||
If omytype = "System.Data.DataTable" Then
|
If omytype = "System.Data.DataTable" Then
|
||||||
Dim oDTMyNewValues As DataTable = oNewValue
|
Dim oDTMyNewValues As DataTable = oNewValue
|
||||||
|
Dim oOldAttributeResult
|
||||||
|
Dim oTypeOldResult
|
||||||
|
|
||||||
If CheckDeleted = True Then
|
If CheckDeleted = True Then
|
||||||
Dim oOldAttributeResult = GetVariableValue(oAttributeName, oIDBTyp)
|
oOldAttributeResult = GetVariableValue(oAttributeName, oIDBTyp)
|
||||||
Dim oTypeOldResult = oOldAttributeResult.GetType.ToString
|
oTypeOldResult = oOldAttributeResult.GetType.ToString
|
||||||
If oTypeOldResult = "System.Data.DataTable" Then
|
If oTypeOldResult = "System.Data.DataTable" Then
|
||||||
Dim myOldValues As DataTable = oOldAttributeResult
|
Dim myOldValues As DataTable = oOldAttributeResult
|
||||||
If myOldValues.Rows.Count > 1 Then
|
If myOldValues.Rows.Count > 1 Then
|
||||||
@ -164,7 +177,13 @@
|
|||||||
|
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
Dim oInfo = $"Value [{oOldAttributeResult}] of Attribute [{oAttributeName}] obviously was updated during runtime - will be deleted!"
|
||||||
|
LOGGER.Info(oInfo)
|
||||||
|
SetVariableValue(CURRENT_PROFILE_LOG_INDEX, oInfo)
|
||||||
|
Delete_Term_Object_From_Metadata(oAttributeName, oOldAttributeResult)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
For Each oNewValueRow As DataRow In oDTMyNewValues.Rows
|
For Each oNewValueRow As DataRow In oDTMyNewValues.Rows
|
||||||
|
|||||||
@ -827,6 +827,9 @@ Public Class frmMain
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If GridControl_Docs.Visible = True And formopenClose = False Then RefreshHelper.SaveViewInfo()
|
If GridControl_Docs.Visible = True And formopenClose = False Then RefreshHelper.SaveViewInfo()
|
||||||
|
If Application.OpenForms().OfType(Of frmValidator).Any Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
'If Not Application.OpenForms().OfType(Of frmValidator).Any Then
|
'If Not Application.OpenForms().OfType(Of frmValidator).Any Then
|
||||||
' Dim oUpdate = "Not Defined"
|
' Dim oUpdate = "Not Defined"
|
||||||
' Try
|
' Try
|
||||||
|
|||||||
@ -4240,17 +4240,17 @@ Public Class frmValidator
|
|||||||
Case "DevExpress.XtraGrid.GridControl"
|
Case "DevExpress.XtraGrid.GridControl"
|
||||||
Dim dgv As GridControl = oControl
|
Dim dgv As GridControl = oControl
|
||||||
|
|
||||||
Dim Zeilen As Integer = dgv.DataSource.Rows.Count
|
Dim oRowCount As Integer = dgv.DataSource.Rows.Count
|
||||||
|
|
||||||
'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 oIsRequired = True And Zeilen = 0 Then
|
If oIsRequired = True And oRowCount = 0 Then
|
||||||
oMissing = True
|
oMissing = True
|
||||||
oErrorMessage = "Fehlende Eingabe in Tabelle '" & dgv.Name & "'"
|
oErrorMessage = "Fehlende Eingabe in Tabelle '" & dgv.Name & "'"
|
||||||
oControl.BackColor = Color.Red
|
oControl.BackColor = Color.Red
|
||||||
Exit For
|
Exit For
|
||||||
|
|
||||||
|
|
||||||
ElseIf Zeilen > 0 Then
|
ElseIf oRowCount > 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
|
'Jeden Werte des Datagridviews durchlaufen
|
||||||
@ -4326,9 +4326,15 @@ Public Class frmValidator
|
|||||||
oErrorMessage = $"Error while indexing table (2) {dgv.Name} - ERROR: " & idxerr_message
|
oErrorMessage = $"Error while indexing table (2) {dgv.Name} - ERROR: " & idxerr_message
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
Dim oDT As DataTable = IDBData.GetVariableValue(oIndexName, oIDBTyp)
|
||||||
|
If oDT.Rows.Count > 0 Then
|
||||||
|
LOGGER.Debug("User cleared the grid, so data needs to be erased!")
|
||||||
|
IDBData.Delete_AttributeData(CURRENT_DOC_ID, oIndexName)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Select
|
End Select
|
||||||
End If 'End If für Control und ReadOnly = False
|
End If 'End If für Control und ReadOnly = False
|
||||||
Next
|
Next
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user