fix flackering lol, add msgbox for missing doctype-module assignment, check for missing guid

This commit is contained in:
Jonathan Jenne 2020-03-25 10:49:58 +01:00
parent af4a126720
commit 2da647812a
2 changed files with 23 additions and 18 deletions

View File

@ -18,7 +18,7 @@ Public Class ClassDatabase
Return True Return True
Catch ex As Exception Catch ex As Exception
LOGGER.Info("Unexpected error in Database-Init: " & ex.Message) LOGGER.Info("Unexpected error in Database-Init: " & ex.Message)
LOGGER.Error(ex.Message) LOGGER.Error(ex)
Return False Return False
End Try End Try
End Function End Function
@ -95,7 +95,7 @@ Public Class ClassDatabase
If userInput = True Then If userInput = True Then
MsgBox("Error in Return_Datatable - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & sql_command, MsgBoxStyle.Critical) MsgBox("Error in Return_Datatable - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & sql_command, MsgBoxStyle.Critical)
End If End If
LOGGER.Info("Unexpected error in Return_Datatable: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("#SQL: " & sql_command) LOGGER.Info("#SQL: " & sql_command)
End If End If
@ -104,7 +104,7 @@ Public Class ClassDatabase
If userInput = True Then If userInput = True Then
MsgBox("Error in Return Datatable - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & sql_command, MsgBoxStyle.Critical) MsgBox("Error in Return Datatable - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & sql_command, MsgBoxStyle.Critical)
End If End If
LOGGER.Info("Unexpected error in Return_Datatable: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("#SQL: " & sql_command) LOGGER.Info("#SQL: " & sql_command)
Return Nothing Return Nothing
End Try End Try
@ -134,7 +134,7 @@ Public Class ClassDatabase
If userInput = True Then If userInput = True Then
MsgBox("Error in Return_Datatable_CS - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & sql_command, MsgBoxStyle.Critical) MsgBox("Error in Return_Datatable_CS - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & sql_command, MsgBoxStyle.Critical)
End If End If
LOGGER.Info("Unexpected error in Return_Datatable_CS: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("#SQL: " & sql_command) LOGGER.Info("#SQL: " & sql_command)
End If End If
@ -143,7 +143,7 @@ Public Class ClassDatabase
If userInput = True Then If userInput = True Then
MsgBox("Error in Return_Datatable_CS - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & sql_command, MsgBoxStyle.Critical) MsgBox("Error in Return_Datatable_CS - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & sql_command, MsgBoxStyle.Critical)
End If End If
LOGGER.Info("Unexpected error in Return_Datatable_CS: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("#SQL: " & sql_command) LOGGER.Info("#SQL: " & sql_command)
Return Nothing Return Nothing
End Try End Try
@ -172,7 +172,7 @@ Public Class ClassDatabase
If userInput = True Then If userInput = True Then
MsgBox("Error in Execute non query - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & sql_command, MsgBoxStyle.Critical) MsgBox("Error in Execute non query - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & sql_command, MsgBoxStyle.Critical)
End If End If
LOGGER.Info("Unexpected error in Execute_non_Query: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("#SQL: " & sql_command) LOGGER.Info("#SQL: " & sql_command)
End If End If
@ -181,7 +181,7 @@ Public Class ClassDatabase
If userInput = True Then If userInput = True Then
MsgBox("Error in Execute non query - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & sql_command, MsgBoxStyle.Critical) MsgBox("Error in Execute non query - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & sql_command, MsgBoxStyle.Critical)
End If End If
LOGGER.Info("Unexpected error in Execute_non_Query: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("#SQL: " & sql_command) LOGGER.Info("#SQL: " & sql_command)
Return False Return False
@ -212,7 +212,7 @@ Public Class ClassDatabase
If userInput = True Then If userInput = True Then
MsgBox("Error in Execute non query - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & sql_command, MsgBoxStyle.Critical) MsgBox("Error in Execute non query - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & sql_command, MsgBoxStyle.Critical)
End If End If
LOGGER.Info("Unexpected error in Execute_non_Query: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("#SQL: " & sql_command) LOGGER.Info("#SQL: " & sql_command)
End If End If
@ -221,7 +221,7 @@ Public Class ClassDatabase
If userInput = True Then If userInput = True Then
MsgBox("Error in Execute Scalar - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & sql_command, MsgBoxStyle.Critical) MsgBox("Error in Execute Scalar - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & sql_command, MsgBoxStyle.Critical)
End If End If
LOGGER.Info("Unexpected error in Execute_Scalar: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("#SQL: " & sql_command) LOGGER.Info("#SQL: " & sql_command)
Return Nothing Return Nothing
End Try End Try
@ -264,7 +264,7 @@ Public Class ClassDatabase
If userInput = True Then If userInput = True Then
MsgBox("Error in OracleExecute_non_Query - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & ExecuteCMD, MsgBoxStyle.Critical) MsgBox("Error in OracleExecute_non_Query - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & ExecuteCMD, MsgBoxStyle.Critical)
End If End If
LOGGER.Info("Unexpected error in OracleExecute_non_Query: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("#SQL: " & ExecuteCMD) LOGGER.Info("#SQL: " & ExecuteCMD)
Return False Return False
@ -289,7 +289,7 @@ Public Class ClassDatabase
If userInput = True Then If userInput = True Then
MsgBox("Error in Oracle Return Datatable - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & Select_anweisung, MsgBoxStyle.Critical) MsgBox("Error in Oracle Return Datatable - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & Select_anweisung, MsgBoxStyle.Critical)
End If End If
LOGGER.Info("Unexpected error in Oracle_Return_Datatable: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("#SQL: " & Select_anweisung) LOGGER.Info("#SQL: " & Select_anweisung)
Return Nothing Return Nothing
End Try End Try

View File

@ -199,23 +199,26 @@ Public Class frmAdministration
MsgBox("Error in EndEdit 2 documenttype: " & vbNewLine & ex.Message, MsgBoxStyle.Exclamation) MsgBox("Error in EndEdit 2 documenttype: " & vbNewLine & ex.Message, MsgBoxStyle.Exclamation)
End If End If
End Try End Try
TBDD_DOKUMENTARTTableAdapter.Update(MyDataset.TBDD_DOKUMENTART) TBDD_DOKUMENTARTTableAdapter.Update(MyDataset.TBDD_DOKUMENTART)
txtStatus.Caption = $"Profil gespeichert - {Now.ToString}"
If IsInsert = True Then If IsInsert = True Then
Dim oNewID As Integer Dim oNewID As Integer
oNewID = ClassDatabase.Execute_Scalar("SELECT MAX(GUID) FROM TBDD_DOKUMENTART", MyConnectionString) oNewID = ClassDatabase.Execute_Scalar("SELECT MAX(GUID) FROM TBDD_DOKUMENTART", MyConnectionString)
If IsNumeric(oNewID) Then If IsNumeric(oNewID) Then
Dim osql = $" EXEC PRDD_CHECK_REL_DOCTYPE_MODULE 'GLOBIX',{oNewID}" Dim osql = $" EXEC PRDD_CHECK_REL_DOCTYPE_MODULE 'GLOBIX', {oNewID}"
ClassDatabase.Execute_non_Query(osql) If ClassDatabase.Execute_non_Query(osql) = False Then
MsgBox("Fehler beim zuweisen des neuen Profils zum Modul Global-Indexer!", MsgBoxStyle.Critical, Text)
End If
End If End If
End If End If
txtStatus.Caption = $"Profil gespeichert - {Now.ToString}"
End If End If
IsInsert = False IsInsert = False
Catch ex As Exception Catch ex As Exception
MsgBox("Error in Save_Dokumentart: " & vbNewLine & ex.Message, MsgBoxStyle.Exclamation) MsgBox("Error in Save_Dokumentart: " & vbNewLine & ex.Message, MsgBoxStyle.Exclamation)
End Try End Try
End Sub End Sub
Private Sub btnNamenkonvention_Click(sender As Object, e As EventArgs) Handles btnNamenkonvention.Click Private Sub btnNamenkonvention_Click(sender As Object, e As EventArgs) Handles btnNamenkonvention.Click
Save_Dokumentart() Save_Dokumentart()
@ -230,7 +233,7 @@ Public Class frmAdministration
End If End If
End Sub End Sub
Private Sub TBDD_DOKUMENTARTBindingSource_CurrentChanged(sender As Object, e As EventArgs) Handles TBDD_DOKUMENTARTBindingSource.CurrentChanged, TBDD_DOKUMENTARTBindingSource.BindingComplete Private Sub TBDD_DOKUMENTARTBindingSource_CurrentChanged(sender As Object, e As EventArgs) Handles TBDD_DOKUMENTARTBindingSource.CurrentChanged
If DOKART_GUIDTextBox.Text <> String.Empty Then If DOKART_GUIDTextBox.Text <> String.Empty Then
CURRENT_DOKART_ID = DOKART_GUIDTextBox.Text CURRENT_DOKART_ID = DOKART_GUIDTextBox.Text
Load_TabData() Load_TabData()
@ -1238,7 +1241,9 @@ Public Class frmAdministration
End Sub End Sub
Private Sub BarButtonItem18_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem18.ItemClick Private Sub BarButtonItem18_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem18.ItemClick
Load_INDEXMAN(Me.DOKART_GUIDTextBox.Text) If DOKART_GUIDTextBox.Text <> String.Empty Then
Load_INDEXMAN(DOKART_GUIDTextBox.Text)
End If
End Sub End Sub
Private Sub BarButtonItem20_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem20.ItemClick Private Sub BarButtonItem20_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem20.ItemClick