Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
hi
i want to calculate fine in library management project....please help me for calculating this
give me the c# code with sql query
Posted
Comments
StM0n 14-Jul-13 4:08am    
Mhm...

* What are the requirements for a fine?
* What is your model for your library management?
* Where should the fine be calculated (DB or objects)?

first of all

* What have you managed so far?
chandresh singh 2 14-Jul-13 4:14am    
I am making a library management project and i am facing problems in fine calculation part. I have Date_Of_Issue and Date_Of_Submission fields (both set to Date/Time datatype) in a table named Book_Details(the database i am using is sql server 2008).

All i want to do is a query which will calculate the difference of days between the Date_Of_Submission and Date_Of_Issue.

If the difference of days is more than 5,then a fine will be charged by the student on a basis of $5 per day i.e; if the difference of days between the Date_Of_Submission and Date_Of_Issue is 7 days,then a fine of $10 will be charged ny the student.

How to do this?

Please please help
StM0n 14-Jul-13 4:56am    
So how would you write it in pseudo code?

1 solution

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!
 
Share this answer
 

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