jj 25.10.
This commit is contained in:
@@ -942,6 +942,7 @@ Public Class ClassControlBuilder
|
|||||||
'AddHandler combo.GotFocus, AddressOf OnComboBoxFocused
|
'AddHandler combo.GotFocus, AddressOf OnComboBoxFocused
|
||||||
AddHandler combo.Enter, AddressOf OnComboBoxFocused
|
AddHandler combo.Enter, AddressOf OnComboBoxFocused
|
||||||
AddHandler combo.SelectedValueChanged, AddressOf OnComboBoxValueChanged
|
AddHandler combo.SelectedValueChanged, AddressOf OnComboBoxValueChanged
|
||||||
|
AddHandler combo.TextChanged, AddressOf RecordChanged
|
||||||
|
|
||||||
'AddHandler combo.TextChanged, AddressOf RecordChanged
|
'AddHandler combo.TextChanged, AddressOf RecordChanged
|
||||||
'AddHandler combo.GotFocus, AddressOf OnComboBoxFocus
|
'AddHandler combo.GotFocus, AddressOf OnComboBoxFocus
|
||||||
|
|||||||
@@ -340,9 +340,24 @@
|
|||||||
CURRENT_CONTROL_ID = properties.ID
|
CURRENT_CONTROL_ID = properties.ID
|
||||||
End If
|
End If
|
||||||
|
|
||||||
SQL = $"UPDATE TBPMO_CONTROL SET REQUIRED = {REQUIRED}, READ_ONLY = {READ_ONLY}, SHOW_COLUMN = {SHOW_COLUMN}, FORMAT_TYPE = '{FORMAT_TYPE}', DEFAULT_VALUE = '{DEFAULTVALUE}',
|
SQL = $"UPDATE TBPMO_CONTROL
|
||||||
NAME = '{NAME}', SQL_COMMAND_1 = '{SQLCommand}', CHANGED_WHO = '{CHANGED_WHO}', COL_NAME = '{COL_NAME}', MULTILINE = {MULTILINE}, MASTER_DATA_ID = {MASTER_DATA_ID},
|
SET REQUIRED = {REQUIRED},
|
||||||
STATIC_LIST = '{STATIC_LIST}', SQL_COMMAND_2 = '{SQL_ENABLED_WHEN}', VISIBLE = {VISIBLE}, TREE_VIEW = {TREE_VIEW}, SELECT_ONLY = {SELECT_ONLY}, AUTO_SUGGEST = {AUTO_SUGGEST}
|
READ_ONLY = {READ_ONLY},
|
||||||
|
SHOW_COLUMN = {SHOW_COLUMN},
|
||||||
|
FORMAT_TYPE = '{FORMAT_TYPE}',
|
||||||
|
DEFAULT_VALUE = '{DEFAULTVALUE}',
|
||||||
|
NAME = '{NAME}',
|
||||||
|
SQL_COMMAND_1 = '{SQLCommand}',
|
||||||
|
SQL_COMMAND_2 = '{SQL_ENABLED_WHEN}',
|
||||||
|
CHANGED_WHO = '{CHANGED_WHO}',
|
||||||
|
COL_NAME = '{COL_NAME}',
|
||||||
|
MULTILINE = {MULTILINE},
|
||||||
|
MASTER_DATA_ID = {MASTER_DATA_ID},
|
||||||
|
STATIC_LIST = '{STATIC_LIST}',
|
||||||
|
VISIBLE = {VISIBLE},
|
||||||
|
TREE_VIEW = {TREE_VIEW},
|
||||||
|
SELECT_ONLY = {SELECT_ONLY},
|
||||||
|
AUTO_SUGGEST = {AUTO_SUGGEST}
|
||||||
WHERE GUID = {CURRENT_CONTROL_ID}"
|
WHERE GUID = {CURRENT_CONTROL_ID}"
|
||||||
|
|
||||||
If ClassDatabase.Execute_non_Query(SQL) = True Then
|
If ClassDatabase.Execute_non_Query(SQL) = True Then
|
||||||
@@ -493,11 +508,6 @@
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
Else
|
Else
|
||||||
Throw New Exception()
|
Throw New Exception()
|
||||||
|
|||||||
@@ -543,7 +543,14 @@ Public Class ClassControlCommandsUI
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else ' Update Control
|
Else ' Update Control
|
||||||
If TypeOf ctrl Is DevExpress.XtraEditors.DateEdit And (IsNothing(CONTROL_VALUE) Or CONTROL_VALUE = String.Empty) Then
|
Dim isEmptyValue As Boolean = IsNothing(CONTROL_VALUE) Or CONTROL_VALUE = String.Empty
|
||||||
|
Dim isDateEdit = TypeOf ctrl Is DevExpress.XtraEditors.DateEdit
|
||||||
|
Dim isTextBox = TypeOf ctrl Is TextBox
|
||||||
|
Dim isComboBox = TypeOf ctrl Is CustomComboBox
|
||||||
|
|
||||||
|
' Bei bestimmten Controls soll der Wert in CONTROL_VALUES gelöscht werden
|
||||||
|
' wenn der Wert im Control leer ist
|
||||||
|
If (isDateEdit Or isTextBox Or isComboBox) And isEmptyValue Then
|
||||||
|
|
||||||
Dim sql As String = $"DELETE FROM TBPMO_CONTROL_VALUE WHERE RECORD_ID = {RecordID} AND CONTROL_ID = {CONTROL_ID}"
|
Dim sql As String = $"DELETE FROM TBPMO_CONTROL_VALUE WHERE RECORD_ID = {RecordID} AND CONTROL_ID = {CONTROL_ID}"
|
||||||
If ClassDatabase.Execute_non_Query(sql) = True Then
|
If ClassDatabase.Execute_non_Query(sql) = True Then
|
||||||
|
|||||||
@@ -19,33 +19,7 @@ Public Class ClassDatabase
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function CreateRecord_New(formId As Integer, Optional UseProxy As Boolean = False)
|
|
||||||
Dim SQLconnect As New SqlClient.SqlConnection
|
|
||||||
|
|
||||||
If UseProxy = True And DD_LIB_Standards.clsDatabase.DB_PROXY_INITIALIZED Then
|
|
||||||
SQLconnect.ConnectionString = ClassProxy.MyPROXYConnectionString
|
|
||||||
Else
|
|
||||||
SQLconnect.ConnectionString = ClassDatabase.connectionString
|
|
||||||
End If
|
|
||||||
|
|
||||||
Using cmd As New SqlCommand("PRPMO_CREATE_RECORD", SQLconnect)
|
|
||||||
|
|
||||||
cmd.CommandType = CommandType.StoredProcedure
|
|
||||||
cmd.Parameters.AddWithValue("@pFORM_ID", formId)
|
|
||||||
cmd.Parameters.AddWithValue("@pADDED_WHO", Environment.UserName)
|
|
||||||
cmd.Parameters.Add("@pRESULT", SqlDbType.Int)
|
|
||||||
cmd.Parameters("@pRESULT").Direction = ParameterDirection.Output
|
|
||||||
|
|
||||||
SQLconnect.Open()
|
|
||||||
cmd.ExecuteNonQuery()
|
|
||||||
SQLconnect.Close()
|
|
||||||
|
|
||||||
Dim GUID As Integer = cmd.Parameters("@pRESULT").Value
|
|
||||||
|
|
||||||
Return GUID
|
|
||||||
End Using
|
|
||||||
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Shared Function GetConnectionString(id As Integer)
|
Public Shared Function GetConnectionString(id As Integer)
|
||||||
Dim connectionString As String = ""
|
Dim connectionString As String = ""
|
||||||
@@ -116,7 +90,7 @@ Public Class ClassDatabase
|
|||||||
Return dt
|
Return dt
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox("Error in Return_Datatable: " & ex.Message & vbNewLine & vbNewLine & Select_anweisung, MsgBoxStyle.Critical)
|
MsgBox("Error in Return_Datatable: " & ex.Message & vbNewLine & vbNewLine & Select_anweisung, MsgBoxStyle.Critical)
|
||||||
ClassHelper.InsertEssential_Log(CURRENT_RECORD_ID, "RECORD-ID", ex.Message & " - SQL: " & Select_anweisung
|
ClassHelper.InsertEssential_Log(CURRENT_RECORD_ID, "RECORD-ID", ex.Message & " - SQL: " & Select_anweisung)
|
||||||
ClassLogger.Add("Error in Return_Datatable: " & ex.Message, True)
|
ClassLogger.Add("Error in Return_Datatable: " & ex.Message, True)
|
||||||
ClassLogger.Add(">> SQL: " & Select_anweisung, False)
|
ClassLogger.Add(">> SQL: " & Select_anweisung, False)
|
||||||
If (ex.Message.Contains("Ungültiger Objektname") Or ex.Message.Contains("Invalid Object Name")) And DD_LIB_Standards.clsDatabase.DB_PROXY_INITIALIZED Then
|
If (ex.Message.Contains("Ungültiger Objektname") Or ex.Message.Contains("Invalid Object Name")) And DD_LIB_Standards.clsDatabase.DB_PROXY_INITIALIZED Then
|
||||||
|
|||||||
@@ -1,4 +1,34 @@
|
|||||||
Public Class ClassRecordCommands
|
Imports System.Data.SqlClient
|
||||||
|
|
||||||
|
Public Class ClassRecordCommands
|
||||||
|
Public Shared Function CreateRecordProcedure(formId As Integer)
|
||||||
|
Try
|
||||||
|
Dim connection As New SqlConnection
|
||||||
|
|
||||||
|
connection.ConnectionString = MyConnectionString
|
||||||
|
|
||||||
|
Using cmd As New SqlCommand("PRPMO_CREATE_RECORD", connection)
|
||||||
|
|
||||||
|
cmd.CommandType = CommandType.StoredProcedure
|
||||||
|
cmd.Parameters.AddWithValue("@pFORM_ID", formId)
|
||||||
|
cmd.Parameters.AddWithValue("@pADDED_WHO", Environment.UserName)
|
||||||
|
cmd.Parameters.Add("@pRESULT", SqlDbType.Int)
|
||||||
|
cmd.Parameters("@pRESULT").Direction = ParameterDirection.Output
|
||||||
|
|
||||||
|
connection.Open()
|
||||||
|
cmd.ExecuteNonQuery()
|
||||||
|
connection.Close()
|
||||||
|
|
||||||
|
Dim GUID As Integer = cmd.Parameters("@pRESULT").Value
|
||||||
|
|
||||||
|
Return GUID
|
||||||
|
End Using
|
||||||
|
Catch ex As Exception
|
||||||
|
ClassHelper.MSGBOX_Handler("ERROR", "Error", "Error in CreateRecordProcedure: ", ex.Message)
|
||||||
|
Return 0
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Shared Function CreateRecord(EntityID)
|
Public Shared Function CreateRecord(EntityID)
|
||||||
Dim SQL = "INSERT INTO TBPMO_RECORD(ADDED_WHO, FORM_ID,RECORD_ENTITY_ID) VALUES ('" & USER_USERNAME & "', " & EntityID & ",4711)"
|
Dim SQL = "INSERT INTO TBPMO_RECORD(ADDED_WHO, FORM_ID,RECORD_ENTITY_ID) VALUES ('" & USER_USERNAME & "', " & EntityID & ",4711)"
|
||||||
Return ClassDatabase.Execute_non_Query(SQL) = True
|
Return ClassDatabase.Execute_non_Query(SQL) = True
|
||||||
|
|||||||
@@ -1745,48 +1745,50 @@ Public Class frmConstructor_Main
|
|||||||
Me.Cursor = Cursors.WaitCursor
|
Me.Cursor = Cursors.WaitCursor
|
||||||
' Try
|
' Try
|
||||||
If TCDetails.SelectedTabPage.Text.StartsWith("Pos") = False Then
|
If TCDetails.SelectedTabPage.Text.StartsWith("Pos") = False Then
|
||||||
SELECTED_RECORD_ID = 0
|
SELECTED_RECORD_ID = 0
|
||||||
Lock_RecordControls(False)
|
Lock_RecordControls(False)
|
||||||
tsButtonCancel.Visible = True
|
tsButtonCancel.Visible = True
|
||||||
|
|
||||||
CURRENT_PARENT_ENTITY_ID = PARENT_ENTITYID
|
CURRENT_PARENT_ENTITY_ID = PARENT_ENTITYID
|
||||||
' Den Record anlegen, damit wir eine RECORD_ID bekommen
|
' Den Record anlegen, damit wir eine RECORD_ID bekommen
|
||||||
If ClassRecordCommands.CreateRecord(ENTITY_ID) = True Then
|
|
||||||
|
Dim recordId = ClassRecordCommands.CreateRecordProcedure(ENTITY_ID)
|
||||||
|
|
||||||
|
If recordId > 0 Then
|
||||||
' Die RECORD_ID auslesen und setzen
|
' Die RECORD_ID auslesen und setzen
|
||||||
NEW_RECORD_ID = ClassRecordCommands.GetLastRecord()
|
NEW_RECORD_ID = recordId
|
||||||
CURRENT_RECORD_ID = NEW_RECORD_ID
|
CURRENT_RECORD_ID = NEW_RECORD_ID
|
||||||
RECORD_ID = NEW_RECORD_ID
|
RECORD_ID = NEW_RECORD_ID
|
||||||
SELECTED_RECORD_ID = NEW_RECORD_ID
|
SELECTED_RECORD_ID = NEW_RECORD_ID
|
||||||
ClassProxy.PRPROXY_RECORD_UPD_INS(ENTITY_ID, SELECTED_RECORD_ID)
|
ClassProxy.PRPROXY_RECORD_UPD_INS(ENTITY_ID, SELECTED_RECORD_ID)
|
||||||
If PARENT_ENTITYID > 0 And PARENT_RECORDID > 0 Then
|
If PARENT_ENTITYID > 0 And PARENT_RECORDID > 0 Then
|
||||||
If ClassRecordCommands.ConnectRecord(PARENT_RECORDID, CURRENT_RECORD_ID, "INSERT RECORD") = False Then
|
If ClassRecordCommands.ConnectRecord(PARENT_RECORDID, CURRENT_RECORD_ID, "INSERT RECORD") = False Then
|
||||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "In Connecting Record - Check the log!")
|
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "In Connecting Record - Check the log!")
|
||||||
Else
|
Else
|
||||||
ClassProxy.PRPROXY_RECORD_CONNECT(PARENT_RECORDID, CURRENT_RECORD_ID)
|
ClassProxy.PRPROXY_RECORD_CONNECT(PARENT_RECORDID, CURRENT_RECORD_ID)
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ClassControlValues.LoadDefaultValues(ENTITY_ID, SELECTED_RECORD_ID, pnlDetails.Controls, CURRENT_PARENT_ENTITY_ID, ENTITY_ID)
|
|
||||||
ClassControlValues.Enable_Depending_Controls(ENTITY_ID, RECORD_ID, PARENT_RECORDID, CtrlBuilder.AllControls, ENTITY_ID)
|
|
||||||
' Das StatusLabel aktualisieren
|
|
||||||
Update_Record_Label(NEW_RECORD_ID)
|
|
||||||
Doc_ReadOnlyHandler(True)
|
|
||||||
RUN_WDSEARCH_GRID()
|
|
||||||
' Im gegensatz zu EnableEditMode muss hier nur der save button enabled werden
|
|
||||||
tsButtonSave.Enabled = True
|
|
||||||
' Muss aktiviert werden, sonst funktionieren die Combobox Abhängigkeits Events nicht
|
|
||||||
CURRENT_RECORD_ENABLED = True
|
|
||||||
' EDIT_STATE muss hier (immer?) Update sein, sonst wird beim Speichern noch ein Datensatz angelegt
|
|
||||||
EDIT_STATE = EditState.Update
|
|
||||||
RECORD_CHANGED = True
|
|
||||||
'tsslblRecord.Text = "Adding record ......"
|
|
||||||
RIGHT_RECORD_AND_FILE_READ_ONLY = False
|
|
||||||
tslblLocked.Visible = False
|
|
||||||
tslblFileslocked.Visible = False
|
|
||||||
tsButtonAdd.Enabled = False
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
ClassControlValues.LoadDefaultValues(ENTITY_ID, SELECTED_RECORD_ID, pnlDetails.Controls, CURRENT_PARENT_ENTITY_ID, ENTITY_ID)
|
||||||
|
ClassControlValues.Enable_Depending_Controls(ENTITY_ID, RECORD_ID, PARENT_RECORDID, CtrlBuilder.AllControls, ENTITY_ID)
|
||||||
|
' Das StatusLabel aktualisieren
|
||||||
|
Update_Record_Label(NEW_RECORD_ID)
|
||||||
|
Doc_ReadOnlyHandler(True)
|
||||||
|
RUN_WDSEARCH_GRID()
|
||||||
|
' Im gegensatz zu EnableEditMode muss hier nur der save button enabled werden
|
||||||
|
tsButtonSave.Enabled = True
|
||||||
|
' Muss aktiviert werden, sonst funktionieren die Combobox Abhängigkeits Events nicht
|
||||||
|
CURRENT_RECORD_ENABLED = True
|
||||||
|
' EDIT_STATE muss hier (immer?) Update sein, sonst wird beim Speichern noch ein Datensatz angelegt
|
||||||
|
EDIT_STATE = EditState.Update
|
||||||
|
RECORD_CHANGED = True
|
||||||
|
'tsslblRecord.Text = "Adding record ......"
|
||||||
|
RIGHT_RECORD_AND_FILE_READ_ONLY = False
|
||||||
|
tslblLocked.Visible = False
|
||||||
|
tslblFileslocked.Visible = False
|
||||||
|
tsButtonAdd.Enabled = False
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
' Catch ex As Exception
|
' Catch ex As Exception
|
||||||
'ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error tsButtonAdd", ex.Message, ex.StackTrace)
|
'ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error tsButtonAdd", ex.Message, ex.StackTrace)
|
||||||
' Finally
|
' Finally
|
||||||
@@ -2860,8 +2862,11 @@ Public Class frmConstructor_Main
|
|||||||
Dim sql As String = String.Format("SELECT T.RECORD2_ID FROM TBPMO_RECORD_CONNECT T, TBPMO_RECORD T1 WHERE T.RECORD2_ID = T1.GUID AND T.RECORD1_ID = {0} and T1.FORM_ID = {1}", PARENT_RECORD_ID, ENTITY_ID)
|
Dim sql As String = String.Format("SELECT T.RECORD2_ID FROM TBPMO_RECORD_CONNECT T, TBPMO_RECORD T1 WHERE T.RECORD2_ID = T1.GUID AND T.RECORD1_ID = {0} and T1.FORM_ID = {1}", PARENT_RECORD_ID, ENTITY_ID)
|
||||||
Dim GRP_SINGLE_REC = ClassDatabase.Execute_Scalar(sql, True)
|
Dim GRP_SINGLE_REC = ClassDatabase.Execute_Scalar(sql, True)
|
||||||
If IsNothing(GRP_SINGLE_REC) Then
|
If IsNothing(GRP_SINGLE_REC) Then
|
||||||
If ClassRecordCommands.CreateRecord(ENTITY_ID) = True Then
|
|
||||||
GRP_SINGLE_REC = ClassRecordCommands.GetLastRecord
|
Dim recordId = ClassRecordCommands.CreateRecordProcedure(ENTITY_ID)
|
||||||
|
|
||||||
|
If recordId > 0 Then
|
||||||
|
GRP_SINGLE_REC = recordId
|
||||||
If Not IsNothing(GRP_SINGLE_REC) Then
|
If Not IsNothing(GRP_SINGLE_REC) Then
|
||||||
'Die neue Record-ID setzen
|
'Die neue Record-ID setzen
|
||||||
RECORD_ID = GRP_SINGLE_REC
|
RECORD_ID = GRP_SINGLE_REC
|
||||||
@@ -4786,18 +4791,17 @@ Public Class frmConstructor_Main
|
|||||||
sql = String.Format("SELECT CONTROL_ID FROM VWPMO_VALUES WHERE CONTROL_ID = {0} AND FORM_ID = {1} AND CONTROL_COLUMN = '{2}' AND RECORD_ID = {3}", controlid, POS_ENTITY, column, POS_RECORD_ID)
|
sql = String.Format("SELECT CONTROL_ID FROM VWPMO_VALUES WHERE CONTROL_ID = {0} AND FORM_ID = {1} AND CONTROL_COLUMN = '{2}' AND RECORD_ID = {3}", controlid, POS_ENTITY, column, POS_RECORD_ID)
|
||||||
Dim cId As Integer = ClassDatabase.Execute_Scalar(sql, True)
|
Dim cId As Integer = ClassDatabase.Execute_Scalar(sql, True)
|
||||||
If IsNothing(POS_RECORD_ID) Or IsDBNull(POS_RECORD_ID) Then
|
If IsNothing(POS_RECORD_ID) Or IsDBNull(POS_RECORD_ID) Then
|
||||||
If ClassRecordCommands.CreateRecord(POS_ENTITY) = True Then
|
Dim recordId = ClassRecordCommands.CreateRecordProcedure(POS_ENTITY)
|
||||||
Dim recid = ClassRecordCommands.GetLastRecord
|
|
||||||
If Not IsNothing(recid) Then
|
If recordId > 0 Then
|
||||||
'Die neue Record-ID setzen
|
'Die neue Record-ID setzen
|
||||||
POS_RECORD_ID = recid
|
POS_RECORD_ID = recordId
|
||||||
ClassProxy.PRPROXY_RECORD_UPD_INS(POS_ENTITY, POS_RECORD_ID)
|
ClassProxy.PRPROXY_RECORD_UPD_INS(POS_ENTITY, POS_RECORD_ID)
|
||||||
If ClassRecordCommands.ConnectRecord(PARENT_RECORDID, POS_RECORD_ID, "POS_LINK for Entity " & POS_ENTITY.ToString) = True Then
|
If ClassRecordCommands.ConnectRecord(PARENT_RECORDID, POS_RECORD_ID, "POS_LINK for Entity " & POS_ENTITY.ToString) = True Then
|
||||||
ClassProxy.PRPROXY_RECORD_CONNECT(PARENT_RECORDID, POS_RECORD_ID)
|
ClassProxy.PRPROXY_RECORD_CONNECT(PARENT_RECORDID, POS_RECORD_ID)
|
||||||
End If
|
|
||||||
Else
|
|
||||||
MsgBox("Unexpected Error in Creating POS", MsgBoxStyle.Exclamation)
|
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
MsgBox("Unexpected Error in Creating POS", MsgBoxStyle.Exclamation)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' Wenn cId = 0, existiert noch kein wert für diese controlId/FormId Kombination
|
' Wenn cId = 0, existiert noch kein wert für diese controlId/FormId Kombination
|
||||||
@@ -4815,9 +4819,6 @@ Public Class frmConstructor_Main
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in grvwGridPos_CellValueChanged: ", ex.Message)
|
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in grvwGridPos_CellValueChanged: ", ex.Message)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub grvwGridPos_FocusedRowChanged(sender As Object, e As FocusedRowChangedEventArgs) Handles grvwGridPos.FocusedRowChanged
|
Private Sub grvwGridPos_FocusedRowChanged(sender As Object, e As FocusedRowChangedEventArgs) Handles grvwGridPos.FocusedRowChanged
|
||||||
@@ -6398,13 +6399,15 @@ Public Class frmConstructor_Main
|
|||||||
|
|
||||||
Dim NEWRECORD As Integer
|
Dim NEWRECORD As Integer
|
||||||
If RECORD_CREATE = True Then
|
If RECORD_CREATE = True Then
|
||||||
ClassRecordCommands.CreateRecord(ENTITY_ID)
|
Dim recordId = ClassRecordCommands.CreateRecordProcedure(ENTITY_ID)
|
||||||
Try
|
|
||||||
NEWRECORD = ClassRecordCommands.GetLastRecord()
|
If recordId = 0 Then
|
||||||
Catch ex As Exception
|
ClassLogger.Add("Error in ADD_NODE: Could not create Record", True)
|
||||||
Dim SQL = "SELECT (MAX(GUID)) FROM TBPMO_RECORD where PARENT_RECORD = 0 AND ADDED_WHO = '" & USER_USERNAME & "'"
|
ClassHelper.MSGBOX_Handler("ERROR", "Error in ADD_NODE", "Could not create Record")
|
||||||
NEWRECORD = ClassDatabase.Execute_Scalar(SQL)
|
Exit Sub
|
||||||
End Try
|
Else
|
||||||
|
NEWRECORD = recordId
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Dim NEWRECORD As Integer = ClassControlCommandsUI.GetLastRecord(ENTITY_ID)
|
'Dim NEWRECORD As Integer = ClassControlCommandsUI.GetLastRecord(ENTITY_ID)
|
||||||
|
|||||||
@@ -494,11 +494,17 @@ Public Class frmWD_Import_Doc_Record
|
|||||||
If IMPORT_REC_ID = Nothing Then
|
If IMPORT_REC_ID = Nothing Then
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Record is new!", False)
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> Record is new!", False)
|
||||||
'Den Record inserten
|
'Den Record inserten
|
||||||
ClassRecordCommands.CreateRecord(PROFILE_ENTITY)
|
|
||||||
IMPORT_REC_ID = ClassRecordCommands.GetLastRecord()
|
Dim recordId = ClassRecordCommands.CreateRecordProcedure(PROFILE_ENTITY)
|
||||||
REC_ADDED = True
|
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> New Record-ID: " & IMPORT_REC_ID.ToString, False)
|
If recordId > 0 Then
|
||||||
_RecordsAdded += 1
|
IMPORT_REC_ID = recordId
|
||||||
|
REC_ADDED = True
|
||||||
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> New Record-ID: " & IMPORT_REC_ID.ToString, False)
|
||||||
|
_RecordsAdded += 1
|
||||||
|
Else
|
||||||
|
Throw New Exception("Could not create Record")
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
ClassLogger.Add(">> ## RECORD already exists - Record-ID: '" & IMPORT_REC_ID.ToString & "' ##", False)
|
ClassLogger.Add(">> ## RECORD already exists - Record-ID: '" & IMPORT_REC_ID.ToString & "' ##", False)
|
||||||
If LogErrorsOnly = True Then ClassLogger.Add(">> Unique SQL: " & SQL_UNIQUE_FILE, False)
|
If LogErrorsOnly = True Then ClassLogger.Add(">> Unique SQL: " & SQL_UNIQUE_FILE, False)
|
||||||
@@ -544,10 +550,16 @@ Public Class frmWD_Import_Doc_Record
|
|||||||
If IMP_PARENT_REC_ID = Nothing Then
|
If IMP_PARENT_REC_ID = Nothing Then
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> No PARENT_RECORD found!", False)
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> No PARENT_RECORD found!", False)
|
||||||
'Den Record inserten
|
'Den Record inserten
|
||||||
ClassRecordCommands.CreateRecord(PROFILE_ENTITY)
|
|
||||||
IMP_PARENT_REC_ID = ClassRecordCommands.GetLastRecord()
|
Dim recordId = ClassRecordCommands.CreateRecordProcedure(PROFILE_ENTITY)
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> New PARENT_RECORD-ID: " & IMP_PARENT_REC_ID.ToString, False)
|
|
||||||
_RecordsAdded += 1
|
If recordId > 0 Then
|
||||||
|
IMP_PARENT_REC_ID = recordId
|
||||||
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> New PARENT_RECORD-ID: " & IMP_PARENT_REC_ID.ToString, False)
|
||||||
|
_RecordsAdded += 1
|
||||||
|
Else
|
||||||
|
Throw New Exception("Could not create Record. Check PRPMO_CREATE_RECORD Procedure.")
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
ClassLogger.Add(">> ## PARENT_RECORD already exists - PARENT_RECORD-ID: '" & IMP_PARENT_REC_ID.ToString & "' ##", False)
|
ClassLogger.Add(">> ## PARENT_RECORD already exists - PARENT_RECORD-ID: '" & IMP_PARENT_REC_ID.ToString & "' ##", False)
|
||||||
If LogErrorsOnly = True Then ClassLogger.Add(">> parent SQL: " & SQL_PARENT, False)
|
If LogErrorsOnly = True Then ClassLogger.Add(">> parent SQL: " & SQL_PARENT, False)
|
||||||
|
|||||||
Reference in New Issue
Block a user