Exercise - Updating Data Programmatically

  1. In ShowProducts.
  2. Replace the message of the "Total units" button with a message "Total Units : " + TotalUnits method from the controller.
  3. Save changes to Git.
  4. Build and test.
  5. In ShowEmployeeCars add a new NumberColumn name it AverageKM and add it to the form.
  6. Add a new method that return Number, name the new method GetAverageKM.
  7. GetAverageKM return the value of CarKM divided to (Today year minus CarYear).
  8. Use the BindValue and set the AverageKM value to GetAverageKM method.
  9. Save changes to Git.
  10. Build and test.
  11. Change the GetAverageKM method to one line method. ( use => )
  12. Save changes to Git.
  13. Built and test.
  14. Change the BindValue to use Lamda Expression instead of calling the GetAverageKM method.
  15. Save changes to Git.
  16. Build and test.
  17. In ShowOrders Bind the value of EstimatedArrivalDate to OrderDate plus 30 days.(use Lambda expression).
  18. Save changes to Git.
  19. Build and test.
  20. 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