MS Korrekturen Release
This commit is contained in:
@@ -84,43 +84,43 @@ Public Class ClassInit
|
||||
ClassLogger.Add(">> Username: " & USER_USERNAME, False)
|
||||
|
||||
CURRENT_USERID = ClassDatabase.Execute_Scalar(sql, MyConnectionString, True)
|
||||
If IsDBNull(CURRENT_USERID) Then
|
||||
Dim userexists As Boolean = True
|
||||
|
||||
If IsDBNull(CURRENT_USERID) Or IsNothing(CURRENT_USERID) Then
|
||||
userexists = False
|
||||
End If
|
||||
If userexists = False Then
|
||||
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!")
|
||||
' Throw New Exception("You are not configured in the Useradministration." & vbNewLine & "Please contact the system administrator!")
|
||||
MsgBox("You are not configured in the Useradministration." & vbNewLine & "Please contact the system administrator!",MsgBoxStyle.Exclamation)
|
||||
Else
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> User exists....", False)
|
||||
'Am System anmelden
|
||||
Refresh_Licence()
|
||||
|
||||
If IsNothing(CURRENT_USERID) Then
|
||||
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
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> User exists....", False)
|
||||
'Am System anmelden
|
||||
Refresh_Licence()
|
||||
Dim sql1 = "SELECT COUNT(GUID) FROM TBPM_PROFILE"
|
||||
Dim anz = ClassDatabase.Execute_Scalar(sql1, MyConnectionString, True)
|
||||
If anz > LICENSE_PROFILES Then
|
||||
MsgBox("Your amount of configurable profiles is limited to " & LICENSE_PROFILES.ToString & " profiles. You can not add more profiles!" & vbNewLine & "Please contact Digital Data for further licensedetails", MsgBoxStyle.Information)
|
||||
End If
|
||||
|
||||
Dim sql1 = "SELECT COUNT(GUID) FROM TBPM_PROFILE"
|
||||
Dim anz = ClassDatabase.Execute_Scalar(sql1, MyConnectionString, True)
|
||||
If anz > LICENSE_PROFILES Then
|
||||
MsgBox("Your amount of configurable profiles is limited to " & LICENSE_PROFILES.ToString & " profiles. You can not add more profiles!" & vbNewLine & "Please contact Digital Data for further licensedetails", MsgBoxStyle.Information)
|
||||
ClassAllgemeineFunktionen.LoginOut("LOGIN")
|
||||
|
||||
sql = String.Format("SELECT * FROM TBDD_USER_MODULES T, TBDD_MODULES T1 WHERE T.MODULE_ID = T1.GUID AND UPPER(T1.SHORT_NAME) = UPPER('PM') AND T.USER_ID = {0}", CURRENT_USERID)
|
||||
DT_USER2MODULE = ClassDatabase.Return_Datatable(sql)
|
||||
If Not IsNothing(DT_USER2MODULE) Then
|
||||
If DT_USER2MODULE.Rows.Count = 1 Then
|
||||
USER_IS_ADMIN = DT_USER2MODULE.Rows(0).Item("IS_ADMIN")
|
||||
End If
|
||||
End If
|
||||
|
||||
ClassAllgemeineFunktionen.LoginOut("LOGIN")
|
||||
sql = String.Format("SELECT COUNT(*) AS Expr1 FROM TBDD_USER_MODULE_LOG_IN WHERE UPPER(MODULE) = UPPER('Process-Manager') AND CLIENT_ID = {0}", 1)
|
||||
USERCOUNT_LOGGED_IN = ClassDatabase.Execute_Scalar(sql, MyConnectionString, True)
|
||||
|
||||
sql = String.Format("SELECT * FROM TBDD_USER_MODULES T, TBDD_MODULES T1 WHERE T.MODULE_ID = T1.GUID AND UPPER(T1.SHORT_NAME) = UPPER('PM') AND T.USER_ID = {0}", CURRENT_USERID)
|
||||
DT_USER2MODULE = ClassDatabase.Return_Datatable(sql)
|
||||
If Not IsNothing(DT_USER2MODULE) Then
|
||||
If DT_USER2MODULE.Rows.Count = 1 Then
|
||||
USER_IS_ADMIN = DT_USER2MODULE.Rows(0).Item("IS_ADMIN")
|
||||
End If
|
||||
End If
|
||||
|
||||
sql = String.Format("SELECT COUNT(*) AS Expr1 FROM TBDD_USER_MODULE_LOG_IN WHERE UPPER(MODULE) = UPPER('Process-Manager') AND CLIENT_ID = {0}", 1)
|
||||
USERCOUNT_LOGGED_IN = ClassDatabase.Execute_Scalar(sql, MyConnectionString, True)
|
||||
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Count Users logged in: " & USERCOUNT_LOGGED_IN.ToString, False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Count Users logged in: " & USERCOUNT_LOGGED_IN.ToString, False)
|
||||
If LICENSE_COUNT < USERCOUNT_LOGGED_IN And LICENSE_EXPIRED = False Then
|
||||
MsgBox("Die Anzahl der aktuell angemeldeten User (" & USERCOUNT_LOGGED_IN.ToString & ") überschreitet die Anzahl der aktuellen Lizenzen!" & vbNewLine & "Anzahl der Lizenzen: " & LICENSE_COUNT.ToString & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:")
|
||||
ClassLogger.Add(" >> Die Anzahl der aktuell angemeldeten User (" & USERCOUNT_LOGGED_IN.ToString & ") überschreitet die Anzahl der Lizenzen (" & LICENSE_COUNT & ") für Process Manager!", False)
|
||||
@@ -132,8 +132,8 @@ Public Class ClassInit
|
||||
End If
|
||||
'Alles OK bis hierhin...nun die FolderwatchKonfig laden
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Init Userlogin successfull completed....", False)
|
||||
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Unexpected Error in InitUserLogin: " & ex.Message, True)
|
||||
ERROR_STATE = "START INCOMPLETE"
|
||||
|
||||
Reference in New Issue
Block a user