Results 1 to 11 of 11

Thread: seats booking system... urgent pls reply!!

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2004
    Location
    Punjab, India
    Posts
    7

    seats booking system... urgent pls reply!!

    Hi Guys,

    Your file has helped ur alot in our project .... but now we are facing a new prob..... actually the problem is that:--

    we were having few probs so we have changed the system a bit... I AM ATTACHING THE my project files with it (its not complete yet... some work to be done this weekend).... jus log in wid da ID = CI and Password = CICST .......
    click on booking, then lower stall.. here this is the current booking screen... we want to put a button on this screen for Advance booking. By clicking dat button a new window should open wid seats and we we click on those seats.. the smaller window (like the one in ur project) should open providing date... time... show options(except current)... i hope u get me....lol.. and in this way the seats are booked in advance...

    Now suppose the advance booking we did was for 24th date .... so when date 24th comes and we open our current booking screen on that day... the seats should have same booking settings as we did before.. ug et me??? we want same seats to be already booked...

    Second prob is that if we want to see the booked seats for any particular date ... we should just select the date.. and the seats for that date should be displayed in new window... we are not getting any idea that how can we attach a particular seating arrangement (seats window) wid a particular date ...


    We will be really thankful to u if u help us.....plzzzzzzzzzzzzz. V have to submit this project on monday with all its testing. So if u plzzzz help to us ASAP. V r sorry that we troubling you alot but our lecturer has gone on urgent leave and we are helpless out here wid no one to help us :-(
    Attached Files Attached Files
    Last edited by ciis2004; Aug 13th, 2004 at 07:31 AM.

  2. #2
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629
    - Set Ok button default property to true so you can just press enter even in textbox and its code is executed
    - App doesn't unload properly cause frmLogin is left (your still executing code frmTheatermgt.Show in frmlogin
    VB Code:
    1. Public Sub UnloadAll_Forms()
    2. Dim frmTemp As Form
    3.  
    4.    For Each frmTemp In Forms
    5.       Unload frmTemp
    6.    Next
    7. End Sub
    - Use a datepicker control for dates
    - Indent your code!
    - Use a public connection object and a public function to initialize that connection object.
    - Most info should be loaded from database to make the system flexible, eg lstTimmings, so you need data entry for timings

    That's it for now... from reading your post and looking at your DB, you need to finalize first yor DB structure before proceeding with any more coding since what you can display and how will depend on the info and strcuture of your database.

    Step back and redo a systems analysis and design. Identify all info you need, identify relationships (one to one, one to many, many to many), identify the interfaces/reports you need, identify data and/or datasets that has to be variable or static (lookup table), etc.

    Only then can you do the algorithm for reading/updating the DB.

    EDIT:

    Since its due monday I guess you can stick with the static timmings info.

  3. #3
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632
    Sweet jesus!
    How do you debug this code?!

    Remove ALL "On Error Resume Next" statements!!! Bad, bad, bad coding

    Just a few points. All your controls are WAY too big, as are your screens. Look at all that wasted space Users HATE that. The design and structure of both your application, and your database, are incorrect This makes the app very un-userfriendly.

    Woka

  4. #4
    Banned jhermiz's Avatar
    Join Date
    Jun 2002
    Location
    Antarctica
    Posts
    2,492
    Originally posted by Wokawidget
    Sweet jesus!
    How do you debug this code?!

    Remove ALL "On Error Resume Next" statements!!! Bad, bad, bad coding

    Just a few points. All your controls are WAY too big, as are your screens. Look at all that wasted space Users HATE that. The design and structure of both your application, and your database, are incorrect This makes the app very un-userfriendly.

    Woka
    Funny cause about 3 weeks ago I posted screen shots of my application only to have people comment that eye candy isn't important...

    Ya sure it isn't....just download this application and tell me looks aren't important .

    Reference:

    http://www.vbforums.com/showthread.p...0&pagenumber=2

  5. #5
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632
    The UI is one of the most important projects in an APP.
    Uses want to have "silly" functions like:
    • Short cut keys
    • Right click menus
    • Double clicking on grids
    • Sorting grids when col header is clicked
    • Drag and drop
    • Systray icon, where needed.
    • Tooltip text
    • Personal settings
    • Good/nice looking icons

    and so on. There are many many extra little things that can be added to the above list.
    Each one isn't hard to do, but to add ALL that functionality in takes time and slows down later development, but in my opinion it's well worth it.

    Woof

  6. #6

    Thread Starter
    New Member
    Join Date
    Aug 2004
    Location
    Punjab, India
    Posts
    7
    Well Woof buddy

    V mentioned it above that "(its not complete yet... some work to be done this weekend)" so working on the looks like buttons and stuff comes later first of all atleast get the system started and working!

    Regarding that 'on error resume next' statement,.... we guys are on our first work term.. have done just first two semesters of our degree so we dont have any exp in VB dats y consulting all u VB experts to help us out and yeah still have to make relationships in that database... anways wut wrong with database?? do tell me that.... i ll b spending tonite working on this project only.... tough and busy night ahead guys..... lemme prepare coffee for myself... thx for ur suggestions...


    Thanks once again!!!
    Adios

    Garry!

  7. #7

    Thread Starter
    New Member
    Join Date
    Aug 2004
    Location
    Punjab, India
    Posts
    7
    Originally posted by leinad31
    - Set Ok button default property to true so you can just press enter even in textbox and its code is executed
    - App doesn't unload properly cause frmLogin is left (your still executing code frmTheatermgt.Show in frmlogin
    VB Code:
    1. Public Sub UnloadAll_Forms()
    2. Dim frmTemp As Form
    3.  
    4.    For Each frmTemp In Forms
    5.       Unload frmTemp
    6.    Next
    7. End Sub
    - Use a datepicker control for dates
    - Indent your code!
    - Use a public connection object and a public function to initialize that connection object.
    - Most info should be loaded from database to make the system flexible, eg lstTimmings, so you need data entry for timings

    That's it for now... from reading your post and looking at your DB, you need to finalize first yor DB structure before proceeding with any more coding since what you can display and how will depend on the info and strcuture of your database.

    Step back and redo a systems analysis and design. Identify all info you need, identify relationships (one to one, one to many, many to many), identify the interfaces/reports you need, identify data and/or datasets that has to be variable or static (lookup table), etc.

    Only then can you do the algorithm for reading/updating the DB.

    EDIT:

    Since its due monday I guess you can stick with the static timmings info.

    Hi Buddy! well yeah we had already done that ok button thing in our PCs lol. ders no time now to do systems analysis and design thing.

    We didnt understand wut u meant by this -- " App doesn't unload properly cause frmLogin is left (your still executing code frmTheatermgt.Show in frmlogin. "

    We tried using datepicker.. but cudnt get it going... we even took help from MSDN and copied sum .ocx file from system32 folder to our project folder... but that didn work in VB as it gave error that that file is not a valid activeX component.(sumthg like this only). So dats y we used calendar instead.

    - Use a public connection object and a public function to initialize that connection object.... well i didnt ge that... maybe other members of my group will get that lol....

    is it really important to make relationships at this moment? We have no experience in making projects so thats y dunno wut exaclty should be included in the project... how we have to proceed and wuts the system or procedure that we should follow while making a project.

    It our very first project and that too without the help of any lecturer and yeah we still have to do VB in next semester... we learnt a little bit of VB in very short span of time before doing this project.

    PLease help us ... we are so helpless...

  8. #8
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629
    Well... you could do a simple analysis for yor immediate needs. When I meant relationships you dont necessarily have to set the relationship in the access database but you have to finalize how data is related to design the proper tables such as Sales, Sales Details tables for one to many, an additional field for one is to one, and an additional crosstable (Such as fields Seat ID, Screening ID) for many to many relationships.

    As to the unload... you show the teather management form from you log in form. So form log in isnt unloaded in the sense that it is equal to nothing (also uinload all references to the form). Quick solution, hide the login form, show the theater management form vbModal, then after the show thetaermgt.show line call the uNloadAll_Forms procedure I gave.

    You decalred your connectiuon object at procedure level... since all recordsets and command objects in your object will reference the same database, might as welll initialize just one connection object (declared public in a code module) and resuse that anywhere such as

    Code:
    Dim cmmd As New ADODB.Command 'declared at procedure level
    Dim rsTemp As New ADODB.Recordset 'declared at procedure level
    
    Set cmmd.ActiveConnection = publicADOConnection
    Set rsTemp.ActiveConnection  = publicADOConnection
    The datepicker should be available through Add New Component -> Microsoft Windows Common Controls-2 6.0. To get a date from it

    Code:
    Dim dtTemp As Date 
    
    dtTemp = CDate(DTPicker.Value)
    'or
    txtDate.Text = Format(DTPicker.Value, "mm/dd/yyyy")
    txtTime.Text = Format(DTPicker.Value, "hh:nn:ss AM/PM")
    Focus on the database structure so you can make the appropriate add/edit/delete/view algorithms with your data.
    Last edited by leinad31; Aug 17th, 2004 at 11:08 AM.

  9. #9

    Thread Starter
    New Member
    Join Date
    Aug 2004
    Location
    Punjab, India
    Posts
    7
    Originally posted by leinad31
    Well... you could do a simple analysis for yor immediate needs. When I meant relationships you dont necessarily have to set the relationship in the access database but you have to finalize how data is related to design the proper tables such as Sales, Sales Details tables for one to many, an additional field for one is to one, and an additional crosstable (Such as fields Seat ID, Screening ID) for many to many relationships.

    As to the unload... you show the teather management form from you log in form. So form log in isnt unloaded in the sense that it is equal to nothing (also uinload all references to the form). Quick solution, hide the login form, show the theater management form vbModal, then after the show thetaermgt.show line call the uNloadAll_Forms procedure I gave.

    You decalred your connectiuon object at procedure level... since all recordsets and command objects in your object will reference the same database, might as welll initialize just one connection object (declared public in a code module) and resuse that anywhere such as

    Code:
    Dim cmmd As New ADODB.Command 'declared at procedure level
    Dim rsTemp As New ADODB.Recordset 'declared at procedure level
    
    Set cmmd.ActiveConnection = publicADOConnection
    Set rsTemp.ActiveConnection  = publicADOConnection
    The datepicker should be available through Add New Component -> Microsoft Windows Common Controls-2 6.0. To get a date from it

    Code:
    Dim dtTemp As Date 
    
    dtTemp = CDate(DTPicker.Value)
    'or
    txtDate.Text = Format(DTPicker.Value, "mm/dd/yyyy")
    txtTime.Text = Format(DTPicker.Value, "hh:nn:ss AM/PM")
    Focus on the database structure so you can make the appropriate add/edit/delete/view algorithms with your data.
    Hi Leinad... Thx for the Post... i tght u wernt going to post anymore lol anyways tell me do u check ur pms???? i bet u dont lol coz i sent you so many PMs the other day wen u wert online but u wernt replying or even checking them...

    Abt the project m having hard time putting gaps between the seats.. Atually in dere are three blocks in each of the sitting place i mean balcony, L Stall and U Stall... take example of Balcony. It has 10 Rows and 40 Seats (Columns). So i m trying to break up in 3 blocks.... but m not finding anyway to do it.... Can u pls help me in this matter.... oh by the way we got out last date for submittin the project extended for a while... so a bit relieved now... but lil bit sad as the most intelligent person in my Group has got her Transfer Visa 4 Canada.. So shes leaving on 19th early morning!.. Now All the work comes on my shoulders are two other group members arent looking interested anymore in completing this project.... well take care buddy... You are an intelligent guy ..... Wut do u do???? keep posting... Your Help means alot to US!

    Adios
    God Bless
    Garry

  10. #10
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632
    How can you split 40 into 3?
    Is it a block for 10 seats, then a block of 20 then another 10?
    If so then do something like:
    VB Code:
    1. Dim lngLeft As Long
    2. Dim lngCol As Long
    3. Dim lngIndex As Long
    4. For lngCol = 1 To 40
    5.    lngIndex = imgSeat.UBound + 1
    6.    Load imgSeat.Item(lngIndex)
    7.    lngleft = 100 + lngCol * imgSeat.Item(lngIndex).Width
    8.    If lngCol > 10 Then
    9.       lngLeft = lngLeft + 100 'Adds gap after 10th seat
    10.    End If
    11.    If lngCol > 30 Then
    12.       lngLeft = lngLeft + 100 'adds 2nd gap after 30th seat
    13.    End If
    14.    ImgSeat.Item(lngIndex).Left = lngleft
    15.    imgSeat.Item(lngIndex).Visible = True
    16. Next lngCol
    The above would produce a block of 10 seats, then 20 seats, then another 10 seats.

    Woof

  11. #11
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629
    I was on vacation... and my link goes directly to Classic VB so I dont see the PM notification.

    Try Wokawidget's solution, if the splitting varies per row then you need to include that info for the hall and initialize the layout according to the stored info on seats per row.

Posting Permissions

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



Click Here to Expand Forum to Full Width