用户登录和注销历史记录详细信息 [英] Users Login and LogOut history Details

查看:224
本文介绍了用户登录和注销历史记录详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

如何使用asp.net,C#和数据库作为sqlserver 2005创建登录历史记录

这些是我的数据库文件
用户ID
用户名
记录日期
持续时间(登录|注销)

谢谢,

Dear All,

How to create Login history using asp.net , C# and database as sqlserver 2005

These are my database fileds
User Id
Username
Log date
Duration (Login | Logout)

Thanks,

推荐答案

这有什么困难?
成功登录并注销后,只需输入用户名并将其连同当前日期和时间一起输入数据库表即可.
Whats difficult in that?
After successful login and logout, just take username and enter it to database table along with current date and time.


阅读下面的文章以获取一些想法.然后编写您自己的代码.如果您有任何问题,请回到此处提出一个具体问题.

跟踪用户在您网站上的登录/注销时间 [ ^ ]
Read the article below to get some ideas. Then write your own code. Come back here with a specific question if you have a problem.

Tracking users login/logout times on your site[^]


登录成功时
在您的历史记录表中插入UserID,Username,currentdatetime作为登录日期
在注销按钮上
1)从历史记录表中获取登录日期和时间
2)持续时间计算差异
3)使用uname =-"和Userid =-"
更新同一张表
这样,您将维护用户的历史记录..

祝你好运
When Login Success
Insert UserID,Username,currentdatetime as login date in ur history table
On logout button
1)get login date and time from history table
2)for duration calculate difference
3)update same table using where uname="--" and Userid="--"

In this way you will maintain history of user..

Best Luck


这篇关于用户登录和注销历史记录详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆