M
Marcus Phass
Let's say that we have an application for tracking vehicle gas consumption.
So, we have the following fields:
VehicleID, gasFillDate, mileage, litres
So, when someone fills the gas tank (allways to the full), he/she should
note the actual mileage (in moment of filling), and other data is printed on
the receipt.
I would like to calculate the average consumption in the moment of each gas
filling. This is the formula:
litres / (currentMileage - previousMileage) * 100
I would like to display these results in the asp.net datagrid. How can I do
these calculations for each row in the datagrid?
So, we have the following fields:
VehicleID, gasFillDate, mileage, litres
So, when someone fills the gas tank (allways to the full), he/she should
note the actual mileage (in moment of filling), and other data is printed on
the receipt.
I would like to calculate the average consumption in the moment of each gas
filling. This is the formula:
litres / (currentMileage - previousMileage) * 100
I would like to display these results in the asp.net datagrid. How can I do
these calculations for each row in the datagrid?