Using the following Software:
--- Visual C# Express 2008
--- Windows Operating System
I am supposed to work on a Monitoring Application for an IT Center, so the requirement is:
- Users will be registered into the database and they will have an expiration_datetime; which means that they can work until that date and time.
- All computers are registered also into the database.
- When Users logging a computer; that computer would be listed as occupied and at the same time the user logged in time will be stored into the database.
- The Time Duration and Time left of every users who are currently using the computer is required to be updated. When their Time Left reaches to 30 minutes Warning message will be displayed and when their time left reaches 0 minutes then they will be logged out.
I did implement some parts as follow:
- List all occupied computers into a separate List View
- List all Free computers into another List View
- Time Duration and Time Left calculation for every user is done, and it is updating using a timer
- When a user logged out the computer, both list will be updated
I don't know the method I used is optimized and good? Let's consider if there are 100 users currently using the computers and in order to refresh their Time Duration and Time Left every second; it is required to read all the data from the database. It will effects system performance.
Have a look on the attached project including the database Schema and ER-Diagram and the project itself.
What is the solution?