• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

check for available seats when booking a flight

 
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am verifying the number of available seats from the tableModel first and display a error message if user required seats are more than this number, saying that "You can only book maximum x number of seats on this flight". Otherwise I go ahead with modifying the database. While doing so, I may still find that the required seats are more than the available seats (because the first time I have not considered other concurrent user's reservations), if so then I am displaying one more message saying "Not enough seats are available". I feel this may be confusing to the user.
Anybody thought on similar lines ??
 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I considered this also. The first message is for when the user you already know that the request is for too many seats. The second message is when their were enough seats a minute ago, but someone just beat you to them.
My second message says, "The seats you requested are no longer available". It might be a little more clear.
 
Rasika Chitnis
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks so much. You are right, properly worded message make things less confusing.
 
reply
    Bookmark Topic Watch Topic
  • New Topic