Beruflich Dokumente
Kultur Dokumente
Submitted in partial fulfillment for the degree of Bachelor of Science (Hons) in Computing
STUDENT DECLARATION
I Declare that: We understand what is meant by plagiarism. The implications of plagiarism have been explained to us by our lecturer. This project is all our work and I have acknowledged any use of the published or unpublished works of other people. Group Leaders Signature : Date : 12-05-2011
Total number of pages including this cover page : 58 PAGES Submission Date : 12th May 2011 Due Date :
Group Members
Leader : A.N.Ahamed Nishadh (CB004081) Members : S.D.Ilangakoon (CB004041) Taiyaba T. Ahmed (CB004119) A.S.Tiffaniya Fernando (CB004165)
ACKNOWLEDGEMENTS
Firstly we would like to thank our lecturer Ms.NadeeraAhangamafor all the help and guidance given to us while doing this assignment. Especially for teaching us this module in such a way that we were able to learnthis highly technical module very easily. Also there are many individuals who have helped us in numerousways directly and indirectly so that we were able to complete this assignment. APIIT Lanka for providing us with resources and the Tech Team at APIIT Lanka for their assistance at required times. And last but not least our friends, parents and the well-wishers without whose moral support and encouragement, we would not have been able to do a good job. Finally, if there are any shortcomings in this project, then we request to excuse us for all those and accept this documentation. Ahamed Nishadh Deshan Ilangakoon Tiffaniya Fernando Taiyaba Ahmed
ii
TABLE OF CONTENTS
1.0 - INTRODUCTION ............................................................................................... 1 2.0 PROJECT DESCRIPTION ................................................................................. 2 2.1 FUNCTIONALITY .................................................................................... 2 2.2 HARDWARE SPECIFICATIONS ............................................................ 3 2.3 SOFTWARE SPECIFICATIONS .............................................................. 4 3.0 LOGICAL DESIGN FLOW CHARTS ............................................................ 5 4.0 SAMPLE OUTPUT ............................................................................................ 6 5.0 DATABASE DESIGN ...................................................................................... 15 6.0 TESTING .......................................................................................................... 16 7.0 SOURCE CODE ............................................................................................... 25 7.1 LOGIN FORM.......................................................................................... 25 7.2 MAIN MENU FORM............................................................................... 25 7.3 VEHICLES FORM ................................................................................... 27 7.4 MODIFY CUSTOMER DETAILS FORM .............................................. 29 7.5 CUSTOMER TYPE FORM ..................................................................... 31 7.6 ADD NEW CUSTOMER FORM ............................................................ 31 7.7 ASSIGN VEHICLE FORM ...................................................................... 32 7.8 CHANGE ORDER STATUS FORM ....................................................... 32 7.9 MODIFY ORDER FORM ........................................................................ 33 7.10 NEW ORDER FORM ............................................................................ 36
iii
7.11 SEARCH ORDER FORM ...................................................................... 37 7.12 SEARCH CUSTOMER FORM ............................................................. 38 7.13 DATABASE CONNECTION MODULE .............................................. 39 7.14 GLOBAL VARIABLES MODULE ....................................................... 39 7.15 DRIVER RENTALS REPORT .............................................................. 39 7.16 MONTHLY TOTAL REPORT .............................................................. 40 7.17 UNCOMPLETED RENTALS REPORT ............................................... 40 8.0 LIMITATIONS ................................................................................................. 42 9.0 FURTHER DEVELOPMENTS ........................................................................ 43 10.0 CONCLUSION ............................................................................................... 44 APPENDICES ............................................................................................................ 45 1.0 MEETING MINUTES.............................................................................. 45 1.1 1st MEETING ........................................................................................ 45 1.2 2nd MEETING ....................................................................................... 47 1.3 3rd MEETING........................................................................................ 48 1.4 4th MEETING ........................................................................................ 49 1.5 5th MEETING ........................................................................................ 50 2.0 GANTT CHART ...................................................................................... 51 3.0 WORK BREAKDOWN STRUCTURE ................................................... 52 4.0 BIBLIOGRAPHY..................................................................................... 53
iv
1.0 - INTRODUCTION
The Visual Basic.Net assignment was handed over to the group on the 22nd of March 2011. This assignment is to be carried out as a group assignment and should be handed in by the 16th of May 2011. The group comprised of 4 members and the work to develop a VB.Net program was divided evenly between the members. The assignment presents a scenario where our group is working for a Dynamic Software Development house and has been approached by a Vehicle rental company by the name of Indulgence Auto Rental. The problem faced by the vehicle rental company is that they are faced with vast amounts of paperwork and having to spend too much time sorting through this paperwork before being able to make a decision. The vehicle rental company now wishes to move to a computer based system so as to improve on their turnaround time and help make faster and better decisions. The scope for this project was set by the client themselves. The specifications to which the system was developed are given below: Should be simple and easy to operate Eliminate the need for manual work to the maximum possible extent Make the rental system automated and available in electronic form Reduce the paperwork and increase the decision making ability
To measure the success of this assignment the program should meet the below requirements: All the above criteria should be met The project should be completed on time Ease of use is paramount for this program to be effective
Search Customer - This form will search for the customer and displays the output in a Data Grid Viewer Vehicle form In this form the user is allowed to enter a new vehicle or edit details of an existing vehicle. Public Variables This is a Module that has been created to hold the variables that are required to be used globally throughout the project. Incomplete Reservation Reports This is a report created using crystal reports and is used to show the reservations that have been made but not completed.
Complete Reservation Reports These reports show the records of reservations that have been completed by each driver. Total Monthly Income This report give the monthly income that the company makes in the report.
Disk Space: Database Engine and Data file : 280MB Analysis Services and data files: 90MB Reporting Services and Report Manager: Integration Service: Client components: 120MB 120MB 850MB
SQL Server books online and SQL Server compact books online: 240MB
The above will be the first form to appear as the system runs. This is the Login form. The user has to enter the correct username and the password to get into the system and view the other forms. Username: admin Password: admin
If the user enters the correct username and the password, the above dialog box will appear suggesting that the user has successfully logged in to the system. If the user has entered the wrong user name or password the following dialog box will appear:
This the Main Menu form which will appear after the user clicks OK in the project dialog box shown above. There are three options presented to the user. Under each option there are more options available. The user can come out of the system by selecting Exit.
When the user selects Add/modify vehicles under Forms in the main menu the above Vehicles form appears where the user can store details of vehicles and drivers. The user can also click on the add new vehicle button below to add a new vehicle and save the information using the save button. The user can also modify and delete records. There user can move to the next or the previous record
7
by clicking on the arrow buttons. He can also move to the first and the last record from the current record he is in.
The above form appears when the user selects New Order under Order Forms. The user can add a new customer by selecting New Customer. After entering the details the user can save the details and the place order button will get enabled. To place the order for that particular customer, the following form will appear:
In here the user can enter the order details and save. When the user selects to add a vehicle to the particular order the following form appears:
In the above form available vehicles, according to the customers requirements is being displayed on the grid view. The customer can choose the vehicle, type in the vehicle ID and select assign and the following dialog box appears indicating that the order has been done. When the user presses OK the form closes.
The user can select change status/cancel button in the above form and the following form will appear. In this form the user can change the status or delete the order of a particular customer.
10
The user can also search for existing customer details and place an order by selecting Existing Customer from the customer type form:
11
Under Order Form the user can select Modify order and the following form called searchorder will appear. In here the user can search for vehicles and modify customer order. He can also change the status of the order or cancel the order.
By clicking on the Modify button above, the below form will appear where the user can modify the order details of a particular customer. The Total charges for the whole journey can be calculated.
12
This form appears when the user selects to change order or cancel order button under search order form. In here the user can delete an order or change its status.
The above form will appear when the modify button under searchorder form is selected. After the journey is being completed and the order status is being changed to complete, the total charges can be calculated in this form. The user can also modify customer details or delete them using the Modify under Orders Form in the Main Menu.
13
14
15
6.0 TESTING
Testing: Login Form: Test No. 1. Description Test Login with username and password. Test Data Username: admin Password: admin Outcome User should be able to login to the system. The message LOGIN SUCCES S is displayed . An error message saying LOGIN FAILED will be displayed and the user wont be able to login. Comments Successful
2.
Successful
Test No. 1.
Outcome The sub menu under Forms and Reports should be displayed.
Comments
2.
Vehicles Form will appear. A sub menu will be displayed. Customertype orm should open. Searchorder for should open. Modifycustom er form should open. Successful
New Order under Order Form. Modify Order under order Form. Modify Customer form
Vehicles Form:
17
Test No.
Description
Test Data
Outcome
Com ment s
1.
Vehicle details
2.
All the text in the textboxes clears and the user can enter new details. Saves the newly added details. Deletes the details of a particular vehicle.
Save
Delete
Modify
3.
Next (>)
Will take the user to the next record from the current record hes in. Will take the user to the previous record from the current
Previous (<)
18
record hes in. First (|<) Will take the user to the first record in the form. Will take the user to the last record in the form.
Last (>|)
Test No. 1.
Description
Test data
Outcome
Comments
Testing Buttons
New Customer
Successful
Existing Customer
Test No. 1.
Description
Test data
Outcome
Comments
Testing Buttons
Save
Saves the record into the database. Enables after a record has been saved. When selected, New order form will appear.
Successful
Place Order
Test No. 1.
Description
Test data
Outcome
Comments
Testing Buttons
Save
Saves the Successful newly added order into the database. Opens the add vehicle form.
Add Vehicle
Test No. 1.
Description
Test data
Outcome
Comments
Testing Buttons
Assign
Successful
Test No. 1.
Description
Test data
Outcome
Comments
Testing Buttons
Search
All the details of that particular vehicle will be displayed in the grid view. Successful Modify Order form will open.
Modify
Change status/Cancel
Test No. 1.
Description
Test data
Outcome
Comments
Testing Buttons
Calculate
The Total Amount for the whole journey will be displayed. Successful Saves the details in the database.
Save
22
Test No. 1.
Description
Test data
Outcome
Comments
Testing Buttons
Delete Order
Deletes that Successful particular order from the database. Message box appears which says ORDER CANCELLED. Then the form closes when OK is pressed. Message box appears which says ORDER STATUS UPDATED. Form closes when OK is pressed.
Change Status
Test No. 1.
Description
Test data
Outcome
Comments
Testing Buttons
Delete
Deletes the particular customer details from the database. Minor details of the customer will be changed.
Successful
Modify
24
25
customertype.Show() End Sub Private Sub ModifyOrderToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ModifyOrderToolStripMenuItem.Click searchorder.Show() End Sub Private Sub VehiclesToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles VehiclesToolStripMenuItem1.Click Vehicles.Show() End Sub Private Sub BillToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BillToolStripMenuItem.Click modifycustdetals.Show() End Sub Private Sub ToolStripMenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem2.Click Vehicles.Show() End Sub Private Sub ToolStripMenuItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem4.Click customertype.Show() End Sub Private Sub ToolStripMenuItem5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem5.Click searchorder.Show() End Sub Private Sub ToolStripMenuItem7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem7.Click modifycustdetals.Show() End Sub Private Sub EXITToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EXITToolStripMenuItem.Click Me.Close() End Sub Private Sub EXITToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EXITToolStripMenuItem1.Click Me.Close() End Sub Private Sub IncompleteVehicleReservationsToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles IncompleteVehicleReservationsToolStripMenuItem.Click uncompletedrentalsreport.Show() End Sub Private Sub TotalMonthlyIncomeToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles TotalMonthlyIncomeToolStripMenuItem.Click sumofrentals.Show() End Sub Private Sub CompleteVehicleReservationToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles CompleteVehicleReservationToolStripMenuItem.Click driverrentalreport.Show() End Sub End Class
26
PublicClassVehicles Dim i AsInteger Dim ds AsNewDataSet PrivateSubVehicles_Load(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) HandlesMyBase.Load con.Open() DimstrAsString str = "SELECT * from vehicle" da = NewSqlDataAdapter(str, con) da.Fill(ds, "Items") Ifds.Tables("Items").Rows.Count = 0 Then i = -1 Else i = 0 EndIf con.Close() navigation() EndSub Subnavigation() If i >= 0 Then txtvno.Text = ds.Tables("Items").Rows(i).Item(0) cmbvtyp.Text = ds.Tables("Items").Rows(i).Item(1) txtvdesc.Text = ds.Tables("Items").Rows(i).Item(2) txtdnm.Text = ds.Tables("Items").Rows(i).Item(3) txtdno.Text = ds.Tables("Items").Rows(i).Item(4) cmbstatus.Text = ds.Tables("Items").Rows(i).Item(5) Else txtvno.Clear() txtvdesc.Clear() txtdnm.Clear() txtdno.Clear() MsgBox("NO RECORDS TO SHOW") EndIf If i < 0 Then btndel.Enabled = False Else btndel.Enabled = True EndIf EndSub PrivateSubbtnnxt_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handlesbtnnxt.Click If i <>ds.Tables("Items").Rows.Count - 1 Then i = i + 1 navigation() EndIf EndSub PrivateSubbtnprev_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handlesbtnprev.Click If i > 0 Then i = i - 1 navigation() EndIf
27
EndSub PrivateSubbtnlast_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handlesbtnlast.Click If i <>ds.Tables("Items").Rows.Count - 1 Then i = ds.Tables("Items").Rows.Count - 1 navigation() EndIf EndSub PrivateSubbtnfirst_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handlesbtnfirst.Click If i > 0 Then i = 0 navigation() EndIf EndSub PrivateSubbtnadd_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handlesbtnadd.Click txtvno.Clear() txtvdesc.Clear() txtdnm.Clear() txtdno.Clear() EndSub PrivateSubbtnsav_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handlesbtnsav.Click DimstrAsString con.Open() str = "insert into vehicle(vehID,vehtype,vehdes,vehdriver,vehtel,vehstatus)values('"&txtvno.Te xt&"','"&cmbvtyp.Text&"','"&txtvdesc.Text&"','"&txtdnm.Text&"',"&txtdno.Tex t&",'"&cmbstatus.Text&"')" Dim com AsNewSqlCommand(str, con) com.ExecuteNonQuery() ds.Clear() str = "SELECT * from vehicle" da = NewSqlDataAdapter(str, con) da.Fill(ds, "Items") i = ds.Tables("Items").Rows.Count - 1 con.Close() navigation() EndSub PrivateSubbtnmod_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handlesbtnmod.Click DimstrAsString con.Open() str = "UPDATE vehicle set vehtype='"&cmbvtyp.Text&"',vehdriver='"&txtdnm.Text&"',vehtel="&txtdno.Text &",vehstatus='"&cmbstatus.Text&"' where vehID='"&txtvno.Text&"'" Dim com AsNewSqlCommand(str, con) com.ExecuteNonQuery() ds.Clear() str = "SELECT * from vehicle" da = NewSqlDataAdapter(str, con) da.Fill(ds, "Items") con.Close() i = i navigation()
28
EndSub PrivateSubbtndel_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handlesbtndel.Click DimstrAsString con.Open() str = "DELETE FROM vehicle WHERE vehID='"&txtvno.Text&"'" Dim com AsNewSqlCommand(str, con) com.ExecuteNonQuery() ds.Clear() str = "SELECT * from vehicle" da = NewSqlDataAdapter(str, con) da.Fill(ds, "Items") Ifds.Tables("Items").Rows.Count = 0 Then i = -1 EndIf con.Close() navigation() EndSub EndClass
29
End If If i < 0 Then btndel.Enabled = False Else btndel.Enabled = True End If End Sub Private Sub btnnxt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnnxt.Click If i <> ds.Tables("Items").Rows.Count - 1 Then i = i + 1 navigation() End If End Sub Private Sub btnprev_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnprev.Click If i > 0 Then i = i - 1 navigation() End If End Sub Private Sub btnlast_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnlast.Click If i <> ds.Tables("Items").Rows.Count - 1 Then i = ds.Tables("Items").Rows.Count - 1 navigation() End If End Sub Private Sub btnfirst_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnfirst.Click If i > 0 Then i = 0 navigation() End If End Sub Private Sub btnmod_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnmod.Click Dim str As String con.Open() str = "UPDATE customer set cusname='" & txtname.Text & "',cusadd='" & txtaddress.Text & "',cusnic='" & txtnic.Text & "',custel=" & txttel.Text & " where cusID='" & txtcusid.Text & "'" Dim com As New SqlCommand(str, con) com.ExecuteNonQuery() ds.Clear() str = "SELECT * from customer" da = New SqlDataAdapter(str, con) da.Fill(ds, "Items") con.Close() i = i navigation() End Sub Private Sub btndel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btndel.Click Dim str As String con.Open() str = "DELETE FROM customer WHERE cusID='" & txtcusid.Text & "'"
30
Dim com As New SqlCommand(str, con) com.ExecuteNonQuery() ds.Clear() str = "SELECT * from customer" da = New SqlDataAdapter(str, con) da.Fill(ds, "Items") If ds.Tables("Items").Rows.Count = 0 Then i = -1 End If con.Close() navigation() End Sub End Class
31
PrivateSubbtnplcordr_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handlesbtnplcordr.Click newcusid = txtcusID.Text Me.Hide() newOrder.Show() EndSub EndClass
32
com.ExecuteNonQuery() con.Close() MsgBox("ORDER CANCELLED") Me.Hide() EndSub PrivateSubbtnupdate_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handlesbtnupdate.Click DimstrAsString con.Open() str = "UPDATE rental set rentstatus='"&cmbstatus.Text&"' where rentID='"&txtorder.Text&"'" Dim com AsNewSqlCommand(str, con) com.ExecuteNonQuery() str = "UPDATE vehicle set vehstatus='Out' where vehId='"&modvehicleid&"'" Dim com2 AsNewSqlCommand(str, con) com2.ExecuteNonQuery() con.Close() MsgBox("ORDER STATUS UPDATED") Me.Hide() EndSub PrivateSubchangeorderstatus_Load(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) HandlesMyBase.Load txtorder.Text = modorderid EndSub EndClass
33
PrivateSubbtncalc_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handlesbtncalc.Click Ifcmbpt.Text = "Colombo Ride"Then colomboride() EndIf Ifcmbpt.Text = "Long Distance Hire"Then longdistance() EndIf Ifcmbpt.Text = "Air Port Drop/Pick"Then airport() EndIf Ifcmbpt.Text = "One Day Hire"Then oneday() EndIf Ifcmbpt.Text = "Two Day Hire"Then twoday() EndIf Ifcmbpt.Text = "Thre Day Hire"Then threeday() EndIf EndSub Subcolomboride() Ifcmbjt.Text = "One way"Then txtwait.Text = 0 txtnytout.Text = 0 txtwait.Enabled = False txtnytout.Enabled = False Iftxtvt.Text = "Car"Then total = CInt(txtdist.Text) * 68 EndIf Iftxtvt.Text = "Van"Then total = CInt(txtdist.Text) * 50 EndIf ElseIfcmbjt.Text = "Return"Then waiting = CInt(txtwait.Text) - 0.5 total = waiting * 50 Iftxtvt.Text = "Car"Then total = total + CInt(txtdist.Text) * 60 EndIf Iftxtvt.Text = "Van"Then total = total + CInt(txtdist.Text) * 45 EndIf EndIf txttot.Text = total EndSub Sublongdistance() Ifcmbjt.Text = "One way"Then Iftxtdist.Text<= 100 Then waiting = CInt(txtwait.Text) - 0.5 total = waiting * 40 Iftxtvt.Text = "Car"Then total = total + CInt(txtdist.Text) * 62 EndIf Iftxtvt.Text = "Van"Then total = total + CInt(txtdist.Text) * 50 EndIf ElseIftxtdist.Text> 100 Then waiting = CInt(txtwait.Text) - 0.5 total = waiting * 30 Iftxtvt.Text = "Car"Then
34
total = total + CInt(txtdist.Text) * EndIf Iftxtvt.Text = "Van"Then total = total + CInt(txtdist.Text) * EndIf EndIf ElseIfcmbjt.Text = "Return"Then Iftxtdist.Text<= 100 Then waiting = CInt(txtwait.Text) - 1 total = waiting * 40 Iftxtvt.Text = "Car"Then total = total + CInt(txtdist.Text) * EndIf Iftxtvt.Text = "Van"Then total = total + CInt(txtdist.Text) * EndIf ElseIftxtdist.Text> 100 Then waiting = CInt(txtwait.Text) - 1 total = waiting * 30 Iftxtvt.Text = "Car"Then total = total + CInt(txtdist.Text) * EndIf Iftxtvt.Text = "Van"Then total = total + CInt(txtdist.Text) * EndIf EndIf EndIf Iftxtnytout.Text> 0 Then total = total + CInt(txtnytout.Text) EndIf txttot.Text = total EndSub Subairport() txtwait.Text = 0 txtnytout.Text = 0 txtdist.Text = 0 txtwait.Enabled = False txtnytout.Enabled = False txtdist.Enabled = False Iftxtvt.Text = "Car"Then total = 1900 EndIf Iftxtvt.Text = "Van"Then total = 1500 EndIf txttot.Text = total EndSub Suboneday() txtwait.Text = 0 txtnytout.Text = 0 txtdist.Text = 0 txtwait.Enabled = False txtnytout.Enabled = False txtdist.Enabled = False Iftxtvt.Text = "Car"Then total = 4500 EndIf Iftxtvt.Text = "Van"Then total = 5200 EndIf txttot.Text = total EndSub
48
42
50
38
38
30
* 500
35
Subtwoday() txtwait.Text = 0 txtnytout.Text = 0 txtdist.Text = 0 txtwait.Enabled = False txtnytout.Enabled = False txtdist.Enabled = False Iftxtvt.Text = "Car"Then total = 9500 EndIf Iftxtvt.Text = "Van"Then total = 12000 EndIf txttot.Text = total EndSub Subthreeday() txtwait.Text = 0 txtnytout.Text = 0 txtdist.Text = 0 txtwait.Enabled = False txtnytout.Enabled = False txtdist.Enabled = False Iftxtvt.Text = "Car"Then total = 15000 EndIf Iftxtvt.Text = "Van"Then total = 18000 EndIf txttot.Text = total EndSub PrivateSubbtnsav_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handlesbtnsav.Click DimstrAsString con.Open() str = "UPDATE rental set rentdistance='"&txtdist.Text&"', rentwaiting='"&txtwait.Text&"', rentnight='"&txtnytout.Text&"',renttotal='"&txttot.Text&"', rentstatus='"&txtstatus.Text&"' where rentID='"&txtrID.Text&"'" Dim com AsNewSqlCommand(str, con) com.ExecuteNonQuery() str = "UPDATE vehicle set vehstatus='In' where vehId='"&txtvehID.Text&"'" Dim com2 AsNewSqlCommand(str, con) com2.ExecuteNonQuery() con.Close() MsgBox("ORDER STATUS UPDATED") Me.Hide() EndSub EndClass
36
Next Dim i AsInteger For i = 0 To 59 cmbmins.Items.Add(i) Next Dim b AsInteger For b = 1 To 31 cmbdate.Items.Add(b) Next DimyrAsInteger Foryr = 2011 To 2020 cmbyr.Items.Add(yr) Next txtcID.Text = newcusid EndSub PrivateSubbtnsav_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handlesbtnsav.Click DimstrAsString DimstarttimeAsString DimstartdateAsString Dim ds AsNewDataSet startdate = cmbdate.Text&"-"&cmbmon.Text&"-"&cmbyr.Text starttime = cmbhr.Text&":"&cmbmins.Text con.Open() Iftxtnopasngrs.Text> 4 Then cmbvt.Text = "Van" EndIf Ifcmbpt.TextIs"Air Port Drop/Pick"Andtxtnopasngrs.Text> 3 Then cmbvt.Text = "Van" EndIf str = "insert into rental(rentID,cusID,vehID,rentpass,renttype,rentpack,rentstart,rentdate,ren ttime,rentdestination,rentdistance,rentwaiting,rentnight,renttotal,rentstat us)values('"&txtrID.Text&"','"&txtcID.Text&"','temp','"&txtnopasngrs.Text&" ','"&cmbjt.Text&"','"&cmbpt.Text&"','"&txtstartloc.Text&"','"&startdate&"', '"&starttime&"','"&txtdest.Text&"',0,0,0,0,'"&cmbstatus.Text&"')" Dim com AsNewSqlCommand(str, con) com.ExecuteNonQuery() ds.Clear() str = "SELECT * from rental" da = NewSqlDataAdapter(str, con) da.Fill(ds, "Items") con.Close() customerid = txtcID.Text orderid = txtrID.Text vehicletype = cmbvt.Text EndSub PrivateSubbtnaddveh_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handlesbtnaddveh.Click Me.Hide() addvehicle.Show() EndSub EndClass
37
PrivateSubbtnsearch_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handlesbtnsearch.Click con.Open() DimstrAsString Dim ds AsNewDataSet ds.Clear() str = "SELECT * from rental where vehID = '"&txtvehid.Text&"' and rentstatus != 'completed'" da = NewSqlDataAdapter(str, con) da.Fill(ds, "Items") con.Close() dgorders.DataSource = ds.Tables("Items") EndSub PrivateSubbtnmod_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handlesbtnmod.Click modorderid = txtorder.Text modvehicleid = txtvehid.Text Me.Hide() modifyorder.Show() EndSub PrivateSubbtnchn_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handlesbtnchn.Click modorderid = txtorder.Text modvehicleid = txtvehid.Text Me.Hide() changeorderstatus.Show() EndSub EndClass
38
Dim cmd As SqlCommand Dim vehicleid As String vehicleid = InputBox("Enter the Vehicle ID", "Enter the Vehicle ID") Dim str As String = "Select * from rental where vehID like'" & vehicleid & "'" cmd = New SqlCommand(str, con) Dim adapter As SqlDataAdapter adapter = New SqlDataAdapter(cmd) ds = New DataSet adapter.Fill(ds, "Orders") Dim rpt1 As New driverrentals()
39
Dim ds As New DataSet Dim da As SqlDataAdapter Private Sub CrystalReportViewer1_Load(sender As System.Object, e As System.EventArgs) Handles CrystalReportViewer1.Load Dim cmd As SqlCommand Dim month As String month = InputBox("Enter the Month", "Enter the Month") Dim str As String = "Select * from rental where rentdate like'%" & month & "%'" cmd = New SqlCommand(str, con) Dim adapter As SqlDataAdapter adapter = New SqlDataAdapter(cmd) ds = New DataSet adapter.Fill(ds, "Orders") Dim rpt1 As New monthlytotal()
40
41
8.0 LIMITATIONS
The system that we developed had several drawbacks that though we attempted to do were unable to accomplish. They are given below: We do not have a way to create a new user and a password through the main system. The system will refuse to run on older versions of Microsoft SQL and Microsoft Visual Studio. If the database location or the name is changed the code in the forms will have to be changed or else the system will not work. For system correction if any arises at a later date will need a trained professional. If a new type of vehicle is required to be added the code will have to be changed in the forms manually. Apart from the above mentioned errors the system works smoothly and effectively. It meets all the requirements that the user has specified and is completed on time.
42
43
10.0 CONCLUSION
During the process of developing this system the team worked as one to make the maximum of the time frame that was available. The system was created to be user friendly and also to help the user of the system to reduce the amount of paperwork that will go into the system. The success of the system was achieved by the team working together. The development of this system helped all of us gain greater knowledge into SQL Server functions and Visual Basic.Net. The development of the system went beyond the limits of the course syllabus and thus providing all of us with an even greater amount of knowledge into the system. The functionality of the team throughout the development and design of the program was exceptional and all the members gave their fullest support and contribution towards it. We were able to fully apply the knowledge that we had gained during our lectures towards this program and this assignment gave us an opportunity to practically apply the knowledge that we had learnt. One of the problems that we faced during the development of the system was that the software that was the system was built in was of a newer version than the software available to us in the APIIT computer laboratories. We also face problems with the coding segment of the system. We overcame these problems and these problems did not hinder the development of the project seriously or delay us and cause us to go over the allocated time frame for developing the system. The system was developed tested and ready to be handed over with plenty of time left for debugging the program and to make any last minute changes if the need arose.
44
APPENDICES
1.0 MEETING MINUTES 1.1 1st MEETING
Date Time of Commencement Time of Conclusion Venue Members Present :Tuesday 29th March 2011 :04.50 pm :05.20 pm :APIIT, Union Place, 6th Floor Cafeteria :Ahamed Nishadh Deshan Ilangakoon Tiffaniya Fernando Taiyaba Ahmed Agenda: Identifying current system problems and requirements Maintaining meeting minutes and records
Minutes The main task that the group had to undertake was to identify the requirements of the existing system the current problems and what changes can be made to eliminate these problems. The meeting commenced with the Ahamed going over the assignment with the group and asking for their opinion on what the problems that the company was facing and how the group should go about developing the system in order to overcome the problems that they are facing. Problems such as the heavy work load caused by the burden of large amounts of paperwork was the main problem that got highlighted and it was decided by the group that this should be the area we focus most of our attention on.
45
After this the group discussed who should take on the task of maintaining the meeting minutes for the group and Deshan was assigned the task as he had done this previously on for other projects. Finally the meeting was adjourned until the 7th of April 2011.
. Group Leader
. Lecturer
46
Minutes The purpose of this meeting is to determine how the new system should operate and what it should contain in order to be most effective. The team talked on what the system should look like and what is needed to be inside the system. During this discussion all the members gave in their ideas on how best to go about the designing of the system and the important and best points Ahamed said would be adopted into the system. also the task of developing the flow charts was given over to Tiffaniya. The meeting after that was adjourned until the 16th of April 2011.
. Group Leader
. Lecturer
47
Minutes The meeting started off by going over the flow charts that Tiffaniya had completed. The flow charts were accepted to be fine and were then used as a guide in building the system. After this the main segment for the meeting commenced, the designing of the main system for the user. The team worked on the designing of the forms and the coding segment for the form. This work took up the rest of the time of the group until finally the meeting was adjourned till the 30th of April 2011 when the testing stage would commence.
. Group Leader
. Lecturer
48
Minutes The group meeting commenced with the team going over the now complete program. The main objective of the meeting was to run tests on the system to see if the system operated as needed and without any glitches. The system was put through rigorous testing and the results of these tests were monitored and recorded. After this the group were each allocated segments of the documentation to complete and the meeting was adjourned until the 5th of May when the documentation would be completed.
. Group Leader
. Lecturer
49
Minutes The main purpose of this meeting was to compile the document for this assignment and to make a final check on the system. After this Ahamed thanked the group for the work put in and the meeting was adjourned.
. Group Leader
. Lecturer
50
51
I, hereby agree that the above members have undertaken the above tasks and their work is reflective of what has written above.
52
4.0 BIBLIOGRAPHY
Microsoft TechNet, 2010. Hardware and Software Requirements for Installing SQL Server 2008. [Online] Available at: http://technet.microsoft.com/enus/library/ms143506(SQL.100).aspx [Accessed 2011].
53