https://youtu.be/7N-Sdqkwx_w
Bom Dia/Boa Tarde/Boa Noite
Esse Ao Vivo vai estrear as 17:00 do dia 26/08/2020
DICAS 3024 - WINDEV TUTORIAL 47 - Pesquisa Multicriterio - Primeiro Parametro - Parte E
Tutoriel WINDEV : Leçon 4.4.e. Recherche multicritère - Premier paramètre
ASSUNTOS
Explicando o que sera feito
CRIANDO O CAMPO RADIO COM OPCOES DO STATUS
ENTRANDO NA TABELA E ALTERAR CODIGO PARA RECEBER O STATUS
CRIANDO BOTAO PARA ATUALIZAR A TABELA
Video original da Franca
https://youtu.be/9lXVCEfzTWE
Playlist Windev TUTORIAL
============================================
pesquisa
// Atualiza a exibição do controle de tabela
TableDisplay(TABLE_QRY_pedido_consulta,taInit)
============================================
// initializin table_qry_pedido_consulta
// The control is using a query with parameters to display its data.
// The parameters of this query must be defined before or when initializing the control.
// The query will be automatically run if at least one parameter was defined.
//
// See the help for more details:
// Query with parameters, Using a Table, List Box or Combo Box control
//
// Parameters of 'QRY_pedido_consulta' query
MySource.ParamStatus = RADIO_Status
MySource.ParamPaymentModeID = "1"
MySource.ParamData_Inicial = "20160101"
MySource.ParamData_Final = "20160312"
First parameter: Order status
Three states can be assigned to an order:
- pending,
- paid,
- canceled.
To allow the user to select one of these three states, we are going to use the Radio Button control associated with the "Status" item of "Orders" data file.
Remark | The radio buttons are also called "option box". They are used to select a single option among the proposed ones. How to differentiate between a radio button and a check box? We will only refer to option boxes as "Radio buttons". An easy way to remember: think of old radios: a single frequency could be selected via the button! The radio button is used to select a single option. |
- To create the Radio Button control:
- Display the "Analysis" pane if necessary: on the "Home" pane, in the "Environment" group, expand "Panes" and select "Analysis". The different data files described in the "WD Full Application" analysis appear in the pane.
- Click the icon next to the "Orders" data file: the items found in the data file are listed.
- Select the "Status" item in the Orders data file, then drag and drop this item into the "WIN_Menu" window
- The Radio Button control is automatically created. Position this control above the Table control.
- We are now going to pass the value selected in the Radio Button control in parameter to the query:
- Display the WLanguage events associated with the Table control:
- Select the Table control.
- Open the popup menu (right click) and select "Code".
- In the "Initializing" event of the Table control, replace the line:with the following WLanguage code://MySource.ParamStatus = <Value of ParamStatus>In this code, RADIO_Status is the name of the Radio Button control that was just created. The value of this control is associated with the ParamStatus parameter expected by the query.MySource.ParamStatus = RADIO_Status
- Close the code editor.
- Display the WLanguage events associated with the Table control:
- Before running the test, we are going to create a Button control to re-display the content of Table control according to the value selected in the Radio Button control:
- Create a Button control:
- on the "Creation" pane, in the "Usual controls" group, click .
- then click on the "Finding orders" pane of the Tab control, at the top right.
- Select the control and press Enter. The control caption becomes editable. Type "Find" and press Enter on the keyboard.
- Modify the control style:
- Display the popup menu of control (right mouse click) and select "Choose a style".
- In the window that is displayed, press Ctrl + F. In the search control, type "BTN_Search".
- The style is automatically selected. Validate.
- Resize the control if necessary.
- Display the WLanguage events associated with this control: press F2.
- Write the following WLanguage code in the "Click..." event:In this code, the taInit constant is used to re-run the "Initializing" event of the Table control (the event in which the parameters are passed to the query).// Refreshes the display of Table control
TableDisplay(TABLE_QRY_FindOrders, taInit) - Close the code editor.
- Create a Button control:
- We are now going to check how the first parameter is passed:
- Save the window by clicking among the quick access buttons.
- Click among the quick access buttons.
- Select the "Finding orders" tab pane if necessary.
- Change the status of orders with the radio button and click "Find". The content of Table control is modified.
- 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