Click here to Skip to main content
15,887,355 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have a blood bank management system i want to restrict the blood Doner till 3 months which means that he can not give blood before three months or his record can not be updated till three months in vb.net

What I have tried:

i did not try any thing because i have no idea how and what to do. I am new to vb.net and i am working on this project please some one tell me or help me in vb.net
Posted
Updated 24-Jun-21 21:21pm
Comments
Wendelius 25-Jun-21 2:59am    
If you already have the system then details about that system would be needed to answer you're question. Based on the information you're provided we cannot know where and how the data is stored or how it could be queried.
Member 14649324 25-Jun-21 3:06am    
i have a window form that take the doner name Age adress and save them in the database. then i retrive them in datagridview for updating with an update button. the record is saved with date. so when i want to update his name age and date again it can not update his records untill three months because for a doner can not give blood again in three months

I'd add a column to the DB: "ElegibleOn" which holds a DATETIME - the Date that he is next allowed to give blood.
When he tries to register to donate, check the appointment date against the DB ElegileOn" date and only allow it if the appointment as after that.

When you register his donation, update the ElegibleOn column to the current date plus the three month cooldown period.
 
Share this answer
 
This sounds pretty trivial:
1. Get the latest doner's visit date
2. Compare this date with today's date
3. If the difference is greater than 3 months, then allow some actions. If not, then disallow.
 
Share this answer
 
Comments
Member 14649324 25-Jun-21 3:27am    
Thank you so much got an idea
Maciej Los 25-Jun-21 3:32am    
You're very welcome.

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