|
The Details of the Selected Order |
|
|
Steps:
The "OrderForm" Element
The "OrderForm" element is a process form that contains a process block "OrderBlock" and ExecuteCommand elements "DeleteOrder" and "ChangeStatus". The "Repeat | For Each" property of "OrderBlock" is defined as "/order/item". "order" Element properties:
This SQL statement joins 3 tables (orders, customers, and employees) and returns the date of the order, the name of the customer, the email of the customer, the name of the employee and the status of the selected order. Please note that the "ID" parameter, that is used in "@vof(i:ID)" definition, was included in the hyperlink with definition Delete Order Process The aim of this process is to delete the currently displayed order from the database. The properties of the "DeleteOrderProcess" were set as follows:
The SQL contains two statements; one deletes the order record from the "orders" table and the other one deletes all the records of the products that were included in the order from the "orderdetails" table. Change Status Process This process is used to change the status of the order being displayed. When the value of the STATUS ComboBox is changed and [Change Status] button is clicked, we change the value of the "STATUS" field in the "orders" table and we will notify the customer with the status change of his order with an e-mail.
The "OrderedProducts" Element
The "Repeat | For Each" property of the repeating panel is set to "/order_details/item". The properties of "order_details" data source element are as follows:
This SQL query will return all the products that were included in the selected order. The selected order, again, is specified with "@vof(i:ID)" definition.
|