Para Manuel Mercado - TSBROWSE Valid()

Post Reply
MGA
Posts: 1219
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá
Contact:

Para Manuel Mercado - TSBROWSE Valid()

Post by MGA »

Sr. Manuel Mercado:

ADD COLUMN TO oBrw TITLE "Vend" DATA FieldWBlock("codvend",select()) SIZE 50 EDITABLE 3DLOOK FALSE, TRUE, TRUE ALIGN DT_CENTER, DT_CENTER, DT_CENTER PICTURE "999";
COLORS CLR_BLACK, bColor MOVE DT_MOVE_NEXT;
valid {|uvar| TSvalidaVend803(@uVar,obrw)}; <-- @ NO FUNCIONA?!
WHEN IF(!EMPTY(saipro->codpro),.T.,.F.)



uVar teve seu valor alterado pela função TSVALIDAVEND803, como fazer uVar receber o novo valor?

Grato
ubiratanmga@gmail.com

FWH17.04
FWPPC
Harbour/xHarbour
xMate
Pelles´C
TDolphin
MGA
Posts: 1219
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá
Contact:

Post by MGA »

Sr. Manuel, resolvi assim:


ADD COLUMN TO oBrw TITLE "Vend" DATA saipro->codvend SIZE 50 EDITABLE 3DLOOK FALSE, TRUE, TRUE ALIGN DT_CENTER, DT_CENTER, DT_CENTER PICTURE "999";
COLORS CLR_BLACK, bColor MOVE DT_MOVE_NEXT;
valid {|uVar| TSvalidaVend803(uVar,oBrw)};
WHEN IF(!EMPTY(saipro->codpro),.T.,.F.) TOOLTIP "Informe o código do vendedor"

*******************************************
static function TSvalidaVend803(uBuffer,obrw)
*******************************************
if pesquisaven(@uBuffer,.t.)
saipro->perccom := PercComTabpre(arqsai->codfil, saipro->codpro, 1, uBuffer)
saipro->codvend := uBuffer
else
Return(.f.)
endif
obRW:refresh()
obRW:setfocus()
RETURN(.t.)


Porem, é a maneira correta????


Grato Sr. Manuel
ubiratanmga@gmail.com

FWH17.04
FWPPC
Harbour/xHarbour
xMate
Pelles´C
TDolphin
Post Reply