NEAR EAST UNIVERSITY
FACULTY OF ENGINEERING
DEPARTMENT OF COMPUTER ENGINERING
COM400
GRADUATION PROJECT
" HOTEL RESERVATION "
USING VISUAL- BASIC 6.0
STUDENT: UGUR ÇİGDEM
NO: 980317
SUPERVISOR: Ms. BESİME ERİN
--~~ !Jı'i("C:) I ı$'~)
tr
.,L. <1:.. 1?,. fı-\'-'{ . Ul \..\lo"I,,
. c,"'f TABLE OF CONTENTS... ··· '~ 1TABLE OF CONTENTS
ACKNOWLEDGEMENT 2 ABSTRACT 3 1. INTRODUCTION 4 2. MAIN MENU 6 3. CUSTOMER INFORMATION 12 4. ROOM INFORMATION 23 5. PERSONNEL INFORMATION 29 6. HOTEL INFORMATION 316.1
STAYS OF CUSTOMERS AT HOTEL.
347. BALANCES 37
8. REPORT'S 42
8. 1
CUSTOMER REPORTS
438.2 CASH REPORT
47ACKNOWLEDGEMENT
Firstly I would like to thank my dear parents who helped me until
this moment.
Secondly I
would
like
to special thanks to my advisor Mr.
Tayseer Al-shanabeleh for his advises and helping.
Thirdly I would like to thanks to all my instructor and all my
friends.
Expecially I want to thanks to my supervisor who is Ms.Besime
Erin for her infinite helpness while I was prepearing this project and
her kinds.
--- ---
---=c=----==-ABSTRACT
As the information age has effected every aspect of our life, the need for
computerizing many information systems has raised.
Once of the important branches that are effected by information revolution
is the computer programming languages.
This project
is concerned about using compueter program in hotel
management system . It is written using Visual Basic 6.0 programming language
and used Microsoft Access Database language for databases. Visual Basic is one
of the best and easy programming languages.
This project is accomlete
hotal management program, that covers all
services needed in most hotels, such as computer related information, rooms,
personnels, goods and many other hotel management related services.
Before coming to this point, this project has gone through some important
steps;
•
First one was the requirements definition for which I had to go
to some hotels and study their systems.
•
The second steps were designing the system and sofware that is
intended to serve an integrated hotel management system.
•
The final steps was the implementation of the design on the
computer using Visual Basic Language.
-~
---====----=--~~---
..
1. INTRODUCTION
Visual Basic is a Microsoft Windows programming Language. Visual
Basic programs are created in an Integrated Development Environment (IDE) .
The IDE allows the programmer to create , run and debug Visual Basic programs conveniently. IDEs allow a programmer to create working programs in a fraction of the time that it would normally take to code programs without using IDEs. The
process of rapidly creating an application is typically referred to as Rapid
Application Development(RAD). Visual Basic is the world's most widely used
RAD language.
Visual Basic is derived from the BASIC programming language. Visual
Basic is a distinctly different language providing powerfull features such as
graphical user interfaces, even handling, access to the Win32 API, object-oriented features, error handling, structured programming, and much more.
The Visual Basic IDE allows Windows programs to be created without the need for the programmer to be a Windows programming export.
Microsoft provides several version of Visual Basic, namely the Learning
Edition , the Professional Edition and the Enterprice Edition. The Learning
Edition provides fundemantal programming capabilities than the Learning Edition and is the choice of many programmers to write Visual Basic applications. The
Enterprice Edition is used for developing large-scale computing systems that
meet the needs of substandial organizations.
Visual Basic is an interpreted language. However , the professional and
Enterprice Edition allows Visual Basic code to be compiled to native code.
Visual Basic evolved from BASIC(Beginner's All purpose Symbolic
Instruction Code). Basic was developed in the mid 1960' s by Professors John
Kemeny and Thomas Kurtz of Darthmouth College as a language for writing
simple programs. BASIC's primary purpose was to help people learn how to
The widespread use of BASIC with various types of computers
sometimes called hardware platforms ) led to many enhancements to the
guage. With the development of the Microsoft windows graphical user
- terface (GUI) in the late 1980s and the early 1990s, the natural evolution of BASIC was Visual Basic, which was created by Microsoft Corporation in 1991.
Until Visual Basic appeared, develoing Microsoft Windows-based
applications was a diffucult and cumbersome process. Visual Basic greatly
simplifies Windows application development. Since 1991 six versions have been released, with the latest-Visual Basic 6-appearing in september 1998.
After a brief explanation about the Visual Basic 6.0 and the
developing layers, I hope that you will find the necessary information that you
2. MAINMENU
This is the main menu of the program. There is also some sub menus on
e top of the main menu. From the main menu we can go sub programs by using
·
sub menus. There are also some buttons. They are used to go to the sub
rograrns. They are providing facilities for users of the program. We can see all
b programs on the main menu.
Reservation button is used to go reservation part of the program. In the
part we enter customer reservation information.
Room information button is used to go to room part. Here we make room
reservation for customer .
Hotel information button is used to show information such as number of
room and floor of hotel about the hotel.
Personnel information button is used to keep information about the hotel
personnel.
Private Sub Command 1 _Click()
ReservationRecord.Show 1
End Sub
Private Sub Command2_Click()
odaşifresi.Show 1
End Sub
Private Sub Command3 _ Click()
PersonnelRecord.Show 1
End Sub
Private Sub Command4_Click()
CustomersThatStaysAtHotel.Show 1
End Sub
Private Sub Commands_ Click() Unload Me
End Sub
Private Sub Command6 _Click() End
End Sub
Private Sub Command7 _Click()
Hotellnformation.Show 1
End Sub
Private Sub Command8 _Click()
frmHotellnformation.Show 1
End Sub
Private Sub m123_Click()
CustomerSearch.Show 1
Private Sub n2 _Click()
CustomersThatStaysAtHotel. Show 1
End Sub
Private Sub n21 _ Click()
Stays_At_Hotel.Show 1
End Sub
Private Sub n22 _Click()
CustomersThatStaysAtHotel.Show 1
End Sub
Private Sub n24_ Click()
RecordOfRoom.Show 1
End Sub
Private Sub n25 _Click()
SearchRoom.Show 1
End Sub
Private Sub n28 _Click() Show
Print "paperbin"; Printer.Paper Bin Print "colormode"; Printer.ColorMode Print "copies"; Printer.Copies
End Sub
Private Sub n3 _Click() Unload Me
End Sub
Private Sub n3 8_Click()
Hotellnformation.Show 1
ub n39 Click()
Selectionllotel.Show 1
e Sub n4 Click()
·ationRecord.Show 1
ub
· ·ate Sub n42 Click()
PersonnelPassword.Show 1
End Sub
Private Sub n43 Click()
PersonnelControl.Show Me
End Sub
Private Sub n46 Click() Dimx
x
=
Shell("notepad", 2)End Sub
Private Sub n4 7_ Click() Dimx
x = Shell("calc.exe", 2)
End Sub
Private Sub n5 Click()
PersonnelProcess.Show 1
End Sub
Private Sub n6 _Click()
GeneralCustomerProcess.Show 1
~-
~~~-· ate Sub n8_Click()
Custornerl'rocesskeport.Show
1End Sub
Private Sub n9_Click()
PersonnelProcessReport.Show
1End Sub
Private Sub r2_Click()
ReservationRecord.Show
1•..
3. CUSTOMER INFORMATION
This is the customer reservation form of the program. We can enter new
customer information or delete customer information by using this form. On the
Customer Information form there are five section. First section is used for enter
the general customer information such as customer name, customer surname, and
customer code etc. On the second section there are detail information part about
the customers which are stays at hotel. In the section we enter detail information
about the customers such as customer job, email address.-and customer firm name so on . On the third section there are population information about the customers such as customer marital status, religion, blood type, country etc . On the fourth
section there are reservation information about the customers such as room no,
room type room cost, and customer no etc. Here we can make room reservation
for customers. On the final section there are payment information about the
customers such as customer account receivable, account payable, balance, and
due date etc. In the section we accept customer payment and record payment
information.
Private Sub Command 1 _Click() Genlnf.Show 1
End Sub
Private Sub Command2 _Click()
CustomerList.Show 1
End Sub
Private Sub Command22 _Click()
OdaArama.Show 1
End Sub
Private Sub Command3 _Click() Unload Me
End Sub
Private Sub Command4_Click()
If Command52.Value = False Then
MsgBox (" it is not possible") Else
Datal .Recordset.Update Data2 .Record set.Update Data3 .Recordset.Update Data4 .Recordset. Update · Data5 .Recordset. Update Data6.Recordset.Update End If
End Sub
Private Sub Command40 _Click() Data6.Recordset.MoveFirst
Private Sub Command4 l _Click() Data6 .Recordset.MovePrevious End Sub
Private Sub Command42 Click()
Data6 .Recordset.MoveN ext End Sub
Private Sub Command43 _Click() Data6 .Recordset.MoveLast
End Sub
Private Sub Command44 _Click()
Text42.Text =
Val(Text43.Text) - Val(Text44.Text)
Data6.Recordset.AddNew
End Sub
Private Sub Command45_Click()
Data6.Recordset.Delete
End Sub
Private Sub Command46_Click()
Data6.Recordset.Cancel
End Sub
Private Sub Command47_Click()
Unload Me
End Sub
Private_ Sub Command48_Click()
With Datal .Recordset
If .BOF
=
True Or Data2.Recordset.BOF
=
True Or Data3.Recordset.BOF
=
True
Or Data4.Recordset.BOF
=
True Or Data5.Recordset.BOF
=
True Or
Data6.Recordset.BOF
=True Then
MsgBox ("you are at first record")
Else
Data2.Recordset.MoveFirst Data3 .Recordset.MoveFirst Data4.Recordset.MoveFirst Data5 .Recordset.MoveFirst Data6.Recordset.MoveFirst End
If
End With End SubPrivate Sub Command49 _Click() With Datal .Recordset
If
.BOF=
True Or Data2.Recordset.B0F=
True Or Data3.Recordset.B0F=
TrueOr Data4.Recordset.B0F
=
True Or Data5.Recordset.B0F=
True OrData6.Recordset.B0F
=
True ThenMsgBox ("you are at first record") Else Data l .Recordset.MovePrevious Data2.Recordset.MovePrevious Data3 .Recordset.MovePrevious Data4.Recordset.MovePrevious Data5 .Recordset.MovePrevious Data6.Recordset.MovePrevious End
If
End With End SubPrivate Sub Crmımandô ; Click() Data6.Recordset. Update
Text42.Text
=
Val(Text43.Text) - Val(Text44.Text)End Sub
If (Datal .Recordset.EOF) Or (Data2.Recordset.EOF) Or (Data3 .Recordset.EOF)
Or (Data4.Recordset.EOF) Or (Data5.Recordset.EOF) Or (Data6.Recordset.EOF)
Then
MsgBox ("You are at last record.") Datal .Refresh
Data6 .Refresh Else
Data l .Recordset.MoveN ext Data2.Recordset.MoveNext Data3 .Recordset.MoveN ext Data4 .Recordset.MoveN ext Data5 .Recordset.MoveN ext Data6 .Recordset.MoveN ext End If
End Sub
Private Sub Command5 l _Click()
If (Datal .Recordset.EOF) Or (Data2.Recordset.EOF) Or (Data3.Recordset.EOF)
Or (Data4.Recordset.EOF) Or (Data5.Recordset.EOF) Or (Data6.Recordset.EOF)
Then
MsgBox ("You are at last record.") Datal .Refresh Data6.Refresh Else Datal .Recordset.MoveLast Data2.Recordset.MoveLast Data3 .Recordset.MoveLast Data4. Recordset.MoveLast Data5 .Recordset.MoveLast Data6 .Recordset.MoveLast End If End Sub
Private Sub Command52_Click() Datal .Recordset.AddNew
Data2 .Recordset.AddN ew Data3 .Recordset.AddN ew Data4 .Records"et.AddN ew Data5 .Recordset.AddN ew Data6 .Recordset.AddN ew End Sub
Private Sub Command53 _Click()
If Datal.Recordset.Fields("adı") = Textl.Text =""Then
Datal .Recordset.Delete Data2.Recordset.Delete Data3 .Recordset.Delete Data4.Recordset.Delete Data5 .Recordset.Delete Data6 .Recordset.Delete Else
MsgBox ("Enter name which you want to delete that record ") Textl .SetFocus
End If End Sub
Private Sub Command54 _Click() Datal .Recordset.MoveFirst Data2.Recordset.MoveFirst Data3 .Recordset.MoveFirst End Sub
Private Sub Command6 _Click() If Datal .Recordset.EOF Then MsgBox ("You are at last record.")
Adodc l .Refresh Else
Datal .Recordset.MoveNext If Textl =""Then
Command 13 .Enabled = True Else
Commandl3.Enabled = False
End If End Sub
Private Sub Command?_ Click() Adodc l .Recordset.MoveLast If Textl2 =""Then
Command 13 .Enabled = True Else
Commandl3.Enabled = False
End If End Sub
Private Sub Command8 _Click() Datal .Recordset.AddNew Data2 .Recordset.AddN ew Data3 .Recordset.AddN ew End Sub
Private Sub Command9 _Click() If Textl2 =""Then
MsgBox ("Select delete record.") Else
Adodc l .Recordset.Delete Command9 .Enabled = False End If
End Sub
Private Sub Form_Load()
Text42.Text = Val(Text43.Text) - Val(Text44.Text)
Text42.Refresh
MaskEdBox2.Text
=
Time$() Combo 1 .Addltem "male" Combo 1 .Addltem "female"Combo2.Addltem "Identity card"
Combo2.Addltem "driving licence"
Combo2.Addltem "passport"
Combo2.Addltem "Student Identity Card"
Combo2.Addltem "Marriage Card"
Combo4.Addltem "single" Combo4.Addltem "marriage" Combo5.Addltem "O Rh+" Combo5.Addltem "O Rh-" Combo5.Addltem "A Rh+" Combo5.Addltem "A Rh-" Combo5.Addltem "B Rh+" Combo5.Addltem "B Rh-"
Combo5 .Addltem "AB Rh+"
Combo5.Addltem "AB Rh-"
Combo6.Addltem "because of first get"
Combo6.Addltem "because of lost"
Combo6.Addltem "to renew"
Combo8.Addltem "General expences"
Combo8.Addltem "Drinks"
Combo8.Addltem "Food"
Combo8.Addltem "Room Cost"
Combo8 .Addltem "electricity"
Combo8.Addltem "telephone"
Combo9.Addltem "bill"
Combo9.Addltem "Cash"
Combo9.Addltem "cheque"
Combo9.Addltem "receipt"
Combo9.Addltem "Credit Card"
Label66
=
Val(Label62.Caption) - Val(Label64.Caption)Private Sub Form_Unload(Cancel As Integer) Dimi
i
=
o
While Data6.Recordset.EOF
=False
i
=i
+
Data6.Recordset.fields("accreceivable")
Data6.Recordset.MoveNext
Wend
Label62
=
i
End Sub
Private Sub Label22_Click()
Label22.Caption
=
Time
End Sub
Private Sub Label62 Click()
Dimi
i =
o
While Data6.Recordset.EOF
=
False
i
=
i
+
Data6.Recordset.Fields("accreceivable")
Data6.Recordset.MoveNext
Wend
Label62
=i
Private Sub Text43 _Change()
Text42.Text = Val(Text43.Text) - Val(Text44.Text)
End Sub
Private Sub Text44_Change()
Text42.Text = Val(Text43.Text) - Val(Text44.Text)
End Sub
Private Sub Label64 Click() Dimi
i=
o
While Data6.Recordset.EOF = False
i = i
+
Data6.Recordset.Fields("accpayable")
Data6.Recordset.MoveNext
Wend
Label64 = i
End Sub
Private Sub Label67_Click()
If Val(Label66.Caption)
>O Then
Label67.Caption= "receivable"
Else
Label67.Caption= "payable"
End If
End Sub
4. ROOM INFORMATION
This is the room information form of the program. We can enter new room
and we can make room reservation by using this form. There are five section on
this form we make room process on
form. On the first part there are general
information about the rooms such as room no, room cost, weight, floor no, and
telephone no etc. on the second part there are clear situation information about
the room such as the room is clear or dirty or repair etc. on the third section there
are room reservation information such as room no, date of reservation, date of
customer leaved etc. on the forth part there are only note section which we can
enter special note about the customers. The final section there are use situation
information about the room such as room is full or empty.
)mmand l _Click() ;!cordset
True Or Data2.Recordset.B0f-True Or Data3.Recordset.B0F
-a4.Recordset.BOF =
True Then
'you are at first record")
:cordset.MovePrevious
;!cordset.MovePrevious
ecordset.MovePrevious
"ecordset.MovePrevious
lb Command11 _Click()
ıl .Recordset.EOF) Or (Data2.Recordset.EOF) Or
~cordset.EOF) Or (Data4.Recordset.EOF) Then
\Box ("You are at last record.")
al.Refresh
al .Recordset.MoveNext
:a2 .Recordset.MoveNext
ta3 .Recordset.MoveNext
.ta4.Recordset.MoveNext
f
.ıb
_e Sub Commandl2_ Click()
f
(Datal .Recordset.EOF) Or (Data2.Recordset.EOF) Or
t3.Recordset.EOF) Or (Data4.Recordset.EOF) Then
MsgBox ("You are at last record.")
Datal .Refresh
Datal .Recordset.MoveLast
24
)ata2.Recordset.MoveLast )ata3 .Recordset.MoveLast )ata4.Recordset.MoveLast Sub Command13_Click() , .Recordset.AddNew ~. Recordset.AddN ew , .Recordset.AddN ew
ı
.Recordset.AddN ew b Sub Command14_Click()xtl
=""Then;gBox ("Önce silinecek kaydı seçiniz.")
ıtal .Recordset.Delete ıta? .Recordset.Delete ' ıta3 .Recordset.Delete ıta4 .Recordset.Delete f
ub
e Sub Commandl 5_Click() ıtal .Recordset.MoveFirst ıta2.Recordset.MoveFirst ıta3 .Recordset.MoveFirst ata4.Recordset.MoveFirst
hıb
te Sub Command16_Click() Joad Me ,ubPrivate Sub Commandl 7_Click() Datal .Recordset.Update Data2.Recordset.Update Data3 .Recordset. Update Data4 .Recordset. Update End Sub
Private Sub Form_Load() Combo l .Addltem "TL"
Combol.Addltem "$"
Combo 1.Addltem "MARK"
Combol.Addltem "uro" Combo2.Addltem "1" Combo2.Addltem "2" Combo3 .Addltem "1" Combo3 .Addltem "2" Combo4.Addltem "1" Combo4.Addltem "2" Combo4.Addltem "3" Combo5.Addltem "South" Combo5.Addltem "North"
Combo5 .Addltem "East"
Combo5.Addltem "West" Combo5.Addltem "WithBalcon" Combo5.Addltem "SideOfCity" Combo6.Addltem "1" Combo6.Addltem "2" End Sub
Private Sub Ilkkayıt_ Click() With Datal .Recordset
If .BOF = True Or Data2.Recordset.B0F =True Or Data3.Recordset.BOF =
True Or Data4.Recordset.BOF
=
True ThenMsgBox ("you are at first record") Else
Datal .Recordset.MoveFirst Data2 .Recordset.MoveF irst Data3 .Recordset.MoveFirst Data4.Recordset.MoveFirst End If
End With End Sub
Private Sub Optioril _Click()
If Optionl.Value
=
True ThenData2.Recordset.AddNew
Data2.Recordset.Fields("clearly")
=
"clear"End If End Sub
Private Sub Commandlü_Click() Unload Me
End Sub
Private Sub Commandl l_Click() Datal .Recordset.Update
End Sub
Private Sub Command2 _Click() Datal .Recordset.MoveFirst End Sub
Private Sub Command3 _Click() If Data l .Recordset.BO F Then MsgBox ("First Record") Datal .Refresh
Else
Datal .Recordset.MovePrevious End If
lb
Command4_Click()
lecordset.EOF Then
("Last Record")
fresh
ecordset.MoveNext
)Sub Commands_ Click()
Recordset.MoveLast
Jbe Sub Command6_Click()
.Recordset.AddNew
,ub
28
5. PERSONNEL INFORMATION
This is the personnel information form of the program. We can enter new
ıel or remove personnel
byusing this form.
, Command
1 O_
Click()b Command
11 _
Click():ordset.Update
ub Command2 Click()
:cordset.MoveFirst
,ub Command3 _Click() .Recordset.BOF Then : ("İlk kayıttasınız.") .efresh
tecordset.MovePrevious
Lb
: Sub Command4 _Click()
ıl .Recordset.EOF Then
ox ("En son kayıttasınız.") .Refresh
, .Recordset.MoveNext
J
Sub
ıte Sub Commands_ Click()
.ı
.Recordset.MoveLastSub
ate Sub Command6 _Click() al .Recordset.AddNew I Sub
6. HOTEL INFORMATION
This is the hotel information form of the program. We can enter find
information about the hotel by using this form.
ivate Sub CommandlO Click()
Data l .Recordset.Update
End Sub
Private Sub Commandl Click()
Datal .Recordset.MoveFirst
Textl .SetFocus
End Sub
Private Sub Command
11 _Click()
HotelReport.Show
1End Sub
Private Sub Command2 Click()
If Datal .Recordset.BOF Then
MsgBox ("İlk kayıttasınız.")
Datal .Refresh
Else
Data l .Recordset.MovePrevious
End If
End Sub
Private Sub Command3 Click()
If Datal .Recordset.EOF Then
MsgBox ("En son kayıttasınız.")
Datal .Refresh
Else
Datal .Recordset.MoveNext
End If
End Sub
Private Sub Command4 Click()
Datal .Recordset.MoveLast
End Sub
Private Sub Command5 _Click() Datal .Recordset.AddNew End Sub
Private Sub Command6 _Click() If Textl =""Then
,.
MsgBox ("Önce silinecek kaydı seçiniz.")
Else
Datal .Recordset.Delete
End If
End Sub
Private Sub Command9_Click()
Unload Me
End Sub
Private Sub Form_Load()
Combo 1 .Addltem "1"
Combo 1 .Addltem "2"
Combo2.Addltem "1"
Combo2.Addltem "2"
End Sub
6.1
STAYS OF CUSTOMERS AT HOTEL
This is the data form of the program. We can see all customers that they
are staying at the hotel.
vate Sub Commandl_Click() stReport.Show 1
j
Sub
vate Sub Command+_Click()
load Me
d Sub
vate
Sub
Command5_ Click()
:HFlexGridl .Clear
.h Adodc2
,nnectionString = "Provider=Microsoft.Jet.OLEDB.3 .51 ;Persist Security
o=False;Data Source=C:\graduationproj\otel\db labc.mdb"
)mmandType = adCmdText
!cordSource ="select*
from staysAtHotel where name like
111
&
Textl.Text
111
or surname like
111 &
Text2.Text
&111
or RoomNo like
111
&
Combol.Text
&or dateoffixit between#"
&DTPicker3.Value
&"# And #"
&fPicker4.Value
&"# or dateofCome between#"
&DTPickerl.Value
&"#
nd #"
&DTPicker2.Value
&"#"
.efresh
nd With
et MSHFlexGridl.DataSource = Adodc2
.xitSub
\nd Sub
>rivateSub Command6_Click()
)imi, j
With Adodcl
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51 ;Persist Security
Info=False;Data Source=C:\graduation proje\otel\dblabc.mdb"
.CommandType = adCmdText
.RecordSource = " select *- from StaysAtHotel"
End With
Set .DataSource = Adodcl
While Adodc l .EOF Action= adStayEOF
MSHFlexGrid 1. Cols("") = Ad ode 1. ConnectionString Adodcl .Recordset.MoveNext
Wend End With
End Sub
7. BALANCES
In this part I prepared customer balances and personnel balances. In the Iances there are three section.
First section is search criteria. Here we can search customers and :rsonnel that we want to find it. We search customers by use the cust_ no ust_name, balance, and balance type. We search personnel by use the person
ode,
person name, and , personnel balance.Second section is sort criteria section .we sort customers by name, umame, and balance.
In the final section there is a table which we can see all balance nformation about the customers and personels.
On the balance form there is a button that we can print out our customers oalance information or our personel balance information.
Dose
____..
--:Receivable ~ rwer 4000000 ıytyt 3000000 eıywe fıfdıo 6000000 nakit 80000007.1 PERSONNEL BALANCE
This is the personnel balance part of the program. We can find balances
ersonnelby using this form. We can search or sort any personnel .
7 .2 CUSTOMER BALACES
'his is the customer balance part of the program. We can find balances
rsonnel by using this form. We can search or sort any personnel .
: codes of the balances are following.
vate
Sub Commandl_Click()sonnelReport.Show 1
i
Subvate Sub Command2 Click()
ıload Me d Sub
ivate Sub Command3 _Click() ith Adodc2
onnectionString = "Provider=Microsoft.Jet.OLEDB.3.51 ;Persist Security
fo=False;Data Source=C:\graduationproj\otel\db labc.mdb"
'ommand'Iype = adCmdText
'.ecordSource = " select
*
from personnelbalance where personnelname like "'Textl .Text & "' or persSurname like"' & Text2.Text & 111 or balancetype like"'
. Combo2.Text & '" or personnelno like"' & Text5.Text & 111 or balance between
& Val(Text3.Text) & "and" & Val(Text4.Text) & ""
tefresh .nd With
,et MSHFlexGridl .DataSource = Adodc2 \nd Sub
'rivate Sub Command4 _Click() )imi, j
ıVith Adodc 1
ConnectionString = "Provider=Microsoft.Jet.OLEDB.3 .51 ;Persist Security
[nfo=False;Data Source=C :\graduationproj\otel\db 1 abc.mdb"
.CommandType = adCmdText
.RecordSource = " select
*
from personnelbalance".Refresh End With
With MSHFlexGrid 1 Set .DataSource = Adede 1
While Adodcl.EOFAction = adStayEOF
MSHFlexGrid 1. Cols("") = Adodc 1. Connection String Adodcl .Recordset.MoveNext
Wend End With End Sub
Private Sub Form_Load()
Combo2.Addltem "receivable"
Combo2.Addltem "payable"
End Sub
Private Sub Optionl_Click()
MSHFlexGridl.Col = 2
MSHFlexGridl .Sort= 5
End Sub
Private Sub Option2 Click()
- '
MSHFlexGridl .Col= 3
MSHFlexGridl .Sort= 5
End Sub
Private Sub Option3 _Click()
MSHFlexGridl .Col= 5
MSHFlexGridl .Sort= 3
End Sub
Private Sub Option4 _Click()
MSHFlexGridl .Col= 6
MSHFlexGridl .Sort= 3
End Sub
Private Sub Option5 _Click()
MSHFlexGridl .Col= 7
MSHFlexGridl .Sort= 3
8. REPORTS
This is the reports of the program. In the section I prepared reports of the
customers and personnel. On the form we can find three section.
First section is search part. We can search customers and personnel
account processes by using this part. We can make search by enter code, name,
surname, and process date.
Second section is sort part. We can sort customers and personnel reports
by using this part. This can facilities for user. If we want to take print out we can
make reports in order.
In the final section there is a table so that we can see all customers and
personnel reports at the same time.
---
--8.1 CUSTOMER REPORTS
This is the customer report part of the program. We can find reports of all ımers by using this form. We can search or sort any customer .
ıte Sub Command l ; Click() Report.Show 1
Sub
ate Sub Command2 _Click() oad Me
Sub
rate Sub Command3 _Click() HFlexGrid 1. Clear
.h
Adodc2
,nnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security
o=False;Data Source=C:\graduationproj\otel\db l abc.mdb"
>mmandType= adCmdText
:cordSource = " select
*
from customerprocessreport where custname like "'
Textl.Text
& "'or custsumame like"'
&Text2.Text
& "'or balancetype like"'
Combo3.Text
& "'or processtype like"'
&Combo4.Text
& "'or cust_code
e "'
&Text3.Text
& "'or tradename like"'
&Text4.Text
& "' "efresh
ıd With
:t MSHFlexGridl.DataSource = Adodc2
üt Sub
nd Sub
rivate Sub Command4_Click()
ıim i,j
vith Adodcl
:onnectionString = "Provider=Microsoft.Jet.OLEDB.3 .51 ;Persist Security
nfo=False;Data Source=C:\graduationproj\otel\db l abc.mdb"
CommandType = adCmdText
RecordSource = " select
*
from customerprocessreport"
Refresh
End With
.DataSource = Adede 1
tile Adodc 1 .EOF Action = adStayEOF
SHFlexGridl .Cols('"'.)= Adodc l .ConnectionString Iodc 1 .Recordset.MoveN ext
'end
ad
With lSubvate Sub Commands_ Clickı) :HFlexGridl .Clear
th Adodc2
)nnectionString = "Provider=Microsoft.Jet.OLEDB.3.51 ;Persist Security
'o=False;Data Source=C:\graduationproj\otel\db 1 abc.mdb"
ommandType = adCmdText
ecordSource = " select
*
from customerprocessreport where duedate between& DTPicker3.Value & "# And #" & DTPicker4.Value & "# or date between
& DTPickerl.Value & "# And #" & DTPicker2.Value & "#"
.efresh nd With
;:t MSHFlexGridl .DataSource = Adodc2 xit Sub
rıd
Sub'rivate Sub Form_Load()
:ombo3.Addltem "receivable"
:ombo3 .Addltem "payable" :::ombo4.Addltem "Bill", :::ombo4.Addltem "cash"
Combo4.Addltem "Decont"
Combo4.Addltem "Cheque"
Combo4.Addltem "Receipt"
Combo4 .Addltem "Credit Card" End Sub
'ate Sub Optionl_ Click()
HFlexGridl .Col =
O
HFlexGridl .Sort= 3 l Sub
.ıate Sub Option2 _ Click() ,HFlexGridl .Col= 2
:HFlexGridl .Sort=
5
:l
Subvate Sub Option3 _Click()
;HFlexGridl.Col = 3
;HFlexGridl .Sort=
5
d Sub
.vate
Sub Option4 _Click() SHFlexGridl .Col= 7 SHFlexGridl .Sort= 3ıd
Subivate Sub Optionô , Click()
SHFlexGridl.Col = 8
SHFlexGridl .Sort= 3 ıd Sub
ivate Sub Option6 _ Click()
SHFlexGridl .Col=
9
SHFlexGridl.Sort = 3
.ıd
Sub-
-
-_....a. _.__...--
--8.2 CASH REPORT
This is the daily
cash report form of the program. We can. see daily
ıroce.ss of cash and also we can see how much money we earn every day .
Private Sub Command 1 _Click()
raporlar.Show 1
End Sub
Private Sub Command2 _Click() Unload Me
End Sub
Private Sub Command3 _Click()
MSHFlexGridl .Clear
With Adodc2
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3 .51 ;Persist Security
Info=False;Data Source=C:\graduationproj\otel\db 1 abc.mdb"
.CommandType _= adCmdText
.RecordSource = 11 select
*
from cashreport where custname like "' &Textl .Text & '" or custsumame like " & Text2.Text & 1" or balancetype like "1 &
. Combo3.Text & "1 or processtype like
111
& Combo4.Text & "1 or bankaccountno
like 111 & Text3.Text & 111
or bankname like 111
& Combo2.Text & "1
11
.Refresh End With
Set MSHFlexGridl .DataSource = Adodc2
Exit Sub End Sub
Private Sub Command4 _Click() Dim i,j
With Adodcl
.ConnectionString = 11Provider=Microsoft.Jet.OLEDB.3 .51 ;Persist Security
Info=False;Data Source=C :\graduationproj\otel\db 1 abc.mdb"
.CommandType = adCmdText
.RecordSource = " select
*
from cashreport".Refresh End With
h MSHFlexGrid 1 .DataSource = Adede 1
hile Adede l .EOF Action= adStayEOF
1SHFlexGridl .Cols('"')= Adodcl .ConnectionString .dodc l .Recordset.MoveN ext
Vend ~nd With d Sub
ivate Sub Command5 _Click() SHFlexGridl .Clear
'ith Adodc2
:onnectionString = "Provider=Microsoft.Jet.OLEDB.3 .51 ;Persist Security
ıfo=False;Data Source=C:\graduationproj' otel db labc.mdb'
:ommandType = adCmdText
:lecordSource = " select
*
from customerprocessreport where duedate between!II & DTPicker3 .Value & "# And
="
& DTPicker-tValue & "# or date between!" & DTPickerl.Value & "# And =" & DTPicker2.Value & "#" Refresh
End With
Set MSHFlexGridl .DataSource = A·
Exit Sub End Sub
Private Sub Form Loa
Combo3 .Addltem "receiYable"
Combo3.Addltem "payable Combo4.Addltem "B. Combo4.Addltem" Combo4.Addltem "Decont' Combo4.Addltem "Cheque" Combo4.Addltem "Receipt"
Combo4.Addltem "Credit Card"
ı1ate Sub Optionl_Click()
:HFlexGridl.Col =
O
;HFlexGridl .Sort= 3
d
Subvate Sub Option2 _Click()
SHFlexGridl.Col = 2
SHFlexGridl .Sort= 5 ıd Sub
ivate Sub Option3 _Click()
SHFlexGridl.Col = 3
SHFlexGridl .Sort= 5 rıd Sub
rivate Sub Option4 _Click() 1SHFlexGridl .Col= 7 1SHFlexGridl .Sort= 3 .nd Sub
'rivate Sub Option5 _Click() ı1SHFlexGridl .Col= 8 .1SHFlexGridl .Sort= 3 ;:nd Sub
)rivate Sub Option6 _Click() vfSHFlexGridl .Col= 9 \.1SHFlexGridl .Sort= 3 End Sub