This commit is contained in:
Digital Data - Marlon Schreiber
2018-02-14 17:32:57 +01:00
parent 496340e8d8
commit e2bd77047e
21 changed files with 2121 additions and 502 deletions

View File

@@ -79,19 +79,20 @@ Public Class ClassInit
End Sub
Public Sub InitUserLogin()
Try
USER_USERNAME = Environment.UserName
Dim sql = String.Format("SELECT MAX(GUID) FROM TBPM_USER WHERE LOWER(USERNAME) = LOWER('{0}')", Environment.UserName)
ClassLogger.Add(">> Username: " & Environment.UserName, False)
ClassLogger.Add(">> Username: " & USER_USERNAME, False)
CURRENT_USERID = ClassDatabase.Execute_Scalar(sql, MyConnectionString, True)
If IsDBNull(CURRENT_USERID) Then
ClassLogger.Add("User '" & Environment.UserName & "' not configured in Useradministration! (DBNull)", True)
ClassLogger.Add("User '" & USER_USERNAME & "' not configured in Useradministration! (DBNull)", True)
'MsgBox("Achtung: Sie sind nicht in der Userverwaltung hinterlegt." & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:")
'Me.Close()
ERROR_STATE = "NO USER"
Throw New Exception("You are not configured in the Useradministration." & vbNewLine & "Please contact the system administrator!")
Else
If IsNothing(CURRENT_USERID) Then
ClassLogger.Add(" - User: " & Environment.UserName & " ' not configured in Useradministration! (nothing)", False)
ClassLogger.Add(" - User: " & USER_USERNAME & " ' not configured in Useradministration! (nothing)", False)
ERROR_STATE = "NO USER"
Throw New Exception("You are not configured in the Useradministration." & vbNewLine & "Please contact the system administrator!")
Else