sábado, 15 de agosto de 2020

DICAS 3025 - WINDEV TUTORIAL 48 - Pesquisa Multicriterio - Segundo Parametro - Parte F



https://youtu.be/2trKZbRkLxE


Bom Dia/Boa Tarde/Boa Noite


Esse Ao Vivo vai estrear as 18:00 do dia 26/08/2020 

DICAS 3025 - WINDEV TUTORIAL 48 - Pesquisa Multicriterio - Segundo Parametro - Parte F
Tutoriel WINDEV : Leçon 4.4.f. Recherche multicritère - Deuxième paramètre

ASSUNTOS

Explicando o que sera feito
Criando combox forma de pagamento 
Colocando valor padrao 1
mudando Estilo combox para interno
no codigo da tabela, colocar o valor da combox 

  

Video original da Franca

https://youtu.be/QIq8l7Jdcvo


Playlist Windev TUTORIAL












Second parameter: Payment mode
Several payment methods can be used for an order: cash, checks, ... The available payment methods are stored in the "PaymentMode" data file.
We will use an Combo Box control based on this data file to allow the user to select the desired payment method.

Remark

The "Combo Box" control is used to display a list of elements and to select an element from this list.
Unlike a List Box, a Combo Box control is not expanded: the Combo Box control expands on request or when the cursor is positioned on the control input area.
The elements displayed in a Combo Box control can be defined when creating the control in the editor. These elements:
  • are defined by programming.
  • come from a data file or query.
  • To create a Combo Box control:
    1. On the "Creation" pane, in the "Usual controls" group, click "Combo Box".
    2. Click the location where the control must be created in the window (beside the Radio Button control that was just created for example).
    3. The Combo Box control creation wizard starts.
    4. Select "Display the data found in a file or in an existing query" and go to the next step.
    5. Select the "PaymentMode" data file and go to the next step.
    6. The item that will be displayed in the Combo Box control is "Caption". Uncheck "PaymentModeID" and check "Caption". Go to the next step.
    7. Select the sort item: "Caption". Go to the next step.
    8. Select the return value: "PaymentModeID". This return value is very important because it will be passed in parameter to the query. Go to the next step.
    9. Keep the default options in the different steps of the wizard and validate the creation of the Combo Box control.
    10. The Combo Box control is automatically created in the window.
  • We are going to modify some characteristics of Combo Box control:
    1. Select the Combo Box control and open the description window ("Description" in the popup menu).
    2. In the "General" tab, modify the control caption: replace "PaymentMode combobox" by "Payment mode".
    3. In the "Content" tab, specify the initial value displayed by the Combo Box control ("Initial value" at the bottom of description window). In our case, type "1". This value corresponds to a payment in cash.
    4. Validate the control description window.
  • Change the control style: to occupy less space, we are going to select a style that displays the caption above the control.
    1. Select the Combo Box control.
    2. In the popup menu (right mouse click), select "Choose a style".
    3. In the window that is displayed, select the "COMBO_Internal" style and validate.
    4. Reduce the control size.
  • We are now going to use the value selected in the Combo Box control to pass it to the query as parameter:
    1. Display the WLanguage events associated with the Table control:
      • Select the Table control.
      • Open the popup menu (right click) and select "Code".
    2. In the "Initializing" event of the Table control, replace the line:
      MySource.ParamPaymentModeID = "1"
      by the code:
      MySource.ParamPaymentModeID = COMBO_PaymentMode
      In this code, COMBO_PaymentMode is the name of the Combo Box control that was just created. The value of this control is associated with the ParamPaymentModeID parameter expected by the query.
    3. Close the code editor.
    4. Save the window by clicking Save an element among the quick access buttons.
  • We are now going to check how the first two parameters are passed:
    1. Click Run the test of a window among the quick access buttons.
    2. Select the "Finding orders" tab pane if necessary.
    3. Change the order status with the Radio Button control and modify the payment method with the Combo Box control, then click "Find". The content of Table control is modified.
      Window test with selection of order status and payment method
    4. Close the test 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 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