Fehlernummern vergeben

This commit is contained in:
ja
2021-11-11 10:42:57 +01:00
parent 46f049c579
commit 38db2fedfb

View File

@@ -8,7 +8,9 @@ Imports System.Data
Partial Class ForgotPW
Inherits System.Web.UI.Page
Dim ConnectionString As String = String.Empty
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
VERAG_VARIABLES.initerrorcount()
End Sub
Protected Sub btn_Back_Click(sender As Object, e As EventArgs)
Response.Redirect("login_FLEX.aspx")
End Sub
@@ -91,7 +93,8 @@ Partial Class ForgotPW
Else
'MsgBox("The form has not been filled completeley.", MsgBoxStyle.Critical, "Error08")
lblMessage.ForeColor = Color.Red
lblMessage.Text = "Error 08. The form has not been filled completeley."
VERAG_VARIABLES.seterrorcount(8)
lblMessage.Text = VERAG_VARIABLES.geterrornumb + "The form has not been filled completeley."
End If
'Erweiterte Degub Msg-Box
@@ -201,7 +204,8 @@ Partial Class ForgotPW
'MsgBox("Token generated successfully.")
Else
lblMessage.ForeColor = Color.Red
lblMessage.Text = "Token is not valid anymore. Please generate a new one by sending a new e-mail!"
VERAG_VARIABLES.seterrorcount(14)
lblMessage.Text = VERAG_VARIABLES.geterrornumb + "Token is not valid anymore. Please generate a new one by sending a new e-mail!"
'MsgBox("Token is not valid anymore. Please generate a new one by sending a new e-mail!")
If Session.Item("TokenforEmail") = Nothing Then
@@ -219,22 +223,27 @@ Partial Class ForgotPW
'MsgBox("Mail would not be sent successfully!")
lblMessage.ForeColor = Color.Red
If String.IsNullOrWhiteSpace(username) = True Then
lblMessage.Text = "Error10: Username not recognized Error!"
VERAG_VARIABLES.seterrorcount(10)
lblMessage.Text = VERAG_VARIABLES.geterrornumb + "Username not recognized Error!"
ElseIf String.IsNullOrWhiteSpace(email) = True Then
lblMessage.ForeColor = Drawing.Color.Red
lblMessage.Text = "Error11: Email not recognized Error!"
VERAG_VARIABLES.seterrorcount(11)
lblMessage.Text = VERAG_VARIABLES.geterrornumb + "Email not recognized Error!"
ElseIf String.IsNullOrWhiteSpace(password) = True Then
lblMessage.ForeColor = Drawing.Color.Red
lblMessage.Text = "An internal password searching error occured in our systems ."
VERAG_VARIABLES.seterrorcount(12)
lblMessage.Text = VERAG_VARIABLES.geterrornumb + "An internal password searching error occured in our systems ."
End If
End If
Else
lblMessage.ForeColor = Drawing.Color.Red
lblMessage.Text = "ErrorCode10: Error with Database or the connection." + Environment.NewLine + "Please contact the admin."
VERAG_VARIABLES.seterrorcount(13)
lblMessage.Text = VERAG_VARIABLES.geterrornumb + "Error with Database or the connection." + Environment.NewLine + "Please contact the admin."
End If
Catch Exc As Exception
lblMessage.ForeColor = Drawing.Color.Red
lblMessage.Text = "Error08: No input found." + Environment.NewLine + Exc.Message
VERAG_VARIABLES.seterrorcount(8)
lblMessage.Text = VERAG_VARIABLES.geterrornumb + "No input found." + Environment.NewLine + Exc.Message
End Try
End Sub
@@ -541,6 +550,7 @@ Partial Class ForgotPW
Return True
End If
Catch ex As Exception
'MsgBox(Err.Number & ex.Message & ex.StackTrace.ToString) 'Falls ein Fehler auftritt wird eine MsgBox angezeigt
End Try
Return True