0% found this document useful (0 votes)
1K views54 pages

Computer Sales Management System1

This document provides an overview of a hospital management system project. The project aims to computerize activities performed in a hospital by storing information about patients, doctors, rooms and maintaining records of transactions. It allows for efficient storage and retrieval of details and processing of fees. The system has modules for master data like doctor, patient and room details. It also has modules for transactions like inpatient, outpatient and fee details. Reports can be generated on inpatient, outpatient and fees. The system provides benefits like reduced manual work, quick processing and improved data security over the existing manual system.

Uploaded by

Dinesh Babu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views54 pages

Computer Sales Management System1

This document provides an overview of a hospital management system project. The project aims to computerize activities performed in a hospital by storing information about patients, doctors, rooms and maintaining records of transactions. It allows for efficient storage and retrieval of details and processing of fees. The system has modules for master data like doctor, patient and room details. It also has modules for transactions like inpatient, outpatient and fee details. Reports can be generated on inpatient, outpatient and fees. The system provides benefits like reduced manual work, quick processing and improved data security over the existing manual system.

Uploaded by

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

HOSPITAL MANAGEMENT SYSTEM

SYNOPSIS

This project is entitled as “HOSPITAL MANAGEMENT SYSTEM” is store the

information about patient and keep records of all the transaction made in the hospital. The

main objective of this project is to computerize the activities performed in the hospital. The

front end of this project is VB.NET and the back end is SQL SERVER.

This project provides a facility to store and retrieve the details about the patients,

doctors of the hospital and rooms details efficiently and quickly. With the help of this project,

the fee process can be done quite easily and quickly. In the existing system, these activities

have been maintaining currently in manual. The ultimate goal of this project is to produce

necessary reports effectively.

MODULES

Master Modules

 Doctor Details

 Patient Details

 Room Details

Transaction Modules

 Inpatient Details

 Outpatient Details

 Fee Details

Reports

 Inpatient Report

 Outpatient Report

1
 Fee Report

MODULE DESCRIPTION
1. Doctor Details
This module consists of various details about the doctors. It includes doctor name, id,

address, specialist in, etc. The availability time of doctor is also indicated in this module.

2. Patient Details
This module consists of various details about the patients. It includes the data such as

name, age, gender and address. The date of registration and the reference of doctor are also

represented in this module.

3. Room Details
This module consists of details about the available rooms in hospital. It includes,

room name, number and rent. The unique room number is maintained for identification

purpose.

4. Inpatient Details
This module is used to maintain the details about the Inpatients. It includes the patient

details such as Patient ID, Patient Name, Diesis Name and Admission Date.

5. Outpatient Details
This module is used to maintain the details about the Outpatients. It includes the

patient details such as Patient ID, Patient Name, Diesis Name and Visit Date.

6. Fee Details
This module is used to maintain the details about the fee. It includes the patient details

such as Patient ID, Patient Name, Patient Type, Diesis Name, Admission Date or Visit Date

and collected fee.

7. Report
Reports are generated by the administrator can generate and view the reports like

patient report and fee report based on daily, weekly and monthly. This report can be extracted

in different format.

2
1.INTRODUCTION

1.1 INTRODUCTION

This system is helpful in maintaining the record of customers and details of suppliers.
In existing system, Admin cannot maintain day to day schedule. As the receipt of the
payment is not computerized, anyone can misuse the receipts.
The people added to projects can over-run their schedule Customer interactions that
are too frequent or lead to open conflicts. The unrealistic expectations, usually in the area of
project scheduling, may happen. In order to avoid these problems, this system is developed.
In present software trend most of the work is done by software. From past few years
various management departments are using software applications for reducing manual work
and improving data security and providing customer service in short time. The software
retrieves this data and displays as per the user requirement.

1.2 ABOUT THE PROJECT

This project is developed to store the information purchased from supplier and keep
records of all the transaction made in the organization. This project is mainly developed for
the concern syssol.
The main objective of this project is to computerize the activities performed in the
concern. The front end of this project is VB.Net and the back end is SQL Server. In this
system viewing and updating of employee details, purchase details and sales details is easy
because it reduces manual work.
This helps the user to process payment details very easily without verifying the
purchase file every time. Thus, the new system is very easy to operate and process all
activities involved in the concern very quickly.

3
1.3 ORGANIZATION PROFILE

Sys Sol is established in 2010. The founder of Sys Sol is Mr.S.Prabhuram. The
company specializes in manufacturing customized high quality Hardware and Networking
Solutions. An investment and sophisticated infrastructure facilities rightly supports core
concern of providing quality products at economical price. Today, Sys Sol is a well-known
brand name in domestic.

The company has the state-of-the-art infrastructure facilities and is equipped with
high precision machineries to produce the hardware and networking solutions of high quality.
The company has a built-up area for its manufacturing activities.

They are also planning for an expansion in the coming years with spacious
manufacturing place with ultra modern facilities. High quality computer hardwares and
machined components are manufactured with the help of CMM and well-trained quality
personnel. The company is investing constantly on the quality control equipments to inspect
and assure the quality of products/components. Above facilities enables Sys Sol to be more
customer centric and achieve 100% customer satisfaction.

4
2. SYSTEM STUDY

2.1 INTRODUCTION

The system analysis and information gathering process is intensified and focused
specially on software. To understand what type of the programs to be built, the system
analyst must study the information domain for the software as well as understand required
function, behaviour, performance and interfacing. The main purpose of requirement analysis
phase is to find the need and to define the problem that needs to be solved.

2.2 EXISTING SYSTEM

Existing system is a done by Excel Sheet in which takes more time for generating a
report. The same information, which limited entry, is again entered in separate payment file
for each company. This process may take more time and risky for the staff, who is the in
charge of these activities. Thus the daily transactions are entered in to corresponding master
file the two excel sheet at a time for inlet, and outlet processes.
2.2.1 DRAWBACKS OF EXISTING SYSTEM
 This maintenance process takes long time
 Constant updating is not possible
 Searching for a transaction is tedious process
 Risky of generating a report
 Each processes are monitor using different sheets so every time referring all
sheets
 So integration technique is needed
2.3 PROPOSED SYSTEM
The proposed system is a computerized system developed using front end as VB.NET
and backend as SQL Server. In the proposed system, separate files are maintained for each
company and separate files for payment details. This helps the user to process payment
details very easily without verifying the purchase file every time. Thus, the new system is
very easy to operate and process all activities involved in the concern very quickly.

5
2.3.1 ADVANTAGES OF PROPOSED SYSTEM

 User-friendly interactive system


 It enables the user to get information at any time by a single keystroke
 It facilitates timely updating process whenever initiated
 It takes less time to process

2.4 SYSTEM SPECIFICATION


2.4.1 HARDWARE SPECIFICATION

Processor : Intel Core i3

RAM : 2 GB

Hard disk drive : 320 GB

Clock Speed : 2.1 GHz

Monitor : Color Monitor

Printer : Laser Printer

Keyboard : Multi Media

Mouse : Optical Mouse

2.4.2 SOFTWARE SPECIFICATION

Technology : Microsoft Visual Studio 2010

Front end : VB.Net

6
Back end : SQL Server 2008

ABOUT THE SOFTWARE

Microsoft .NET is a set of Microsoft software technologies for rapidly building and
integrating XML Web services, Microsoft Windows-based applications, and Web solutions.
The .NET Framework is a language-neutral platform for writing programs that can easily and
securely interoperate.

FEATURES OF VISUAL BASIC .NET

The .NET Framework is a new computing platform that simplifies application


development in the highly distributed environment of the Internet.

Objectives of .NET Framework

 To provide a consistent object-oriented programming environment whether Codes


object are stored and executed locally on Internet-distributed, or executed
remotely.
 To provide a code-execution environment to minimizes software deployment and
guarantees safe execution of code.
 Eliminates the performance problems.

For example, the Windows Forms classes are a comprehensive set of reusable types
that vastly simplify Windows GUI development. If you write an ASP.NET Web Form
application, you can use the Web Forms classes.

The Common Language Runtime (CLR)

The common language runtime is the foundation of the .NET Framework. It manages
code at execution time, providing important services such as memory management, thread
management, and remoting and also ensures more security and robustness. The concept of
code management is a fundamental principle of the runtime. Code that targets the runtime is

7
known as managed code, while code that does not target the runtime is known as unmanaged
code.

FEATURES OF THE COMMON LANGUAGE RUNTIME

The common language runtime manages memory; thread execution, code execution,
code safety verification, compilation, and other system services these are all run on CLR.

 Security
 Robustness
 Productivity
 Performance
ABOUT .NET FRAME WORK
The .NET Framework can be hosted by unmanaged components that load the
common language runtime into their processes and initiate the execution of managed code,
thereby creating a software environment that can exploit both managed and unmanaged
features. The .NET Framework not only provides several runtime hosts, but also supports the
development of third-party runtime hosts.
OBJECTIVES OF THE .NET FRAMEWORK
The .NET Framework is a new computing platform that simplifies application
development in the highly distributed environment of the Internet. The .NET Framework is
designed to fulfil the following objectives:
 To provide a consistent object-oriented programming environment whether object
code is stored and executed locally, executed locally but Internet-distributed, or
executed remotely.
 To provide a code-execution environment that minimizes software deployment and
versioning conflicts.
 To provide a code-execution environment that guarantees safe execution of code,
including code created by an unknown or semi-trusted third party.
 To provide a code-execution environment that eliminates the performance
problems of scripted or interpreted environments.

8
 To make the developer experience consistent across widely varying types of
applications, such as Windows-based applications and Web-based applications.
 To build all communication on industry standards to ensure that code based on the
.NET Framework can integrate with any other code.
 Windows Application — this is a standard executable, in VB6 terminology. It is
the way to create applications with a Windows interface, using forms and controls.
This is as close to “your father’s VB” as you’ll get in VB.NET.
 Class Library — this project type allows you to create classes that will be used in
other applications. Think of it as similar to the COM components that you have
been building, which VB6 called the ActiveX DLL and ActiveX EXE project
types.
 Windows Control Library — this project type is for creating what used to be called
ActiveX controls. This type allows you to create new controls to be used in
Windows applications.
ABOUT SQL SERVER
A database is a structured collection of data. Data refers to the characteristics of
people, things and events. SQL Server stores each data item in its own fields. In SQL
Server, the fields relating to a particular person, thing or event are bundled together to form a
single complete unit of data, called a record (it can also be referred to as raw or an
occurrence). Each record is made up of a number of fields. No two fields in a record can
have the same field name.

SQL Server is a very powerful client server-computing model available in the


computing environment. It comprises of all the features from basic data storage to high-level
data representation techniques in the form of reports. It also comprises of VB.NET module
programming, which allows embedding VB.NET into SQL server Stored Procedures.

SQL Manager 2008 for SQL Server key features


 Full support of SQL Server 2005
 New state-of-the-art graphical user interface
 Rapid database management and navigation
 Easy management of all SQL Server objects

9
3. SYSTEM DESIGN

3.1 INTRODUCTION

The System Design Document (SDD) describes how (1) the functional and non-
functional requirements recorded in the Requirements Document, (2) the preliminary user-
oriented functional design recorded in the High Level Technical Design Concept/Alternatives
document, and (3) the preliminary data design documented in the Logical Data Model (LDM)
are transformed into more technical system design specifications from which the system will
be built. The SDD is used to document both high-level system design and low-level detailed
design specifications.

3.2 INPUT DESIGN

The input design translates system requirements into ways by which they can be made
operational. It is a translational from a user oriented document to a document oriented
programmers. For that, it provides the understanding and procedural details necessary for the
implementation. Here we use Flowchart to supplement the working of the new system.

The system thus made should be reliable, durable and above all should have least
possible maintenance costs. It should overcome all the drawbacks of the Old existing system
and most important of all meet the user requirements. In accurate input data is the most
common cause of errors in data processing. Errors found at the data entry can be controlled
by the proper input design.

10
Field Name Data Type Size Description Constraints
C_ID Nvarchar 8 Customer Identification Number Primary Key
Cname Nvarchar 20 Name of the Customer Not Null
Addr Nvarchar MAX Address of the customer Not Null
Phno Bigint 13 Phone number Not Null
Rdate Date/Time ___ Registered date Not Null

3.3 TABLE DESIGN


1) Table Name: Customer Details
Primary Key: C_ID

11
Field Name Data Type Size Description Constraints
S_ID Nvarchar 8 Supplier ID Primary Key
Sname Nvarchar 20 Name of Supplier Not Null
Cno Number 13 Contact number of the Not Null
supplier
Eid Nvarchar 50 Email ID of the supplier Not Null
Addr Nvarchar MAX Address of the supplier Not Null

2) Table Name: Supplier Details


Primary Key: S_ID

12
Field Name Data Type Size Description Constraints
E_ID Number 8 Employee Id Primary Key
Ename Nvarchar 20 Name of Employee Not Null
gen Nvarchar 10 Gender Not Null
DOJ Date/Time __ Date of Joining Not Null
Sal Float 8,2 Salary Not Null
Addr Nvarchar MAX Address Not Null
Cno Number 13 Contact Number Not Null

3) Table Name: Employee Details


Primary Key: E_ID

13
Field Name Data Type Size Description Constraints
I_ID Nvarchar 8 Item Id Primary Key
Iname Nvarchar 30 Name of Item Not Null
PQty Nvarchar 10 Purchase Quantity of the Item Not Null
Price Float 10 Price of the Item Not Null
Rdate Date/Time ___ Registerd Date Not Null

4) Table Name: Purchase Details


Primary Key: I_ID

14
5) Table Name: Stock Details
Foreign Key: I_ID

Field Name Data Type Size Description Constraints


I_ID Nvarchar 8 Item Identification Number Foreign Key
Iname Nvarchar 20 Item name Not Null
Aqty Number 10 Available quantity Not Null
Newqty Number 10 New quantity Not Null
Udate Date/Time __ Updated date Not Null

15
Field Name Data Type Size Description Constraints
I_ID Nvarchar 8 Item Id Primary Key
Iname Nvarchar 30 Name of Item Not Null
RQty Nvarchar 10 Returned Quantity of the Item Not Null
Price Float 10 Price of the Item Not Null
Rdate Date/Time ___ Return Date Not Null

6) Table Name: Purchase Return Details


Foreign Key: I_ID

16
Field Name Data Type Size Description Constraints
B_ID Nvarchar 8 Bill Identification Number Primary Key
C_ID Nvarchar 7 Customer Identification Number Foreign Key
I_ID Nvarchar 7 Item Id Foreign Key
Iname Nvarchar 20 Name of Item Not Null
Qty Nvarchar 10 Quantity of the Item Not Null
Price Float 8,2 Price of the Item Not Null
Tot Float 8,2 Grand Total Not Null
Sdate Date/Time ___ Sales Date Not Null
7) Table Name: Sales Details

Primary Key: B_ID

Foreign Key: I_ID, C_ID

17
Field Name Data Type Size Description Constraints
B_ID Nvarchar 8 Bill Identification Number Foreign Key
C_ID Nvarchar 7 Customer Identification Number Foreign Key
I_ID Nvarchar 7 Item Id Foreign Key
Iname Nvarchar 20 Name of Item Not Null
Qty Nvarchar 10 Quantity of the Item Not Null
Price Float 8,2 Price of the Item Not Null
Tot Float 8,2 Grand Total Not Null
Rdate Date ___ Return Date Not Null
8) Table Name: Sales Return Details

Foreign Key: B_ID, P_ID, C_ID

18
Field Name Data Type Size Description Constraints
P_NO Nvrachar 9 Payroll Number Primary key
E_ID Nvarchar 6 Employee Code Foreign key
Ename Nvarchar 10 Name of Employee Not null
Salary Integer 5 Salary Not null
Dos Date ___ Date of Salary Received Not null
Working_days Integer 3 Working days Not null
Present_ days Integer 3 Present days Not null
Total _salary Integer 5 Total salary Not null

9) Table Name: Payroll Details


Primary Key: P_NO

Foreign Key: E_ID

19
Field Name Data Type Size Description Constraints
UT_ID Nvarchar 8 Utility Identification Number Primary Key
C_ID Nvarchar 7 Customer Identification Number Foreign Key
Cname Nvarchar 20 Customer Name Not Null
I_ID Nvarchar 7 Item Id Foreign Key
Iname Nvarchar 20 Name of Item Not Null
Amt Float 8,2 Service Amount Not Null
SRdate Date/Time ___ Service Date Not Null
10) Table Name: Utility Details
Primary Key: UT_ID

Foreign Key: I_ID, C_ID

20
3.4 OUTPUT DESIGN

Output design is the most important and direct source of information to the user.
Efficient, intelligible output design should improve the systems relationships with the user
and help in decision making. In output design, it is determined how the information has to be
displayed for immediate need and also for the hard copy output.

It is generally refers to the results and information that is generated by the system.
Hence output design specification was carried out with maximum user friendliness. They are
used to communicate the result of processing hard copy of the result.

3.5 CODE DESIGN


Table Name: Customer Details

99XXX99

Running number indicate the Customer ID

String indicate the Customer Name

Number indicates Year

Example

19CUS01

Running number indicate the Customer ID

String indicate the Customer Name

Number indicates Year

Table Name: Supplier Details

99XXX99

21
Running number indicate the Supplier ID

String indicate the Supplier Name

Number indicates the Year

Example

19SUP01

Running number indicate the Supplier ID

String indicate the Supplier Name

Number indicates Year

Table Name: Employee Details

99XXX99

Running number indicate the Employee ID

String indicate the Employee Name

Number indicates Year

Example

19EMP01

Running number indicate the Employee ID

String indicate the Employee Name

Number indicates Year

Table Name: Invoice Details

99XXX99

Running number indicate the Invoice ID

22
String indicate the Invoice Name

Number indicates Year

Example

19INV01

Running number indicate the Invoice ID

String indicate the Invoice Name

Number indicates Year

Table Name: Stock Details

99XXX 99

Running number indicate the Item ID

String indicate the Item Name

Number indicates Year

Example

19INV01

Running number indicate the Item ID

String indicate the Item Name

Number indicates Year

Table Name: Sales Details

999999

String indicate the Bill Number

23
Example
000001

String indicate the Bill Number

Table Name: Payroll Details

99XXX99

Running number indicate the Payroll ID

String indicate the Payroll

Number indicates Year

Example

19PNO01

Running number indicate the Payroll ID

String indicate the Payroll

Number indicates Year

Table Name: Utility Details

99XXX99

Running number indicate the Utility ID

String indicate the Utility

Number indicates Year

Example

19UTI01

Running number indicate the Utility ID

24
String indicate the Utility

Number indicates Year

4. SYSTEM DEVELOPMENT AND TESTING

4.1 INTRODUCTION

The method of designing the program to produce the desired result is accomplished to
the section. Programs are written and tested by using sample data: if the output produces
good result was that the actual required output. All the facilities required for developing the
new system acquired and program preparation is started.

Quality assurance is an important step in software engineering. This overlaps with all
the phases of development right from the requirement analysis. This quality requirement
phase of the software system must be clearly extracted during the requirement analysis and
all the subsequent should be made biased to that, so that the final testing will become trivial
and less expensive.

There are a number of quality parameters like correctness, accuracy, reliability,


robustness, efficiency, effectiveness, reusability, maintainability, etc. The state of
requirement of each of these parameters will vary depending upon the name and domain of
the application. The testing should be done at the end of all development steps. Even though
the final testing and verification are inevitable for better life and functionality of the software.
There are different testing approaches and methods like Unit testing, Integration Testing,
Acceptance Testing, etc.

The major phases in testing are design of test plan, setting up test case and test
candidate and test procedure, testing and correction. This is a cycle process and the software
will circulate through all the steps till it attains the required quality.

4.2 SYSTEM DEVELOPMENT

Implementation is the stage where the theoretical design is turned into a working
system. The most crucial stage in achieving a new successful system and in giving
confidence on the new system for the users is that it will work efficiently and effectively. The

25
system can be implemented only after thorough testing is done and if it is found to work
according to the specification.

It involves careful planning, investigation of the current system and its constraints on
implementation, design of methods to achieve the change over and an evaluation of change
over methods a part from planning. Two major tasks of preparing the implementation are
education and training of the users and testing of the system. The required hardware and
software acquisition is carried out. The system may require some software to be developed.
For this, programs are written and tested. The user then changes over to his new fully tested
system and the old system is discontinued.

Failures continue to be discovered in software for years. ƒ Often first job upon
graduating is maintenance. It is the change made to the internal structure of software to make
it easier to understand and cheaper to modify without changing its observable behaviour.

4.3 STSTEM TESTING

1) Unit Testing
Unit Testing refers testing of the all individual program. This is sometimes called
as program testing. This test should be carried out during programming stage in order to
find the errors in coding and logic for each program in each module. Unit test focuses
verification effort on the smallest unit of software design module. In this project, the user
must fill each field otherwise the user to enter values.

2) Integration testing

In integration testing all modules are combined. This testing starts from main form
to entire module. Input is given to check whether all modules are connected properly or
not. The main objective in this testing is to unit test the modules and built a program
structure that has been dictated by the design.

3) Validation Testing

Valid and invalid data should be created and the program should be made to
process this data to catch errors. When the user of each module wants to enter into the
page by the login page using the userid and password. If the user gives the wrong

26
password or userid then the information is provided to the user like “you must enter use
rid and password”. Here the inputs given by the user are validated.

Public Class frmLogin

Private Sub btLogin_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btLogin.Click
If txtUserName.Text = "computer" And txtPassword.Text = "admin@123" Then
MsgBox("Welcome Admin", vbInformation, "Login Success")
MDIParent1.Show()
Me.Hide()
Else
MsgBox("Invalid UserName or Password", vbInformation, "Login Failed")
txtUserName.Clear()
txtPassword.Clear()
txtUserName.Focus()
End If
End Sub

Private Sub btCancel_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btCancel.Click
End
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
txtUserName.Clear()
txtPassword.Clear()
End Sub
End Class

4) Acceptance Testing

Accepting test is performed on a collection of functions in a production and after


the completion of functional testing. This is the final stage in the testing process before
the system is accepted for operational use. This testing is should be done with original
data and with the presence of the users. This test confirms the system ready for use.

27
5. CONCLUSION
In every Organization, computerization plays the most important role in day-to-day
activities. It saves a lot of time and is very efficient. The flexibility of the program developed
is quite high. The use of computerization has very little chance of committing any data entry
error since it has enough validation check. This system has been studied to design and
develop a complete recording and reporting to the computer peripheral sales and service for
the company. This is found to be working efficiently. The new system is developed with
much attention and the reliability is carried out to reduce the workload.

This system overcomes all the problems that are faced in the manual system. The
system is found to be satisfactory running under the real environment. The system is so
flexible that it can be easily modified to the future development. This project work is planned
to cover all the stepwise process that takes place in a software development environment. The
basis of the project is well analyzed and prepared, so that any changes in the future can be
updated to the project.

FUTURE ENHANCEMENT

Due to the creative nature of the design, there remain some lapse-mistaken
communications between the users and the developers. So, certain aspects of the system must
be modified as operational experience is gained with it. As users work with the system, they
develop ideas for change and enhancements.
The system can be modified in terms of the colour of display of text, colour of
windows. Whenever changes are made it will not affect the performance or efficiency of the
existing system. The alterations will be saved and it can be used along with the existing
system. The changes requested by the user after implementation of the project can be done
easily and added to the existing system.

28
BIBLIOGRAPHY

BOOK REFERENCES

1. Daniel Cazzulino, Victor Garcia Aprea, James Greenwood, and Chris Hart, (Feb
28,2005) ‘Beginning Visual Basic Programming in VB.NET: From Novice to
Professional’, Fifth edition.
2. Bill Evjen, Billy Hollis, Bill Sheldon, and Kent Sharkey,(Jun 5, 2007) ‘Professional
VB 2005 with .NET 3.0 (Programmer to Programmer)’, Second edition .
3. Damon Allison, Andy Olsen, and James Speer,(Sep 5, 2003)‘Visual Basic .NET
Class Design Handbook: Coding Effective Classes’, Second edition.
4. Roger S. Pressman, (2001) ‘Software Engineering: A Practioner’s Approach’,
McGraw-Hill International Edition, Fifth edition.
5. Benjamin Nevarez,(2011) ‘Insidethe SQL Server Query Optimize’, Red gate
books , Third edition.

WEB REFERENCES

1. http://www.vb.net-tutorials.com
2. http://www.visual-basic-tutorials.com/Tutorials/Strings/combining-strings-in-visual-
basic.html
3. http://www.tutorialspoint.com/vb.net/vb.net_overview.html
4. http://www.visual-basic-tutorials.com/beginner/Comments.html
5. http://www.sqlmag.com/ddl.html

29
APPENDICES
APPENDIX A: SYSTEM FLOW DIAGRAM

User Input

No

Is Valid

Yes

Employee Supplier Invoice Customer Sales Service Payroll Utility

Employee Supplier Invoice Custom Sales Service Payroll


Details Details Details er Detail Details Details
s
Details
Utility
Update Update Details

Return Return

Process

Employee Supplier Invoice Purchase Customer Sales Sales Service


Report Report Report Return Report Report Return Report
Report
30
APPENDIX B: DATA FLOW DIAGRAM

Level 0

Login Hardware Details


Admin View

31
Level 1

Id,pwd
Admin Purchase New
Product

View Sales

Generate
Personal
Information
Report
Customer
Details

32
Level 2

Id,Pwd Supply Store


Admin Order Supplier Supplier
Details

Update

Information Available Store


Customer View Product Product
Details
Return

Customer
Service Sales
Details

Billing

Generate

Billing
Details

33
APPENDIX C: ENTITY RELATIONSHIP DIAGRAM

E_ID Price
Phno
Date Rdate
Ename gen
DOJ Pname
Purchase Return
Employee
Details
Details Maintain
Sal
P_Id Qty
View
Addr
Update
DOS P_No
Sales
Phno Product
Payroll Product id Name
C_ID
Salary Ename
CName Purchase Quantity
E_Id Date
Customer
Price
Rdate P_ID
Newqty
Pname Purchase
Addr Udate Phno
Stock Details
Sales
Supplier
P_ ID Details
SName
Pname Aqty
Qty
Sales Details Tot Addr S_ID
B_ID Sname

Sdate
C_ ID Pname
Price
P_ID
S_ID
Update
Amt
Tot C_ ID Utility
Service
P_ID
Sales Return
Rdate Details
Price Sdate C_ID

Pname Qty
B_ID
34
APPENDIX D: SAMPLE SCREENS

35
36
37
38
39
40
41
42
43
44
45
46
APPENIDX E: SAMPLE REPORTS

47
48
49
50
SAMPLE CODING:
Imports System.Data
Imports System.Data.SqlClient
Public Class frmEmployee
Dim con As New SqlConnection
Dim cmd As New SqlCommand
Dim da As New SqlDataAdapter("select *from tblEmployee2", con)
Dim ds As New DataSet
Dim dbind As New BindingSource

Dim a As Integer = 0
Private Sub frmEmployee_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
LoadDatabase()
Load1()
clear()
End Sub
Private Sub LoadDatabase()
con.Close()
con.ConnectionString = "Data Source=.\SQLEXPRESS;Initial Catalog=Geeva;Integrated
Security=True"
con.Open()
End Sub
Public Sub Load1()
ClearGridView()
LoadDatabase()
da.Fill(ds, "tblEmployee2")
dbind.DataSource = ds
dbind.DataMember = ds.Tables(0).ToString()
DataGridView1.DataSource = dbind
End Sub

Private Sub ClearGridView()


For Each row As DataGridViewRow In DataGridView1.Rows
DataGridView1.Rows.Remove(row)
Next
End Sub

Private Sub btInsert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles btInsert.Click
LoadDatabase()
cmd.Parameters.Clear()
Try
cmd.Connection = con
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "spInsertEmployeeDetails2"
cmd.Parameters.AddWithValue("@Empid", txtEmpid.Text)
cmd.Parameters.AddWithValue("@Empname", txtEmpname.Text)
cmd.Parameters.AddWithValue("@Dob", dtdate.Value)
cmd.Parameters.AddWithValue("@Conno", txtcontact.Text)
cmd.Parameters.AddWithValue("@Address", txtaddress.Text)
cmd.Parameters.AddWithValue("@Doj", dtdoj.Value)
cmd.Parameters.AddWithValue("@Designation", ComboBox1.Text)

51
cmd.Parameters.AddWithValue("@Salary", txtsalary.Text)
cmd.ExecuteNonQuery()
MsgBox("Details of Employee are Successfully Inserted", vbInformation, "Successfully
Inserted")
con.Close()
Catch ex As Exception
MsgBox("Details are not Inserted! Please Try Later", vbInformation, "Error In Inserting
Company Details")
End Try
ClearGridView()
ClearGridView()
ClearGridView()
ClearGridView()
ClearGridView()
ClearGridView()
Load1()
clear()
End Sub

Private Sub btClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles btClear.Click
txtEmpid.Clear()
txtEmpname.Clear()
txtcontact.Clear()
txtaddress.Clear()
txtsalary.Clear()

End Sub

Private Sub DataGridView1_SelectionChanged(ByVal sender As Object, ByVal e As


System.EventArgs) Handles DataGridView1.SelectionChanged
Try
Dim dgv As DataGridView = TryCast(sender, DataGridView)
If dgv IsNot Nothing AndAlso dgv.SelectedRows.Count > 0 Then
Dim row As DataGridViewRow = dgv.SelectedRows(0)
If row IsNot Nothing Then
txtEmpid.Text = row.Cells(0).Value.ToString()
txtEmpname.Text = row.Cells(1).Value.ToString()
dtdate.Value = row.Cells(2).Value.ToString()
txtcontact.Text = row.Cells(3).Value.ToString()
txtaddress.Text = row.Cells(4).Value.ToString()
dtdoj.Value = row.Cells(5).Value.ToString()
ComboBox1.Text = row.Cells(6).Value.ToString()
txtsalary.Text = row.Cells(7).Value.ToString()

End If
End If
Catch ex As Exception
End Try
End Sub
Private Sub btUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btUpdate.Click
LoadDatabase()
Me.Refresh()
'Dim answer As Long

52
Try
cmd.Parameters.Clear()
'answer = MsgBox("Are you sure to Updating Data?", vbYesNo, "Updating Record")
'If (answer = vbYes) Then
cmd.Connection = con
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "spUpdateEmployeeDetails2"
'cmd.Parameters.Add("@ProductCode", SqlDbType.NVarChar).Value = ttProductCode.Text

cmd.Parameters.AddWithValue("@Empname", txtEmpname.Text)
cmd.Parameters.AddWithValue("@Dob", dtdate.Value)
cmd.Parameters.AddWithValue("@Conno", txtcontact.Text)
cmd.Parameters.AddWithValue("@Address", txtaddress.Text)
cmd.Parameters.AddWithValue("@Doj", dtdoj.Value)
cmd.Parameters.AddWithValue("@Designation", ComboBox1.Text)
cmd.Parameters.AddWithValue("@Salary", txtsalary.Text)
cmd.Parameters.Add("@Empid", SqlDbType.NVarChar).Value = txtEmpid.Text
cmd.ExecuteNonQuery()
MsgBox("Employee Details Updated", vbInformation, "Succesfully Updated")
con.Close()
ClearGridView()
ClearGridView()
ClearGridView()
ClearGridView()
ClearGridView()
ClearGridView()
Load1()
Me.Refresh()
'Else
'txtSerialNo.Focus()
'End If
Catch ex As Exception
MsgBox("Unable to Update Record! Please Try Later", vbInformation, "Error in Updating
Record")
End Try
clear()
End Sub

Private Sub btDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles btDelete.Click
LoadDatabase()
Me.Refresh()
' Dim answer As Long
Try
cmd.Parameters.Clear()
'answer = MsgBox("Are you sure to Deleting Data?", vbYesNo, "Delete Record")
'If (answer = vbYes) Then
cmd.Connection = con
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "spDeleteEmployeeDetails2"
cmd.Parameters.Add("@Empid", SqlDbType.NVarChar).Value = txtEmpid.Text
'cmd.Parameters.AddWithValue("@ProductCode", ttProductCode.Text)
cmd.ExecuteNonQuery()
MsgBox("Details Deleted", vbInformation, "Successfully Deleted")
ClearGridView()

53
ClearGridView()
ClearGridView()
ClearGridView()
ClearGridView()
ClearGridView()
Load1()
Me.Refresh()
'Else
' txtSerialNo.Focus()
'End If
Catch ex As Exception
MsgBox("Unable to Delete Record! Please Try Later", vbInformation, "Error in Deleting")
End Try
clear()
End Sub

Private Sub txtSearch_KeyPress(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyPressEventArgs) Handles txtSearch.KeyPress
Dim con As New SqlConnection
con = New SqlConnection()
con.ConnectionString = "Data Source=.\SQLEXPRESS;Initial Catalog=Geeva;Integrated
Security=True"
con.Open()
Dim da As New SqlDataAdapter("spSearchEmployeeDetails2", con)
da.SelectCommand.Parameters.Clear()
da.SelectCommand.CommandType = CommandType.StoredProcedure
da.SelectCommand.Parameters.AddWithValue("Empname", txtSearch.Text)
Dim dt As New DataTable
da.Fill(dt)
DataGridView1.DataSource = dt
con.Close()
End Sub
Private Sub clear()
txtEmpid.Clear()
txtEmpname.Clear()
txtcontact.Clear()
txtaddress.Clear()
txtsalary.Clear()
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
MDIParent1.Show()
Me.Hide()
End Sub
End Class

54

You might also like