Änderungen an Fehlersystem
This commit is contained in:
@@ -60,7 +60,8 @@ Partial Class login_FLEX
|
||||
If regexuserID.IsValid Then
|
||||
Customer_ID = tb.Text
|
||||
Else
|
||||
regexuserID.ErrorMessage = "Customer-ID has to be a number."
|
||||
VERAG_VARIABLES.seterrorcount(1)
|
||||
regexuserID.ErrorMessage = VERAG_VARIABLES.geterrornumb + ": Customer-ID has to be a number."
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -72,7 +73,8 @@ Partial Class login_FLEX
|
||||
If regexusername_M.IsValid Then
|
||||
Customer_ID = tb_M.Text
|
||||
Else
|
||||
regexusername_M.ErrorMessage = "Username doeas not have any special chaaracters in it."
|
||||
VERAG_VARIABLES.seterrorcount(2)
|
||||
regexusername_M.ErrorMessage = VERAG_VARIABLES.geterrornumb + "Username does not have any special characters in it."
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -84,10 +86,12 @@ Partial Class login_FLEX
|
||||
If regexusername.IsValid Then
|
||||
UserNaMe = tb2.Text
|
||||
Else
|
||||
regexusername_M.ErrorMessage = "Username does not have any special chaaracters in it."
|
||||
VERAG_VARIABLES.seterrorcount(2)
|
||||
regexusername_M.ErrorMessage = VERAG_VARIABLES.geterrornumb + "Username does not have any special characters in it."
|
||||
End If
|
||||
Else
|
||||
reqfieldvaluserName.ErrorMessage = "Username has to be given."
|
||||
VERAG_VARIABLES.seterrorcount(2)
|
||||
reqfieldvaluserName.ErrorMessage = VERAG_VARIABLES.geterrornumb + "Username has to be given."
|
||||
End If
|
||||
End If
|
||||
If String.IsNullOrEmpty(tb2_M.Text) = False AndAlso String.IsNullOrEmpty(tb2.Text) = True Then
|
||||
@@ -99,7 +103,8 @@ Partial Class login_FLEX
|
||||
If regexusername.IsValid Then
|
||||
UserNaMe = tb2_M.Text
|
||||
Else
|
||||
regexusername.ErrorMessage = "Password has to match the criterias of tge info button."
|
||||
VERAG_VARIABLES.seterrorcount(3)
|
||||
regexusername.ErrorMessage = VERAG_VARIABLES.geterrornumb + "Password has to match the criterias of tge info button."
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -119,7 +124,8 @@ Partial Class login_FLEX
|
||||
If reqfieldvalpassw_M.IsValid = True Then
|
||||
passw = tb3_M.Text
|
||||
Else
|
||||
reqfieldvalpassw_M.ErrorMessage = "Please insert your personal passowrd."
|
||||
VERAG_VARIABLES.seterrorcount(4)
|
||||
reqfieldvalpassw_M.ErrorMessage = VERAG_VARIABLES.geterrornumb + "Please insert your personal passowrd."
|
||||
End If
|
||||
End If
|
||||
' Dim constr As String = ConfigurationManager.ConnectionStrings("constr").ConnectionString
|
||||
@@ -139,16 +145,19 @@ Partial Class login_FLEX
|
||||
'MsgBox(dr.Item(0).ToString())
|
||||
Select Case dr.Item(0)
|
||||
Case 0
|
||||
Login1.FailureText = "Benuzername und/oder das Passwort stimmen nicht überein."
|
||||
VERAG_VARIABLES.seterrorcount(5)
|
||||
Login1.FailureText = VERAG_VARIABLES.geterrornumb + "Username and/or Password do not match."
|
||||
Exit Select
|
||||
Case -2
|
||||
Login1.FailureText = "Account ist nicht freigeschaltet."
|
||||
VERAG_VARIABLES.seterrorcount(6)
|
||||
Login1.FailureText = VERAG_VARIABLES.geterrornumb + "Account is not activated."
|
||||
Exit Select
|
||||
Case Else
|
||||
If tb.Text = dr("KundenNr") Then
|
||||
Customer_ID = dr("KundenNr").ToString
|
||||
Else
|
||||
Login1.FailureText = "ID cannot be found in the database!"
|
||||
VERAG_VARIABLES.seterrorcount(7)
|
||||
Login1.FailureText = VERAG_VARIABLES.geterrornumb + "ID cannot be found in the database!"
|
||||
End If
|
||||
If tb2.Text = dr("Username") Then
|
||||
UserNaMe = dr("Username").ToString
|
||||
|
||||
Reference in New Issue
Block a user