如何设置登录人通知? [英] How to set login person notification?

查看:112
本文介绍了如何设置登录人通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I have 5 users to login my website.any one of this person going to login.that person is first person to login the website to.Notify that person you are the  first person today to login website.How to make this format in  asp.net c#.



我尝试过的事情:

我已经尝试过了.



What I have tried:

I have tried to make this now.

推荐答案

可以用很多方法完成,这就是其中之一.

  • 创建一个包含2列的表LoginDate用于日期,而UserName用于存储userId
  • 当用户登录到应用程序时,只需将当前日期及其ID保存在表中即可.
    在保存数据之前,添加一个条件,如果今天的日期已经存在一行,那么请忽略它并登录到应用程序,他不是第一个用户.
  • 如果今天没有行,请插入具有今天的日期和UserID的新行.由于他是今天的第一个用户,因此请以首次登录"用户的身份向他打招呼.
This can be done in many ways, this is the one of them

  • Create a Table with 2 columns LoginDate for date and UserName for storing userId
  • When an user logs in to the application just save the current date and his Id in the table.
    before saving the data, add a condition that,if a row is already present for today''s date, if so then just ignore it and login to the application, he is not a first user.
  • if there is no row present for today , then insert a new row with todays'' date and the UserID. Greet him the text as First login user, since he is the first user for today.
  • 在每个新插入上,如果不需要审核,则删除旧行.
  • On every new insert, delete the old rows, if no audit required.


这篇关于如何设置登录人通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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