如何跟踪系统中的用户签入和签出 [英] How Do I Keep Track For A User Checkin And Checkout In A System

查看:80
本文介绍了如何跟踪系统中的用户签入和签出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我正在创建这个程序,现在我需要跟踪用户每天签入和签出系统的时间。我认为我必须创建一个记录,但有没有更简单的方法呢?任何建议

解决方案

创建记录?好的,在什么地方?



你在创建这条记录的是什么?一个文本文件?一个数据库?什么?



如果您不知道存储应用程序数据的方式和位置,那么几乎不可能告诉您什么是更简单的方法。

使用MySQL作为后端存储。它适用于Microsoft和Linux,并且任何运行Linux服务器的ISP都默认使用所有Linux发行版,这意味着如果您需要来自世界各地的人员记录他们的时间并进行管理,您可以将数据存储在Web上的某个位置。在这些世界中,想要了解员工在任何特定时间都会做些什么。



在这种情况下,他们不妨开始使用Twitter ......开玩笑吧当然;)


这是一个代码,它将联系一个文本文件并将其读取以进行更新,只需更改它以写入文件,这通常是为了更新而使用dropbox文件托管程序它托管了文本文件。



 公共  Sub  CheckForUpdates()

Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(我们的txt文件l这里的墨水)

Dim 响应 As System.Net.HttpWebResponse = request。 GetResponse() Dim sr As System.IO.StreamReader = System.IO.StreamReader(response.GetRespoonseStream()) Dim newestversion As 字符串 = sr.ReadToEnd() Dim currentversion 作为 字符串 = Application.ProductVersion 如果 newestversion.Contains(currentversion)然后 msgbox(你最近)其他 msgbox( a 更新我们将立即下载 y ou。)system.diagnostics.process.start( New link)
End 如果


So, i am creating this program and now i need to keep a track of the time when the user checks in and checks-out the system each day. I think that i have to create a record for that but is there any easier way to do it? Any suggestions

解决方案

Create a record? OK, in WHAT?

What are you creating this record in? A text file? A database? What?

Without knowing anything about how and where you're storing your applications data, it's pretty much impossible to tell you what's "an easier way".


Use MySQL for your backend storage. It is available for both Microsoft and Linux and any ISP running Linux Servers will have it by default with all Linux distro's which means you can store your data somewhere on the Web if you need people from all over the world to log their times and have management all over those worlds wanting to see what their employees are up to at any given time.

They might as well start using Twitter in that case.... just kidding of course ;)


Here is a code that will contact a textfile and read it to update just change it to write to the file normally this was made for updates and uses dropbox a file hosting program it was hosting the text file.

Public Sub CheckForUpdates()

Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(our txt file link here)

Dim response As System.Net.HttpWebResponse = request.GetResponse() Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetRespoonseStream()) Dim newestversion As String = sr.ReadToEnd() Dim currentversion As String = Application.ProductVersion If newestversion.Contains(currentversion) Then msgbox (You are up todate) Else msgbox (There is a new update we will download it now for you.) system.diagnostics.process.start (New link)
End If


这篇关于如何跟踪系统中的用户签入和签出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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