I am creating a web application and in this project i have to manage the profit and loss account of a company.
I have two headers as Income and Expenditure
In the Income i have to show the details of income sources with amount group by date and in the similar way i have to show all the expenditures like salary,vat,etc. with amount group by dates.
How can i manage this through grid view so that i can calculate the net profit/loss.
Please help me with the suitable examples.
Thanks in advance.
Your question and the comment isn’t explanatory in itself, so i am assuming bit of things myself so pardon me in that case.
I assume you want to Show data from Tbl_Sale under the Income header and data from Tbl_Purchase under Expenditure header.
For that, you will need to have two grid controls one for Tbl_Sale and one for for Tbl_Purchase(Set their respective data sources). Both of these controls orientation is needed to be set vertically rather than the default horizontal. Include the columns in gridview for those values which you want to display : like Item and Amount.
For Total, you will need to have a function which sums up the Entire Sale table and Entire Purchase table and stores the value in some temp field like TotalSumForSale and TotalSumForPurchase and then display them at the bottom of your grid controllers. You can’t have them inside the Gridview control