Árvore de páginas

Ponto de Entrada

Descrição:

Este Ponto de Entrada será executado na rotina Escala Automática de Produtivos (OFIOM270) e permite a inclusão de campos na tela.

Localização:

Atualizações \ MovProdutivos \ Escala Automatica (OFIOM270)

Eventos:

Function OFIOM270(cParam01)

Local lProd := .t.

Local aAuxAcesso := {}

Local nPosAcesso := 0

Local lAcesso := .F.

Private cProd := space(6)

Private dDtIn := dDataBase+1

Private dDtFi := dDataBase+31

Private cPDom := space(6)

Private cPSeg := space(6)

Private cPTer := space(6)

Private cPQua := space(6)

Private cPQui := space(6)

Private cPSex := space(6)

Private cPSab := space(6)

Private cPFer := space(6)

Private cPAux := space(6)

Private cNome := space(50)

Private cFilPro := ""

Private lVOEFILPRO := (VOE->(FieldPos("VOE_FILPRO")) > 0)


Default cParam01 := cProd

cProd := cParam01

if !Empty(cProd)

lProd := .f.

if ! FS_VPROD(0)

return

endif

endif


aAuxAcesso := FMX_LEVXNU(nModulo) //Retorna os acessos do menu do usuário


nPosAcesso := aScan( aAuxAcesso , { |x| x[1] == "OFIOA380" } ) //Verificar se existe no Menu o fonte OFIOA380


If nPosAcesso > 0

lAcesso := .T.

EndIf


DEFINE MSDIALOG oDlg1 FROM 000,000 TO 017,060 TITLE STR0001 OF oMainWnd

@ 007,006 SAY STR0002 SIZE 35,08 OF oDlg1 PIXEL COLOR CLR_BLUE

@ 006,030 MSGET oProd VAR cProd PICTURE "!!!!!!" F3 "A1C" VALID FS_VPROD(1) SIZE 20,08 OF oDlg1 PIXEL COLOR CLR_HBLUE WHEN lProd

@ 007,063 SAY cNome SIZE 300,08 OF oDlg1 PIXEL COLOR CLR_BLUE

If lVOEFILPRO

cFilPro := Space(TamSx3("VOE_FILPRO")[1])

@ 007,160 SAY RetTitle("VOE_FILPRO") SIZE 35,08 OF oDlg1 PIXEL COLOR CLR_BLUE

@ 006,190 MSGET oFilPro VAR cFilPro PICTURE "@!" VALID (Vazio() .or. ExistCpo("SM0",cEmpAnt+cFilPro)) F3 "SM0_01" SIZE 20,08 OF oDlg1 PIXEL COLOR CLR_HBLUE WHEN lProd

Endif

@ 025,006 SAY STR0003 SIZE 32,08 OF oDlg1 PIXEL COLOR CLR_BLUE

@ 024,030 MSGET oDtIn VAR dDtIn PICTURE "@D" VALID FS_VDATA(1) SIZE 50,08 OF oDlg1 PIXEL COLOR CLR_HBLUE

@ 025,087 SAY STR0004 SIZE 10,08 OF oDlg1 PIXEL COLOR CLR_BLUE

@ 024,093 MSGET oDtIn VAR dDtFi PICTURE "@D" VALID FS_VDATA(2) SIZE 50,08 OF oDlg1 PIXEL COLOR CLR_HBLUE

@ 041,006 SAY STR0005 SIZE 30,08 OF oDlg1 PIXEL COLOR CLR_BLUE

@ 040,030 MSGET oPDom VAR cPDom PICTURE "!!!!!!" F3 "VOH" VALID FS_VESCA(cPDom) SIZE 01,08 OF oDlg1 PIXEL COLOR CLR_HBLUE

@ 041,069 SAY STR0006 SIZE 45,08 OF oDlg1 PIXEL COLOR CLR_BLUE

@ 052,030 MSGET oPSeg VAR cPSeg PICTURE "!!!!!!" F3 "VOH" VALID FS_VESCA(cPSeg) SIZE 01,08 OF oDlg1 PIXEL COLOR CLR_HBLUE

@ 053,069 SAY STR0007 SIZE 45,08 OF oDlg1 PIXEL COLOR CLR_BLUE

@ 064,030 MSGET oPTer VAR cPTer PICTURE "!!!!!!" F3 "VOH" VALID FS_VESCA(cPTer) SIZE 01,08 OF oDlg1 PIXEL COLOR CLR_HBLUE

@ 065,069 SAY STR0008 SIZE 45,08 OF oDlg1 PIXEL COLOR CLR_BLUE

@ 076,030 MSGET oPQua VAR cPQua PICTURE "!!!!!!" F3 "VOH" VALID FS_VESCA(cPQua) SIZE 01,08 OF oDlg1 PIXEL COLOR CLR_HBLUE

@ 077,069 SAY STR0009 SIZE 45,08 OF oDlg1 PIXEL COLOR CLR_BLUE

@ 088,030 MSGET oPQui VAR cPQui PICTURE "!!!!!!" F3 "VOH" VALID FS_VESCA(cPQui) SIZE 01,08 OF oDlg1 PIXEL COLOR CLR_HBLUE

@ 089,069 SAY STR0010 SIZE 45,08 OF oDlg1 PIXEL COLOR CLR_BLUE

@ 100,030 MSGET oPSex VAR cPSex PICTURE "!!!!!!" F3 "VOH" VALID FS_VESCA(cPSex) SIZE 01,08 OF oDlg1 PIXEL COLOR CLR_HBLUE

@ 101,069 SAY STR0011 SIZE 45,08 OF oDlg1 PIXEL COLOR CLR_BLUE

@ 112,030 MSGET oPSab VAR cPSab PICTURE "!!!!!!" F3 "VOH" VALID FS_VESCA(cPSab) SIZE 01,08 OF oDlg1 PIXEL COLOR CLR_HBLUE

@ 113,069 SAY STR0012 SIZE 45,08 OF oDlg1 PIXEL COLOR CLR_BLUE

@ 041,137 SAY STR0013 SIZE 45,08 OF oDlg1 PIXEL COLOR CLR_BLUE

@ 052,135 MSGET oPFer VAR cPFer PICTURE "!!!!!!" F3 "VOH" VALID FS_VESCA(cPFer) SIZE 01,08 OF oDlg1 PIXEL COLOR CLR_HBLUE

@ 085,125 BUTTON oEsca PROMPT OemToAnsi(STR0014) OF oDlg1 SIZE 55,10 PIXEL ACTION ( Processa( {|| FS_ESCALAR() } ) , oProd:SetFocus() )

@ 081,123 TO 097,182 LABEL "" OF oDlg1 PIXEL // Caixa Botao ESCALAR

@ 105,125 BUTTON oSair PROMPT OemToAnsi(STR0015) OF oDlg1 SIZE 55,10 PIXEL ACTION (oDlg1:End())

@ 040,160 BUTTON oCadFer PROMPT OemToAnsi("...") OF oDlg1 SIZE 09,10 PIXEL ACTION ( OFIOA380() , oPFer:SetFocus() ) WHEN lAcesso

@ 101,123 TO 117,182 LABEL "" OF oDlg1 PIXEL // Caixa Botao Sair

@ 002,003 TO 019,238 LABEL "" OF oDlg1 PIXEL // Caixa Produtivo

@ 020,003 TO 126,238 LABEL "" OF oDlg1 PIXEL // Caixa Escalas

// Ponto de Entrada para Inserção de campos na Tela

If ExistBlock("OM270TEL")

ExecBlock("OM270TEL",.f.,.f.)

EndIf

ACTIVATE MSDIALOG oDlg1 CENTER

Return

Programa Fonte:

OFIOM270.PRW

Função:

OFIOM270()

Parâmetros:

N/A

Retorno:

N/A

Exemplo:

Include totvs.ch

//////////////////////////////////////////////////////

// Ponto de Entrada para Inserção de campos na Tela //

//////////////////////////////////////////////////////

User Function OM270TEL()


MsgAlert("Ponto de Entrada OM270TEL executado com sucesso!","Atenção")


Return