Änderungen Login System schreibtjetzt auch die einlogzeit in die Datenbank und die Kundennummer wurd durch die USerID ersetzt

This commit is contained in:
ja
2021-11-15 16:33:34 +01:00
parent 64c5207163
commit d434400a39
5 changed files with 46 additions and 26 deletions

View File

@@ -187,6 +187,16 @@ Partial Class login_FLEX
dr.Close()
con.Close()
End Using
Using cmd2 As New SqlCommand("UPDATE [VERAG_HOMEPAGE].[dbo].[Users] SET [LastLoginDate]=@Date WHERE [Username]=@Username AND [UserId]=@UserId AND Password=@Password")
cmd2.Parameters.AddWithValue("Date", Date.Now.ToString)
cmd2.Parameters.AddWithValue("Username", UserNaMe)
cmd2.Parameters.AddWithValue("UserID", Customer_ID)
cmd2.Parameters.AddWithValue("Password", passw)
cmd2.Connection = con
con.Open()
cmd2.ExecuteNonQuery()
con.Close()
End Using
End Using
If String.IsNullOrEmpty(tb2_M.Text) = False AndAlso String.IsNullOrEmpty(tb2.Text) = True Then
FormsAuthentication.SetAuthCookie(Login1.UserName, cb_M.Checked)