Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Problem booking timeslots within a range of dates

Problem booking timeslots within a range of dates

Scheduled Pinned Locked Moved C#
helpcssdatabasetutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Twyce
    wrote on last edited by
    #1

    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

    L 1 Reply Last reply
    0
    • T Twyce

      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

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Hi, you could loop over the days from date1 to date2, by "incrementing" a DateTime, using DateTime.AddDays(1); and check that each of these days is still free. And of course you would use DateTime.Date to get rid of the time component when performing comparisons. :)

      Luc Pattyn [Forum Guidelines] [My Articles]


      Voting for dummies? No thanks. X|


      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups