Click here to Skip to main content
15,900,108 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello friends,

i have query regarding a scheduling scheme.

i have designed a scheduling dashboard for machines in vb.net and sql server.in which a user enters the schedules for machines which he has to use.now the problem is i am able to stop the duplicate scheduling entries but i dont have any idea on how to achieve the following mentioned problem:


suppose a user enters the schedule from 3 AM to 4AM then i am able to stop entries on this schedule but how should i restrict the entries from say: 2AM to 5AM coz the schedule of 3 AM to 4AM is already taken.

i want to restrict and check such entries.

needed help....

thanks.
Posted
Comments
Nelek 28-Sep-13 6:25am    
I think you should give a bit more information about the structure of your system or what / how you already did the other tasks. The working solution can be quite different between one option or another or even make things worst if not compatible.

Example:
Do you save the schedule in Time Format? or dou you have a sort of calender where you put the flag "busy" at the reserved hours?
Are there other priorities to be considered or just the first that reserves something gets it?
sachin bhise 28-Sep-13 6:33am    
i am entering the time from a combobx in number format like 1 AM,1:15AM,1:30AM,2 AM etc.
RedDk 28-Sep-13 15:40pm    
Offhand wouldn't be easy to add a computational column on the fly that identitfies a "subslot" as INUSE, then include that exculpatory info in a WHERE clause to filter viable return?

1 solution

There isn't a single piece of code anyone can give you to fix this issue. You need to check for overlapping. Drawing out a diagram may help you see it. You need to make sure your start time of the existing one is not in the range of the new one nor is the end time. Then check the other scenarios but drawing a diagram should help you visualize it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900