• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 238
  • Last Modified:

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
0
Sanmarie
Asked:
Sanmarie
  • 4
  • 3
1 Solution
 
SanmarieAuthor Commented:
Anybody there? Please help.
0
 
JRossi1Commented:
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...
0
 
SanmarieAuthor Commented:
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


0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
JRossi1Commented:
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
0
 
SanmarieAuthor Commented:

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  
0
 
JRossi1Commented:
Re: Saving the data.  The easiest way would be to add code to the double click event of the cell that opens a simple form with text boxes that the users can use to make changes. You can then perform data validation on the textbox values before saving the data to the database.

Also, each record in your table would have a unique id.  You can add a boolean field to the table and name it 'IsLocked'.  When the user opens the data edit screen, you can update the IsLocked to true. When the changes are saved successfully, you update that field to false.  The datagrid would only display data where the IsLocked field is false thereby preventing data conflicts.

Check out this link regarding DataGrid tips and tutorials:  http://www.syncfusion.com/FAQ/WindowsForms/Default.aspx#44
0
 
SanmarieAuthor Commented:

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
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now