Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi guys.

I have a problem that I need to solve quickly.

Here is the scenario. The total fee to pay by the customer is 15,000. Now, customer needs to down payment of 5,000 at first. So the remaining balance is 10,000. Now, that 10,000 will be divided into 10 months so it the customer will pay 1,000 each month. I want to display the list of months and the payment the customer needs to pay. I cannot think of any way to do this. Can anyone suggest here some links, of can give codes that might help me here. Thanks in advance.
Posted
Comments
Nathan Minier 22-Jan-15 14:07pm    
Use the DateTime object.

https://msdn.microsoft.com/en-us/library/system.datetime(v=vs.110).aspx
Sergey Alexandrovich Kryukov 22-Jan-15 14:08pm    
Do you understand that "I cannot think of any way do to this" strongly demotivate answering, because next step seems to be "I cannot think of a way of using this advice"? Who would like to waste time on such inquirer?

You need to start with explaining your problem, showing what have you tried so far.

—SA
CPallini 22-Jan-15 17:11pm    
Yep, "I cannot think of any way do to this" is at least discouraging, in such a case.
Sergey Alexandrovich Kryukov 22-Jan-15 17:45pm    
:-)
BillWoodruff 23-Jan-15 1:52am    
This is WinForms ? WPF ? ASP.NET ?

So you need idea how the page /screen should be? or you need ready-made code?

If second is what you are looking for, sorry I can't help you or rather no-one will be able to help.

If the case is first, you can thing of simple table view using grid/list etc having first column as month and second as installment. If you want to show paid installment and remaining installments, a tab view might be a better idea (both tab actually showing same control only data will be different.
 
Share this answer
 
One way is: you need a way to store the info e.g:

C#
class Payment
{
string month;
float amount;
}


them a collection such
List<payment>
to hold the data and add to Listbox etc.

you can make an enum or array with names of the month, then

float remainder=10000;
int startMonth=1; // change to start month
int numPayments=(int)remainder/12;
float installment=remainder/numPayments;
for(int i=0; i<numpayments;>{
// add new Payment to List
}
 
Share this answer
 
v2
Comments
DarkDreamer08 22-Jan-15 23:30pm    
what is int remainder?

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