0% found this document useful (0 votes)
134 views46 pages

Hospital Management VB6

The document is a project report submitted by Sapna for a BSc in IT. It discusses developing a hospital management system using Visual Basic. The system will allow users to book appointments, manage employee and film records, and view reports. Visual Basic was chosen as it allows for rapid application development through a graphical user interface and integration with databases. The report covers introducing the frontend and backend, database design, form creation, and a bibliography.

Uploaded by

Rayat Computer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
134 views46 pages

Hospital Management VB6

The document is a project report submitted by Sapna for a BSc in IT. It discusses developing a hospital management system using Visual Basic. The system will allow users to book appointments, manage employee and film records, and view reports. Visual Basic was chosen as it allows for rapid application development through a graphical user interface and integration with databases. The report covers introducing the frontend and backend, database design, form creation, and a bibliography.

Uploaded by

Rayat Computer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 46

HOSPITAL MANAGEMENT

A Project Report

Submitted by

SAPNA
10204110078

in partial fulfillment for the award of the degree


of

B.Sc IT

At

PTU LEARNING CENTRE

ARYA INFOTECH INSTITUTE


PHAGWARA

November 2013
DECLARATION

I hereby declare that the project entitled “HOSPITAL MANAGEMENT ”

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.

Signature of the Student:

Date:
CERTIFICATE

This is to certify that the project entitled “HOSPITAL MANAGEMENT” is

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

any other similar title.

Signature of the Guide: Signature of the External Examiner:

Date: Date:
Acknowledgement

It is my pleasure to be indebted to various people, who directly or indirectly contributed in the


development of this work and who influenced my thinking, behavior, and acts during the course
of study.

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

S.No. Chapter Page No.

1. Introduction to project 1

2. Introduction to frontend 2

3. Introduction to backend 3

4. Database design 4

5. Form design and coding 5

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.

Features of visual basic


Visual basic 6.0 has many powerful features that are required in today ‘s
programming environment which include features from previous versions. Some of
these features are:

 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.

 Activex features: visual basic allows you to migrate applications to an


activex document, which enables the application to install and run from a
web browser. Thus, the developer need not know languages like java or
html. visual basic also enables you to creative activex controls.

 Database enhancement: Earlier versions of visual basic used data access


objects (Dao) and remote data objects (RDO) visual basic 6.0 include
activex data objects (ado) as the visual data access tool. Which will be
covered in detail in a later section? Data access features allow you to create
databases and front –end applications for most popular database formats
including Microsoft SQL server and other enterprise-level databases.ado
requires very little coding to interact with a data source.

 Quick editing, testing, and debugging: The visual basic development


environment includes extensive editing and debugging tools.

 Internet features: Server side applications, responding to user requests


from a browser, can be written with the help of IIS applications. The
methods, properties, and events of every element on a web page can be
exposed using the dynamic html technology. Without having to transfer

5
processing to the server, this technology also allows you to write visual
basic codes to respond to actions on an html page.

The integrated development environment


Visual basic is not just a language. it’s an integrated development environment
(IDE) in which you can develop, run, test and debug your applications.

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

Microsoft Access is a computerized database management system (DBMS) that


allows efficient data storage and retrieval as well as efficient and effective data
presentation. You can create a database in which information can be stored in an
organized manner that also allows tailoring to efficient, effective data retrieval and
presentation.

Microsoft access is a relational database management system (RDBMS) used to


store and manipulate large collection of information of any kind. Here RDBMS
refers to the organization of data in a series of rows and columns in such a manner
that any specific piece of information is available with a click of mouse and a few
keystrokes .ms access has tools, which are easy to use and provide powerful
development environment, making it an appropriate choice for novices and
professionals.

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.

Access is both a program for ordinary computer and a professional development


tool. It is used for developing database, which are used in system; you can use to
set up a billing system or an efficient indexing system

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.

 Microsoft access objects from other applications, such as Microsoft excel.

 You can link from Microsoft excel or lotus 1-2-3 spreadsheet as long as the
data is arrange in an appropriate tabular format.

 When a Microsoft spreadsheet is no longer the appropriate tool for your


data, you can create a Microsoft access database from the spreadsheet by clicking
convert to access on data menu in Microsoft excel.

 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

Private Sub Addsupplier_Click()


Form2.Show
End Sub

Private Sub Bill_Click()


Form6.Show
End Sub

Private Sub Exit_Click()


End
End Sub

Private Sub Itemupdate_Click()


Form5.Show
End Sub

Private Sub login_Click()


Form1.Show
End Sub

Private Sub MDIForm_Load()


MDIForm1.login.Enabled = True
MDIForm1.Addsupplier.Enabled = False
MDIForm1.purchase.Enabled = False

16
MDIForm1.Additem.Enabled = False
MDIForm1.Itemupdate.Enabled = False
MDIForm1.Bill.Enabled = False
MDIForm1.printw.Enabled = False

End Sub

Private Sub printw_Click()


Form7.Show
End Sub

Private Sub purchase_Click()


Form3.Show
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

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 "login", cn, adOpenDynamic, adLockOptimistic, adCmdTable
End Sub

Private Sub Label7_Click()

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

Private Sub Command2_Click()


Text1.Text = rsa
Text2.Text = ""

22
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
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 "select max(Supplier_Id) from supplier", cn, adOpenDynamic, adLockOptimistic,
adCmdText
rsa = rs(0)
rs.Close
rsa = rsa + 1
Text1.Text = rsa
rs.Open "supplier", cn, adOpenDynamic, adLockOptimistic, adCmdTable
End Sub

Private Sub Text5_KeyPress(KeyAscii As Integer)


If KeyAscii > 47 And KeyAscii < 58 Or KeyAscii = 8 Then
Text5.Locked = False
Else
Text5.Locked = True
End If
End Sub

23
Add Purchase

24
Source Code
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset

Private Sub Combo1_GotFocus()


Combo1.Clear
rs.Open "Supplier", cn, adOpenDynamic, adLockOptimistic, adCmdTable
rs.MoveFirst
While rs.EOF = False
Form3.Combo1.Additem (rs(0))
rs.MoveNext
Wend
rs.Close
End Sub

Private Sub Command1_Click()


rs.Open "Purchase", cn, adOpenDynamic, adLockOptimistic, adCmdTable
rs.AddNew
rs(0) = Combo1.Text
rs(1) = Text1.Text
rs(2) = Text2.Text
rs(3) = Text3.Text
rs(4) = Text5.Text
rs.Update
MsgBox ("Record is Updated")
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text5.Text = ""

25
rs.Close
End Sub

Private Sub Command2_Click()


Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text5.Text = ""
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 "Supplier", cn, adOpenDynamic, adLockOptimistic, adCmdTable
While rs.EOF = False
Combo1.Additem (rs(0))
rs.MoveNext
Wend
rs.Close
End Sub

Private Sub Text2_Change()


Text5.Text = Val(Text2.Text) * Val(Text3.Text)

26
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)


Call onlyno(KeyAscii)
End Sub
Private Sub Text3_Change()
Text5.Text = Val(Text2.Text) * Val(Text3.Text)
End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer)


Call onlyno(KeyAscii)
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

Private Sub Command3_Click()


Unload Me
End Sub
Private Sub Command4_Click()
DataEnvironment1.Command1 (rsa - 1)
DataReport1.Show
End Sub
Private Sub Form_Load()
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
Set rs1 = New ADODB.Recordset
cn.ConnectionString = "Provider=microsoft.jet.oledb.4.0;data source=juice.mdb"
cn.Open
rs.Open "Select max(Bill_Id) from Bill", cn, adOpenDynamic, adLockOptimistic,
adCmdText

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

Private Sub Form_Load()


Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
Set rs1 = New ADODB.Recordset
cn.ConnectionString = "Provider=microsoft.jet.oledb.4.0;data source=juice.mdb"
cn.Open
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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy