Jump to content
Fivewin Brasil

evertonlb

Membros
  • Posts

    733
  • Joined

  • Last visited

  • Days Won

    18

Reputation Activity

  1. Like
    evertonlb reacted to kapiaba in Etiqueta zebra c\ fastreport   
    Para que usar FAST?
    http://fivewin.com.br/index.php?/topic/21638-etiquetas-na-argox-214tt-resolvido/
    http://fivewin.com.br/index.php?/topic/10947-impressao-de-etiquetas-impressora-argox/
    http://www.pctoledo.com.br/forum/viewtopic.php?f=4&t=12576
    http://www.pctoledo.com.br/forum/viewtopic.php?f=1&t=13489
  2. Like
    evertonlb reacted to Valdir in "navegar" no MySql   
    Olá Everton...
    Defina a sua query
    oQry = oServer:Query( "SELECT * FROM SeuBd Order by SuaOrder" ) Depois é só usar assim: oQry:GoTop() oQry:Skip( n ) oQry:GoBottom() abraços.
  3. Like
    evertonlb reacted to joaosolution in Erro besta em SQL... Resolvido   
    Everton
    Boa tarde
    Veja se você está executando commit
    TRY START TRANSACTION SQL EXECUTE cSql SQL EXECUTE "COMMIT" END TRANSACTION CATCH oErro MsgAlert( "Erro : " + oErr:Operation + " -> " + oErr:Description ) lRetSql := .F. END Att João Bosco
  4. Like
    evertonlb reacted to Jorge Andrade in Erro besta em SQL... Resolvido   
    Everton, bom dia, vc não tem que dar um refresh na Table/Bd? Sei que na SQLRDD vc tem o SR_DBREFRESH limpa as informações e que atualiza as informações, mas no seu caso, vc está usando a TDOLPHIN/SQLLIB, então não sei se existe algo semelhante.
    []s,
  5. Like
    evertonlb reacted to joaosolution in Erro besta em SQL... Resolvido   
    Everton
    Boa tarde
    No INSERT INTO o INTO é junto
    Att
    João Bosco
  6. Like
    evertonlb reacted to marcioe in Erro besta em SQL... Resolvido   
    Pelo que vi está faltando espaço e o IN antes do TO . Veja assim
    Sql_Command := "Insert in To Clientes "
    Sql_Command += " codigocliente, nomecliente, cidade, loja, telefonefixo, telefonecelular, Anotacoes "
    Sql_Command += " VALUES "
    Sql_Command += " cCodigoCliente, cNomeCliente, cCidade, cLoja, cTelefoneFixo, cTelefoneCelular, cAnotacao"
  7. Like
    evertonlb got a reaction from Valdir in Conexão com Bd - Resolvido   
    Poxa cara.. fico feliz que esteja funcionando...
    Att.
    Everton
  8. Like
    evertonlb reacted to kapiaba in Aplicação "não respondendo"   
    sim,
    WHILE... SYSREFRESH() ... ENDDO
  9. Like
    evertonlb got a reaction from kapiaba in Aplicação "não respondendo"   
    Kapiaba.. o sysreresh() se usa como...
    do while !eof()
    .....
    .....
    skip
    sysrefresh()
    enddo
    Isso?
    A cada "volta" no do while dá um sysrefresh()?
    Att.
    Everton
  10. Like
    evertonlb reacted to kapiaba in Aplicação "não respondendo"   
    1 - Verifique se o seu ERRSYSW.PRG, é compativel com esta versão, senão for, troque-o.
    2 - Nos WHILE... ENDDO, use o comando: SYSREFRESH() para refrescar o Looping.
    abs.
  11. Like
    evertonlb reacted to Theotokos in ref array   
    Use Arquivo
    Go Top
    aDados := { } / Array que vai receber dados
    While !EOF()
    AADD( aDados, { Arq->Codigo, Arq->Nome, Arq->Endereco, ARq-Cep, Arq->Bairro})
    DbSkip(1)
    EndDo
    Close
    Use OutroArquivo
    Go Top
    For nV1 := 1 To Len(aDados)
    Append Blank
    Replace CODIGO With aDados[nV1,1]
    Replace NOME Wiith aDados[nV1,2]
    Replace ENDERECO With aDados[nV1,3]
    Replace CEP With aDados[nV1,4]
    Replace BAIRRO With aDados[nV1,5]
    Next nV1
  12. Like
    evertonlb reacted to kapiaba in Salvar e restaurar a impressora atual.   
    /*
    Purpose : Save and restore the current printer.
    Notes : When an application is run, the current printer always defaults to the
    Windows default printer. Here is how default to the last used printer in
    the application. Each user can have a different default printer. The printer
    name is saved in a user.ini file under the user's section.
    Author : James Bott, jbott@compuserve.com
    Date : 04/09/04 10:53:04
    Language: Fivewin Harbour 2.4. Harbour 43 Alpha.
    */


    #include "fivewin.ch"


    //--- Test
    function main()
    local oIni, cPrinter:="", oUser

    INI oIni file ".\user.ini"

    oUser:= TUser():new()
    oUser:name:="James"

    // Get application default printer for oUser
    get cPrinter section oUser:name entry "DefaultPrinter" default prnGetName() of oIni

    msgInfo(prnGetName(), "Windows default printer is:")

    msgInfo(cPrinter,"Application default printer from INI file is:")

    // Set the current printer to cPrinter
    setPrinter( cPrinter )

    msgInfo( prnGetName(), "Application Current printer as set via code is:" )

    printerSetup()

    // Save current printer as default
    set section oUser:name entry "DefaultPrinter" to prnGetName() of oIni

    return nil


    //--- Set application's current printer. Returns .T. if successful.
    // cPrinter must be the name of an existing print device.
    function setPrinter(cPrinter)
    local cOldPrinter:="", hDC:=0, aPrn, cText:="", lSuccess:=.f.

    if cPrinter <> prnGetName()

    cText := StrTran(GetProfString("Devices"),Chr(0), chr(13)+chr(10))
    aPrn := Array(Mlcount(cText, 250))
    Aeval(aPrn, {|v,e| aPrn[e] := Trim(Memoline(cText, 250, e)) } )

    if ascan(aPrn,cPrinter) > 0

    cOldPrinter := GetProfString( "windows", "device" , "" )
    WriteProfString( "windows", "device", cPrinter )
    SysRefresh()
    PrinterInit()
    hDC := GetPrintDefault( GetActiveWindow() )
    if hDC>0
    lSuccess:= resetDC( hDC )
    endif
    SysRefresh()
    WriteProfString( "windows", "device", cOldPrinter )

    endif

    endif
    return lSuccess



    //--- User class
    class TUser
    data name
    method new
    method end virtual
    endclass

    method new()
    ::name:=""
    return self

    // eof


  13. Like
    evertonlb reacted to Rogerio Figueira in Conexão com Bd - Resolvido   
    Valdir,
    quando começo a aprender algo novo, vou de pouco em pouco, funcionando o "Olá Mundo!" eu passo adiante.
    Então minha proposta, pegue o código que passei antes, que repito aqui, crie um programinha só com ele, sem nada mais, só o básico. Tem que funcionar. Funcionando, então vai colocando mais funcionalidades, se der erro, vai saber onde foi .
    Estou fazendo assim no meu estudo para implementação do sql. Passo a passo.
    Então segue o código:
    #include "tdolphin.ch" #define CRLF Chr( 13 ) + Chr( 10 ) PROCEDURE Main() LOCAL oServer := NIL LOCAL cText := "" local cCmdSql , oQry IF ( oServer := ConnectTo() ) == NIL msgAlert("Erro de conexão") return nil ENDIF IF ! oServer:lError cText += oServer:GetServerInfo() + CRLF cText += oServer:GetClientInfo() msginfo(cText,"Server Info") ENDIF oServer:End() RETURN //---------------------------------------------------------- FUNCTION ConnectTo( ) LOCAL hIni LOCAL oServer LOCAL cServer, cUser, cPassword, nPort, cDBName,nFlags LOCAL oErr LOCAL cText := "" oServer := NIL cServer := "stt.com.br" cUser := "stf_zero" cPassword := "dxxxxxxj0" nPort := "3306" cDBName := "stf_cpw4" nFlags := "0" TRY CONNECT oServer HOST cServer ; USER cUser ; PASSWORD cPassword ; PORT nPort ; FLAGS nFlags; DATABASE cDBName CATCH oErr MsgInfo( oErr:Description ) RETURN NIL END IF ! oServer:lError cText += "Connection OK" + CRLF cText += "Host: " + oServer:cHost +CRLF cText += "Database: " +oServer:cDBName + CRLF cText += oServer:GetServerInfo() + CRLF cText += oServer:GetClientInfo() msginfo( cText ,"Dados da conexão ") ENDIF RETURN oServer //====================================== []´s
  14. Like
    evertonlb reacted to Geraldo (gbsilva) in Conexão com Bd - Resolvido   
    Olá Valdir como vai!
    Hoje que estou vendo o seu post. Sabe que cheguei a montar um tempo atrás um exemplo completo com a TDolphin para você, mas não tive como enviá-lo, nem me lembro mais como fiz, mas tenho ele aqui.
    Estou de passagem aqui no momento, mas e quanto ao mysql, pode estar faltando algum detalhe, a senha esta correta, onde esta o seu mysql numa máquina local acredito, pois no seu .ini esta localhost. Falo isso porque ao instalar tem uma solicitação de flegar sobre conexão via ip e que deve ser flegada ou não acessa, mas local funcionaria.
    Tente usar em vez de localhost assim:
    [mysql]
    // Endereço de IP
    host = 127.0.0.1
    user = root
    port = 3306

    Você criou no mysql o banco e tabelas? são perguntas bobas, mas pode ser por ai rsss....apanhei muito também.
    Estou a disposição, se estiver interessado darei uma olhada no exemplo que te falei e te passo para tentar compilar ai.
    Abaixo um exemplo do que utilizo atualmente, parte de um Main() e uma classe que criei para configurações:
    Function Main() // Menu Principal local nEntry := 0 local oBar,oIco,oHand local oSfa,cRede:="" Private oConn,oServer PUBLIC oWnd,oGbs //-> Instancia Classe TGbSilva() oGbs := TGbsilva() //-> Instancia objeto e iguala atributos antes de verificar versão do sistema oSfa := TGbConfig():new() oSfa:versao := "1.1.0" //-> Versão oSfa:ini_file := "gb_connect.ini" //-> Nome do arquivo .ini oSfa:sistema := "Sistema de Atendimento - Facilidades (SISAF)" oSfa:ini_set := "mysql" ******************************************************************************************** * Definição do Banco de Dados e senha de acesso ******************************************************************************************** oSfa:ini_dbname := "Sagre" //-> Database mysql oSfa:password := "123" //-> Senha ******************************************************************************************** //-> Chama arquivo .ini oSfa:SetIni() //-> Verifica se o Sistema já esta sendo executado IF !oSfa:SisExec("Sisaf.exe") BringWindowToTop( oWnd ) return(nil) ENDIF //-> Configurações gerais do Sistema oSfa:Set() //-> Chama método para conectar ao banco de dados IF ( oServer := oSfa:Connect() ) == NIL BringWindowToTop( oWnd ) return(nil) ENDIF //-> Chama módulo de acesso ao sistema (acesso.prg) IF !Login(@nEntry) BringWindowToTop( oWnd ) return(.f.) ENDIF //-> Trata retorno do Login() IF nEntry = 1 BringWindowToTop( oWnd ) return(.f.) ENDIF .... .... .... #include "FiveWin.ch" #include "xbrowse.ch" #include "tsbutton.ch" #include "config.ch" #ifdef rdd_tdolphin #include "tdolphin.ch" //-> usando Tdolphin #else #Include "sqllib.Ch" //-> usando sqllib #endif ************************************************************************************************************************ CLASS TGbConfig FROM TGbSoftware DATA sistema,versao,lReturn,CLR_GetFocus DATA apDados,aImagens DATA ini_dbname,ini_empresa,ini_host,ini_user,ini_porta,ini_file,ini_reshor,ini_resver,ini_exe,password DATA ini_rede,ini_endclasse,ini_set,ini_endesp DATA id_imagem,nome,filec METHOD New() CONSTRUCTOR METHOD SisExec(_cSistema) METHOD SisVersao() METHOD Set() METHOD SetIni() METHOD Connect() ENDCLASS METHOD New() CLASS TGbConfig super:New() ::sistema := "Nome do Sistema" ::versao := "" ::lReturn := .f. ::apDados := {} ::aImagens := {} ::CLR_GetFocus := NRGB(255,208,047) // RGB(235,255,145) ::ini_set := "mysql" //-> nome da variável do arquivo .ini ::ini_dbname := "" ::ini_file := "" ::ini_empresa := "" ::ini_host := "127.0.0.1" ::ini_user := "root" ::ini_porta := 3306 ::ini_exe := "" ::ini_reshor := 1024 ::ini_resver := 768 ::password := "123" ::ini_rede := "" ::ini_endclasse := "" ::ini_endesp := "" ::id_imagem := space(2) ::nome := space(20) ::filec := space(20) return self METHOD SisVersao() CLASS TGbConfig local cSql,aVersao[1],lVersao:=space(10) local oQry cSql := "SELECT versao" +; " FROM cadastro.versao" +; " WHERE sistema='"+oGbs:id_sistema+"' AND status='1' LIMIT 1 ;" #ifdef rdd_tdolphin oQry := oServer:Query(cSql) lVersao := oQry:FieldGet(1) oQry:End() #else aVersao := SqlArray(cSql) lVersao := aVersao[1,1] #endif if ::versao <> alltrim(lVersao) If !MsgYesNo("Existe uma nova versão, Deseja atualizar o Sistema (S/N) ?","Atualização do Sistema",2) ::lReturn := .f. Else ::lReturn := .t. Endif return(.f.) endif return(.t.) //-> Verifica se o sistema já esta sendo executado METHOD SisExec(_cSistema) CLASS TGbConfig if (IsExeRunning(_cSistema) ) MsgStop("Sistema "+STRTOKEN(_cSistema,1,".") +" já esta sendo executado","Atenção!!!") return(.f.) endIf return(.t.) METHOD Set() CLASS TGbConfig //-> Configuração Para Todo o Sistema SET 3DLOOK ON SET CENTURY ON // 4 DIGITOS PARA O ANO SET CONFIRM OFF // (mudei, eu) CURSOR NÃO PODE DESLOCAR-SE AUTOMATICAMENTE SET CURSOR ON //-SetCursor( if(Upper("ON") == "ON", 1, 0) ) SET DATE BRITISH // FORMATO DD/MM/AAAA SET DATE FORMAT "dd/mm/yyyy" // IGUAL AO ANTERIOR, APENAS REFOR€O. SET DELETED ON // ON IMPEDIR VER REGISTROS MARCADOS PARA APAGAR SET DECIMALS TO 2 SET EPOCH TO (Year(Date())-50)// PARA IMPEDIR QUE O ANO SEJA 00 SET ESCAPE ON // TECLA ESC LIGADA, POSSO ESCAPAR. SET EXCLUSIVE OFF // REDE NETUSE LIGADA //NOTA: As Funcoes OrdKeyCount() e OrdKeyNo() Nao Trabalham se OPTIMIZE //Esta em OFF, ou se uma variavel de filtro e um elemento de matriz. SET MULTIPLE ON // PARA QUE SE POSSA ACIONAR QUANTAS JANELAS QUISER SET OPTIMIZE ON // OPTIMIZAR OS FILTROS(DBSETFILTER) SET SOFTSEEK OFF // OBRIGATÓRIO "OFF" PARA USO COM MYSQL SET UNIQUE OFF // PERMITIR OU NÇO CHAVES COM DUPLICIDADE SET WRAP ON //-Set( 35, "ON" ) // PARA MENUS SETCANCEL( .F. ) // INUTILIZA ALT + C PARA ABORTAR PROGRAMA #ifdef rdd_sqllib SET CUSTOM INDEXES ON // ATIVA O USO DE ÍNDICES CUSTOMIZADOS (COM FUNÇÃO) #endif REQUEST DBFCDX // CHAMADA AO BANCO DBFCDX OU _DBFCDX REQUEST HB_CODEPAGE_PT850 REQUEST HB_LANG_PT HB_SETCODEPAGE("PT850") HB_LANGSELECT("PT") RDDSETDEFAULT( "DBFCDX" ) // CARREGA RDD DEFINIDO NO CASO, *.CDX DBSETDRIVER( "DBFCDX" ) // CARREGA RDD DEFINIDO NO CASO, *.CDX //SetGetColorFocus( RGB(235,255,145) ) SetGetColorFocus( ::CLR_GetFocus ) return(.t.) METHOD Connect(n) CLASS TGbConfig local c local hIni local oServer,nFlags local oErr c = "mysql" if n != NIL c = "mysql" + AllTrim( Str( n ) ) endif #ifdef rdd_sqllib SQL CONNECT ON ::ini_host ; PORT ::ini_porta ; DATABASE ::ini_dbname ; USER ::ini_user ; PASSWORD ::password ; OPTIONS SQL_NO_WARNING ; LIB "MySQL" IF SQL_ERRORNO() > 0 Alert("Não foi possível conectar ao banco de dados !"+CRLF+; "Informe esta mensagem ao suporte: "+CRLF+; SQL_ErrorMsg()) return(.f.) ENDIF RddSetDefault("MySQL") return(.t.) #else oServer := NIL nFlags := 0 TRY CONNECT oServer HOST ::ini_host ; USER ::ini_user ; PASSWORD ::password ; PORT ::ini_porta ; FLAGS nFlags; DATABASE ::ini_dbname CATCH oErr ? hb_dumpvar( oErr ) RETURN NIL END RETURN oServer #endif return(.f.) METHOD SetIni() CLASS TGbConfig local c,oWnd,hIni c = ::ini_set //-> variável do arquivo .ini #ifdef rdd_sqllib //-> somente usado método com sqllib INI hIni FILE ".\"+::ini_file GET ::ini_host SECTION c ENTRY "host" OF hIni GET ::ini_user SECTION c ENTRY "user" OF hIni GET ::ini_porta SECTION c ENTRY "port" OF hIni ENDINI #else //-> chama o arquivo .ini hIni := HB_ReadIni( ::ini_file ) //-> atribui valores do ini ::ini_host := hIni[ c ]["host"] ::ini_user := hIni[ c ]["user"] ::ini_porta := val(hIni[ c ]["port"]) #endif return nil ************************************ FINAL DA TGBCONFIG ****************************************************************
  15. Like
    evertonlb reacted to Valdir in Conexão com Bd - Resolvido   
    Pessoal...
    Obrigado pelas Dicas e Sugestões.
    Agradeço em especial aos amigos : Rogério Figueira, Jorge Andrade e Everton pela ajuda.
    Mais uma vez, estou desistindo,
    Não sei porque aqui não consigo fazer a conexão, mesmo seguindo todas as orientações dos amigos, não funfa e o pior de tudo, é que não tenho a minima ideia do porquê.
    Obrigado
  16. Like
    evertonlb got a reaction from aferra in xBrowse com Array - Tamanho da linha - Resolvido   
    ACho que o que estava atrapalhando o bom funcionamento era o fato de eu colocar o left + substr + right.
    tirei isso e mandei "imprimir" todo o conteúdo do vetor e funcionou...
    Att.
    Everton
  17. Like
    evertonlb reacted to aferra in xBrowse com Array - Tamanho da linha - Resolvido   
    olha, se saber como vc está fazendo esse browse é como armazenar vento, rsrsrsrsrs.
    então algumas dicas

    @ <lin>,<col> XBROWSE oBrw SIZE <lar>,<com> PIXEL OF .... ; COLUMNS 1, 2, 3,...; HEADERS "item1", "item2", "item3"...; PICTURES "", "", "", ...; COLSIZES <tamanho_coluna1>, <tamanho_coluna2>, <tamanho_coluna3>, .... agora se for com ADD COLUMN @ <LIN>,<COL> XBROWSE oBrw SIZE <lar>,<com> PIXEL OF ... ADD COLUMN TO XBROWSE oBrw AT 1 HEADER "item1" SIZE <tamanho_coluna> e por fim depois de criado o objeto do browse pode usar desta maneira. oBrw:aCols[<coluna>]:nWidth := <tamanho_coluna>
  18. Like
    evertonlb got a reaction from Theotokos in xBrowse com Array - Tamanho da linha - Resolvido   
    Cara... Funcinou, claro..
    Obrigado pela dica... Foi na realidade falta de pensar um pouco, pois se o gobottom funciona com um arquivo/tabela tambem deveria
    funcionar com uma array... Obrigado mesmo!!!
    Att.
    Everton
  19. Like
    evertonlb reacted to Theotokos in xBrowse com Array - Tamanho da linha - Resolvido   
    ja tentou
    oLbx:aArrayData := aDados * oLbx:Refresh() oLbx:GoBottom()
  20. Like
    evertonlb reacted to FiveWinBr in Ribbonbar for FiveWin   
    Demo:
    https://www.dropbox.com/s/7lgvuu5lkqkv76q/ribbon.rar?dl=0

    Compativel com qualquer versao do fivewin.
  21. Like
    evertonlb got a reaction from kapiaba in Briga boa com Silvio Falconi-Itália   
    Putz.. não conheço o cara mas...:
    who is not even able to boil water without the help of this forum.
    e
    My hamster is a better programmer, and a better interlocutor
    me deixou com vergonha por ele!!!
  22. Like
    evertonlb got a reaction from Theotokos in Saberue nome da rotina   
    Não sei se entendi.. mas acho que o PROCNAME() pode lhe ajudar nisso.
    Att.
    Everton
  23. Like
    evertonlb got a reaction from aferra in Briga boa com Silvio Falconi-Itália   
    Putz.. não conheço o cara mas...:
    who is not even able to boil water without the help of this forum.
    e
    My hamster is a better programmer, and a better interlocutor
    me deixou com vergonha por ele!!!
  24. Like
    evertonlb got a reaction from kapiaba in Copiar e Colar   
    Na hora de gravar os dados no DBF Kapiaba.. tenho 2 Replaces absolutamente iguais... Quando bastava verificar a existência do registro e se não existisse colocar um append blank
    sem precisar repetir o processo!
    Ah... agora li de novo e entendi! hahahahaha
  25. Like
    evertonlb got a reaction from microfly in Copiar e Colar   
    Não dá usando o Design no say?
    Uma vez fiz um "desenhador" de etiquetas que usava esta propriedade para clicar e arrastar. Acho que se colocar um BMP no fundo dá para fazer algo....
    No caso das etiquetas eu guardo a posição em que deixei o componente num DBF e dou um nome para esta etiqueta. Depois, quando o usuário escolher o nome da etiqueta
    eu recupero as posições e coloco cada componente (say) no local definido!
    Segue o código!
    Att.
    Everton
    Function Layout(NomeEtiqueta,; PO1TITUL, PO2TITUL, PO1DESCR, PO2DESCR, PO1CODBA, PO2CODBA, PO1CODIG, PO2CODIG,; PO1AVDES, PO2AVDES, PO1AVVAL, PO2AVVAL, PO1APDES, PO2APDES, PO1APVAL, PO2APVAL ) Private oGrp1, oSay1, oSay2, oSay3, oSay4, oSay5, oSay6, oSay7, oSay8, oBut2, oBut3 /* oSay1:Var:="Titulo" oSay2:cVarName:="Descricao" oSay3:cVarName:="CodBarra" oSay4:cVarName:="DescAVista" oSay5:cVarName:="ValAVista" oSay6:cVarName:="DescAPrazo" oSay7:cVarName:="ValAPrazo" oSay8:cVarName:="Codigo" */ if( empty(PO1TITUL), PO1TITUL := 20, .t.) if( empty(PO2TITUL), PO2TITUL := 8, .t.) * if( empty(PO1DESCR), PO1DESCR := 35, .t.) if( empty(PO2DESCR), PO2DESCR := 8, .t.) * if( empty(PO1CODBA), PO1CODBA := 50, .t.) if( empty(PO2CODBA), PO2CODBA := 8, .t.) * if( empty(PO1CODIG), PO1CODIG := 75, .t.) if( empty(PO2CODIG), PO2CODIG := 8, .t.) * if( empty(PO1AVDES), PO1AVDES := 90, .t.) if( empty(PO2AVDES), PO2AVDES := 8, .t.) * if( empty(PO1AVVAL), PO1AVVAL := 90, .t.) if( empty(PO2AVVAL), PO2AVVAL := 121, .t.) * if( empty(PO1APDES), PO1APDES := 105, .t.) if( empty(PO2APDES), PO2APDES := 8, .t.) * if( empty(PO1APVAL), PO1APVAL := 105, .t.) if( empty(PO2APVAL), PO2APVAL := 121, .t.) * DEFINE FONT oFONT1 NAME "Courier New" SIZE 8, 16 DEFINE FONT oFONT2 NAME "Arial" SIZE 0, -13 DEFINE FONT oFONT3 NAME "Agency FB" SIZE 0, -19 BOLD DEFINE FONT oFONT4 NAME "Gill Sans MT" SIZE 0, -16 Define DIALOG oFormLout TITLE "RFID - (49)XXXX-XXXX - Layout de Etiquetas"; FROM 100, 233 to 535, 738 PIXEL COLOR 0, 14215660 ACTIVATE DIALOG oFormlOut ON INIT IniciaroFormlOut(NomeEtiqueta, PO1TITUL, PO2TITUL, PO1DESCR, PO2DESCR,; PO1CODBA, PO2CODBA, PO1CODIG, PO2CODIG, PO1AVDES, PO2AVDES,; PO1AVVAL, PO2AVVAL, PO1APDES, PO2APDES, PO1APVAL, PO2APVAL ) //---------------------------------------------------------------------------- Function IniciaroFormlOut(NomeEtiqueta, PO1TITUL, PO2TITUL, PO1DESCR, PO2DESCR, PO1CODBA, PO2CODBA,; PO1CODIG, PO2CODIG, PO1AVDES, PO2AVDES, PO1AVVAL, PO2AVVAL, PO1APDES,; PO2APDES, PO1APVAL, PO2APVAL ) @ 4, 6 GROUP oGrp1 TO 376, 500 LABEL "" PIXEL; OF oFormlOut COLOR 0, 16777215 FONT oFont1 @ PO1TITUL, PO2TITUL SAY oSay1 VAR "Titulo da Etiqueta" SIZE 104, 20 PIXEL; OF oGrp1 COLOR 0, 16777215 FONT oFont2 Design @ PO1DESCR, PO2DESCR SAY oSay2 VAR "Descrição da Mercadoria" SIZE 148, 20 PIXEL; OF oGrp1 COLOR 0, 16777215 FONT oFont2 design @ PO1CODBA, PO2CODBA SAY oSay3 VAR "CÓDIGO DE BARRAS" SIZE 220, 28 PIXEL; OF oGrp1 COLOR 0, 16777215 FONT oFont3 design @ PO1AVDES, PO2AVDES SAY oSay4 VAR "Valor a Vista R$" SIZE 98, 20 PIXEL; OF oGrp1 COLOR 0, 16777215 FONT oFont2 design @ PO1AVVAL, PO2AVVAL SAY oSay5 VAR "Av 99,99" SIZE 56, 20 PIXEL; OF oGrp1 COLOR 0, 16777215 FONT oFont2 design @ PO1APDES, PO2APDES SAY oSay6 VAR "Valor a Prazo R$" SIZE 106, 20 PIXEL; OF oGrp1 COLOR 0, 16777215 FONT oFont2 design @ PO1APVAL, PO2APVAL SAY oSay7 VAR "Ap 99,99" SIZE 62, 20 PIXEL; OF oGrp1 COLOR 0, 16777215 FONT oFont2 design @ PO1CODIG, PO2CODIG SAY oSay8 VAR "Código" SIZE 60, 20 PIXEL; OF oGrp1 COLOR 0, 16777215 FONT oFont2 design @ 383, 430 BUTTON oBut2 Prompt "Voltar" SIZE 70, 24 PIXEL; OF oFormlOut ACTION oFormlOut:end() FONT oFont4 @ 383, 342 BUTTON oBut3 Prompt "Salvar" SIZE 70, 24 PIXEL; OF oFormlOut ACTION SalvaLayout(NomeEtiqueta) FONT oFont4 SET MESSAGE OF oFormLOut TO "Etiquetas RFID - V 0.95" Return NIL *------------------------------------------------------------------------------------* * * * Define a funcao que salva o layout das etiquetas * * *------------------------------------------------------------------------------------* static function SalvaLayout(NomeEtiqueta) if empty( NomeEtiqueta ) MsgInfo( "Nome da etiqueta em branco, volte e atribua um nome a esta etiqueta.", "Atenção" ) return NIL endif Select Etiqueta INDEX ON ETI_NOME TO ETI001 go top if dbseek( NomeEtiqueta ) rlock() replace POS_1TITUL with oSay1:nTOP(),; POS_2TITUL with oSay1:nleft(),; POS_1DESCR with oSay2:nTOP(),; POS_2DESCR with oSay2:nleft(),; POS_1CODBA with oSay3:nTOP(),; POS_2CODBA with oSay3:nleft(),; POS_1CODIG with oSay8:nTOP(),; POS_2CODIG with oSay8:nleft(),; POS_1AVDES with oSay4:nTOP(),; POS_2AVDES with oSay4:nleft(),; POS_1AVVAL with oSay5:nTOP(),; POS_2AVVAL with oSay5:nleft(),; POS_1APDES with oSay6:nTOP(),; POS_2APDES with oSay6:nleft(),; POS_1APVAL with oSay7:nTOP(),; POS_2APVAL with oSay7:nleft() ?? "Layout da etiqueta " + alltrim( NomeEtiqueta ) + " salvo" PO1TITUL := POS_1TITUL PO2TITUL := POS_2TITUL PO1DESCR := POS_1DESCR PO2DESCR := POS_2DESCR PO1CODBA := POS_1CODBA PO2CODBA := POS_2CODBA PO1CODIG := POS_1CODIG PO2CODIG := POS_2CODIG PO1AVDES := POS_1AVDES PO2AVDES := POS_2AVDES PO1AVVAL := POS_1AVVAL PO2AVVAL := POS_2AVVAL PO1APDES := POS_1APDES PO2APDES := POS_2APDES PO1APVAL := POS_1APVAL PO2APVAL := POS_2APVAL else rlock() append blank replace POS_1TITUL with oSay1:nTOP(),; POS_2TITUL with oSay1:nleft(),; POS_1DESCR with oSay2:nTOP(),; POS_2DESCR with oSay2:nleft(),; POS_1CODBA with oSay3:nTOP(),; POS_2CODBA with oSay3:nleft(),; POS_1CODIG with oSay8:nTOP(),; POS_2CODIG with oSay8:nleft(),; POS_1AVDES with oSay4:nTOP(),; POS_2AVDES with oSay4:nleft(),; POS_1AVVAL with oSay5:nTOP(),; POS_2AVVAL with oSay5:nleft(),; POS_1APDES with oSay6:nTOP(),; POS_2APDES with oSay6:nleft(),; POS_1APVAL with oSay7:nTOP(),; POS_2APVAL with oSay7:nleft(),; ETI_NOME with NomeEtiqueta ?? "Layout NOVO da etiqueta " + alltrim( NomeEtiqueta ) + " salvo" PO1TITUL := POS_1TITUL PO2TITUL := POS_2TITUL PO1DESCR := POS_1DESCR PO2DESCR := POS_2DESCR PO1CODBA := POS_1CODBA PO2CODBA := POS_2CODBA PO1CODIG := POS_1CODIG PO2CODIG := POS_2CODIG PO1AVDES := POS_1AVDES PO2AVDES := POS_2AVDES PO1AVVAL := POS_1AVVAL PO2AVVAL := POS_2AVVAL PO1APDES := POS_1APDES PO2APDES := POS_2APDES PO1APVAL := POS_1APVAL PO2APVAL := POS_2APVAL endif return NIL
×
×
  • Create New...