MS
This commit is contained in:
parent
3dcca628a6
commit
977e358eaf
@ -129,6 +129,17 @@
|
||||
Return Nothing
|
||||
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
|
||||
|
||||
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
|
||||
If omytype = "System.Data.DataTable" Then
|
||||
Dim oDTMyNewValues As DataTable = oNewValue
|
||||
Dim oOldAttributeResult
|
||||
Dim oTypeOldResult
|
||||
|
||||
If CheckDeleted = True Then
|
||||
Dim oOldAttributeResult = GetVariableValue(oAttributeName, oIDBTyp)
|
||||
Dim oTypeOldResult = oOldAttributeResult.GetType.ToString
|
||||
oOldAttributeResult = GetVariableValue(oAttributeName, oIDBTyp)
|
||||
oTypeOldResult = oOldAttributeResult.GetType.ToString
|
||||
If oTypeOldResult = "System.Data.DataTable" Then
|
||||
Dim myOldValues As DataTable = oOldAttributeResult
|
||||
If myOldValues.Rows.Count > 1 Then
|
||||
@ -164,7 +177,13 @@
|
||||
|
||||
Next
|
||||
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
|
||||
|
||||
For Each oNewValueRow As DataRow In oDTMyNewValues.Rows
|
||||
|
||||
@ -827,6 +827,9 @@ Public Class frmMain
|
||||
End If
|
||||
|
||||
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
|
||||
' Dim oUpdate = "Not Defined"
|
||||
' Try
|
||||
|
||||
@ -4240,17 +4240,17 @@ Public Class frmValidator
|
||||
Case "DevExpress.XtraGrid.GridControl"
|
||||
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
|
||||
If oIsRequired = True And Zeilen = 0 Then
|
||||
If oIsRequired = True And oRowCount = 0 Then
|
||||
oMissing = True
|
||||
oErrorMessage = "Fehlende Eingabe in Tabelle '" & dgv.Name & "'"
|
||||
oControl.BackColor = Color.Red
|
||||
Exit For
|
||||
|
||||
|
||||
ElseIf Zeilen > 0 Then
|
||||
ElseIf oRowCount > 0 Then
|
||||
Dim ZeilenGrid As Integer = 0
|
||||
Dim myVektorArr As String()
|
||||
'Jeden Werte des Datagridviews durchlaufen
|
||||
@ -4326,9 +4326,15 @@ Public Class frmValidator
|
||||
oErrorMessage = $"Error while indexing table (2) {dgv.Name} - ERROR: " & idxerr_message
|
||||
Exit For
|
||||
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 Select
|
||||
End If 'End If für Control und ReadOnly = False
|
||||
Next
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user