Have a pub night on me!
I'm glad to hear you're working on booking system improvements!
Ha! It's less like a discussion and more like a brawl.
I'm definitely no developer, but I'm sometimes capable enough to hack other brilliant developers' code to get it to do what I want (as long as it's a minor change). Of course I'm more comfortable with PHP and VB than C#...and it looks like most of the logic is compiled into binaries so I wouldn't know where to start with that, heh.
If this were PHP/MySQL (not C#/XML), I figure the simplest way to do this would add a "maxresourcecount" field for the booking system resource and do something like this. Obviously, it's more difficult than I make it sound...especially when you already have a day job!
//pull max resource count from configuration
$intMaxResourceCount = mysql_query( "SELECT `maxresourcecount` FROM `bookingsystem_resources` WHERE name='$strResourceName'" );
//calculate resource count already booked (an alternative would be to loop through the records and add them up)
$intBookedResourceCount = mysql_query( "SELECT SUM(`bookedresourcecount`) FROM `bookings` WHERE (name='$strResourceName') AND (`date`='$strDate') AND (`lesson`='$strLesson')" );
//determine whether or not to allow booking
if($intBookedResourceCount < $intMaxResourceCount){
//allow booking if requested quantity is less than or equal to: $intMaxResourceCount - $intBookedResourceCount
}else{
//don't allow booking
}