quinta-feira, 13 de agosto de 2020

DICAS 3017 - WINDEV TUTORIAL 40 - Pesquisa Simples - Pesquisa Identica- PARTE D



https://youtu.be/RNVtggtkHaE


Bom Dia/Boa Tarde/Boa Noite

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

DICAS 3017 - WINDEV TUTORIAL 40 - Pesquisa Simples - Pesquisa Identica- PARTE D
Tutoriel WINDEV : Leçon 4.3.d. Recherche simple - Recherche à l'identique


ASSUNTOS

CRIANDO COMBO RELACAO CLIENTE 
ALINHANDO COMBO CLIENTE COM OUTROS CAMPOS ABAIXO
CRIANDO BOTAO NO LADO DA COMBO
COMANDOS UTILIZADOS 
  HReadSeekFirst
  HFound
  FileToScreen()


Video original da Franca

https://youtu.be/rsM9Q78JIgU


Playlist Windev TUTORIAL










Exact-match search

To perform an exact-match search, we are going to select the customer name in a Combo Box control. The "Generic search" Button control will be used to display the form of the corresponding person. A single person corresponds to the selected name.
  • The Combo Box control will be positioned above the created controls. If your controls are placed too close to the top of the Tab control pane, it is necessary to move them down. To do so:
    1. Select all the controls in the Tab control pane:
      • Press Ctrl + A: all the controls in the window and in the current pane are selected.
      • Press the Ctrl key.
      • Click the Tab control: only the controls in the Tab control pane are selected.
    2. With the mouse, move one of the selected controls to the bottom.
      Selecting the controls to move down
    3. All controls are moved to the bottom.
  • To create the search control:
    1. Create a Combo Box control: on the "Creation" pane, in the "Usual controls" group, click on "Combo Box".
    2. Click the "Finding customers" pane, between the tab pane and the control "Identifier of Customer".
    3. The Combo Box control creation wizard is displayed. We will create a Combo Box control based on the "Customer" data file.
    4. Select "Display the data found in a file or in an existing query".
      Combo Box control creation assistant
      Go to the next step of the wizard.
    5. Select the "Customer" data file. Go to the next step.
    6. We are going to display the last and first names of the person.
      • Deselect the "CustomerID" item.
      • Select the "FullName" item.
        Combo Box control creation assistant
    7. Go to the next step.
    8. The "FullName" item will also be used to sort the list of customers displayed in the Combo Box control. Select the "FullName" item.
      Combo Box control creation assistant
    9. Go to the next step.
    10. The value returned by the Combo Box control will be the "CustomerID" identifier. This is the value that will be sought in the Customer data file. Select the "CustomerID" item.
      Combo Box control creation assistant
      Go to the next step.
    11. The Combo Box control will be linked to no item. Keep "No" and go to the next step.
    12. Validate the next step ("Next").
    13. Give a name ("COMBO_Customer" for example) and a caption ("Sought customer" for example) to the control.
    14. Finish the wizard ("Finish" button). Position the Combo Box control in the window (top left corner for example).
    15. Select the Combo Box control and resize it (via the handles) in order for the full customer name to be displayed.
      Creating the search control
  • To create the Button control to find customers:
    1. Create a Button control: on the "Creation" pane, in the "Usual controls" group, click Create a Button control.
    2. Position the Button control beside the Combo Box that was just created.
    3. This control is named "BTN_ExactMatchSearch" and its caption is "Exact-match search".
    4. If necessary, adjust the size of the control so that the caption is displayed properly in the control.
    5. Write the following WLanguage code in the "Click" event of the control:
      // Finds the customer from his identifier
      HReadSeekFirst(CustomerCustomerIDCOMBO_Customer)
      IF HFound(Customer) THEN
      // Displays the customer data
      FileToScreen()
      END
    6. Let's take a look at this WLanguage code:
      • HReadSeekFirst is used to perform an exact-match search. In this example, the search is performed on the Customer data file and on the CustomerID item. The sought value corresponds to the last parameter of the function. Here, the sought value corresponds to the value selected in the Combo Box. This value is obtained by using the name of the Combo Box control (COMBO_Customer).
      • HFound is used to check the search result. If HFound returns True, a value was found ; if HFound returns False, no value was found. Any record found is read: it becomes the current record in the data file.
      • In this code, if the record was found, it is displayed by FileToScreen.

        Remark

        FileToScreen and ScreenToFile perform the reverse operation: the data found in the file items is displayed in the corresponding controls.
    7. Close the code editor.
    8. Save the window (Ctrl + S).



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






Nenhum comentário:

Postar um comentário

Teste

Teste
teste