Link to home
Start Free TrialLog in
Avatar of Sanmarie
Sanmarie

asked on

creating a scheduling control like a calendar

It would be much easier to show you what I want but I will try to describe it. We have a big office with 10 receptionists and we want to create something like a calendar control where they can schedule many patients in a particular time slot on a particular week day. Let me try to draw the control that I want:

Checkbox for Schedule immediate Appointment

                                         This Week                          Next Week
Appointment Time|  05/22/2005  |   05/23/2006 |  05/29/2005 | 05/30/2005
8:00                    |        5           |       2            |         4        |       3                      
9:00                    |        6           |       3            |         8        |       2
10:00                  |        0           |       0            |         1        |        4

All the information would be read from a database so the appointment times and the number slots would be different from day to day. This is how it would work: if a receptionist clicks on the first slot that shows 5 (under 05/22/2005) to schedule an appointment for a patient, then the 5 should be decremented to 4. If 2 receptionists click on this same slot, then the resulting number should be 3, as the information will be shared by all 10 receptionists.

To design the control, I was thinking of using 2 datagrids but I'm not sure how to start. Also,
 
1. I would like to put one color for This Week data and another color for Next Week data.
2. When the receptionist clicks on a slot, they should get a pop-up window
3. Past information would be greyed out (If it is 12 p.m today, the receptionist shouldn't be able to schedule   appointments for 8:30 this morning.)
4. It would be good if the control could be designed so that other applications could use it and not just my reception application. (Custom or user? which is best?)
5. The information would have to be constantly refreshed in the control as receptionists use the slots. Note that the receptionists cannot change the values of the slots.

Sorry for making this so long. Please point me in the right direction! Thanks in advance.

Sanna
Avatar of Sanmarie
Sanmarie

ASKER

Anybody there? Please help.
It seems to me that what you are trying to do is very complex.  My advice would be to see if you can customize Outlook to get what you want.

Here is a site that has software that allows you to connect the Outlook Calendar to any database:
http://www.geniusatwork.nl/articles/GeniusConnect/2/3/

Theoretically, if you can save Outlook Calendar data to a database, then you can add/subtract appointments, etc...
Hi JRossi1,

Thanks for replying. It seems there is some misunderstanding. I won't be using the Outlook calendar at all in my application (not my decision). What I was thinking of doing is reading the scheduling information (which would have been saved to a database by an administrator) into a datagrid control and then customizing it, so it would look like the diagram I drew, but I'm not sure.

It may be complex but unfortunately, I have to do it in VB.NET.

Thanks

Sanna


I suppose if you created a CrossTab query in the database to display the data a la your example, then you wouldn't have to customize the datagrid.  You can add functionality to the datagrid so that if the user clicks on a date, it will bring up a form that can be used to update the tables that make up the query.

Or, you can purchase a 3rd party control that contains all the functionality you require:

http://www.infragistics.com/products/NetAdvantage/WinForms/Schedule.aspx

Fair enough.Purchasing a third party control is out of the question. So, I guess I could create probably a stored procedure that would return the rows and columns for the datagrid. The only customizing (I think) I would do is add one color for the "This Week" values and another color for the "Next Week" ones as well as "grey out" cells/slots that are in the past (In the evening, receptionists should not be able to book appointments for this morning). Do you know of any links or tutorials that would show me how to manipulate cells, not rows, of a datagrid?

Also, this would be a shared datagrid among the 10 receptionists. So, the data would have to be saved back to the database periodically. Concurrency issues! Do you know of the best way I could do this? I mean, would I update a dataSet from the dataGrid for each receptionist and save it back to the database. Help!

Thanks again.

Sanna  
ASKER CERTIFIED SOLUTION
Avatar of JRossi1
JRossi1

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

Thanks.

I'm going to try implementing something tonight with your suggestions. I will defnitely have more questions but for now I will accept your answer.

Sanna