Fix keine Email wurde gesendet intern

This commit is contained in:
ja
2021-11-11 08:31:16 +01:00
parent 094c9f9758
commit bdaaded228
2 changed files with 22 additions and 11 deletions

View File

@@ -44,7 +44,7 @@ Partial Class ForgotPW
valreqtxtEmail.Validate()
If valreqtxtEmail.IsValid = True Then
regexval_txt_Email.Validate()
If regexval_txt_Email.IsValid = True Then
If regexval_txt_Email.IsValid = False Then
regexval_txt_Email.ForeColor = Drawing.Color.OrangeRed
regexval_txt_Email.ErrorMessage = "Annotation: The Domain does not match."
regexval_txt_Email_2.Validate()
@@ -122,10 +122,10 @@ Partial Class ForgotPW
username = dr("Username").ToString()
password = dr("Password").ToString()
email = dr("Email").ToString()
customerID = dr("UserId").ToString()
customerID = dr("KundenNr").ToString()
Try
If txt_Username.Text = dr("Username").ToString() AndAlso String.IsNullOrEmpty(txt_Username_M.Text) = True And String.IsNullOrEmpty(customerID) = True Then
If txt_Username.Text = dr("Username").ToString() AndAlso String.IsNullOrEmpty(txt_Username_M.Text) = True And String.IsNullOrEmpty(customerID) = False Then
username = txt_Username.Text
isusrnmright = True
ElseIf String.IsNullOrEmpty(txt_Username.Text) = True Then
@@ -138,12 +138,12 @@ Partial Class ForgotPW
isusrnmright = False
End Try
End If
If (txtEmail.Text = dr("Email").ToString() AndAlso String.IsNullOrEmpty(txtEmail_M.Text) = True) And String.IsNullOrEmpty(VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt(customerID)) = True Then
If (txtEmail.Text = dr("Email").ToString() AndAlso String.IsNullOrEmpty(txtEmail_M.Text) = True) And String.IsNullOrEmpty(customerID) = False Then
email = txtEmail.Text
lblMessage.ForeColor = Color.Green
isemailright = True
lblMessage.Text = "The given e-mail exists in our database."
ElseIf String.IsNullOrEmpty(customerID) = True Then
ElseIf String.IsNullOrEmpty(email) = True Then
lblMessage_M.ForeColor = Color.Red
isemailright = False
lblMessage_M.Text = "The given User does not exist in our database."
@@ -152,7 +152,20 @@ Partial Class ForgotPW
isemailright = False
lblMessage_M.Text = "The given e-mail does not exist in our database."
End If
If (txt_CustomerID.Text = dr("KundenNr").ToString() AndAlso String.IsNullOrEmpty(txt_CustomerID_M.Text) = True) And String.IsNullOrEmpty(customerID) = False Then
email = txtEmail.Text
lblMessage.ForeColor = Color.Green
isCustomeridright = True
lblMessage.Text = "The given Customer-ID exists in our database."
ElseIf String.IsNullOrEmpty(customerID) = True Then
lblMessage_M.ForeColor = Color.Red
isCustomeridright = False
lblMessage_M.Text = "The given Customer-ID does not exist in our database."
Else
lblMessage_M.ForeColor = Color.Red
isCustomeridright = False
lblMessage_M.Text = "The given Customer-ID does not exist in our database."
End If
Catch ex As Exception
Dim Msg, Style, Title As String
Msg = "E-Mail validation failed!" & vbCrLf + "Please try again!"
@@ -334,7 +347,7 @@ Partial Class ForgotPW
email = dr("Email").ToString()
customerID = dr("UserId").ToString()
Try
If (txt_CustomerID_M.Text = dr("userId").ToString() AndAlso String.IsNullOrEmpty(txt_CustomerID.Text) = True) And String.IsNullOrEmpty(VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt(customerID)) = True Then
If (txt_CustomerID_M.Text = dr("userId").ToString() AndAlso String.IsNullOrEmpty(txt_CustomerID.Text) = True) And String.IsNullOrEmpty(customerID) = True Then
customerID = txt_CustomerID_M.Text
lblMessage_M.ForeColor = Color.Green
isuserIDright = True
@@ -352,7 +365,7 @@ Partial Class ForgotPW
Title = "Authentication error!"
End Try
Try
If (txtEmail_M.Text = dr("Email").ToString() AndAlso String.IsNullOrEmpty(txtEmail.Text) = True) And String.IsNullOrEmpty(VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt(customerID)) = True Then
If (txtEmail_M.Text = dr("Email").ToString() AndAlso String.IsNullOrEmpty(txtEmail.Text) = True) And String.IsNullOrEmpty(customerID) = False Then
email = txtEmail_M.Text
isuserEmailright = True
lblMessage_M.ForeColor = Color.Green
@@ -370,7 +383,7 @@ Partial Class ForgotPW
Title = "Authentication error!"
End Try
Try
If (txt_Username_M.Text = dr("Username").ToString() AndAlso String.IsNullOrEmpty(txt_Username_M.Text) = True) And String.IsNullOrEmpty(VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt(customerID)) = True Then
If (txt_Username_M.Text = dr("Username").ToString() AndAlso String.IsNullOrEmpty(txt_Username_M.Text) = True) And String.IsNullOrEmpty(customerID) = True Then
username = txt_Username_M.Text
lblMessage_M.ForeColor = Color.Green
isusernameright = True