änderungen logik login

This commit is contained in:
ja
2021-10-20 12:42:31 +02:00
parent e0a7304225
commit 87e7968579
2 changed files with 73 additions and 21 deletions

View File

@@ -311,7 +311,7 @@
<asp:CheckBox ID="RememberMe" runat="server" ValidationGroup="Login" Text="Remember me." style="margin-left:22px;"/>
</td>
<td align="right" colspan="4">
<a id="LinkButton2" runat="server" target="_top" href="ForgotPW.aspx" style="margin-left:-154px;margin-right:-42px">I forgot my password</a>
<a id="btn_ForgotPW" runat="server" target="_top" href="ForgotPW.aspx" style="margin-left:-154px;margin-right:-42px">I forgot my password</a>
</td>
</tr>
<tr style="color:#003680; height:16px">

View File

@@ -41,30 +41,82 @@ Partial Class login_FLEX
Dim UserNaMe As String = String.Empty
Dim passw As String = String.Empty
If reqfieldvaluserID.IsValid Then
regexuserID.Validate()
If regexuserID.IsValid Then
Customer_ID = tb.Text
End If
ElseIf reqfieldvaluserID_M.IsValid Then
regexusername_M.Validate()
If regexusername_M.IsValid Then
Customer_ID = tb_M.Text
If String.IsNullOrEmpty(tb.Text) = False AndAlso String.IsNullOrEmpty(tb_M.Text) = True Then
reqfieldvaluserID.Enabled = True
reqfieldvaluserID_M.Enabled = False
reqfieldvaluserID.Validate()
If reqfieldvaluserID.IsValid = True Then
regexuserID.Validate()
If regexuserID.IsValid Then
Customer_ID = tb.Text
Else
regexuserID.ErrorMessage = ""
End If
Else
reqfieldvaluserID.ErrorMessage = ""
End If
End If
If reqfieldvaluserName.IsValid Then
UserNaMe = tb2.Text
ElseIf reqfieldvaluserName_M.IsValid Then
UserNaMe = tb2_M.Text
If String.IsNullOrEmpty(tb_M.Text) = False AndAlso String.IsNullOrEmpty(tb.Text) = True Then
reqfieldvaluserID.Enabled = False
reqfieldvaluserID_M.Enabled = True
If reqfieldvaluserID_M.IsValid = True Then
regexusername_M.Validate()
If regexusername_M.IsValid Then
Customer_ID = tb_M.Text
Else
regexusername_M.ErrorMessage = ""
End If
Else
reqfieldvaluserID_M.ErrorMessage = ""
End If
End If
If reqfieldvalpassw.IsValid Then
passw = tb3.Text
ElseIf reqfieldvaluserName_M.IsValid Then
passw = tb2_M.Text
If String.IsNullOrEmpty(tb2.Text) = False AndAlso String.IsNullOrEmpty(tb2_M.Text) = True Then
reqfieldvaluserName.Enabled = True
reqfieldvaluserName_M.Enabled = False
regexusername.Validate()
If reqfieldvaluserName.IsValid = True Then
If regexusername.IsValid Then
UserNaMe = tb2.Text
Else
regexusername_M.ErrorMessage = ""
End If
Else
reqfieldvaluserName.ErrorMessage = ""
End If
End If
If String.IsNullOrEmpty(tb2.Text) = False AndAlso String.IsNullOrEmpty(tb2_M.Text) = True Then
reqfieldvaluserName.Enabled = False
reqfieldvaluserName_M.Enabled = True
reqfieldvaluserName_M.Validate()
If reqfieldvaluserName_M.IsValid = True Then
regexusername_M.Validate()
If regexusername.IsValid Then
UserNaMe = tb2_M.Text
Else
regexusername.ErrorMessage = ""
End If
Else
reqfieldvaluserName_M.ErrorMessage = ""
End If
If reqfieldvalpassw.IsValid AndAlso String.IsNullOrEmpty(tb3_M.Text) = False AndAlso String.IsNullOrEmpty(tb3.Text) = True Then
reqfieldvalpassw.Enabled = True
reqfieldvalpassw_M.Enabled = False
reqfieldvalpassw.Validate()
If reqfieldvalpassw.IsValid = True Then
End If
passw = tb3.Text
End If
End If
If reqfieldvalpassw_M.IsValid AndAlso String.IsNullOrEmpty(tb3.Text) = False AndAlso String.IsNullOrEmpty(tb3_M.Text) = True Then
reqfieldvalpassw.Enabled = False
reqfieldvalpassw_M.Enabled = True
reqfieldvalpassw_M.Validate()
If reqfieldvalpassw_M.IsValid = True Then
passw = tb3_M.Text
Else
reqfieldvalpassw_M.ErrorMessage = ""
End If
End If
' Dim constr As String = ConfigurationManager.ConnectionStrings("constr").ConnectionString
Using con As New SqlConnection(ConnectionString)
' Using cmd As New SqlCommand("Validate_User")