Exercise - Updating Data Programmatically
- In ShowProducts.
- Replace the message of the "Total units" button with a message "Total Units : " + TotalUnits method from the controller.
- Save changes to Git.
- Build and test.
- In ShowEmployeeCars add a new NumberColumn name it AverageKM and add it to the form.
- Add a new method that return Number, name the new method GetAverageKM.
- GetAverageKM return the value of CarKM divided to (Today year minus CarYear).
- Use the BindValue and set the AverageKM value to GetAverageKM method.
- Save changes to Git.
- Build and test.
- Change the GetAverageKM method to one line method. ( use => )
- Save changes to Git.
- Built and test.
- Change the BindValue to use Lamda Expression instead of calling the GetAverageKM method.
- Save changes to Git.
- Build and test.
- In ShowOrders Bind the value of EstimatedArrivalDate to OrderDate plus 30 days.(use Lambda expression).
- Save changes to Git.
- Build and test.
- Notice that in run time the column show the right value in all the rows.
Help us improve, Edit this page on GitHub
or email us at info@fireflymigration.com