Hotel Booking System Programme - When Booking Button Is Clicked It Can Search A Database And Find The Best Suited Room

Jun 22, 2010

I have created a hotel booking system programme. However, I am puzzled as to how when the booking button is clicked it can search a database and find the best suited room (RoomType) and make sure that it is available (Date of Departure < system.date).

This data is held in two tables (Access):
Booking:
BookingID (Primary Key)
CustomerID (Foreign Key, Table:Customer)
Date of Arrival (Date)
Date of Departure (Date)
RoomID (Foreign Key,Table:Room) Room:
RoomID (Primary Key)
RoomType (Text)
RoomPrice (Currency)
Floor (Number)

This has all got to be done within a single button click. Any ideas as to how I can place this into my vb code?

I have a rough query for picking a room that is best suited:

Code:
SELECT roomID
FROM Room INNER JOIN Booking ON Room.RoomID = Booking.RoomID
WHERE Room.[Room Type] LIKE '" & Room_TypeTextbox.Text & "'"
AND Booking.[Date of Departure] < Now()

I have been trying for a while to get it to select a single matching record as there is a high chance that this query will return multiple records but im unsure on how to deal with that.

View 16 Replies


ADVERTISEMENT

DateDiff - Put Together A Booking System

Aug 22, 2010

I am trying to put together a booking system. I have managed to program rates, discounts etc., and am now onto calculating the nights for the stay. On my form I have two datetimepickers, and a button. The code I have entered is: (I am using Visual Basic 2008 Express)

CODE:

This works well when getting how many nights between two dates in the same month, but if I enter say 30th August to 2th September, I get a -28. Is there a way to get the number of nights booked between two different months?

View 3 Replies

Develop A System For Booking Cars?

Mar 1, 2011

I want to develop a system for booking cars for example. Suppose that one customer wants to book a car and this is the last one.Another customer searches with the same criteria and is finding this car too. How I am able to stay away of this situation?I don't know if I explained well... Imagine when you book tickets. How they can 'lock' the last ticket (or maybe the one that someone is viewing it) and make it unavailable to customers that have browse the site after?I use C# and it's about a very simple web service.

View 3 Replies

.net - Avoiding Overlapped Bookings In Booking System Application?

Aug 22, 2011

If a booking is present in database on 12/27/2011 at 5:00 pm for 2 hours and i try to make a new booking on 12/27/2011 between 5 to 7 pm then my code generates an error message. Even if i try to book at 4:00 pm for 2 hours it generates an error message as the 2nd hour will be overlapped here with already made booking from 5:00 to 7:00.

Now here comes the problem part. When day changes it doesn't generate error message i.e. IF a booking is there on 12/27/2011 at 11:00 pm for 3 hours then it should not allow new booking till 12/28/2011 2:00 am but when i try to book 12/28/2011 at 1:00 am it saves it in the database and doesn't generate an error message. I want an error message generated in such a case.

I am using two separate fields in database one for time and one for date. Both of them have DateTime datatype.

newtime refers to time on which i'm trying to make new booking addednewtime refers to time after adding the duration to time on which i'm trying to make new booking

[Code]...

View 1 Replies

Create Website Involving Payments Plus Some Data Entry Eg Booking Of Some Facilities With The Main Data Kept At A LAN Window System?

Oct 26, 2010

create website involving payments plus some data entry eg booking of some facilities with the main data kept at a LAN window system.

View 4 Replies

Asp.net - Create And Share Bus Booking API?

Apr 16, 2011

I have created a Bus Booking Website [URL]. I want to share the bus booking form with other sites so that they use our services.How can do I this using vb.net?

View 2 Replies

Forms :: .NET PC Booking Application?

Oct 11, 2011

I am making a vb.net client application that works with a php based website where users can reserve a pc for themselves at a certain day and a certain time. I have made the application in such a way that upon logon, it queries the database and finds the person who booked pc at this time and compares the username to the person logged on. If it matches a welcome screen is showed with additional options. Else a window is shown which says "This PC is already booked. You will be logged of in 10 seconds".

The problem i am facing is, i have coded the close button to logoff since i dont want user to bypass this part, but yesterday i saw that if i close the app directly from taskbar (processes) it just closes.without logging him off.How can we code or is there anything we can do that, even if he closes the application through task bar there is still an instant log off?

View 6 Replies

Insert A Booking And Viewing In A DataGridView 2010?

May 27, 2011

I am using Visual Basic 2010, I have Created A DataSet Called "GaryTPHDB. and from that, I have created A form Called "Booking Form" , And I have also created a "Daily Jobs Form" And on this DailyJobsForm there is a DataGridView1, and at the begining of the row I have inserted a button called "View Job" and when I click this Button I want to View the whole job in the Booking Form so a user can edit the booking.

And at the end of the DataGridView1 Row, I Have inserted Another Button called "Allocate" There Is also a ComboBox. that a user can select a driver and when a driver is selected. I want the user to click the Allocate Button to update the dataset/Database with the selected driver. then remove the row from the DataGridView1. the DataGridView1 should be refreshed each time a row is remove.

View 7 Replies

C# - .NET Based Desktop Open Source Booking Application?

Feb 11, 2011

Anybody know of an existing open-source booking systems in Sports Clubs or Leisure Facilities based on .NET?

View 2 Replies

Booking Details Arent Being Shown In The Main Menu Screen?

May 26, 2011

im writing a room booking application, and after i've entered all the details for a booking, which looks like this;

'Declare Variables
Dim sUser As String
Dim sRoom As String[code].....

and now the problem is, its not working , its all going through ok and im not getting any run time errors. But the booking details arent being shown in the main menu screen.

View 11 Replies

Record Deletion - Customer And Booking Data Sets On My Form

Mar 15, 2012

I have a customer and booking data sets on my form. customer id is a foreign key in booking table .but when i click delete button. it gives me an error: The DELETE statement conflicted with the REFERENCE constraint "FK_Booking_Customer". The conflict occurred in database "photoshoot", table "dbo.Booking", column 'Cust_id'. The statement has been terminated. Its a one to many relation between customer and booking. one customer can make many bookings each booking will belong to only 1 customer.

View 1 Replies

For Each Method - Search If A Name Exist On The Form1's Listview If The Button Is Clicked From The Form2

Oct 5, 2010

I am trying to search if a name exist on the Form1's listview if the button is clicked from the Form2. But for somehow, I don't know why my code is never get fired. Can someone help me with the following code.

Private Sub Btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn.Click

Dim f1 As New Form1()

For Each itm As ListViewItem In f1.lv.Items

[CODE]...

View 5 Replies

Forms :: Loop Through Controls In A Group And Find Out Which Button Is Clicked?

Sep 2, 2010

I have a form with many buttons on it and I would like to loop through all the controls in a group control and find out which button is clicked.

I plan to use the click event of the button and I know it's easy to create a click event procedure for all of the buttons but would like to avoid that.

The group control is called GroupFilterButtons.

View 5 Replies

Make A Search Button To Search Through All The Tables In The Database?

Dec 28, 2009

I have a MS access database connected to a VB2008 developed software.
I want to make a search button to search through all the tables in the database.
how can I do this?

I want to link a field in table one to a field in table 2 in the database so that they are the same ( whenever I change what is in table 1 table 2 changes to the same automaticaly )

View 7 Replies

Creating A Find Button To Search A List Box?

Mar 21, 2010

I have been trying to figure out how to get my code to work. (It was a homework assignment which has already been turned in but I am determined to get this code to work.)I have a text box titled txtSearch and btnClick.I need to search a list box for a city name and then have it displayed in a message box. If there is not a match then I need to display an alternative message box stating there is no match. City is in the list box starting at 16.The text needs to be case insensitive.I am only getting the message "That is not a valid city." for any entry that I type into my txtSearch even though I know it should be a match.

Here is what I have for code

Private Sub btnFind_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFind.Click
' Declare variables to find text on txtSearch when button clicked
Dim length As Integer = txtSearch.TextLength
Dim value As String = txtSearch.Text.ToUpper

[code].....

View 1 Replies

DB/Reporting :: Get Info From MDB Database When A Button Is Clicked?

Nov 17, 2009

What I am trying to do is get specific info from a database and what I am getting is the first entry.

I have made a database connection, made the top bar not visible and I have inserted a text box and multiple labels. My MDB database has 3 columns (street, city, postcode) and multiple rows.

What I want is when a user enters a postcode in the text field the other labels get the info related to it. I.E. when a user enters "FY1 3DL" the labels update to "King street" and "Blackpool". With the code below I get the first row from the database.

Code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.StreetsTableAdapter.Fill(Me.WcipcodeDataSet.Streets)
End Sub

View 1 Replies

What Control Should Be Use In Making A Room Mapping System

Feb 25, 2010

what control should i use in making a room mapping system? i just cant figure out what controls i should use. i plan to use the datagrid but i don't know how to fill the color of cell.

View 3 Replies

VS 2008 : Have A Label's Text Recorded Into A Database When Button Is Clicked?

Apr 14, 2009

I would like to have a label's text recorded into a database when my button is clicked. I do not yet understand the database connection. I have created the db, and have the following

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Conn As String = "Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5; Data Source=c: empTestDB.sdf;"
Dim tConnection As New OleDb.OleDbConnection(Conn)

[code]....

When I try to test this the .ExecuteNonQuery() becomes highlighted and says the given type name is unrecognized. My table is setup as table1 and the only 2 columns are datetime and temperature. I want the label text to go to temperature and I would like somehow the time the temperature was taken to go into the datetime field. I had the provider=microsoft.jet.oledb.4.0, but I changed it since I thought this was the one to use.

View 6 Replies

VS 2010 - Search Database Using String To Find Image

May 18, 2010

I'm trying to make a program for a school assessment in VB express 2010 using databases. The program essentially has a panel for uploading an image with a name string and an author string, which it then stores in a database. You can then search the database using the name or author string and find pictures that fit the criteria.

View 2 Replies

Find Data Using Search Command In Form Application Like Searching A Name In Database?

Feb 24, 2012

how to find data using search command in my form application like searching a name in my database?

View 1 Replies

Search Function In Program In Order To Find Records From An Access Database

Oct 16, 2009

i have a search function in my program in order to find records from an access database... all the other functions add/edit/delete are working just fine this is my code for search function: [code]

View 16 Replies

Press A Button - If I Clicked The Button In Form2 It Would Automaticlly, Click The Button In Form1?

Oct 30, 2010

Using 2 forms how would I click one button, from another form? ie In VB 4,5,6, I would used to do it as:-

Form 1:

private sub Command1_Click()

msgbox "Say Hello"

End Sub[code].....

If I clicked the button in form2, it would automaticlly, click the button in form1. Do I, do it the same way in VB Express or has it changed?

View 5 Replies

How To Access My Database Using Search Button Function

Jan 4, 2009

How could I build a search function button which will access my database? As the search item match the database, there must be a window pop up to show the searched data from the database.

View 1 Replies

Search Button To Access Entire Database?

Jul 15, 2009

Search Button To Access Entire Database? [code]...

View 3 Replies

How To Search A Database With TextBoxes And Button And Display It On DataGridView

Dec 24, 2009

Does any one know how to search a Database with TextBoxes and button and display it on a DataGridView.I've already got the Data to show in the DataGrid, but with 6000 rows now I want to Filter or search the view.

View 8 Replies

When A Player Types North In Room "Crash Site" They Get The Description Of Traveling To The Next Room "In Trail"?

Jul 27, 2010

I've run into another road block while programming my game. The problem is that when a player types North in room "Crash Site" They get the description of traveling to the next room "In Trail" as well as the description of traveling to the next room after that, "Deeper In Trail" before having to type north again. I've looked over the code several times, but can't find the problem....the conditions seem to be fine, but I'm guessing that's where the problem is..

Code:
ElseIf LCase$(txtInput.Text) = "go north" And Room = "Crash Site" Then
Room = "In Trail"

[code].....

View 14 Replies

Deploy A VB2010 Programme That Uses The 2010 Access Database Engine?

Nov 3, 2010

I am trying to deploy a VB2010 programme that uses the 2010 Access Database Engine. The programme falls over when starting, with an error trying to access the Database. If I Install the programme on a machine that has Office 2003 installed - still installing the 2010 Database Engine - then it runs OK.Does the Database Engine work?

View 5 Replies

Button Click Reference - What Is Identifier For Most Recent Button Clicked

Jul 6, 2010

I have numerous buttons on a form, one each to select a playing card (52 buttons). When the Card(button) is selected I want to highlight it by changing the border from black to Red, then if reclicked from change back from red to black, easy enough (if then else). So that I do not have to copy this code 52 times I wanted to create a module as follows:

Sub ChangeButtonBorderColor(ByRef ButtonName)
If (Equals(ButtonName.BorderBrush, Brushes.Red)) Then
ButtonName.BorderBrush = Brushes.Black

[code]....

View 3 Replies

Make A Link Button Visible After Another Button Has Been Clicked In Asp.net In Button_click()

May 14, 2010

How to make a link button visible after another button has been clicked in asp.net(vb) in button_click()

it says error as "Object reference not set to an instance of an object."

i've done this in my code

Protected Sub InsertButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim receipt As LinkButton = FormView1.FindControl("LinkButton1")
' receipt.Enabled = "true"

[Code].....

View 2 Replies

Save The Last Dragged Button On The Form And Also Detect The Name Of The Last Clicked Button?

Sep 5, 2009

I have already done the creation of button and the dragging of button at runtime already.But now i need to know how do i save the last dragged button on the form and also detect the name of the last clicked button.so lets say i now drag a button to coordinates 25,254. so when i exit the form and the next time i launch it, the button will still be at 25,254. and this one will go on for the number of button i created like 100. so when i launch the form the 100 button will be at the exact position where i last saved them.the second part is lets say i created button1 and button2 on the form in runtime. so when i clicked the first button, it should display button1. and if i clicked on button 2, it should say button2. same goes for like 100buttons.

[code]...

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved