UI_CargaComboClientes("Win_AgendamentoTarefas.COMBO_QRY_Clientes_Ativos")
UI_CargaComboClientes("Win_AgendamentoTarefas.COMBO_QRY_Clientes_Ativos")
COMBO_QRY_Clientes_Ativos.Open()
SendKey("{RIGHT}",COMBO_QRY_Clientes_Ativos)
gsClienteSelecionado = COMBO_QRY_Empresas_Ativas
gsClienteSelecionado = ExtractString( gsClienteSelecionado ,1, TAB, FromBeginning)
Procedure UI_CargaComboClientes(InternalWindow_COMBO_QRY_Clientes_Ativas)
NomeCliente is string = {InternalWindow_COMBO_QRY_Clientes_Ativas}..DisplayedValue
IF NomeCliente <> ""
ListDeleteAll({InternalWindow_COMBO_QRY_Clientes_Ativas,indControl})
SqlCodigo is string = [
SELECT
T001_CLIENTES.T001_ID_PESSOA AS T001_ID_PESSOA,
T001_CLIENTES.T001_NOME AS T001_NOME
FROM
T001_CLIENTES
WHERE
T001_CLIENTES.AUDT_Excluido = 'N'
AND T001_CLIENTES.T001_NOME LIKE '%{ParamT001_NOME}%'
]
X is int
Matricula,Cliente is string
SqlCodigo = Replace(SqlCodigo,"{ParamT001_NOME}",NomeCliente,IgnoreCase)
dsQueryCombo is Data Source
IF HExecuteSQLQuery(dsQueryCombo,hQueryDefault,SqlCodigo)=True THEN
FOR EACH dsQueryCombo
X++
Matricula = dsQueryCombo.T001_ID_PESSOA
Cliente = dsQueryCombo.T001_NOME
ListAdd({InternalWindow_COMBO_QRY_Clientes_Ativas,indControl},Matricula +TAB+ Cliente)
END
END
{InternalWindow_COMBO_QRY_Clientes_Ativas,indControl}=NomeCliente
SetFocus({InternalWindow_COMBO_QRY_Clientes_Ativas,indControl})
END
--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/