Hospital Management VB6
Hospital Management VB6
A Project Report
Submitted by
SAPNA
10204110078
B.Sc IT
At
November 2013
DECLARATION
submitted for the B.Sc IT is my original work and the project has not formed the
basis for the award of any degree, associateship, fellowship or any other similar
titles.
Date:
CERTIFICATE
the bonafide work carried out by SAPNA student of BSC IT, 10204110078, Arya
Infotech Institute, Phagwara , during the year 2013 in partial fulfillment of the
requirements for the award of the Degree/Diploma and that the project has not formed
the basis for the award previously of any degree, diploma, associateship, fellowship or
Date: Date:
Acknowledgement
I express my sincere gratitude to Miss. Priyanka , worthy Project Incharge for providing me an
opportunity to undergo my minor project
Lastly, I would like to thank the almighty and my parents for their moral support and my friends
with whom I shared my day-to-day experience and received lots of suggestions that improved my
quality of work.
Sapna
Table of contents
1. Introduction to project 1
2. Introduction to frontend 2
3. Introduction to backend 3
4. Database design 4
a. FormName 6
b. Formname 7
c. Formname 8
d. Formname 9
n. Formname 10
6. Bibliography 11
Introduction of Project
Meaning of Project
“A project is a bit real life that has been imported in the school”
Ballard
“The work involved in the design, fabrication and assembly of components of a project’s deliverable into
working product”
Turner R.
In other words project is constituent of seven words and I have tried my best to give its definition
analyzing each word in the following manner
P – Perfect Planning
R – Resources
O – Organization
J – Joint Efforts
E – Engineering Skill
C – Communication
T - Techniques
1
Introduction
I am going to design the project for computerization of Cinema Ticket Booking Management. The main
target of my project is to develop software to book tickets and maintain record of all films and employees.
Working
If a user wants to start using this software he has a valid login name and password to access all menus in
menu bar. Once a user login to the software then system will check according to the designation of user
that whether the user has authority to use all menu or some menus in menu bar. In this software only
manager has authority to use the all menu which includes adding user, managing user, deleting user,
adding films, booking tickets, booking schedule and user can also see reports of employee and films.
Whereas all other designated user can only book tickets and can check booking schedule.
In this software a time counter counts the system time in every second and then allows the users to book
tickets in between specific time interval only. This timer also updates the session booking status to
database on specific time out of ticket booking.
User cannot book tickets above the limits of seats and for their help software displays the number of
available seats for different films and different sessions by subtracting the booked seats from total
available seats.
Booking and Film reports helps manager to understand and navigate of all films and their booking status
in different time sessions, dates and types.
2
Introduction of Front-End
Introduction
Visual basic is a high level programming language evolved from the earlier dos
version called basic. Basic means beginner’s all-purpose symbolic instruction
code.
It is fairly easy programming language to learn. The code looks a bit like English
language. Different software companies produced different version of basic, such
as Microsoft QBASIC, QUICKBASIC, GWBASIC, and IBM BASICA AND SO
ON.
Visual basic is a visual and drive driven programming language. These are the
divergence from the old basic. In basic, programming is done in a text-only
environment and the program is executed sequentially. In visual basic,
programming is done in a graphical environment. Because users may click on a
certain object randomly, so each object has to be programmed independently to be
able to response to those actions (events). Therefore, a visual basic program is
made up of many subprograms, each has its own program codes, and each can be
executed independently and at the same time each can be linked together in one
way or another.
VISUAL BASIC
3
Visual basic (VB) is an event driven programming language and associated
development environment created by Microsoft. It is derived heavily from basic.
VB enables rapid application development (RAD) of graphical user interface
(GUI) applications, easy access to database using DAO, RDO, OR ADO AND
easy creation of active controls. A programmer can quickly put together an
application using the component provided with visual basic itself. Programs
written in visual basic can
Also use the windows api, but doing so requires external function declarations.
With control like this you can create many applications.
Programming objects and event: the visual forms and objects like list,
boxes and radio buttons that you use on the forms help you to interact with
the application in order to find out flow of the program. The forms and
objects perform a specified action when an event occurs. This is known as
event driven programming.
Object types: New object types, called file system. Objects or fso, have
been added to visual basic 6.0. These objects enable you to work faster and
more easily with files and directories.
4
Functions: There are additional functions in visual basic 6.0. All of them
deal with string data. Some of these callbyname, filter, formatcurrency,
formatdatetime, formatnumber, and formatpercent.
5
processing to the server, this technology also allows you to write visual
basic codes to respond to actions on an html page.
The controls: Controls are objects designed to perform specific tasks. Like form
objects, controls have associated properties, events, and methods.
The properties: Properties consist of the object’s data, settings and attributes. it
describes the object, their appearance and behavior.
The events: Any action recognized by a form or control is called an event. visual
basic is an event driven programming.
6
Introduction of Back-End
INTRODUCTION TO MS-ACCESS
For example: access can be used to enter and maintain student awards, inventory
record of warehouse, telephone numbers. Once the records are stored, any type of
queries can be asked, reports can be created and data entry forms can be designed.
7
Access is easy to make tables, screen displays and function, but if you want to
develop an effective database you will need to do a little more. You will have to
plan and systematic.
FEATURES OF MS ACCESS
You can import data from Microsoft access database into your contains
folder in outlook .you can also export outlook data back into ms access.
When you output a report with a sub report to a .txt, .rtf or .xls file format,
the sub report is output along with the main report.
You can link from Microsoft excel or lotus 1-2-3 spreadsheet as long as the
data is arrange in an appropriate tabular format.
You can link data from Microsoft excel or lotus 1-2-3 spreadsheet as long as
the data is arrange in an appropriate tabular format.
8
When you use Ms-Access as an ActiveX component, you can manipulate
Microsoft access objects from other applications, such as Microsoft excel.
Create a pivot table control in a Microsoft access from using pivot table
wizard, you can create a control on a form that allow you to summarize large
amount of data using a format and calculation method you choose. A pivot table is
like a cross tab query, but you can switch the row and column heading dynamically
to see different views of data.
9
Login
10
Supplier
11
Purchase
12
Purchase
13
Bill
14
Screen Shot
Mdi form
15
Source Code
Private Sub Additem_Click()
Form4.Show
End Sub
16
MDIForm1.Additem.Enabled = False
MDIForm1.Itemupdate.Enabled = False
MDIForm1.Bill.Enabled = False
MDIForm1.printw.Enabled = False
End Sub
17
Login
18
Source Code
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Private Sub Command1_Click()
rs.MoveFirst
aa:
If rs.EOF = False Then
If Text1.Text = rs(0) And Text2.Text = rs(1) Then
MsgBox ("LOGIN")
MDIForm1.login.Enabled = False
MDIForm1.Addsupplier.Enabled = True
MDIForm1.purchase.Enabled = True
MDIForm1.Additem.Enabled = True
MDIForm1.Itemupdate.Enabled = True
MDIForm1.Bill.Enabled = True
MDIForm1.printw.Enabled = True
Text1.Text = ""
Text2.Text = ""
Form1.Hide
Form2.Show
Else
rs.MoveNext
GoTo aa
End If
Else
MsgBox ("Not Valid Login")
End If
End Sub
19
Private Sub Command2_Click()
Unload Me
End Sub
End Sub
20
Add Supplier
21
Source Code
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim rsa As Integer
Private Sub Command1_Click()
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Or Text5.Text =
"" Then
MsgBox ("Fill All Fields in Form")
Else
rs.AddNew
rs(0) = Text1.Text
rs(1) = Text2.Text
rs(2) = Text3.Text
rs(3) = Text4.Text
rs(4) = Text5.Text
rs.Update
MsgBox ("Supplier is Added")
rsa = rsa + 1
Text1.Text = rsa
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
End If
End Sub
22
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
End Sub
23
Add Purchase
24
Source Code
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
25
rs.Close
End Sub
26
End Sub
27
Add Item
28
Source Code
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Private Sub Command1_Click()
rs.AddNew
rs(0) = Text1.Text
rs(1) = Text2.Text
rs.Update
MsgBox ("Category is Added")
Text1.Text = ""
Text2.Text = ""
Form5.Combo1.Clear
rs.MoveFirst
While rs.EOF = False
Form5.Combo1.Additem (rs(0))
rs.MoveNext
Wend
Form6.Combo1.Clear
rs.MoveFirst
While rs.EOF = False
Form6.Combo1.Additem (rs(0))
rs.MoveNext
Wend
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
End Sub
29
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Form_Load()
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
cn.ConnectionString = "Provider=microsoft.jet.oledb.4.0;data source=juice.mdb"
cn.Open
rs.Open "Category", cn, adOpenDynamic, adLockOptimistic, adCmdTable
End Sub
Private Sub Text1_LostFocus()
rs.MoveFirst
While rs.EOF = False
If Text1.Text = rs(0) Then
MsgBox ("Item Already Exists")
Text1.Text = ""
rs.MoveNext
Else
rs.MoveNext
End If
Wend
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
Call onlyno(KeyAscii)
End Sub
30
Update Item
31
Update Item
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Private Sub Combo1_Click()
rs.MoveFirst
While rs.EOF = False
If Combo1.Text = rs(0) Then
Text2.Text = rs(1)
rs.MoveNext
Else
rs.MoveNext
End If
Wend
End Sub
Private Sub Command2_Click()
rs.MoveFirst
While rs.EOF = False
If rs(0) = Combo1.Text Then
rs.Delete
MsgBox ("Category Deleted")
rs.MoveNext
Else
rs.MoveNext
End If
Wend
Combo1.Clear
rs.MoveFirst
While rs.EOF = False
Combo1.Additem (rs(0))
32
rs.MoveNext
Wend
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Form_Load()
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
cn.ConnectionString = "Provider=microsoft.jet.oledb.4.0;data source=juice.mdb"
cn.Open
rs.Open "Category", cn, adOpenDynamic, adLockOptimistic, adCmdTable
While rs.EOF = False
Combo1.Additem (rs(0))
rs.MoveNext
Wend
End Sub
33
Add Bill
34
Source Code
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim rs1 As ADODB.Recordset
Dim rsa As Integer
Private Sub Combo1_Click()
rs.MoveFirst
While rs.EOF = False
If rs(0) = Combo1.Text Then
Text1.Text = rs(1)
rs.MoveNext
Else
rs.MoveNext
End If
Wend
End Sub
Private Sub Command1_Click()
rs1.Open "Bill", cn, adOpenDynamic, adLockOptimistic, adCmdTable
rs1.AddNew
rs1(0) = Text2.Text
rs1(1) = Combo1.Text
rs1(2) = Text1.Text
rs1(3) = Text3.Text
rs1(4) = Text4.Text
rs1(5) = Text5.Text
rs1.Update
rs1.Close
MsgBox ("Kindly Print the Bill")
rsa = rsa + 1
35
Text2.Text = rsa
Text1.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
End Sub
Private Sub Command2_Click()
Text1.Text = rsa
Text1.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
End Sub
36
rsa = rs(0)
rs.Close
rs.Open "Category", cn, adOpenDynamic, adLockOptimistic, adCmdTable
While rs.EOF = False
Combo1.Additem (rs(0))
rs.MoveNext
Wend
rsa = rsa + 1
Text2.Text = rsa
End Sub
Private Sub Text3_Change()
Text5.Text = Val(Text3.Text) * Val(Text1.Text)
End Sub
37
Bill
38
Search Bill
39
Source Code
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Private Sub Command1_Click()
rs.Open "Bill", cn, adOpenDynamic, adLockOptimistic, adCmdTable
While rs.EOF = False
If rs(0) = Text1.Text Then
DataEnvironment1.Command1 (Text1.Text)
DataReport1.Show
End If
rs.MoveNext
Wend
rs.Close
End Sub
40
Bibliography
The books and websites that are used in making this project are as follows:
BOOKS
Lewis, Thomas. VB COM. Chicago, IL: Wrox Press Inc., 1999.
Pattison, Ted. Programming Distributed Applications with COM
and Microsoft Visual Basic 6.0. Redmond, WA: Microsoft Press,
1998.
Stamatakis, William. Microsoft Visual Basic Design Patterns.
Redmond, WA: Microsoft Press, 2000.
WEBSITES
http://www.vbtutor.net/
http://www.vbtutor.net/vb2010/index.html
http://cuinl.tripod.com/tutorials.htm
http://www.youtube.com/watch?v=qVjQvixZPxk
http://visualbasic.freetutes.com/learn-vb6/
41