Para Manuel Mercado - TSBROWSE Valid()

Para Manuel Mercado - TSBROWSE Valid()

Postby MGA » Mon Mar 17, 2008 12:51 pm

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

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1250
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Postby MGA » Mon Mar 17, 2008 5:03 pm

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

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1250
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 56 guests

cron