FUNCTION Otros_Dom(cCli)
LOCAL oDld, oBrd, oDDom , oDat[4]
LOCAL oBtn[5], lNew, lCap, aDat[4]
lNew:=lCap:=.F.
oDDom:=Open_Dbf("DomEnt")
(oDDom)->(DbSeek(cCli))
DEFINE DIALOG oDld RESOURCE "Dlg_Dom" FONT oWnd:oFont
REDEFINE LISTBOX oBrd FIELDS (oDDom)->DomEnt HEADER "Domicilio" ;
ALIAS (oDDom)->(Alias()) ID 110 OF oDld
oBrd:nClrForeHead:=CLR_BLUE
oBrd:bGoTop :={|| GoToTop(oDDom,cCli)}
oBrd:bGoBottom:={|| GoToBot(oDDom,cCli)}
oBrd:bSkip :={|n| MovePtr(oDDom,cCli,n)}
oBrd:bChange :={|| Refr_Dom(oDDom,oDat,aDat)}
REDEFINE GET oDat[1] VAR aDat[1] ID 201 OF oDld PICTURE "@!" WHEN lCap UPDATE VALID !Empty(aDat[1])
REDEFINE GET oDat[2] VAR aDat[2] ID 202 OF oDld PICTURE "@!" WHEN lCap UPDATE
REDEFINE GET oDat[3] VAR aDat[3] ID 203 OF oDld PICTURE "@!" WHEN lCap UPDATE
REDEFINE GET oDat[4] VAR aDat[4] ID 204 OF oDld PICTURE "@!" WHEN lCap UPDATE
REDEFINE BUTTON oBtn[1] ID 210 OF oDld ACTION RegD_Dom(.T.,lNew,oDat,aDat,oDDom,oBrd,@lCap,oBtn,cCli,oDld) WHEN lCap
REDEFINE BUTTON oBtn[2] ID 220 OF oDld ACTION RegD_Dom(.F.,lNew,oDat,aDat,oDDom,oBrd,@lCap,oBtn,cCli,oDld) CANCEL WHEN lCap
REDEFINE BUTTON oBtn[3] ID 120 OF oDld ACTION Edit_Dom(.T.,oDat,aDat,oDDom,oBrd,@lCap,@lNew,oBtn,oDld)
REDEFINE BUTTON oBtn[4] ID 130 OF oDld ACTION Borra_Dom(oDDom,oBrd,cCli)
REDEFINE BUTTON oBtn[5] ID 140 OF oDld ACTION Edit_Dom(.F.,oDat,aDat,oDDom,oBrd,@lCap,@lNew,oBtn,oDld)
ACTIVATE DIALOG oDld ;
ON INIT (oDat[1]:Hide(),oBtn[1]:Disable(),oBtn[2]:Disable());
VALID (Close_Dbf("DomEnt",oDDom),.T.)
RETURN (NIL)