Page 2 of 2

Re: Converting sample test of Tplan

PostPosted: Fri Jun 21, 2019 7:47 am
by Silvio.Falconi
Mr Rao,

I'm afraid that Daniel Garcia Gil made me to release more different from that you published but I tested the source you have pubblished

first error.
Image
I don't see any date in the date controls


on METHOD BuildDialog why you use ::oReserva:Commit() instead of oReserva:save() ?

Second Error
when you open for the first time it is possible that you manage to create the reservation, if you re-open for the second time you do not see the reservation created and you cannot make any more

Image

in fact the procedure creates the record but does not go to save anything as seen in the figure

Third error

Image

on METHOD MoveReservation( oData, nRowId, oPlann ) there is an error when go to save as you can see on picture


Four error
When I try to resize a bar there is strange error as ou can see here
Image




Another test

Image

when you insert a record on plan you see the reservation on window but on archive reserva.dbf you can see only a empty record with no data info
that's why when you exit and re-enter the program you don't see any reservation created


So it's not the error of the indexes but the error is perhaps somewhere else

the error is not in the Tplan class because I assure you that the class works very well
if you want I can show you an example where everything works fine but not with tdatabase / tdata but only in single-user mode (reserva->)

Re: Converting sample test of Tplan

PostPosted: Fri Jun 21, 2019 8:25 am
by nageswaragunupudi
Ok.
Now you have the sample converted using TDatabase

Re: Converting sample test of Tplan

PostPosted: Fri Jun 21, 2019 9:08 am
by Silvio.Falconi
nageswaragunupudi wrote:Ok.
Now you have the sample converted using TDatabase


but not run with tdatabase - instead with old system run ok as you can see here

Image

Re: Converting sample test of Tplan

PostPosted: Fri Jun 21, 2019 9:11 am
by nageswaragunupudi
It is working here for me with tdatabase

Please use the source code I posted as it is without changes and let us know.

Re: Converting sample test of Tplan

PostPosted: Fri Jun 21, 2019 9:17 am
by Silvio.Falconi
Nages,
on METHOD BuildDialog( oPlan, dCheckIn, dCheckOut )

I made

IF lSave
if lNew
::oReserva:Append()
oRec:= ::oReserva:record(.t.)
else
::oReserva:Seek( oPlan:GetRowID() + DToS( dCheckIn ) )
oRec:= ::oReserva:record()
endif

oRec:DATE = Date()
oRec:ROOMS_ID = oPlan:GetRowID()
oRec:CHECK_IN = dCheckIn
oRec:CHECK_OUT = dCheckOut
oRec:STATUS = StrZero( oCbx:nAt, 2 )
oRec:GUEST = cName
oRec:save()



now the record is saved on archive


Now the method METHOD ResizeReservation( oData, nRowId, oPlann ) not make error but not save on date right date

Re: Converting sample test of Tplan

PostPosted: Fri Jun 21, 2019 9:20 am
by Silvio.Falconi
nageswaragunupudi wrote:It is working here for me with tdatabase

Please use the source code I posted as it is without changes and let us know.



Nages I used your files you published in this forum and not run as I sad you on this message

viewtopic.php?f=3&t=37337&start=15#p223105

I post also the images with the errors
you said that it works with td but you actually actually see it on the screen when you enter a new booking but in reality the procedure only saves an empty record and not the data you entered, I'm trying to make you understand where it is the error

Re: Converting sample test of Tplan

PostPosted: Fri Jun 21, 2019 9:42 am
by Silvio.Falconi
Now seems run ok I changed BuildDialog

Image

Re: Converting sample test of Tplan

PostPosted: Fri Jun 21, 2019 9:47 am
by nageswaragunupudi
I edited and revised the sample01.prg.
Please test the revised program.

Re: Converting sample test of Tplan

PostPosted: Fri Jun 21, 2019 10:10 am
by Silvio.Falconi
nageswaragunupudi wrote:I edited and revised the sample01.prg.
Please test the revised program.


I saw...
why I cannot use oRec:oReserva:record(.t.) ?

I allready have the error on datepick I not see the date but only //

Re: Converting sample test of Tplan

PostPosted: Sat Jun 22, 2019 10:00 am
by Silvio.Falconi
Error on Modify I not see the data info

Image



Sure not need oRec:oDbf:record() instead of oReserva:xxxxx ?

Re: Converting sample test of Tplan

PostPosted: Sat Jun 22, 2019 10:35 am
by Silvio.Falconi
when go to search not search right as you can see here

Image

on Plan there is "Antonio Linares" but the seek is positioned on first record of database

I change the index INDEX ON ROOMS_ID + DToS( CHECK_IN )+ALLTRIM(TYPE) TAG room_in because I add a new field on Reserva.dbf Type

and then on dialog I make the seek

::oReserva:SetOrder( "room_in" )
::oReserva:GoTop()
::oReserva:Seek( oPlan:GetRowID() + DToS( dCheckIn )+ALLTRIM(cTipo) )

any solution please
I need have the room_id and room type because I have diiferent type of rooms having the same number

Re: Converting sample test of Tplan

PostPosted: Sat Jun 22, 2019 11:00 am
by Silvio.Falconi
Some time ago I tried to contact Daniel Garcia Gill also through Antonio but he seems to have vanished into thin air

I am very worried that something has happened to him.

Daniel must make people feel and say "I'm here and I'm fine !!!"

I am aware of the facts and situations that exist in Venezuela, even though Daniel should live in the north of Venezuela and I am also worried because I have many relatives in Caracas and Barquisimeto y do lara.

In Daniel's class even if in the archive Rooms.dbf there is the type field then in reserva.dbf it is not mentioned. My problem is precisely that my client has several rooms with the same number but with the different type.

So I thought I'd modify the Room_ID string with the first character of the room description string and then the room number so I could have it now:

O001 which is different from P0001

then on reserva.dbf I go to store the new RoomdID and now the index and the seek positioning in the archive :: oReserva seems to work well.