Click here to Skip to main content
15,910,981 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am making a Gym management system in windows form ( .Net ) . when application is start i check a date ( when user is registered ) with current System date . if current date is 1 month greater than Register date then user will be able to pay fee .. but my problem is this if user change a system date than my logic is failed what i do please suggest me ??
Posted

I think Christian's solution is close, but his solution doesn't detect if the user resets the date to some time between the registration date and the expiration date. (Assuming I completely understand his.)

So, I'd save another date/time ("last used") every once-in-awhile and complain if the current system time is ever more than a reasonable amount (a couple of hours?) before the "last used" time.
Be sure to do the checking of the date/time as UTC to avoid any Daylight Savings Time type issues.
And, of course, don't make it easy for the user to change these saved values.

The risk here is that users may have a legitimate reason to reset the system time back by the larger amount. (But I can't think of any!)
 
Share this answer
 
v2
Hello,

You can have a registry key which will increment after every day's. SO even if user changes computer's date, this key help you to identify the days. And also you can have some encryption algorithms which will avoid user to manually edit the registry key.
Hope this will help you.

Thanks!!!!!!
 
Share this answer
 
When you install your software you must save the dates (the date for registered software & date expiration).

So you can ask if date is superior to date expiration "pay fee" if actual_date < date of registered software "pay fee"

This is only and idea.

Regards.
 
Share this answer
 
Comments
Christian Amado 29-Aug-12 14:09pm    
Oh, thanks for downvoted.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900