quarta-feira, 5 de agosto de 2020

DICAS 3000 - WINDEV TUTORIAL 23 - PROJETO E ANALISE - IMPORTANDO CVS-ARQUIVO TEXTO - PARTE 4



https://youtu.be/WRrRpIGLwk8


Bom Dia/Boa Tarde/Boa Noite

Esse Ao Vivo vai estrear as 10:00 do dia 19/08/2020 QUARTA
DICAS 3000 - WINDEV TUTORIAL 23 - PROJETO E ANALISE - IMPORTANDO CVS-ARQUIVO TEXTO - PARTE 4
Tutoriel WINDEV : Leçon 3.3.d. Projet et analyse - Importation CSV
https://windevdesenvolvimento.blogspot.com/2020/08/dicas-3000-windev-tutorial-23-projeto-e.html


ASSUNTOS

1. CRIANDO UM ARQUIVO TEXTO
2. NESSE ARQUIVO TEXTO CVS, CRIAR OS CAMPOS , E VALORES
3. IMPORTAR O ARQUIVO TEXTO E GERAR A ANALISE


https://doc.pcsoft.fr/fr-FR/?1410087521&name=lecon_33_projet_analyse

Video original da Franca
https://youtu.be/UVsWtUYpDAw

Playlist Windev TUTORIAL
https://www.youtube.com/playlist?list=PLwJwZaqiZW-lxU1XF0M0htb5S5f8pavuE






Importing a CSV file
A different method will be used to create the "PaymentMode" data file, which contains the payment characteristics: importing a CSV file.
Remark
A CSV file is a text file that uses a specific format. This file contains data on each line. The data is separated by a separation character (a comma, a semi-colon or a tabulation).
From the CSV file containing the data, WINDEV will create:
  • the description of data file in the analysis,
  • the HFSQL data file with the data found in the CSV file.
  • To import a CSV file into the analysis:
    1. In the ribbon, on the "Analysis" pane, in the "Creation" group, expand "Import" and select "Import file/table descriptions".
      Tip
      To import a CSV file (or any other file) into the analysis, you also have the ability to Drag and Drop the CSV file (from the Windows explorer) to the data model editor. This will be presented in the next paragraph.
    2. The file import wizard starts.
    3. Go to the next step.
    4. Select the format of files to import. In this case, select "Text file".
      Data file import wizard
      Go to the next step of the wizard.
    5. Specify the path of file to import: "\Tutorial\WD\Exercises\WD My First Database\PaymentMode.csv" in the WINDEV setup directory.
    6. Go to the next step of the wizard.
    7. Specify the following import parameters:
      • The records are delimited by: "<Carriage Return/Line Feed>".
      • The columns are delimited by: "<Semicolon>".
      • The strings are delimited by: "<None>".
      • Decimal separator: "<Automatic: dot or comma>"
        Parameters for importing a text file
    8. Don't forget to check "The first row contains the names of columns".
    9. Go to the next step.
    10. The structure of data file that will be created is displayed.
      Import options
      Keep the default options. Go to the next step of the wizard.
    11. The content of CSV file will be automatically converted to HFSQL format. The wizard proposes to create the HFSQL file in the project directory.
      Creating the HFSQL files
      Keep the proposed options and go to the next step.
    12. Validate the wizard. WINDEV creates the data file.
  • Let's study the description of the imported data file:
    1. Select the "PaymentMode" data file.
    2. In the popup menu (right mouse click), select "Description of data file".
    3. Change the data file caption in the window that opens up: delete "(Imported)".
    4. Click the Description of items icon to display the description of the data file items.
    5. This data file contains no automatic identifier and no unique key. We are going to switch the "Code" item to unique key:
      • Position the selection bar on the code item if necessary.
      • In the right section of screen, click "Unique key".
        Managing the keys
    6. We get the following data:
      Description of items (data file PaymentMode)
    7. Validate the item description window and the data file description window.










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 2999 - WINDEV TUTORIAL 22 - PROJETO E ANALISE - ARQUIVOS DADOS CRIACAO ARQUIVO PEDIDO - PARTE 3



https://youtu.be/NMvNvWaXGAM


Bom Dia/Boa Tarde/Boa Noite

Esse Ao Vivo vai estrear as 17:00 do dia 14/09/2020 segunda

DICAS 2999 - WINDEV TUTORIAL 22 - PROJETO E ANALISE - ARQUIVOS DADOS CRIACAO ARQUIVO PEDIDO - PARTE 3 

Tutoriel WINDEV : Leçon 3.3.c. Projet et analyse - Création du fichier
https://windevdesenvolvimento.blogspot.com/2020/08/dicas-2999-windev-tutorial-22-projeto-e.html


ASSUNTOS

CRIANDO A TABELA PEDIDO
CRIANDO OS CAMPOS NECESSARIOS DO PEDIDO
CRIANDO DATA DO PEDIDO
CRIANDO STATUS DO PEDIDO
  PENDENTE FINALIZADO CANCELADO
CRIANDO CAMPOS DE TOTAIS

https://doc.pcsoft.fr/fr-FR/?1410087521&name=lecon_33_projet_analyse

Video original da Franca

https://youtu.be/EV62zq3xlpc


Playlist Windev TUTORIAL

https://www.youtube.com/playlist?list=PLwJwZaqiZW-lxU1XF0M0htb5S5f8pavuE














Creating a data file: creating the data file and items

  • To create a data file from the window for creating a new element:
    1. Click "Data" then "Data file".
      Remark
      You also have the ability to create a data file from the data model editor: in the ribbon, on the "Analysis" pane, in the "Creation" group, click "New file".
    2. The data file creation wizard starts.
    3. In the wizard, select "Create a new data file description".
      Data file creation wizard
    4. Go to the next step of the wizard.
    5. We are going to create the "Orders" data file. Type its name ("Orders") in the wizard. This name will be used:
      • to handle the data file by programming. The variable associated with the data file will be "Orders".
      • to build the name of associated physical data file ("Orders.fic" file). The caption and description of elements represented by the file records are automatically displayed.
        Remark
        In the wizard, the control "A record represents" is used to get an understandable caption during the description of links between data files. A caption is automatically proposed from the data file name.
        In our case, type "An order".
        Data file creation wizard - General settings
    6. In "Automatic identifier", keep "8-byte automatic identifier". If an automatic identifier is defined on the data file, it means that the data file includes a unique key, automatically managed by WINDEV.
      Remark
      To create the identifier (an identifier is a unique key), you have the ability to create a numeric item whose type is "Automatic identifier".
      This identifier is automatically managed by WINDEV. Whenever a record is added to the data file, WINDEV automatically assigns a value to the data file identifier. This value is unique.
    7. Go to the next step and select the type of database associated with the data file. We are going to work on HFSQL Classic data files. Go to the next step.
    8. Click "Done" to validate. The data file is automatically created in the analysis. The description window of items and indexes opens up.
      Description of a data file
We are going to create the items of the "Orders" data file. In the data file description window, you will notice that an item was automatically created: "OrdersID". This item corresponds to the automatic file identifier. This item consists of the letters "ID" and the name of the data file.
We are going to create the other items of this data file.
  • First, we are going to create the "Date" item. This item will contain the order date.
    1. In the item description window, double-click in the "Name" column of first empty row. This column automatically becomes editable. Type "Date".
    2. Click the "Caption" column. The item name is automatically displayed. We are going to modify the item caption by clicking on it: type "Order date". In the "Type" column, the "Text" type is automatically selected. Expand the list and select the "Date" type.
      Description of items
    3. This item will be a key item (index) in our data file: the keys are used to accelerate the accesses to data and the sorts.
      • In the case of an SQL database, the engine makes the best use of indexes.
      • For a sequential browse of a data file, all you have to do is specify the browse index (which means the key).
        Remark
        The concept of key is part of the item characteristics. When creating an item, you have the ability to specify whether it is:
        • not key,
        • unique key: the value of this key will be unique in the entire data file (i.e. in all the data file records).
        • key with duplicates: the value of this key can be found several times in the data file.
    4. The key definition is performed as follows: re-select the row of the "Date" item to activate the description controls on the right-hand side of the window. Then, simply specify the type of key used. In our case, the date is a key with duplicates.
      Description of items
    5. You must also define the search direction of the key. The search direction is used to define the default sort for this item. In our case, when a browse is performed on this key, the default sort order will be "ascending".
  • We are now going to create the "Status" item that is used to find out the order status.
    1. Position the cursor on a new table row. Enter:
      • the name: Status
      • the caption: Order status
      • the type: Radio Button, List Box, Combo Box. In the window that appears, you can select the type of control created by default for this item. It will be a radio button in this case. Validate the window.
    2. In the lower section of the screen, click the link to display the parameters of the control linked to the selected item.
      Control parameters
      The information typed in the new window that is displayed will be automatically used when creating windows linked to the data file. You will find here the control type and the caption.
      We are going to type the following options in the "Content" tab:
      • Click the "Content" tab.
      • Click the "+" button to add the first option.
      • The option 1 corresponds to Pending. Type "Pending" in the edit control found on the right.
      • Click the "+" button to add the second option.
      • Type "Validated" instead of "Option 2".
      • Click the "+" button again.
      • Type "Canceled" instead of "Option 3".
        Control parameters
    3. Validate the description window of the control linked to the item.
    4. Similarly:
      • Position the cursor on a new table row and create the item "TotalBT". This item is a "Currency" item.
      • Position the cursor on a new table row and create the item "TotalIOT". This item is a "Currency" item.
    5. That's it, the description of "Orders" data file is complete. Validate the description window of items.
    6. The "Orders" data file appears in the data model editor. It is possible to enlarge the displayed data file. Simply click the data file, select the black handle at the bottom of the data file and move the mouse down.
      Data files in the 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










Teste

Teste
teste