Click here to Skip to main content
15,891,513 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi codeproject
i want to design a winform application which has two buttons known as deathcount and deathcountAfter10years button and are set to invisible. Now i want that by the end of the year the deathcount button should become visible then if the user clicks on it, the total number of record inerted into the death record table in the database for that year is displayed. Now the deathcount button should stay visible for atleast one week, after which the button is made invisible again, and the same process continues. Then after 10 years, the deathcountAfter10years button becomes visible which onclick of the button displays all the record inserted into the deathRecord table in the database for the past 10 years. Is just like birth and death rate.
thanks guys for you help
Posted

1 solution

I do not find this question clear at all, could you please rephrase it?

If I understand correctly, basically you want to:
- have two buttons, deathcount and deathcountAfter10years (both invisible)
- At the end of the year, deathcount button becomes visible
- User clicks on deathcount button - deaths recorded for the present year are displayed
- After a week, deathcount button becomes invisible

Same thing goes with code>deathcountAfter10years button, the difference being that it is displayed at the end of a 10-year period, instead of each year.

Am I right? And if I am, what's the problem?
Check the date at the beginning of each day - if it's last week of the year, display your first button. If it's the last week of the 10 years, display the other one as well.
If any button is clicked, just query your database for records with date (I'm assuming you do save it) in your needed range and display the records.

Also, you are unlikely to get any code to solve your problem. We do not usually provide code, we do however provide you with ideas as how to write your own code.
 
Share this answer
 
v2

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