Alpha Video Training
Page 1 of 2 12 LastLast
Results 1 to 30 of 45

Thread: Passenger Seating Dbase

  1. #1
    Member
    Real Name
    Nathan
    Join Date
    Feb 2009
    Posts
    8

    Default Passenger Seating Dbase

    I'm trying to develop a basic database for an airline type functionality. I'm quite new to Alpha Five and have some experience with Filemaker in the past. I'm pretty much after some advice on the feasibility or best method to go about this. This is what I'm after:

    • I will be inputting a route (eg A-B-C-D)
    • I will input a passengers first name, last name, passport number and select the route they are flying. (eg A-D, or B-D)
    • I'd like a graphical representation of the seating available.
    • I'd like to be able to either drag the passenger to the picture of their seat, or enter the seat number in the passengers details.
    • I'd then like the seat to show who is sitting there and their details as well as changing color to show the seat is occupied.


    I know it sounds like a lot.

    I hope someone can offer some advice.

    Thank you.

  2. #2
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Grand Rapids, Michigan
    Posts
    4,201

    Default Re: Passenger Seating Dbase

    Nathan,
    How many seats are we talking about? How many different seating "patterns" would there be? The seating pattern of a Beoing 737 is very different from a 757.

    Everything you describe is doable EXCEPT the dragging a passenger to their seat.
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

  3. #3
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Passenger Seating Dbase

    Hi Mike,

    There is a demo of a Hotel Reservation application that has drag fields in it but no one has yet shared the code for it.

    It is in Richard's Blog
    Last edited by Keith Hubert; 02-25-2009 at 10:57 AM.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  4. #4
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Grand Rapids, Michigan
    Posts
    4,201

    Default Re: Passenger Seating Dbase

    Thanks Keith,
    I stand corrected. It seems that is demoing a web based application? Very cool. However, I am thinking this being posted on the desktop area, Nathan is looking for that. Is AJAX available to desktop?
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

  5. #5
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,644

    Default Re: Passenger Seating Dbase

    • I will be inputting a route (eg A-B-C-D) No problemo
    • I will input a passengers first name, last name, passport number and select the route they are flying. (eg A-D, or B-D) No problemo
    • I'd like a graphical representation of the seating available. You can scan in an image and use a bmp as either a form background - or as an bmp object. Then place hotspots on top of the seats to toggle your reservations on or off, etc.
    • I'd like to be able to either drag the passenger to the picture of their seat, or enter the seat number in the passengers details. As said by others, A5 does not support D&D. The web app Keith refers to is a custom web AJAX job.
    • I'd then like the seat to show who is sitting there and their details as well as changing color to show the seat is occupied. If you use a scanned image, obviously you wont be able to change the seat colors, per se. You could place objects on top of the seats (buttons, text objects, frames, etc) and control the colors that way. I don't believe it is practical to show passenger info on the seat due to space limitations. But you could have a browse below the graphic listing seat nos and passenger info.

  6. #6
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Passenger Seating Dbase

    Hi Guys,

    Unless I am getting this all wrong, it is using AJAX in a web browser which is being used on the desktop.

    Which as I understand it, this can be used on a single machine or the WWW if that is required.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  7. #7
    Member
    Real Name
    Nathan
    Join Date
    Feb 2009
    Posts
    8

    Default Re: Passenger Seating Dbase

    Thanks for the tips guys. Instead of the drag and drop, Im going to settle for entering the seat number manually.

    So far I've created a Browse in which you enter the persons name, route (eg A-C) and seat number.

    Peter, could you please explain in more detail how I would set up a placeholder, and have it change color etc, if it is entered into the seat field on the browse? I'd like a different color for each route if that's possible :)

    Thanks again

  8. #8
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,644

    Default Re: Passenger Seating Dbase

    Quote Originally Posted by nathanashton View Post
    Peter, could you please explain in more detail how I would set up a placeholder, and have it change color etc, if it is entered into the seat field on the browse? I'd like a different color for each route if that's possible :)
    Nathan,

    See attached sample...


    EDIT: Nathan, check out BOTH forms...
    Last edited by Peter.Greulich; 02-25-2009 at 08:27 PM.

  9. #9
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Passenger Seating Dbase

    Hi Nathan,

    To change a colour of a field in a browse select properties, Setup tab, then select Font Equations. Now you can change the colour dependant of the value of the field.

    Using Peter's code, you could put a button on a browse to change the colour of a Row or field in the browse.
    Last edited by Keith Hubert; 02-25-2009 at 08:14 PM.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  10. #10
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,644

    Default Re: Passenger Seating Dbase

    Quote Originally Posted by Keith Hubert View Post
    Using Peter's code, you could put a button on a browse to change the colour of a Row or field in the browse.
    Keith, I updated my sample to include a browse. You just enter the route no and the browse OnSave event does the rest.

  11. #11
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Passenger Seating Dbase

    Hi Peter,

    That looks very interesting.

    Are you suggesting that Nathan has over 400 little spots (for a 747) on a form and each spot changes colour when it gets booked?

    So Nathan could have several Seating layouts on conditional layers for each plane layout, 737, 747 etc.

    Sure is going to take some coding! But doable.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  12. #12
    Member
    Real Name
    Nathan
    Join Date
    Feb 2009
    Posts
    8

    Default Re: Passenger Seating Dbase

    Thanks Peter, the sample you provided works excellent. The next stumbling block I have come across is that when I close the form then re-open it, the seats are no longer colored. I have to adjust the record, to reforce it to save, and re-color again.

    So Nathan could have several Seating layouts on conditional layers for each plane layout, 737, 747 etc.
    Sounds like my plan Keith. I was planning to draw up the 300 odd seats using Peters method and give it a trial to see how it goes.
    Unless there is another method?

    Is there any way of using the seats as individual records or something?

    Thanks again

  13. #13
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Passenger Seating Dbase

    Hi Nathan,

    Is there any way of using the seats as individual records or something?
    Yes, in a child table. How many plane details do you plan to work with?
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  14. #14
    Member
    Real Name
    Nathan
    Join Date
    Feb 2009
    Posts
    8

    Default Re: Passenger Seating Dbase

    3 different aircraft with corresponding seating

  15. #15
    "Certified" Alphaholic
    Real Name
    Raymond Lyons
    Join Date
    Apr 2000
    Location
    Carlsbad, CA
    Posts
    2,143

    Default Re: Passenger Seating Dbase

    See what you all think of the approach in the attached. Any way you do this seems to me like it would be a lot of work. But in that regard, I think one of Cal's utilities can greatly reduce the work in my approach--forget which one it is. And, the way I did things in the sample could probably be done in a somewhat easier way.

    Raymond Lyons

  16. #16
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,644

    Default Re: Passenger Seating Dbase

    Quote Originally Posted by nathanashton View Post
    Thanks Peter, the sample you provided works excellent. The next stumbling block I have come across is that when I close the form then re-open it, the seats are no longer colored. I have to adjust the record, to reforce it to save, and re-color again.
    You may be missing the point. I just provided you a sample to get you started. In order for the seats to properly display on form load, you need to script a loop thru the relevant records in the table and "re-color" the seats before viewing. Use the OnInit event. Here is some simplified generic code to query and loop thru the records. You have to study the code and apply what I gave you previously to make it all work. Of course, I could build the whole thing for you, but then you'd have to pay me. ;)

    Code:
    tbl = table.open()
    ''========================QUERY
    query.description = ""
    query.order = ""        
    query.filter = ""
    query.options = ""    
    Q = tbl.query_create()
    ''************************No of records
    nrecs = Q.records_get()
    IF nrecs = 0
        Q.drop()
        tbl.close()
        ui_msg_box("Null Query","No records were found matching the criteria.",UI_INFORMATION_SYMBOL)
        END
    END IF
    ''========================FETCH 
    i = 1
    tbl.fetch_first()
    while .not. tbl.fetch_eof()
            ''code here
        statusbar.percent(i,nrecs)
        i = i + 1
    tbl.fetch_next()
    end while
    tbl.close()
    END

  17. #17
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,644

    Default Re: Passenger Seating Dbase

    Quote Originally Posted by Keith Hubert View Post
    Are you suggesting that Nathan has over 400 little spots (for a 747) on a form and each spot changes colour when it gets booked?
    Well, I didn't think about the number! 400 - yikes! I guess you would make the objects very small to fit them all on the form/screen view. But there might be a performance issue w. that many objects. One would have to test it to see how fast 400 objects update.


    So Nathan could have several Seating layouts on conditional layers for each plane layout, 737, 747 etc.
    You could use cond objects, although, in this case, I would probably minimize the number of objects and "re-use" objects (if feasible) by code.


    Sure is going to take some coding! But doable.
    I don't think the coding is too bad, actually. The secret is to name the objects logically and address them by xbasic - e.g. S001, S002, S003, or some such system. You certainly don't need a line of code to address each each object individually!

  18. #18
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,644

    Default Re: Passenger Seating Dbase

    Quote Originally Posted by Raymond Lyons View Post
    See what you all think of the approach in the attached.
    You can do all kinds of cool tricks like that. But, the one thing I totally disagree with is putting all the fields for each seat of one flight in one record - 400 fields+ (using your sample idea would require 1200+ fields in a single record ~ what's the limit of fields per record?). I would humbly suggest a closer adherence to db normalization rules and use one record per seat. Like Keith said, it can be a child table or whatever.

  19. #19
    "Certified" Alphaholic
    Real Name
    Raymond Lyons
    Join Date
    Apr 2000
    Location
    Carlsbad, CA
    Posts
    2,143

    Default Re: Passenger Seating Dbase

    Quote Originally Posted by Peter.Greulich View Post
    You can do all kinds of cool tricks like that. But, the one thing I totally disagree with is putting all the fields for each seat of one flight in one record - 400 fields+ (using your sample idea would require 1200+ fields in a single record ~ what's the limit of fields per record?). I would humbly suggest a closer adherence to db normalization rules and use one record per seat. Like Keith said, it can be a child table or whatever.
    I was mainly interested in some form what one could do with the "cool tricks" on a form. Clearly if you have up to 400 seats not everything can be in one table (the limit is around 1000 fields, plus God forbid anyone break normalization rules). As for one record per seat, I humbly await any genuinely cool tricks with that scenario--or maybe I missed them in your sample. Seems like it would have to be something like a calendar/appointments model. But unlike you ("Of course, I could build the whole thing for you, but then you'd have to pay me"), I'm not looking for business, so I'll leave it to you and whoever else wants to play around with it.

    Raymond Lyons

  20. #20
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Grand Rapids, Michigan
    Posts
    4,201

    Default Re: Passenger Seating Dbase

    That was pretty much fun. I think this example goes along the lines that Peter was describing. I think. It makes for a platform for folks to play with, at least. This really is a RAD product.

    In this example, the progressive lookup for the airport codes displays a dialog box which has the OK button highlighted, but requires a mouse press, as the Enter key will not activate it. It was created throught the Genie and converted to xdialog for color changes. I can't figure how to get the dialog buttons to operate with keystrokes.
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

  21. #21
    "Certified" Alphaholic
    Real Name
    Raymond Lyons
    Join Date
    Apr 2000
    Location
    Carlsbad, CA
    Posts
    2,143

    Default Re: Passenger Seating Dbase

    Mike,

    A great start! However, unless I bypass opening the mainmenu form, any action on that form seems to crash A5. Maybe it is just the Navigate button--not sure.

    Ray

  22. #22
    Member
    Real Name
    Nathan
    Join Date
    Feb 2009
    Posts
    8

    Default Re: Passenger Seating Dbase

    Hi Mike,

    Wow! thats about all I can say. You've pretty much nailed the functionality that I was aiming for. A little bit of customisation etc and this would be pretty much perfect. Very grateful for your help. Now I need to dig through the code and see how it all works........

  23. #23
    Member
    Real Name
    Bob Arbuthnot
    Join Date
    Apr 2005
    Location
    Belleville, KS
    Posts
    598

    Default Re: Passenger Seating Dbase

    Very impressive, Mike. Nice work!

    ba

  24. #24
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Passenger Seating Dbase

    Mike,

    That is amazing, I take my hat off to you sir.

    Thank you for including me on your flight.

    My idea to have conditional layers was to allow for the different areas of the plane.
    Which would allow for the number of seats in a 747.

    Just for added functionally, available seat numbers could be on a lookup with a W or A as in this planes seating arrangement

    How cool would the drag and drop be, in this application?
    Upgrading might be a problem with conditional layers and drag and drop?

    When you can produce an application like this, even as a sample, then you can call yourself an Alpha Developer
    Last edited by Keith Hubert; 02-27-2009 at 04:23 AM.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  25. #25
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,644

    Default Re: Passenger Seating Dbase

    That's sick, Mike! But you'll be happy to know I just used your program to book a flight to Taipei! BTW: I charged it to your credit card. ;)

    Very Impressive.

  26. #26
    "Certified" Alphaholic
    Real Name
    Raymond Lyons
    Join Date
    Apr 2000
    Location
    Carlsbad, CA
    Posts
    2,143

    Default Re: Passenger Seating Dbase

    Mike,

    I don't get it. Am I the only for which your Navigator function crashes A5 completely? I downloaded the zip again, no help. I am on XP, sp3 and the v9 patch just released a day or two ago. What's going on?

    Ray

  27. #27
    Member
    Real Name
    Bob Arbuthnot
    Join Date
    Apr 2005
    Location
    Belleville, KS
    Posts
    598

    Default Re: Passenger Seating Dbase

    Ray,

    I opened it with V8 and it worked fine.

    Bob Arbuthnot

  28. #28
    "Certified" Alphaholic
    Real Name
    Raymond Lyons
    Join Date
    Apr 2000
    Location
    Carlsbad, CA
    Posts
    2,143

    Default Re: Passenger Seating Dbase

    I just tried it in V8. Same thing--big time crash (Ctrl+ Alt+Del type). Oh well, I am not going to be flying anytime soon!!

    Ray

  29. #29
    Member
    Real Name
    Geoff Meredith
    Join Date
    Aug 2006
    Posts
    637

    Default Re: Passenger Seating Dbase

    Ray - Worked fine for me in V8. Might be worth downloading it again in case any of the files were corrupted.

    Mike - Thank you for providing this sample. Its a great help for novices like myself.

  30. #30
    "Certified" Alphaholic
    Real Name
    Raymond Lyons
    Join Date
    Apr 2000
    Location
    Carlsbad, CA
    Posts
    2,143

    Default Re: Passenger Seating Dbase

    I did download it again. Same problem with both V8 and V9.

Similar Threads

  1. MsWorks dbase
    By lodhol in forum Alpha Four Versions 7 and 8
    Replies: 3
    Last Post: 04-20-2008, 01:07 AM
  2. dbase
    By civitas in forum Alpha Five Version 7
    Replies: 4
    Last Post: 07-06-2006, 10:58 AM
  3. ODBC for dbase or anything else
    By DHB in forum Web Application Server v7
    Replies: 5
    Last Post: 03-03-2006, 01:20 PM
  4. dbase 3 Problem
    By AngusCT in forum Alpha Four Version 6 and Prior
    Replies: 3
    Last Post: 07-24-2002, 07:08 AM
  5. dBase 4 and 5
    By Bob Pelletier in forum Alpha Four Version 6 and Prior
    Replies: 1
    Last Post: 06-25-2000, 12:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •