mBrowse C/ Criação de Tela

11 views
Skip to first unread message

Thiago Copacheski Santos

unread,
Oct 20, 2011, 6:44:01 PM10/20/11
to totvs-treinam...@googlegroups.com

#INCLUDE "protheus.ch"

 

User Function ExMBrow3

 

Private cAlias := "SZB"

 

Private cCadastro := "Cadastro de Pessoas"

 

Private aRotina := { ;

{"Pesquisar","AxPesqui",0,1}  ,;

{"Visualizar","AxVisual",0,2} ,;

{"Incluir","AxInclui",0,3}    ,;

{"Alterar","U_ALTCUST",0,4}    ,;

{"Excluir","AxDeleta",0,5}     ;

}

 

dbSelectArea(cAlias)

dbSetOrder(1)

mBrowse(,,,,cAlias)

 

Return          

 

user function altCust(cAlias, nReg, nOpc)

 

Local oButton1

Local oGet1

Local cCodigo := (cAlias)->ZB_CODIGO

Local oGet2

Local cNome := (cAlias)->ZB_NOME

Local oSay1

Local oSay2 

Local lGravar := .F.

Static oDlg

 

DEFINE MSDIALOG oDlg TITLE "New Dialog" FROM 000, 000  TO 200, 500 COLORS 0, 16777215 PIXEL

 

 

@ 014, 033 MSGET oGet1 VAR cCodigo SIZE 061, 010 OF oDlg COLORS 0, 16777215 PIXEL when .f.

@ 031, 017 SAY oSay2 PROMPT "Nome" SIZE 025, 007 OF oDlg COLORS 0, 16777215 PIXEL

@ 030, 034 MSGET oGet2 VAR cNome SIZE 106, 010 OF oDlg COLORS 0, 16777215 PIXEL

@ 052, 044 BUTTON oButton1 PROMPT "Gravar" SIZE 037, 012 OF oDlg ACTION (lGravar := .T., oDlg:End()) PIXEL

 

ACTIVATE MSDIALOG oDlg CENTERED                                                                          

 

if lGravar

                RecLock(cAlias, .F.)

                (cAlias)->ZB_NOME := cNome

                MsUnLock()

endif

 

return

    

return 

 

Thiago Copacheski Santos
FSW - Fábrica de Software

Unidade Curitiba

(55 (41) 3360-6200

+ thiago.c...@totvs.com.br
cid:image001.png@01CBAF5D.19B85040

 

image001.png
Reply all
Reply to author
Forward
0 new messages