sexta-feira, 24 de março de 2017

Aula 1101 - Sql 021 - Sql - SQLCode (Propriedade)









Video no Youtube Se Gostou clique aqui para dar joinha





http://doc.windev.com/?1000017045&lang=en-US&productversion=01A210059n




Blog - Curso Sql/1 ... NVL - Select/Update -> NVL
Blog - Curso Sql/2... - Data - Ultimo Dia do mes - Select Last_Day() - Ultimo dia Do Mes
Blog - Curso Sql/3... - Data Mes - Months_BetWeen
Blog - Curso Sq/4 ... - Data e Hora Atual - SysDate - Hora e Data Atual
Blog - Curso Sq/5 ... - Decode
Blog - Curso Sql/6... - Posicao - Select Instr
Blog - Curso Sql/7... - Posicao - Select Instr - Procura posicao 
Blog - Curso Sql/8... - Count - Select count 
Blog - Curso Sql/9... - Maximo - Select Max,Min,Count,Avg
Blog - Curso Sql/10... - Strings - Modifica Strings-Minuscula/Maiscula
Blog - Curso Sql/11... - Tamanho Campo - Len
Blog - Curso Sql/12... - Data - Select - Pegar Dia/mes/Ano 
Blog - Curso Sql/13... - Data - Select Betwen /2/ - Intervalo Data
Blog - Curso Sql/14... - Foto -  ALTER TABLE veiculo ADD foto BLOB
Blog - Curso Sql/15... - Elimina Tabela - Dropt Table - Eliminar Uma Tabela Dentro WinDev 
Blog - Curso Sql/16... - Procurar - Like - Pesquisar Cidade combox 
Blog - Curso Sql/17... - String - Select - Wl.ExtractString 
Blog - Curso Sql/18... - Cnpj - fazer Queue - Ver se Existe Cnpj/Cpf
Blog - Curso Sql/19... - Colorir as Linhas Sql
Limit - Limitar Informações - Curso Sql/20 ... - Limit
SqlCode - Ver Conteudo da Qry - Sql / 021
SQLCODE - DICAS 1771 - PUBLICA - WINDEV 23 - SQL 022 -




Nessa aula de hoje, vou mostrar
como mostrar o codigo da qry




//Chamado a janela para mostrar codigo sql

EXTERN WIN_sql_codigo_usado
LoadWDL("utilitarios_matos.wdl")
//Chamado wdl utilitarios matos
//Called wdl utilities matos
Codigo_Sql is string=QRY_nota_fiscal_ler..SQLCode
//Estou colocando o codigo sql na variavel codigo_sql
//I am putting the sql code in the variable code_sql
Open(WIN_sql_codigo_usado,Codigo_Sql)
//Estou abrindo a janela, e passando parametro sql
//I am opening the window, and passing sql parameter














quinta-feira, 23 de março de 2017

Aula 1100 - Windev - Dicas 027/... - Historico Erp 4/Final









Video no Youtube Se Gostou clique aqui para dar joinha





help1




Backup e Restore Projeto Windev - 001
Dicionario e Supecontrole - 002
Cd - CdEject CdList - Abre e Lista CD - 003
Dicionario e SuperControle - 004
Cnpj - Formatar com Pontos Barra Ifen - 005
Controlfindhighlight - Pesquizar Palavras entre edts - 006
Som - Emitir - Beep - 007
Valor Minimo e Maximo - MinValue / MaxValue - Dicas - 008
Vazio - Empty - Ver se combox,tabela,ou etc Esta Vazio - 009 - Dicas
Pdf - Ler Pdf com Active X - 010
Baixar Titulos Contas Receber - Dica - 011 
Saldo Anterior Caixa - Como Calcular - Dica - 012
Anos - Mostrar Anos Pagamentos Recebimentos - Dica - 013
Mes Por Extenso - MonthNumberInAlpha - Dicas - 014
Clone Tabela - Meses com Varios Anos - Dicas - 015
Tecla Atalho - Control + Alt + Espaco - WinDev - dicas - 016/...
ControleCreate - Criar bloco Notas - Notes - WinDev - Dicas - 017/...
Alt - Static - Apertando Alt em Cima Static - Altera borda - Windev - Dicas 018/...
Guardar Valor - WinDev - Dicas 019/...
Pegar Quantidade/Valor/Codigo Cupom - WinDev - Dicas- 020
Consultar Alterar cliente e Procurar - WinDev - Dicas - 021Código - Consultar alterar Cliente e Procurar - WinDev dicas - 022
Grupos - Colocar Grupo e Deixar visivel ou Não - WinDev Dicas 023
Historio Erp 1/... - Analise- Segurança - WinDev Dicas 024
Historio Erp 2/... - Telas Iniciais - WinDev Dicas 025
Historio Erp 3/... - Analise- Alterações - WinDev Dicas 026
Historico Erp 4/Final - Empresa - Gravar Historioco - WinDev Dicas 027
Estilo Mudar Quando Chegar F2 - WinDev Dicas 028






//Abertura da window
//Gravar Historico Erp
//Save History
gs_EDT_Tipo_ambiente_nfe is string=""
gs_EDT_Tipo_ambiente_nfce is string=""
gs_motivo_alteracao_nfe is string=""
gs_motivo_alteracao_nfce is string=""
//Vou Criar 4 Variaveis que vou precisar usar
//I will create 4 variables that I will need to use
//Gravar Historico Erp




//Colocar informacoes
MyWindow..ReturnedValue = False
IF empresa_parametro_nfe..NewRecord = True THEN
    //Se for inclusão de um parametro
    //If a parameter is included
    dados_iniciais()
ELSE
    //Gravar Historico Erp
    //Save History
    gs_EDT_Tipo_ambiente_nfe=EDT_Tipo_ambiente_nfe
    gs_EDT_Tipo_ambiente_nfce=EDT_Tipo_ambiente_nfce
    //Salvar informações antes da alteração
    //Save information before change
END




//saida do edt tipo ambinente nfe

IF gs_EDT_Tipo_ambiente_nfe<>EDT_Tipo_ambiente_nfe THEN
    //Se foi modificado esse campo
    //If you have modified this field
    LOOP
        //vou fazer um loop
        //I'm going to do a loop
        Input("Digite o Motivo Para Alterar Tipo Ambiente Nfe:",gs_motivo_alteracao_nfe)
        //Tem de digitar o Motivo - obrigatório
        //You must enter Reason - required
        IF gs_motivo_alteracao_nfe="" THEN
            //se motivo estiver em branco, vou informar que é obrigatorio
            //If reason is blank, I will inform you that it is mandatory
            Info("Favor Digitar o Motivo,é obrigatório")
        ELSE
            //Senão
            BREAK   
            //sai do loop
            //Get out of the loop
        END
    END
   
END



//Saida tipo ambinente nfce
LOOP
    Input("Digite o Motivo Para Alterar Tipo Ambiente Nfce:",gs_EDT_Tipo_ambiente_nfce)
    IF gs_EDT_Tipo_ambiente_nfce="" THEN
        Info("Favor Digitar o Motivo,é obrigatório")
    ELSE
        BREAK   
    END
END






//Rotina Gravar Historico
//Routine Record History

//Nas Futuras Aulas Essa Rotina será transformada uma classe para ser reaproveitada por outros
//In the Future Classes This Routine will be transformed into a class to be reused by others

HReadSeekFirst(usuario_matos,nome,gs_usuario_nome)
//Lendo Usuario
//Reading User
b_grava_historico_Erp is boolean=False
//Criando uma variavel boolean para ver se é para gravar historico
//Creating a boolean variable to see if it is to record history
s_acao_feita is string=""
//Criando Variavel açao feita
//Creating Variable action done
IF gs_EDT_Tipo_ambiente_nfe<>EDT_Tipo_ambiente_nfe THEN
    //Se foi alterado entao o grava historico sera igual a verdadeiro
    //If it has been changed then the historical record will be equal to true
    b_grava_historico_Erp=True   
    s_acao_feita+="Alterado Tipo Ambiente Nfe Para["+EDT_Tipo_ambiente_nfe+"]"+CR
    s_acao_feita+=" Motivo["+gs_motivo_alteracao_nfe+"]"+CR   
    //Está sendo colocado acao feita e o sinal de +,pois estou acrescentando informação
    //The action is done and the + sign, because I am adding information
    //Estou Colocando Cr, pois vou fazer pular de linha
    //I'm putting Cr, because I'm going to make the line jump   
END
//Vou fazer o mesmo para nfce
//I'll do the same for you
IF gs_EDT_Tipo_ambiente_nfce<>EDT_Tipo_ambiente_nfce THEN
    b_grava_historico_Erp=True   
    s_acao_feita+="Alterado Tipo Ambiente Nfc-e Para["+EDT_Tipo_ambiente_nfce+"]"+CR
    s_acao_feita+=" Motivo["+gs_motivo_alteracao_nfce+"]"+CR   
END
IF b_grava_historico_Erp=True THEN
    //Se grava historico é igual a verdadeiro
    //If historical record is equal to true
    HReset(Historico_Erp)
    //Atribuir os valores padrão ao historico
    //Assign default values to history
    //https://doc.windev.com/en-US/?3044118&name=HReset
    _titulo is string="Parametros Nfe/Nfce"
    //Criando uma variavel titulo para parametro
    //Creating a Variable Title for Parameter
    HReadSeekFirst(Historico_Erp,titulo,_titulo)
    //Lendo Historio erp
    //Reading erp story
    IF HFound(Historico_Erp) THEN
        //Se encontrou historico erp
        //If you found historical erp
    ELSE
        //Se não existir vamos criar um novo historico erp
        //If it does not exist let's create a new erp history
        Historico_Erp.titulo=_titulo
        HAdd(Historico_Erp)
        //Gravando um registro novo historico erp
        //Recording a new historical record erp       
    END   
        HReset(historico_erp_itens)
        //Atribuir os valores padrão aos itens do historio itens
        //Assign Default Values to Items in History Items
        historico_erp_itens.Historico_ErpID=Historico_Erp.Historico_ErpID
        //Colocando erpid do historico erp no historio item erp
        //Put erpid of historical erp in history item erp
        historico_erp_itens.data=DateSys()
        //estou colocando a data atual
        //I'm putting the current date
        historico_erp_itens.hora_alteracao=Now()
        //estou colocando a hora atual
        //I am putting the current time
        historico_erp_itens.acao_feita=s_acao_feita
        historico_erp_itens.valor=0
        historico_erp_itens.id_empresa=gnEmpresaCodigo
        historico_erp_itens.id_usuario=usuario_matos.usuario_matosID
        historico_erp_itens.nome_usuario=gs_usuario_nome
        //acrescentando os outros dados
        //Adding the other data
        HAdd(historico_erp_itens)
        //Gravando um registro novo historico erp item
        //Recording a new historical record erp    item   
END






















quarta-feira, 22 de março de 2017

Aula 1099 - Windev - Dicas 026/... - Historico Erp 3/...









Video no Youtube Se Gostou clique aqui para dar joinha







Na aula de hoje vamos continuar Historio erp 3/
Primeiro vamos criar novos campos nos itens do historico erp.
Id Empresa,Id Usuario,usuario,Motivo
Vamos Alterar Historico Erp
Vamos fazer com que titulo, seja chave.
Vou Marcar na Tabela para ficar em ordem inversa.
Vou incluir em historio erp itens, o horario.






help1



Backup e Restore Projeto Windev - 001
Dicionario e Supecontrole - 002
Cd - CdEject CdList - Abre e Lista CD - 003
Dicionario e SuperControle - 004
Cnpj - Formatar com Pontos Barra Ifen - 005
Controlfindhighlight - Pesquizar Palavras entre edts - 006
Som - Emitir - Beep - 007
Valor Minimo e Maximo - MinValue / MaxValue - Dicas - 008
Vazio - Empty - Ver se combox,tabela,ou etc Esta Vazio - 009 - Dicas
Pdf - Ler Pdf com Active X - 010
Baixar Titulos Contas Receber - Dica - 011 
Saldo Anterior Caixa - Como Calcular - Dica - 012
Anos - Mostrar Anos Pagamentos Recebimentos - Dica - 013
Mes Por Extenso - MonthNumberInAlpha - Dicas - 014
Clone Tabela - Meses com Varios Anos - Dicas - 015
Tecla Atalho - Control + Alt + Espaco - WinDev - dicas - 016/...
ControleCreate - Criar bloco Notas - Notes - WinDev - Dicas - 017/...
Alt - Static - Apertando Alt em Cima Static - Altera borda - Windev - Dicas 018/...
Guardar Valor - WinDev - Dicas 019/...
Pegar Quantidade/Valor/Codigo Cupom - WinDev - Dicas- 020
Consultar Alterar cliente e Procurar - WinDev - Dicas - 021Código - Consultar alterar Cliente e Procurar - WinDev dicas - 022
Grupos - Colocar Grupo e Deixar visivel ou Não - WinDev Dicas 023
Historio Erp 1/... - Analise- Segurança - WinDev Dicas 024
Historio Erp 2/... - Telas Iniciais - WinDev Dicas 025
Historio Erp 3/... - Analise- Alterações - WinDev Dicas 026
Historico Erp 4/Final - Empresa - Gravar Historioco - WinDev Dicas 027































terça-feira, 21 de março de 2017

Aula 1098 - Windev - Dicas 025/... - Historico Erp 2/...









Video no Youtube Se Gostou clique aqui para dar joinha



Na dica de hoje
vamos continuar Historio Erp Parte 2
Vamos criar as telas iniciais Historio Erp
Vamos Deixar somente para consulta
Vamos Fazer duas Tabelas,Pai e Filho
Vamos fazer um chamado de uma wdl de outra wdl
Vamos Fazer primeiro Teste

In today's tip
Let's continue History Erp Part 2
Let's create the home screens Erp Story
Let's leave for consultation only
Let's Do Two Tables, Father and Son
Let's make a call to a wdl from another wdl
Let's do first test



help1



Backup e Restore Projeto Windev - 001
Dicionario e Supecontrole - 002
Cd - CdEject CdList - Abre e Lista CD - 003
Dicionario e SuperControle - 004
Cnpj - Formatar com Pontos Barra Ifen - 005
Controlfindhighlight - Pesquizar Palavras entre edts - 006
Som - Emitir - Beep - 007
Valor Minimo e Maximo - MinValue / MaxValue - Dicas - 008
Vazio - Empty - Ver se combox,tabela,ou etc Esta Vazio - 009 - Dicas
Pdf - Ler Pdf com Active X - 010
Baixar Titulos Contas Receber - Dica - 011 
Saldo Anterior Caixa - Como Calcular - Dica - 012
Anos - Mostrar Anos Pagamentos Recebimentos - Dica - 013
Mes Por Extenso - MonthNumberInAlpha - Dicas - 014
Clone Tabela - Meses com Varios Anos - Dicas - 015
Tecla Atalho - Control + Alt + Espaco - WinDev - dicas - 016/...
ControleCreate - Criar bloco Notas - Notes - WinDev - Dicas - 017/...
Alt - Static - Apertando Alt em Cima Static - Altera borda - Windev - Dicas 018/...
Guardar Valor - WinDev - Dicas 019/...
Pegar Quantidade/Valor/Codigo Cupom - WinDev - Dicas- 020
Consultar Alterar cliente e Procurar - WinDev - Dicas - 021Código - Consultar alterar Cliente e Procurar - WinDev dicas - 022
Grupos - Colocar Grupo e Deixar visivel ou Não - WinDev Dicas 023
Historio Erp 1/... - Analise- Segurança - WinDev Dicas 024
Historio Erp 2/... - Telas Iniciais - WinDev Dicas 025
Historio Erp 3/... - Analise- Alterações - WinDev Dicas 026







//Estou no Programa Cadastros
//I'm in the Program Entries

//Vou chamar a Window WIN_Table_Historico_Erp,mas ele esta na wdl,utilitarios_matos
//I'm going to call Window WIN_Table_Historico_Erp, but it's in wdl, utilitas_matos

EXTERN WIN_Table_Historico_Erp
LoadWDL("utilitarios_matos.wdl")
//Estamos fazendo a chamada da wdl utilitarios matos
//We are making the call of the wdl utilities matos
Open(WIN_Table_Historico_Erp)
//estamos abrindo a window WIN_Table_Historico_Erp
//We are opening the WIN_Table_Historico_Erp window




// Dentro utilitarios matos wdl
// Inside utility vehicles wdl

// Vou filtrar os itens do historico,conforme o historio
// I'll filter the history items according to the history

TableEnableFilter(TABLE_historico_erp_itens.COL_Historico_ErpID,filterStartsWith,TABLE_Historico_Erp.COL_Historico_ErpID)
//Quando inicializar ele vai colocar somente itens desse historio ex:pedido
//When initializing it will put only items from this ex history: request





































Teste

Teste
teste