https://youtu.be/Y_boh8KJqy0
Bom Dia/Boa Tarde/Boa Noite
Esse Ao Vivo vai estrear as 09:00 do dia 20/08/2020
DICAS 3002 - WINDEV TUTORIAL 25 - PROJETO E ANALISE - LINK - PARTE 6
tutoriel WINDEV : Leçon 3.3.f. Projet et analyse - Liaisons et génération
https://windevdesenvolvimento.blogspot.com/2020/08/dicas-3002-windev-tutorial-25-projeto-e.html
https://youtu.be/Y_boh8KJqy0
ASSUNTOS
1. fazendo o link do cliente com pedido
2. fazendo o link tipo de pagamento pedido
3. fazendo o link produto com pedido
4. criando arquivo intermediario por causa link
5. criado Linha_pedido
6. mostrando como gera os arquivos
https://doc.pcsoft.fr/fr-FR/?1410087521&name=lecon_33_projet_analyse
Video original da Franca
https://youtu.be/M7F_DGIGbdM
Playlist Windev TUTORIAL
https://www.youtube.com/playlist?list=PLwJwZaqiZW-lxU1XF0M0htb5S5f8pavuE
Creating links
All data file descriptions required by the account management application have been created.
We are now going to create the links between data files. A link is used to define the integrity constraints (cardinalities) between two data files.
- First, let's create the link between the "Customer" and "Orders" data files: a customer can have one or more orders and each order is linked to a customer.
- On the "Analysis" pane (in the ribbon), in the "Creation" group, click "New link". The mouse cursor turns into a pen.
- Click the "Customer" data file, then the "Orders" data file.
- The link creation wizard starts.
- Answer the questions asked by the wizard:
- Each Customer has at least one Order: No
- Each Customer can have several Orders: Yes
- Each Order has at least one Customer: Yes
- Each Order can have several Customers: NoRemark
You can also specify the link cardinalities directly in the wizard.
- Go to the next step. The wizard automatically proposes the key used by the link (CustomerID).
- Go to the next step of the wizard. The wizard offers to create the "CustomerID" key in the Orders data file to store the customer corresponding to the order.
- Accept this option by going to the next step.
- This step defines the integrity rules that will be automatically applied. In our case, you can set the behavior when deleting a customer and when modifying the customer identifier.
- Validate the integrity rules by going to the next step of the wizard.
- Click "Finish". The link is automatically created in the data model editor.
- Likewise, create a link between the PaymentMode and Orders data files. These two data files are linked as follows:
- An order must have a payment mode.
- A payment mode can be used in several orders.
- The cardinalities are as follows: PaymentMode (0,n), Orders (1,1)
- The link key corresponds to the "Code" item.
- We are now going to create a link between the "Product" and "Orders" data files. This link will be used to create a link file, the file of order lines.
- Likewise, create the link between the data files.
- Answer the questions asked by the wizard:
- Each Product has at least one Order: No
- Each Product can have several Orders: Yes
- Each Order has at least one Product: No
- Each Order can have several Products: Yes
- Go to the next step. The wizard proposes to create a relation file. Keep "Create the relation file automatically" and go to the next step.
- The wizard proposes the unique key of the Product data file. Select "Reference". Go to the next step.
- Validate the key creation by going to the next step.
- Keep the default options regarding the integrity rules and go to the next step.
- The wizard proposes the unique key of the Orders data file to use: "OrdersID". Go to the next step.
- Validate the key creation by going to the next step.
- Keep the default options regarding the integrity rules and go to the next step.
- Click "Finish". The relation file is automatically created in the data model editor.
- Modify the name of the data file.
- Modify the name of its items.
- Add items to find out the quantity of products ordered and the total of order line.
- First, we are going to rename the data file. We already did something similar when we changed the caption of the imported data file. However, in this case, not only the caption will be modified: we will also rename the physical file linked to the data file description.
- Select the "Product_Orders" data file.
- In the popup menu (right mouse click), select "Description of data file".
- In the window that is displayed, modify:
- the name of data file: "OrderLine".
- the name on disk: "OrderLine".
- We are now going to modify the items of this relation file.
- Click to display the description of data file items.
- This relation file has 3 items. Position the selection bar on the item "Reference_OrdersID". This item is a composite key.Remark
A composite key is a set of items that constitute an index.
This type of key is used to browse the data file according to complex criteria or to perform specific searches on several items at the same time. - To rename this item:
- Click the "Name" column.
- Replace "Reference_OrdersID" by "OrderLineID".
- Click the "Caption" column.
- Replace the current caption by "Identifier of OrderLine".
- Click to display the description of data file items.
- We are now going to add 3 new items into this relation file: Quantity, TotalIOT and TotalBT.
- Position the cursor on a new row and create the item "Quantity". This item is a "Numeric" item.
- Position the cursor on a new row and create the item "Total IOT". This item is a "Currency" item.
- A window is displayed, indicating that the item already exists in the analysis and proposing to re-use its characteristics:
- Position the cursor on a new row and create the item "Total BT". This item is a "Currency" item. Once again, use the existing description.
- The description of the "OrderLine" data file items is as follows.
- Validate the description of the items ("OK") as well as the data file description.
- The analysis is as follows:
Generating the analysis consists in validating the modifications performed in the analysis (create data files, add or delete items, etc.) and in applying them to the entire project (pages, linked controls, reports, etc.). The project will thus "know" all the data files, items and links defined in the analysis. It will be very easy to handle these elements in the different editors of WINDEV.
The generation is automatically proposed when closing the data model editor while modifications have been performed.
You also have the ability to generate the analysis manually. That's what we are going to do.
- To generate the analysis:
- In the ribbon of the analysis editor, on the "Analysis" pane, in the "Analysis" group, click "Generation".
- The analysis generation is automatically started.
To update the data files of the application, WINDEV automatically starts the procedure for modifying the data files. This operation is used to update the data files (".fic" files) according to their description in the analysis.
- The automatic modification wizard starts. Validate the different steps until you reach the screen that lists the data files to take into account.
- WINDEV detects that the PaymentMode data file must be updated. Keep this data file selected.
- WINDEV detects that the Product data file is out of sync. Select this data file.
- Go to the next step.
- The wizard proposes to make a back up copy of the existing data files, don't change anything and go to the next step.
- The wizard proposes to type the passwords for protecting the data files modified by the automatic modification. Keep the default options and go to the next step.
- The list of data files to modify is displayed. Validate the wizard.
- The data files are updated.
- Close the data model editor.
DICAS 2978 - WINDEV TUTORIAL 1 - 1.1B - WINDEV TEMA ESCURO E IDIOMA DO AMBIENTE
DICAS 2979 - WINDEV TUTORIAL 2 - 1.2- CRIAR JANELA E INSERIR TEXTO E EXIBIR
DICAS 2980 - WINDEV TUTORIAL 3 - 2.1- VARIAVEIS PARTE 1
DICAS 2981 - WINDEV TUTORIAL 4 - 2.2- VARIAVEIS ESCOPO - PARTE 2
DICAS 2982 - WINDEV TUTORIAL 5 - 2.1- VARIAVEIS OPERADORES PARTE 3
DICAS 2983 - WINDEV TUTORIAL 6 - 2.1.D - VARIAVEIS STRINGS PARTE 4
DICAS 2984 - WINDEV TUTORIAL 7 - 2.1.E - VARIAVEIS ARRAYS PARTE 5
DICAS 2985 - WINDEV TUTORIAL 8 - 2.2.A - CONDICOES IF-SWITCH PARTE 1
DICAS 2986 - WINDEV TUTORIAL 9 - 2.2.B - CONDICOES PARTE 2
DICAS 2987 - WINDEV TUTORIAL 10 - 2.3.A - LOOP PARTE 1
DICAS 2988 - WINDEV TUTORIAL 11 - 2.3.B - LOOP EXEMPLOS PARTE 2
DICAS 2989 - WINDEV TUTORIAL 12 - Lesson 2.4. The procedures - PARTE 1
DICAS 2990 - WINDEV TUTORIAL 13 - Leçon 2.4.b. Procedures Parametros - PARTE 2
DICAS 2991 - WINDEV TUTORIAL 14 - PROCEDURES REFERENCIA - PARTE 3
DICAS 2992 - WINDEV TUTORIAL 15 - PROCEDURES OPCIONAIS OU OBRIGATORIAS - PARTE 4
DICAS 2993 - WINDEV TUTORIAL 16 - PROCEDURES EXEMPLOS - PARTE 5
DICAS 2994 - WINDEV TUTORIAL 17 - PERGUNTAS E RESPOSTA - PARTE 1
DICAS 2995 - WINDEV TUTORIAL 18 - PERGUNTAS E RESPOSTA - PARTE 2
DICAS 2996 - WINDEV TUTORIAL 19 - WINDEV E OS BANCOS DE DADOS
DICAS 2997 - WINDEV TUTORIAL 20 - PROJETO E ANALISE - CRIACAO
DICAS 2998 - WINDEV TUTORIAL 21 - PROJETO E ANALISE - ARQUIVOS DADOS CLIENTE - PARTE 2
DICAS 2999 - WINDEV TUTORIAL 22 - PROJETO E ANALISE - ARQUIVOS DADOS CRIACAO ARQUIVO PEDIDO - PARTE 3
DICAS 3000 - WINDEV TUTORIAL 23 - PROJETO E ANALISE - IMPORTANDO CVS-ARQUIVO TEXTO - PARTE 4
DICAS 3001 - WINDEV TUTORIAL 24 - PROJETO E ANALISE - IMPORTANDO ARQUIVO PRODUTO - PARTE 5
DICAS 3002 - WINDEV TUTORIAL 25 - PROJETO E ANALISE - LINK - PARTE 6
DICAS 3003 - WINDEV TUTORIAL 26 - RAD COMPLETO