Tuto WINDEV 25
264 Part 4: Full application with data Step by step Step 1 : Creating an external component We are going to create an external component from the "WD Full Application" project. This project is used to manage orders, products and customers. This external component will be used to immediately find out in another application the customers corresponding to a given city. During the call to the external component, you will have the ability to: • Pass a city in parameter. • Retrieve a string containing the customer name and the total amount of his orders. To avoid having to develop the code required for the component to operate, the "WD Full Application" project contains all necessary elements. Answer If you did not create the windows in the previous lessons, you can follow this lesson by opening a corrected project: in WINDEV’s home page (Ctrl + <), click "Tutorial" and select "Full application (with windows)". A full corrected application project is also available: in WINDEV’s home page (Ctrl + <), click "Tutorial" and select "Full application (Answer)". ▶ For the component needs, the project contains: • a "QRY_OrdersByCity" query. This query is a query with parameters used to find out the customers corresponding to a given city as well the total amount of their orders. • a set of procedures "SET_Component". This set of procedures contains: • the "GiveOrdersByCity" procedure that returns, for the city passed in parameter, a string containing the customer name and the total amount of his orders. • the "DataLocation" procedure that is used to locate the data required by the component. • an analysis used to described the data files for storing information. ▶ We are now going to create our component. To do so, a project configuration must be created. Remark The project configurations are used to create several "targets" from the same project: • A 32-bit application, • A 64-bit application, • A component, • ... You have the ability to choose the requested configuration at any time and to generate in a single operation all elements for all project configurations.
Made with FlippingBook
RkJQdWJsaXNoZXIy NDQ0OA==