diff --git a/app/TaskFlow/ClassInit.vb b/app/TaskFlow/ClassInit.vb index 49c5790..c4de241 100644 --- a/app/TaskFlow/ClassInit.vb +++ b/app/TaskFlow/ClassInit.vb @@ -282,6 +282,9 @@ Public Class ClassInit End If Try + oSQLLoginAttempt = String.Format($"INSERT INTO TBDD_USER_LOG_IN_ATTEMPT (USERNAME,MODULE,VERSION_CLIENT,MACHINE_NAME,OVERRIDE_LANGUAGE) VALUES + ('{USER_USERNAME}','{MODULE_PM}','{My.Application.Info.Version.ToString}','{Environment.MachineName}','{My.Settings.SYS_Override_Language}')") + Dim oSQLSW As New RefreshHelper.SW("VWDD_USER_CLIENT") oSQL = $"SELECT * FROM VWDD_USER_CLIENT WHERE USERNAME = '{USER_USERNAME}'" @@ -296,6 +299,7 @@ Public Class ClassInit ElseIf DT_CLIENT_USER.Rows.Count = 1 Then CLIENT_SELECTED = DT_CLIENT_USER.Rows(0).Item("CLIENT_ID") Else + DatabaseECM.ExecuteNonQuery(oSQLLoginAttempt) ERROR_STATE = "NO CLIENT" Dim oDT As DataTable = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("No Client relation") MsgBox(oDT.Rows(0).Item("STRING1") & vbNewLine & oDT.Rows(0).Item("STRING2") & vbNewLine & vbNewLine & oSQL, MsgBoxStyle.Exclamation) @@ -324,6 +328,7 @@ Public Class ClassInit oFnct.Done() If DT_CHECKUSER_MODULE.Rows.Count = 0 Then + DatabaseECM.ExecuteNonQuery(oSQLLoginAttempt) LOGGER.Info("DT_CHECKUSER_MODULE.Rows.Count = 0", True) ERROR_STATE = "NO USER" MsgBox("Sorry - Something went wrong in getting Your rights." & vbNewLine & "Please contact the system administrator!", MsgBoxStyle.Exclamation) @@ -427,6 +432,7 @@ Public Class ClassInit LOGGER.Info("Die Anzahl der aktuell angemeldeten User (" & USERCOUNT_LOGGED_IN.ToString & ") überschreitet die Anzahl der Lizenzen (" & LICENSE_COUNT & ") für Flow Task!") If USER_IS_ADMIN = False Then ClassAllgemeineFunktionen.LoginOut("LOGOUT") + DatabaseECM.ExecuteNonQuery(oSQLLoginAttempt) ERROR_STATE = "START INCOMPLETE" End If End If @@ -436,6 +442,7 @@ Public Class ClassInit Catch ex As Exception LOGGER.Error(ex) LOGGER.Info("Unexpected Error in InitUserLogin: " & ex.Message, True) + DatabaseECM.ExecuteNonQuery(oSQLLoginAttempt) ERROR_STATE = "START INCOMPLETE" End Try oStopWatch.Done() @@ -508,6 +515,7 @@ Public Class ClassInit Catch ex As Exception LOGGER.Error(ex) LOGGER.Info($"Unexpected Error in InitBasics - last Step [{oStep}]: {ex.Message}", True) + DatabaseECM.ExecuteNonQuery(oSQLLoginAttempt) ERROR_STATE = "Basics not initialized" End Try End Sub @@ -528,6 +536,7 @@ Public Class ClassInit Catch ex As Exception LOGGER.Error(ex) LOGGER.Info("Unexpected Error in InitBasics2: " & ex.Message, True) + DatabaseECM.ExecuteNonQuery(oSQLLoginAttempt) ERROR_STATE = "Basics2 not initialized" End Try End Sub diff --git a/app/TaskFlow/ModuleRuntimeVariables.vb b/app/TaskFlow/ModuleRuntimeVariables.vb index 8a63f7a..5a516e0 100644 --- a/app/TaskFlow/ModuleRuntimeVariables.vb +++ b/app/TaskFlow/ModuleRuntimeVariables.vb @@ -173,4 +173,5 @@ Module ModuleRuntimeVariables Public WM_AHWF_docPath As String Public LIC_MODULES As String = "NONE" + Public oSQLLoginAttempt As String End Module