From and TO
I know the number of room and the type
I want see if I have a booking order on a dbf for this room and for this period
on the file.dbf I have these fields
CAMERA 6 N
dal 8 Date
Al 8 Date
tipoattrez 1 C
How I can make to control it ?
i made :
- Code: Select all Expand view
- Function SE_Libera(dDataIniziale,dDataFinale,n,cTipo)
Local lOk := FALSE
LOCAL nRec:=(oDCot)->(Recno())
(oDCot)->(OrdSetFocus(3))
(oDCot)->(DbGoTop())
set filter to alltrim((oDCot)->tipoattrez) == cTipoAttrez .AND. (oDCot)->CAMERA == n ;
.AND. ;
(;
( (oDCot)->DAL >= dDataIniziale .AND. (oDCot)->DAL <= dDataFinale ) .OR.;
( (oDCot)->AL >= dDataIniziale .AND. (oDCot)->AL <= dDataFinale );
)
(oDCot)->(DbSeek(n))
DO WHILE !(oDCot)->(EoF())
lOk := TRUE
(oDCot)->(DbSKIP())
ENDDO
(oDCot)->(DbGoTo(nRec))
Return lOk
but not run ok