S
Saint
I'm doing a little reservation website and I have two tables: Modules
and Reservation
In MODULE I have every module from a doctor with the day and the hours
that he goes to work, for example:
doctor | module | hour | day
--------------------------------------------
1 1 10:00 1
1 2 10:30 1
1 3 11:00 1
1 4 09:00 2
1 5 09:30 2
This says that the Doctor 1 works from 10:00 until 11:00 on Monday,
from 9 to 9:30 on Tuesday
And in RESERVATION I got:
date | hour | doctor
-----------------------------------------
25/12/06 10:00 1
25/12/06 11:00 1
This says that Doctor 1 has a reservation for day 25 (wich is Monday =
1) at 10:00 and at 11:00
I HAVE to fill my gridview from de MODULE table with ALL the hours
available for that doctor in certain date (I got covered that with a
calendar control).
So, for default that would look like this:
HOUR | STATE
-------------------------
10:00 | Available
10:30 | Available
11:00 | Available
11:30 | Available
But in the case that one o more of the hours are reserved (making a
query in the RESERVATION table), then would look like this:
HOUR | STATE
-------------------------
10:00 | Reserved
10:30 | Available
11:00 | Reserved
11:30 | Available
My problem is that I don't know how to generate the states while the
gridview is being filled :S
I hope is clear.... please please help me with this!!!
and Reservation
In MODULE I have every module from a doctor with the day and the hours
that he goes to work, for example:
doctor | module | hour | day
--------------------------------------------
1 1 10:00 1
1 2 10:30 1
1 3 11:00 1
1 4 09:00 2
1 5 09:30 2
This says that the Doctor 1 works from 10:00 until 11:00 on Monday,
from 9 to 9:30 on Tuesday
And in RESERVATION I got:
date | hour | doctor
-----------------------------------------
25/12/06 10:00 1
25/12/06 11:00 1
This says that Doctor 1 has a reservation for day 25 (wich is Monday =
1) at 10:00 and at 11:00
I HAVE to fill my gridview from de MODULE table with ALL the hours
available for that doctor in certain date (I got covered that with a
calendar control).
So, for default that would look like this:
HOUR | STATE
-------------------------
10:00 | Available
10:30 | Available
11:00 | Available
11:30 | Available
But in the case that one o more of the hours are reserved (making a
query in the RESERVATION table), then would look like this:
HOUR | STATE
-------------------------
10:00 | Reserved
10:30 | Available
11:00 | Reserved
11:30 | Available
My problem is that I don't know how to generate the states while the
gridview is being filled :S
I hope is clear.... please please help me with this!!!