Jump to content

Problem booking timeslots within a range of dates

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1
Twice

Twice

    Newbie

  • Members
  • PipPip
  • 11 posts
I'm working on a venue booking system.This system allows a person to make a booking for any period during the year(for a whole month or week).My problem is getting my system to check and display available time slots between a specified range.for example: a person may book from 12 August to 30 August,now how do i get the system to check and display available or unavailable slots.i'm using a grid to display all of this so what i want is my grid to shade with a color the booked time slots on a particular day and allow a person to select the slots they prefer on the grid with a different colour.Any help with this will be appreciated.(code,sql statements)
Thanx

#2
gaylo565

gaylo565

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 268 posts
You need to come up with a solid plan of how you are going to implement the application. There are numerous ways to achieve this but depending on what sort of server or computer you are going to be storing the information on, the solution will vary. I would probably implement a control array of labels for all the different locations on your grid. Then you can apply the different properties to the corresponding date label based on weather or not the time slot is filled. Then you can create a generic click handler which would show the information for the time slot the user selected in a separate info label. With this approach you could arrange the labels in a calendar like fashion or some other sort if you are using weeks or months. If the GUI isn't to important you could just show the data set from your server directly in a container. This will only give you text outputs rather than a calender like arrangement of the label array but could allow the user much easier access to modification of the info displayed. If you want someone to code it out for you, you should be ready to pay $ for it.

#3
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
The first question is: how do you mark time as available/unavailable?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#4
gaylo565

gaylo565

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 268 posts
You would probably be best of creating some sort of enumerable collection who's properties mirror the information needed for a booking. This way you could store all of the booking information in your collection and check for nulls (or whatever your default value) for unbooked dates. If you keep your data in some sort of db you can query the data and assign it to your enumerable. Then you can loop through the enumerable and assign text and colors to your grid members based on the data in the corresponding enumerable position. Because this doesn't work directly with a data set you will also need to build in an update query so that you can modify the information from your grid.
If you need more specific help on details I would be happy to help out, but a good plan is paramount.

#5
Peter Andersen

Peter Andersen

    Newbie

  • Members
  • Pip
  • 1 posts
Hi Twice,

Have you looked at SaaS applications? There are several sites that provides all the heavy-lifting for bookings, email confirmations, rates etc., so you can concentrate on the UI and customizations. I have used WebReserv.com for several website designs.

Cheers
Peter