sábado, 15 de agosto de 2020

DICAS 3026 - WINDEV TUTORIAL 49 - Pesquisa Multicriterio - Parametro Data - Parte G



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:
    1. In the "Project explorer" pane, expand the "Control templates" folder.
    2. 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).
      Drag and Drop control template
    3. Select the control template that was just created and open its description ("Description" in the popup menu).
    4. In the description window, rename the control template. The new name is "CTPL_ChoosePeriod".
    5. Validate the description window.
    6. Reposition and align the controls if necessary.
  • We are now going to use the selected dates to pass them 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 lines:
      MySource.ParamStartOfPeriod = "20160101"
      MySource.ParamEndOfPeriod = "20160331"
      by:
      MySource.ParamStartOfPeriod = EDT_StartDate
      MySource.ParamEndOfPeriod = EDT_EndDate
      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.
    3. Close the code editor.
    4. Save the window by clicking Save the element among the quick access buttons.
  • We are now going to check how the parameters are passed:
    1. Click Run the test of a window among the quick access buttons.
    2. Select the "Finding orders" tab if necessary.
    3. Define the different search parameters:
      • Status of orders,
      • Payment method,
      • Range of dates to take into account.
    4. Click on the "Find" control. The content of Table control is modified.
      Window test with multi-criteria search
    5. 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