Personalakte

This commit is contained in:
Developer01
2025-06-18 09:33:52 +02:00
parent 0159fa79c4
commit cfe631a568
18 changed files with 561 additions and 345 deletions

View File

@@ -393,10 +393,10 @@ Public Class ClassControlCommandsUI
End Sub
Private Sub UpsertImage(ControlID As Integer, RecordID As Integer, image As Bitmap)
Dim existsSQL As String = "SELECT GUID FROM TBPMO_CONTROL_IMAGE WHERE CONTROL_ID = " & ControlID & " AND RECORD_ID = " & RecordID
Dim exists = MYDB_ECM.ExecuteNonQuery(existsSQL)
Dim existsSQL As String = "SELECT COALESCE(MAX(GUID),0) FROM TBPMO_CONTROL_IMAGE WHERE CONTROL_ID = " & ControlID & " AND RECORD_ID = " & RecordID
Dim exists = MYDB_ECM.GetScalarValue(existsSQL)
If IsNothing(exists) Then
If exists = 0 Then
InsertImage(ControlID, RecordID, image)
Else
UpdateImage(ControlID, RecordID, image)