MSKW43
This commit is contained in:
@@ -189,6 +189,7 @@ Public Class frmConstructor_Main
|
||||
Private IW_COMMENT As String
|
||||
Private BACKGROUND_HELPER As ClassBackgroundHelper
|
||||
Private ROW_READ_ONLY As Boolean = False
|
||||
Private ERROR_WHILE_SAVING As Boolean = False
|
||||
|
||||
Public Enum EditState
|
||||
None
|
||||
@@ -900,17 +901,7 @@ Public Class frmConstructor_Main
|
||||
End Function
|
||||
|
||||
Private Sub grvwGrid_BeforeLeaveRow(sender As Object, e As RowAllowEventArgs) Handles grvwGrid.BeforeLeaveRow
|
||||
'If RECORD_CHANGED = True Then
|
||||
' Dim ResultMessage As String
|
||||
' Try
|
||||
' ResultMessage = Update_Record_OnChange()
|
||||
' Catch ex As Exception
|
||||
' MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error in saving Record")
|
||||
' Me.Cursor = Cursors.Default
|
||||
' ' Verhindert den Zeilenwechsel
|
||||
' e.Allow = False
|
||||
' End Try
|
||||
'End If
|
||||
|
||||
If TrySave_Automatic() = False Then
|
||||
e.Allow = False
|
||||
Else
|
||||
@@ -960,7 +951,7 @@ Public Class frmConstructor_Main
|
||||
Exit Sub
|
||||
End If
|
||||
If NODE_NAVIGATION = True Then
|
||||
Exit Sub
|
||||
' Exit Sub
|
||||
End If
|
||||
' If NODE_NAVIGATION = False Then
|
||||
Dim Grid_RecordID = Get_Focused_Row_Cell_Value("Record-ID")
|
||||
@@ -979,7 +970,7 @@ Public Class frmConstructor_Main
|
||||
CURRENT_RECORD_ID = RECID
|
||||
CURRENT_SEARCH_TYPE = "RECORD"
|
||||
|
||||
If RECID = RECORD_ID And ENTITY_RECORD_COUNT > 1 And _refresh = False Then
|
||||
If RECID = RECORD_ID And ENTITY_RECORD_COUNT > 1 And _refresh = False And ERROR_WHILE_SAVING = False Then
|
||||
Exit Sub
|
||||
End If
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> RowHandler: RID: " & RECID.ToString & " - " & Now, False)
|
||||
@@ -1696,7 +1687,7 @@ Public Class frmConstructor_Main
|
||||
|
||||
Private Sub tsButtonAdd_Click(sender As Object, e As EventArgs) Handles tsButtonAdd.Click
|
||||
If USER_PERSONIFIED_TEST = True Then
|
||||
ClassHelper.MSGBOX_Handler("INFO", "Attention", "You are using ADDi in personified mode! Adding records is not allowed!")
|
||||
ClassHelper.MSGBOX_Handler("INFO", "Attention", "You are using ADDI in personified mode! Adding records is not allowed!")
|
||||
Exit Sub
|
||||
End If
|
||||
'If ClassProxy.IS_PROXY_BUSY = True Then
|
||||
@@ -1749,8 +1740,7 @@ Public Class frmConstructor_Main
|
||||
' Try
|
||||
If TCDetails.SelectedTabPage.Text.StartsWith("Pos") = False Then
|
||||
SELECTED_RECORD_ID = 0
|
||||
Lock_RecordControls(False)
|
||||
tsButtonCancel.Visible = True
|
||||
' Lock_RecordControls(False)
|
||||
|
||||
CURRENT_PARENT_ENTITY_ID = PARENT_ENTITYID
|
||||
' Den Record anlegen, damit wir eine RECORD_ID bekommen
|
||||
@@ -1758,6 +1748,8 @@ Public Class frmConstructor_Main
|
||||
Dim recordId = ClassRecordCommands.CreateRecordProcedure(ENTITY_ID)
|
||||
|
||||
If recordId > 0 Then
|
||||
Lock_RecordControls(False)
|
||||
tsButtonCancel.Visible = True
|
||||
' Die RECORD_ID auslesen und setzen
|
||||
NEW_RECORD_ID = recordId
|
||||
CURRENT_RECORD_ID = NEW_RECORD_ID
|
||||
@@ -1790,6 +1782,9 @@ Public Class frmConstructor_Main
|
||||
tslblLocked.Visible = False
|
||||
tslblFileslocked.Visible = False
|
||||
tsButtonAdd.Enabled = False
|
||||
Else
|
||||
Me.Cursor = Cursors.Default
|
||||
MsgBox("Could not create a new record. Please check the log for further informations!", MsgBoxStyle.Critical)
|
||||
End If
|
||||
End If
|
||||
' Catch ex As Exception
|
||||
@@ -1801,6 +1796,9 @@ Public Class frmConstructor_Main
|
||||
|
||||
Private Sub tsButtonSave_Click(sender As Object, e As EventArgs) Handles tsButtonSave.Click
|
||||
Save_Record()
|
||||
If ERROR_WHILE_SAVING = True Then
|
||||
Column_Row_Handler()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -2055,16 +2053,7 @@ Public Class frmConstructor_Main
|
||||
If RECORD_ENABLED = False Then
|
||||
EnableEditMode()
|
||||
Else
|
||||
'If RECORD_CHANGED = True Then
|
||||
' Dim ResultMessage As String
|
||||
' Try
|
||||
' ResultMessage = Update_Record_OnChange()
|
||||
' Catch ex As Exception
|
||||
' MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error in saving Record")
|
||||
' Me.Cursor = Cursors.Default
|
||||
' Exit Sub
|
||||
' End Try
|
||||
'End If
|
||||
|
||||
If TrySave_Automatic() = True Then
|
||||
DisableEditMode()
|
||||
End If
|
||||
@@ -2845,7 +2834,10 @@ Public Class frmConstructor_Main
|
||||
End If
|
||||
Try
|
||||
Dim ResultMessage = Update_Record_OnChange()
|
||||
Update_Status_Label(True, ResultMessage)
|
||||
If ResultMessage <> "ERROR" Then
|
||||
Update_Status_Label(True, ResultMessage)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in Save Record Changes: " & ex.Message, ex.StackTrace)
|
||||
End Try
|
||||
@@ -4810,11 +4802,11 @@ Public Class frmConstructor_Main
|
||||
End If
|
||||
' Wenn cId = 0, existiert noch kein wert für diese controlId/FormId Kombination
|
||||
If cId = 0 Then
|
||||
ClassControlCommandsUI.InsertControlValue(controlid, POS_RECORD_ID, e.Value, POS_ENTITY)
|
||||
Update_Status_Label(True, "Record was added!", EditState.Insert)
|
||||
ClassControlCommandsUI.CreateControlProcedure(controlid, POS_RECORD_ID, e.Value, POS_ENTITY)
|
||||
Update_Status_Label(True, "Value was added!", EditState.Insert)
|
||||
Else
|
||||
ClassControlCommandsUI.UpdateControlValue(controlid, POS_RECORD_ID, e.Value, POS_ENTITY)
|
||||
Update_Status_Label(True, "Record was updated!", EditState.Update)
|
||||
Update_Status_Label(True, "Value was updated!", EditState.Update)
|
||||
End If
|
||||
Else
|
||||
Update_Status_Label(False)
|
||||
@@ -5295,10 +5287,15 @@ Public Class frmConstructor_Main
|
||||
End Function
|
||||
|
||||
Public Sub TrySave_DoSave()
|
||||
ERROR_WHILE_SAVING = False
|
||||
' Record Speichern
|
||||
Dim ResultMessage = CtrlCommandUI.SaveRecord(SELECTED_RECORD_ID, ENTITY_ID, PARENT_RECORDID)
|
||||
' Status anzeigen
|
||||
Update_Status_Label(True, ResultMessage)
|
||||
If ResultMessage <> "ERROR" Then
|
||||
' Status anzeigen
|
||||
Update_Status_Label(True, ResultMessage)
|
||||
Else
|
||||
ERROR_WHILE_SAVING = True
|
||||
End If
|
||||
'Jetzt die für die Entität notwendigen Prroceduren ausführen
|
||||
Customer_Run_Procedures()
|
||||
' RECORD_CHANGED zurücksetzen
|
||||
@@ -6714,6 +6711,9 @@ Public Class frmConstructor_Main
|
||||
Refresh_Entity_Data()
|
||||
ElseIf e.KeyCode = Keys.Control And e.KeyCode = Keys.S Then
|
||||
Save_Record()
|
||||
If ERROR_WHILE_SAVING = True Then
|
||||
Column_Row_Handler()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user