Änderungen Korrektur abfragen der Strings

This commit is contained in:
ja
2021-11-15 15:22:31 +01:00
parent 9ab730cea0
commit 64c5207163
2 changed files with 19 additions and 15 deletions

View File

@@ -345,7 +345,7 @@ Partial Class ForgotPW
Using con As New SqlConnection(ConnectionString)
' Using cmd As New SqlCommand("Validate_User")
Using cmd As New SqlCommand("SELECT Username,Password,Email,KundenNr FROM [VERAG_HOMEPAGE].[dbo].[Users] WHERE Username=@Username AND Email=@Email AND KundenNr=@CUSTOMERId")
Using cmd As New SqlCommand("SELECT Username,Password,Email,UserId FROM [VERAG_HOMEPAGE].[dbo].[Users] WHERE Username=@Username AND Email=@Email AND UserId=@CUSTOMERId")
' cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.AddWithValue("@Username", username)
cmd.Parameters.AddWithValue("@Email", email)
@@ -358,9 +358,9 @@ Partial Class ForgotPW
username = dr("Username").ToString()
password = dr("Password").ToString()
email = dr("Email").ToString()
customerID = dr("KundenNr").ToString()
customerID = dr("UserId").ToString()
Try
If (txt_CustomerID_M.Text = dr("KundenNr").ToString() AndAlso String.IsNullOrEmpty(txt_CustomerID.Text) = True) And String.IsNullOrEmpty(customerID) = False Then
If (txt_CustomerID_M.Text = dr("UserId").ToString() AndAlso String.IsNullOrEmpty(txt_CustomerID.Text) = True) And String.IsNullOrEmpty(customerID) = False Then
customerID = txt_CustomerID_M.Text
lblMessage_M.ForeColor = Color.Green
isuserIDright = True