quarta-feira, 12 de agosto de 2020

DICAS 3014 - WINDEV TUTORIAL 37 - Pesquisa Simples - Apresentacao - PARTE A



https://youtu.be/OFLnZz2bM8Q


Bom Dia/Boa Tarde/Boa Noite

Esse Ao Vivo vai estrear as 09:00 do dia 25/08/2020 

DICAS 3014 - WINDEV TUTORIAL 37 - Pesquisa Simples - Apresentacao - PARTE A
Tutoriel WINDEV : Leçon 4.3.a. Recherche simple - Présentation


ASSUNTOS

EXPLICANDO O QUE SERA FEITO NESSAS LICOES


Video original da Franca

https://youtu.be/MnuivOQ_ybk


Playlist Windev TUTORIAL












Lesson 4.3. Simple search and record browse
This lesson will teach you the following concepts
  • Managing the search for records.
  • Browsing records.
Lesson duration

Estimated time: 30 mn
Previous LessonTable of contentsNext Lesson
Overview
We have managed the addition and modification of records. It's fine. But it would be even better to be able to find a record (to modify it for example). That's what we are going to do now.
We are going to modify the main window of "WD Full Application" application to use tab panes.
  • The first tab pane will display the product list and manage the addition and modification of products (these operations have been performed in previous lessons).
  • The second tab pane will propose to find a customer by name. The customer form will be displayed in the same tab pane.
Two search modes will be implemented:
  • an exact-match search,
  • a generic search.
Window to create in this lesson
Then, you will have the ability to browse the records found in the data file from the customer displayed.

Answer

A corrected project is available. This project contains the different windows created in this lesson. To open the corrected project, in WINDEV's home page (Ctrl + <), click "Tutorial" and select "Full application (With windows)".


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
DICAS 3004 - WINDEV TUTORIAL 27 - VISAO GERAL
DICAS 3005 - WINDEV TUTORIAL 28 - Adicionar e Modificar Janelas PRODUTOS - PARTE A
DICAS 3006 - WINDEV TUTORIAL 29 - Adicionar e Modificar Janelas PRODUTOS Formulario - PARTE B
DICAS 3007 - WINDEV TUTORIAL 30 - Adicionar e Modificar Janelas PRODUTOS ALINHAR CAMPOS - PARTE C









DICAS 3013 - WINDEV TUTORIAL 36 - Adicionar e Modificar Janelas - Teste - PARTE I



https://youtu.be/4q-IeqqBobI



Bom Dia/Boa Tarde/Boa Noite

Esse Ao Vivo vai estrear as 19:00 do dia 24/08/2020 

DICAS 3013 - WINDEV TUTORIAL 36 - Adicionar e Modificar Janelas - Teste - PARTE I
Tutoriel WINDEV : Leçon 4.2.i. Fenêtres d'ajout et de modification - Test


ASSUNTOS

incluindo novo registro
incluindo novo registro, mas a mesma referencia, e ver mensagem
explicando erros
mostrando wdmap



Video original da Franca

Playlist Windev TUTORIAL












Checking the product addition

  • To check the product addition:
    1. Run the project test ( Run project test among the quick access buttons).
    2. In the list of products, click the "New" button.
    3. Enter a new product with the following characteristics:
      • Reference: REF-337
      • Caption: Surf WD
      • Description: Surf with WINDEV colors
      • Price: 150
        Test of the window for adding a product
    4. Validate. The new product is displayed in the list of products.
    5. Click the "New" button again.
    6. Enter a new product with the following characteristics:
      • Reference: REF-337
      • Caption: Surf WB
      • Description: Surf with WEBDEV colors
      • Price: 150
    7. Validate. A specific window is displayed:
      Managing duplicates
      This window informs the user that a duplicate was found: indeed, the reference (that is a unique key) is identical for two products. This window is used to modify the reference value: type "REF-338" for example.
      This window is one of the windows for automatic management of HFSQL errors.

Remark

Several errors may occur when adding or modifying a record: duplicate errors, integrity errors, password errors, etc.
WINDEV proposes several modes for managing these errors:
  • the automatic mode: for each error that occurred when managing database records, a specific page is displayed to the user. This window allows the user to modify his data directly.
  • the advanced programmed mode: a procedure or a custom window for error management is called whenever an error occurs when managing the database records.
The example "WD Detecting HFSQL Errors", supplied with WINDEV, allows you to check these different modes for error management. This example can be opened via the WINDEV home page (Ctrl + <), "Open an example" option.

Viewing the records

The new added records can be immediately viewed in the Table control of the "WIN_Menu" window.
However, in some cases (when running tests for example), you may want to see the content of the data file directly.
WINDEV proposes a tool used to view the content of data files while the application is being developed (when the viewing windows have not been created yet).
This tool is named WDMAP. We are going to use it to see the content of the Product data file.
  • To start WDMAP:
    1. On the "Tools" pane, in the "Database" group, click "WDMap".
    2. Select the "Product" data file. The data file content is displayed.
      WDMAP
    3. Sort the elements by reference (click the header of the "Reference" column) and the two added records appear.



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
DICAS 3004 - WINDEV TUTORIAL 27 - VISAO GERAL
DICAS 3005 - WINDEV TUTORIAL 28 - Adicionar e Modificar Janelas PRODUTOS - PARTE A
DICAS 3006 - WINDEV TUTORIAL 29 - Adicionar e Modificar Janelas PRODUTOS Formulario - PARTE B
DICAS 3007 - WINDEV TUTORIAL 30 - Adicionar e Modificar Janelas PRODUTOS ALINHAR CAMPOS - PARTE C









DICAS 3012 - WINDEV TUTORIAL 35 - Adicionar e Modificar Janelas - CRIACAO - PARTE H



https://youtu.be/tOUFuAJnhTc


Bom Dia/Boa Tarde/Boa Noite

Esse Ao Vivo vai estrear as 11:00 do dia 24/08/2020 

DICAS 3012 - WINDEV TUTORIAL 35 - Adicionar e Modificar Janelas - CRIACAO - PARTE H
Tutoriel WINDEV : Leçon 4.2.h. Fenêtres d'ajout et de modification - Création

ASSUNTOS

BOTAO novo
  HReset(Product)
  Open(WIN_FICHA_DE_PRODUTOS)
  TableDisplay(TABLE_Product,taCurrentRecord)
BOTAO GRAVAR
  ScreenToFile()
  HSave(Product)
  Close()


Video original da Franca

https://youtu.be/LNK3C1R03Uk


Playlist Windev TUTORIAL


=======================
// btn novo
HReset(Product)
Open(WIN_FICHA_DE_PRODUTOS)
TableDisplay(TABLE_Product,taCurrentRecord)
=======================
// btn alterar
Open(WIN_FICHA_DE_PRODUTOS)
TableDisplay(TABLE_Product,taCurrentFirst)

=======================
// btn gravar
//Product.Reference = EDT_Reference
ScreenToFile()

HSave(Product)

//if Product..NewRecord=true THEN
// hadd(Product)
//else
// HModify(Product)
//END

Close()
========================












Creating a new product
The principle for creating a product is as follows:
  • In the product list window, we will add a "New" Button control that will open the "Product form" window.
  • Then, we will modify the code of "Product form" window to manage the addition into the Product data file.

Adding a Button control

  • To add a "New" Button control into "WIN_Menu":
    1. Display the "WIN_Menu" window in the editor: click the corresponding button in the open documents bar.
    2. On the "Creation" pane, in the "Usual controls" group, expand "Button" and select "New button".
    3. The shape of the control appears under the mouse pointer. Click in the window: the Button control is created.
    4. Position the Button control above the "Modify" Button control (if necessary, reposition the "Modify" Button control).
      Window interface in the editor
    5. Modify the WLanguage code of this control:
      • Right-click on the "New" Button control and select "Code" in the popup menu.
      • Write the following code in the "Click" WLanguage event:
        HReset(Product)
        Open(WIN_Product_form)
        TableDisplay(TABLE_ProducttaCurrentRecord)
        Let's study this code:
        • HReset initializes the item variables in the "Product" data file with the default values to manage a new record.
        • Open is used to open the product form to type the new record.
        • TableDisplay is used to re-display the Table control. The taCurrentRecord constant is used in this code: the Table control is re-displayed from the current record.
    6. Save the modifications by clicking Save an element among the quick access buttons.
    7. Close the code window (click X at the top right corner of code editor).

Adding a new record in the data file

  • We are now going to modify the window of product form to manage the addition of a new record.
    1. Open the "WIN_Product_form" window in the editor.
    2. We will modify the WLanguage code associated with the "OK" Button control:
      • Right-click on "OK" and select "Code" in the popup menu.
      • In the "Click" event, replace the existing WLanguage code with the following:
        ScreenToFile()
        IF Product..NewRecord THEN
        HAdd(Product)
        ELSE
        HModify(Product)
        END
        Close()
        Let's take a look at this WLanguage code:
        • ..NewRecord is used to find out whether the current record must be created.
        • If HRESET has been called previously, the property returns True (click on "New") and the record must be created by HAdd.
        • Otherwise, the current record already exists and it must be modified by HModify.
        • HAdd adds the record into the data file. This function takes the values in memory and writes the content of file items into the data file itself. The indexes are immediately and automatically updated. In this case, it is the "Product" data file that is updated.

          Remark

          The test code of new record can be replaced by HSave. This function is used to check whether the record is already found in the data file, and it allows you to add it or to modify it. The code becomes:
          ScreenToFile()
          HSave(Product)
          Close()
    3. Save the modifications by clicking Save an element among the quick access buttons.
    4. Close the code window (click X at the top right corner of code 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
DICAS 3004 - WINDEV TUTORIAL 27 - VISAO GERAL
DICAS 3005 - WINDEV TUTORIAL 28 - Adicionar e Modificar Janelas PRODUTOS - PARTE A
DICAS 3006 - WINDEV TUTORIAL 29 - Adicionar e Modificar Janelas PRODUTOS Formulario - PARTE B
DICAS 3007 - WINDEV TUTORIAL 30 - Adicionar e Modificar Janelas PRODUTOS ALINHAR CAMPOS - PARTE C








Teste

Teste
teste