Skip to content
Advertisement

How to compute running balance from array in ASP.NET MVC controller?

This is my code in controller

I want to implement running balance in this array. This query will return Date, debit, credit and balance columns. I have to compute balance on the basis of debit and credit.

I want to achieve this:

for each row of the array.

Hope, you get my point…help me….thanks

Advertisement

Answer

I have solved the problem. In this I store array in localrecord and previous balance in Prev. then I loop throughthe array data.

Hope, it will help someone..

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement