corrected logic in abfrage und pw change sowie abfrage

This commit is contained in:
ja
2021-10-14 16:40:39 +02:00
parent 54cf8ad651
commit 4ecb221600
5 changed files with 299 additions and 87 deletions

View File

@@ -53,39 +53,67 @@ Partial Class login_ChangePW
Protected Sub btn_submitpw_Click(sender As Object, e As EventArgs)
Dim tempstr As String = ""
Dim Msg, Style, Title As String
reqPasswtxt.Validate()
reqPassw1txt.Validate()
If confirmPasswordReq.IsValid = True Then
If String.IsNullOrEmpty(txt_Pw.Text) = Not True AndAlso String.IsNullOrEmpty(txt_Pw_WH.Text) = Not True AndAlso String.IsNullOrEmpty(txt_Pw_M.Text) = True AndAlso String.IsNullOrEmpty(txt_Pw_WH_M.Text) = True Then
reqPasswtxt.Validate()
reqPassw1txt.Validate()
reqPassw1txt_M.Enabled = False
reqPasswtxt.Enabled = False
tempstr = txt_Pw.Text
ElseIf String.IsNullOrEmpty(txt_Pw.Text) = True AndAlso String.IsNullOrEmpty(txt_Pw_WH.Text) = True AndAlso String.IsNullOrEmpty(txt_Pw_M.Text) = Not True AndAlso String.IsNullOrEmpty(txt_Pw_WH_M.Text) = Not True Then
reqPasswtxt.Enabled = False
reqPassw1txt.Enabled = False
reqPasswtxt_M.Validate()
reqPassw1txt_M.Validate()
tempstr = txt_Pw_M.Text
Else
tempstr = "Error01"
End If
If txt_Pw.Text = tempstr Then
Msg = "PW erfolgreich geändert!"
Style = vbOKOnly + vbInformation + vbDefaultButton1
Title = "Information"
MsgBox(Msg, Style, Title)
If MsgBox(Msg, Style, Title).Ok Then
Response.Redirect("login_FLEX.aspx")
End If
ElseIf tempstr = "Error01" Then
Msg = "PW nicht erfolgreich geändert!"
Style = vbAbortRetryIgnore + vbCritical + vbDefaultButton1
Title = "Error"
MsgBox(Msg, Style, Title)
If MsgBox(Msg, Style, Title).Retry Then
Response.Redirect(Request.RawUrl)
ElseIf MsgBox(Msg, Style, Title).Abort Then
Response.Redirect("../newPageJulius_Sidebar.aspx")
ElseIf MsgBox(Msg, Style, Title).Ignore Then
Try
Catch ex As Exception
End Try
If txt_Pw.Text = tempstr And txt_Pw_WH.Text = tempstr AndAlso txt_Pw_M.Text = String.Empty And txt_Pw_WH_M.Text = String.Empty Then
Msg = "PW erfolgreich geändert!"
Style = vbOKOnly + vbInformation + vbDefaultButton1
Title = "Information"
regexval_txt_Pw.ForeColor = Drawing.Color.Green
regexval_txt_Pw.Text = "Password has been changed successfully!"
'MsgBox(Msg, Style, Title)
' If MsgBox(Msg, Style, Title).Ok Then
'Response.Redirect("login_FLEX.aspx")
'End If
ElseIf txt_Pw_M.Text = tempstr And txt_Pw_WH_M.Text = tempstr AndAlso txt_Pw.Text = String.Empty And txt_Pw_M.Text = String.Empty Then
Msg = "PW erfolgreich geändert!"
Style = vbOKOnly + vbInformation + vbDefaultButton1
Title = "Information"
regexval_txt_Pw.ForeColor = Drawing.Color.Green
regexval_txt_Pw.Text = "Password has been changed successfully!"
'MsgBox(Msg, Style, Title)
' If MsgBox(Msg, Style, Title).Ok Then
'Response.Redirect("login_FLEX.aspx")
'End If
ElseIf tempstr = "Error01" Then
regexval_txt_Pw.ForeColor = Drawing.Color.MediumVioletRed
regexval_txt_Pw.Text = "Password has not been changed successfully!"
' Msg = "PW nicht erfolgreich geändert!"
' Style = vbAbortRetryIgnore + vbCritical + vbDefaultButton1
' Title = "Error"
'MsgBox(Msg, Style, Title)
'If MsgBox(Msg, Style, Title).Retry Then
'Response.Redirect(Request.RawUrl)
'ElseIf MsgBox(Msg, Style, Title).Abort Then
' Response.Redirect("../newPageJulius_Sidebar.aspx")
'ElseIf MsgBox(Msg, Style, Title).Ignore Then
' Try
' Catch ex As Exception
' End Try
End If
End If
End Sub
Protected Sub txt_Pw_TextChanged(sender As Object, e As EventArgs)
@@ -119,4 +147,8 @@ Partial Class login_ChangePW
End If
End Function
Protected Sub Image1_M_Click(sender As Object, e As ImageClickEventArgs)
MsgBox("")
End Sub
End Class