https://youtu.be/uBZxG2seMLc
DICAS_3026_WINDEV_TUTORIAL_49_Pesquisa_multicritério_Parametro_data_Parte_G
Bom Dia/Boa Tarde/Boa Noite
Esse Ao Vivo vai estrear as 19:00 do dia 26/08/2020
DICAS 3026 - WINDEV TUTORIAL 49 - Pesquisa Multicriterio - Parametro Data - Parte G
Tutoriel WINDEV : Leçon 4.4.g. Recherche multicritère - Troisième paramètre
ASSUNTOS
Explicando o que sera feito
Explicando template controle
pegando a data do template controle
alterando codigo da tabela para pegar os parametros data
MOstrando funcionando as pesquisas
Video original da Franca
https://youtu.be/5LGyqyFAM80
Playlist Windev TUTORIAL
// 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 = COMBO_PaymentMode_tipo_pagamento
MySource.ParamData_Inicial = EDT_StartDate
MySource.ParamData_Final = EDT_EndDate
Last parameter: Order date
The last query parameter corresponds to the date of orders taken into account. The user must be able to type a date interval. To do so, we are going to use a control template.
Remark | A control template is a specific window containing different controls. All types of controls can be included in this window. A control template is a file whose extension is "WDT". The main benefit of a control template is the re-usability. A control template found in a project can be re-used in any project window. Furthermore, the control templates can be overridden: code can be added, the controls can be moved in the window that is using the control template. The controls can also be modified. |
- To manage the order date:
- In the "Project explorer" pane, expand the "Control templates" folder.
- Drag the control template named "TPLC_ChoosePeriod" from the "Project explorer" pane and drop it in the "WIN_Menu" window (beside the "Payment mode" control).
- Select the control template that was just created and open its description ("Description" in the popup menu).
- In the description window, rename the control template. The new name is "CTPL_ChoosePeriod".
- Validate the description window.
- Reposition and align the controls if necessary.
- We are now going to use the selected dates to pass them to the query as parameter:
- 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 lines:by:MySource.ParamStartOfPeriod = "20160101"
MySource.ParamEndOfPeriod = "20160331"In this WLanguage code, EDT_StartDate and EDT_EndDate are the names of two edit controls found in the control template. Their values are associated with the parameters ParamStartOfPeriod and ParamEndOfPeriod expected by the query.MySource.ParamStartOfPeriod = EDT_StartDate
MySource.ParamEndOfPeriod = EDT_EndDate - Close the code editor.
- Save the window by clicking among the quick access buttons.
- Display the WLanguage events associated with the Table control:
- We are now going to check how the parameters are passed:
- Click among the quick access buttons.
- Select the "Finding orders" tab if necessary.
- Define the different search parameters:
- Status of orders,
- Payment method,
- Range of dates to take into account.
- Click on the "Find" control. 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