ä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;"/> <asp:CheckBox ID="RememberMe" runat="server" ValidationGroup="Login" Text="Remember me." style="margin-left:22px;"/>
</td> </td>
<td align="right" colspan="4"> <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> </td>
</tr> </tr>
<tr style="color:#003680; height:16px"> <tr style="color:#003680; height:16px">

View File

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