Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 109

PROJECT REPORT

ON
MEDICAL INVENTORY SYSTEM
IN PARTIAL FULFILLMENT OF REQUIREMENT OF

DEGREE OF MASTER OF COMPUTER APPLICATIONS

SUBMITTED
TO
REGIONAL CENTER KHANNA

Indira Gandhi National University ,New Delhi

GUIDED BY: PREPARED BY:

Raman Jyoti Palvi

Mphill Computer Science Enrollmewnt No. -.....

Study Center -.......(2202)

YEAR-2016
MEDICAL INVENTORY SYSTEM

TO WHOM SO EVER IT MAY CONCERN

This is to certify that Miss Palvi(roll.no…) has completed her one full
semester on project work titled “MEDICAL INVETORY SYSTEM”
satisfactorily in partial fulfillment of requirement Of Degree of Master in
Computer Applications IGNOU University in Batala study Center
(2202), in the year 2016 under my supervision. No part of this work has
been submitted for any other degree of any other university. The date
sources have been duly acknowledged. It may be considered for
evolution for evolution partial fulfillment of degree of BCA.

I wish his success in all future endeavors.

Guide

Date: / /2016

Place: Gurdaspur

2
MEDICAL INVENTORY SYSTEM

ACKNOWLEDGEMENT

 With a deep sense of great respect I would like to extend my


heartiest thanks to all those who provided me immense help
and guidance during in me 6th semester.

 I would like thanks Mr………………… (H.O.D of Computer


Dept.) for providing a Opportunity for A creating a “Medical
Invetory system”.

 All the teachers for providing a vision about the system, their
patience and suggestions on improving.

 My skill set through their constant guidance during this


system. I have greatly benefited from their Regular review and
inspiration throughout the work.

 I express my gratitude to MY LECTURER ……………. for his


timely help and for showing keen interest in my work, which
enabled us to complete it in assigned span of time?

 Last but not the least i would like to mention here that i am greatly
indebted to each and Everybody Who has been associated with my
system at any stage but whose name does not find in this?

Palvi

Enr No.-

3
MEDICAL INVENTORY SYSTEM

ABSTRACT

 My project Medical Inventory System mainly focused on the different


medical related item sales/return system, which is highly user
friendly easy to use, where in user can easy sales/return of item.

 I have developed this Medical Inventory System as our semester


project with a view to get familiar with the technology as well as with
windows utility.

 My system mainly deals with different type of Medical item, customer,


dealer very easily.

 Since I had time constraints I was not able to make out module into
live and living portal but would try for the same together with the
interference.

4
MEDICAL INVENTORY SYSTEM

NEED FOR COMPUTERIZATION

Before studying the need for the computerization in the factory I should have a
look at the various departments and the organizations layout of the factory. I have
to deal with Agents details, party details, item details, indents, and accounts also.
In manual system at the time of enquiries one has to check all the records for the
availability of items as per the requirement of the user, which is very time
consuming, and tedious one. This can lead to errors. There is no doubt that the
existing manual system can be improved by changing certain procedures and by
employing more man power but at same time employment of more and more
personal means more expensive which can be brought down by computerization
and the same time efficiency if not improved can at least be the same. Another
major drawback of the manual system that is found from the study is that there is
large amount of data redundancy due to manual system .It is because a piece
of information has to be checked rapidly, which leads to the enormous wastage of
time and increase the possibility of committing the errors.

In brief it has been said that computerization not only helps


in improving the operational efficiency and in cutting down the expenses on man
power but it also helps to maintain a database with less errors that can be utilized
for references. It also helps in reducing the wastage of human efforts that can
be utilized for other productive purpose leading.

5
MEDICAL INVENTORY SYSTEM

SR.NO Topic Page no

1 Introduction 7

2 System Requirement Specification 10

3 Problem Identification 12

4 System Analysis 14

5 Priliminary Investigation 17

6 Feasibility Study 19

7 Problem Analysis 21

8 System Development Strategies 23

9 System Engg Paradigm Applied 25

10 Information gathering 29

11 System Flow Diagram 31

12 Data Flow Diagram 34

13 Data Dictionary 40

14 E-R Diagram 46

15 Input Design 49

16 Output Design 62

17 Testing And Implementation plan 70

18 coding 86

18 Further Enhancement Of The System 107

19 Bibliography 108

Table of Contents

6
MEDICAL INVENTORY SYSTEM

INTRODUCTION

7
MEDICAL INVENTORY SYSTEM

Project Profile

Project Title Medical Inventory System

Developed For Bawa Medical Store

Developed At PTU Learning Center ,Gurdaspur.

Objectives The main aim of the system is provide computerized maintaining stock

Front End VB.Net 2008

Back End Sql Server 2008

Tools Microsoft Office 2007

Project Guide Raman Jyoti (Mphill Computer Science )

Lect. Mata Gujri College ,Balwanda,Chackshrif,Gurdaspur

Developed By

8
MEDICAL INVENTORY SYSTEM

About The Organization

The organization of Bawa Medical Store is establish in year 1995 which are grown in full
organization within.

 It is situated at opposite Civil Hospital,Gurdaspur.

 The owner of this Medical store is Mr. GurwimBawa .

 The organization is concerned with the different Medical Related items.

 It is one of the popular Medical Store In Gurdaspur.

 In this Medical store many type of Items are maintain and sale.

 This Medical store cannot establish second branch.

9
MEDICAL INVENTORY SYSTEM

SYSTEM
REQUIREMENT
SPECIFICATION

10
MEDICAL INVENTORY SYSTEM

Software Requirement

Development Side
 Microsoft xp service pack 2 or upwards

 Sql Server 2008

 MS Office 2007

 MS Visual Studio 2008

 Crystal report 9.0 on later

Client Side

 Microsoft xp service pack 2 or upwards

 Sql Server 2008

Microsoft .Net Framework 3.5

Hardware Requirement

Development Side

 CPU : Pentium-IV processor or any processor.

 HARDDISK : 40 GB or above.

 RAM : 256 MB or above.

Client Side
 CPU : Pentium-IV processor or any processor.

 HARDDISK : 40 GB or above.

 RAM : 256 MB or above.

 DEVICE : printer

11
MEDICAL INVENTORY SYSTEM

PROBLEM IDENTIFICATION

12
MEDICAL INVENTORY SYSTEM

Existing System

The existing Medical Store System is manual system. The main drawback of the
existing system is time consumption. There are number of records and hence a
larger number of registers have to be kept to the store.

This document required more storing space, more manpower and job become
tedious.

In Existing system following points are observed:

 chances of errors and data processing time

 Timely Due to manual process, required more time to complete user


requirement

 It will increase updating is complicated.

 Security of data were not maintain


.

Need For The New System

 The existing of Medical Store System is manually which require more


paper work so it needs to computerized the system to get following benefits.

 Computer enhances easy and simple means of Storing information.


The space occupied for storing of information is reduced.

 Computers helps in fast retrieval of information .we can search


information in a short of time.

 Maintenance of data is very easy and workload is reduced.

 It’s a paperless system.

 We can generated report on demand.

 It will give faster modification.

13
MEDICAL INVENTORY SYSTEM

SYSTEM ANALYSIS

14
MEDICAL INVENTORY SYSTEM

SYSTEM ANALYSIS

 Requirement analysis is a software engineering task that bridges the


gap between system engineering and software design. It provides
the software designer with a representation of information and
function that can be translated to data.

 Before developing any computerized system, it is imperative to


examine initially. The problem in the exiting system and also
ascertain the basic needs that should be fulfilled by the proposed
system the primary aspect of developing a full 1 fledged automated
system would be to learn the current procedure and the information
flow to locate the problem in the exiting system to identify what
recourses are used to discuss with user and their authority as to
what improvement must in the exiting system.

Definition : -

 “Analysis of system is process of gathering fact, solution of


problem and to decide overall constitution of the desired system.
In system analysis we have to analyze all the processes, related
features, required function, available sources and the time which
should be specified for the analysis stage

 The most important phase of developing any system is system


analysis. Because of the analysis phase decides that type of
requirements, materials, strangles and techniques, models are
required.

15
MEDICAL INVENTORY SYSTEM

 All these things are depend upon our system that what type of
our output of our system to function. We desire from the system
is responsible for defining the above factors. So the overall
structure of system that we want to implement will be decided in

analysis part of a system development by analyst .

16
MEDICAL INVENTORY SYSTEM

Preliminary
Investigation

17
MEDICAL INVENTORY SYSTEM

Preliminary Investigation

 Interviewing

The information is collected from system leader by interviewing to


them a took suggesting from end user as per their requirement.

 Visiting

For Clarification, Visited To Hari-Om Medical Store.

 Questionnaires

By asking possible question to the system leader at the time of


interview some questionnaires to collect the required information .

18
MEDICAL INVENTORY SYSTEM

Feasibility
Study

19
MEDICAL INVENTORY SYSTEM

Feasibility Study

Technical feasibility

 Customer the work for the system can be done with the
present equipment and three is no need of other technologies so
this application is technically feasible.

Economic feasibility
 All software packages are available or already exist in the
company and institute so this system is economically feasible.

Operation feasibility

 System will be use immediate because all staff is aware of how


to operate so there is no need to train them, so it is
operationally feasible for the company and institute.

 At the end of investigation it is found that this system is feasibly


in all points of view.

Schedual feasibility

 It is a measure of how reasonable the project timetable is

Implementation feasibility

 As far the Implementation is concerned, there would not be any


problem. All the user of it gets its service by only operate this
system.

20
MEDICAL INVENTORY SYSTEM

Problem
Analysis

21
MEDICAL INVENTORY SYSTEM

Problem Analysis

 We are asked some question for good requirement those are as


follow :

 What is the addition functionality you want in the system?

 What are the problems you face in the existing system?

 What are you expectation with the system?

 How do you manage to do this work manually?

 Is there anything else that wants to specify?

 What the help of analysis I tried out to reduce the


communication gap between the user and us.

22
MEDICAL INVENTORY SYSTEM

System
Development
Strategies

23
MEDICAL INVENTORY SYSTEM

System Development Strategies

 There are three distinct approaches to the development of any


good system as the point of view system analysis and design.

 System development life cycle method.

 Structure analysis development method.

 System prototype method.

 Here, starting with 1st system development life cycle method.


Which has the following activities of any system?

 Preliminary investigation.

 Determination of system requirement.

 Design of system.

 Development of software.

 System testing.

 Implementation and evolution.

24
MEDICAL INVENTORY SYSTEM

Software Engneering
Paradigm Applied

25
MEDICAL INVENTORY SYSTEM

 Software Engineering paradigm Applied

Requirements

Design

Implement

Test

Deliver

 The waterfall model derivers its name due to the cascading effect
from one phase to the other as is illustrated in above fig.

 In this model each phase where define starting and ending point
with identifiable deliveries to the next phase.

 Note that this model is some time referred to as the linear


sequential model or the software life cycle model.

26
MEDICAL INVENTORY SYSTEM

 The waterfall diagram is basically divided into following


5 models.
 Requirement

 Design

 Implementation

 Verification

 Maintenance

 Requirement
 In the requirement phase the need to create the application is
specified what is the need of the system is defined.

 What information to be feeder to create the application will


come under the requirement phase?

 Design
 After the requirement phase the next phase is the design
phase where the application is designed according the forms
and other modules created.

 Implementation

 Implementation is the process of having a system personnel


phase check out and put new equipment into use, train user,
install new application and construct any file of data need to
use it.

 Verification

 After the whole application is being developed the main phase


is verification phase where the whole application tested and
verifies to check the whole application

27
MEDICAL INVENTORY SYSTEM

 Maintenance

 After the successful verification of the application the main


phase is the maintenance where the application needs to be
maintained for its successful operation in future.

28
MEDICAL INVENTORY SYSTEM

INFORMATION
GATHERING

29
MEDICAL INVENTORY SYSTEM

Information Gathering

 Information from field

 The main information of this system is gathering from the

Hari-Om Store,Visnagar.

 The error of this system are seen the studied. Because of this
error we need necessary to develop.

 This type of system :

 The system mainly develop for organize for remove the paper
work.

 Other detail are given to us from lecturer of our institute

 Information from books:

 The detail of designing of coding of this system are viewed


from the “The complete reference of net programming book “,
Master in VB.Net.

30
MEDICAL INVENTORY SYSTEM

System Flow
Diagram

31
MEDICAL INVENTORY SYSTEM

32
MEDICAL INVENTORY SYSTEM

33
MEDICAL INVENTORY SYSTEM

Data Flow
Diagram

34
MEDICAL INVENTORY SYSTEM

35
MEDICAL INVENTORY SYSTEM

First Level
Data Flow Diagram

36
MEDICAL INVENTORY SYSTEM

37
MEDICAL INVENTORY SYSTEM

Second Level DFD


For Process :-2.0

38
MEDICAL INVENTORY SYSTEM

39
MEDICAL INVENTORY SYSTEM

Data
Dictionary

40
MEDICAL INVENTORY SYSTEM

LOG IN MASTER TABLE

NO NAME TYPE SIZE CONSTRAIN DESCRIPTION

1 Username Varchar 10 Not Null Username

2 Password Varchar 10 Not Null Password

BILL TABLE

NO NAME TYPE SIZE CONSTRAIN DESCRIPTION

1 No Int 10 Primary Key No

2 Billno Int 10 Not Null Billno

3 C_code Int 10 Not Null Customer Code

4 C_name Varchar 15 Not Null Customer Name

5 Itemcode Int 10 Not Null Item Code

6 Itemname Varchar 15 Not Null Item Name

7 Quantity Float 10 Not Null Quantity

8 Price_Per_Unit Float 10 Not Null Price per unit

9 Total_Price Float 10 Not Null Total Price

10 Salesdate Datetime 8 Not Null Salesdate

41
MEDICAL INVENTORY SYSTEM

CUSTOMER MASTER TABLE


NO NAME TYPE SIZE CONSTRAIN DESCRIPTION

1 Cid Int 10 Primary Key Customer Id

2 C_name Varchar 15 Not Null Customer Name

3 C_no Numeric 10 Not Null Contact Number

4 C_add Varchar 15 Not Null Customer Address

5 City Varchar 15 Not Null City

6 Pin Int 6 Not Null Pin code

7 Email varchar 15 Not Null Email Address

DEALER MASTER TABLE


NO NAME TYPE SIZE CONSTRAIN DESCRIPTION

1 D_code Int 10 Primary Key Dealer Code

2 D_name Varchar 15 Not Null Dealer Name

3 C_no Numeric 10 Not Null Contact Number

4 Add Varchar 15 Not Null Address

5 City Varchar 10 Not Null City

6 Date Datetime 8 Not Null Datetime

7 Pin Numeric 6 Not Null Pin Time

8 Email Varchar 15 Not Null Email Address

42
MEDICAL INVENTORY SYSTEM

Item Master Table

NO NAME TYPE SIZE CONSTRAIN DESCRIPTION

1 I_code Int 10 Primary Key Item Code

2 I_name Varchar 15 Not Null Item Name

3 I_details Varchar 15 Not Null Item details

4 Price Float 10 Not Null Price

PURCHASE MASTER TABLE

NO NAME TYPE SIZE CONSTRAIN DESCRIPTION

1 NO Int 10 Primary Key Dealer Number

2 D_code Int 15 Not Null Dealer Code

3 D_name Varchar 20 Not Null Dealer Name

4 I_code Int 10 Not Null Item code

5 I_name Varchar 20 Not Null Item Name

6 Total_pur Numeric 10 Not Null Total Purchase

7 Pri_per_uni Numeric 10 Not Null Price Per Unit

8 To_price Numeric 10 Not Null Total Price

9 Pu_date Datetime 10 Not Null Perchase Date

10 Billno Int 10 Not Null Bill No

43
MEDICAL INVENTORY SYSTEM

PURCHASE RETURN TABLE

NO NAME TYPE SIZE CONSTRAIN DESCRIPTION

1 No Int 10 Primary Key Dealer Number

2 Billno Int 10 Not Null Bill Number

3 D_code Int 10 Not Null Dealer Code

4 D_name Varchar 20 Not Null Dealer Name

5 I_code Int 10 Not Null Item Code

6 I_name Varchar 20 Not Null Item Name

7 Quantity Float 10 Not Null Quantity

8 T_price Float 10 Not Null Total Price

9 P_date Datetime 10 Not Null Purchase Date

SALES MASTER TABLE

NO NAME TYPE SIZE CONSTRAIN DESCRIPTION

1 No Int 10 Primary Key Customer Number

2 C_code Int 10 Not null Customer Code

3 C_name Varchare 20 Not null Customer Name

4 I_code Int 10 Not null Item code

5 I_name Varchare 20 Not null Item Name

6 Quntity Int 10 Not null Quantity

7 Pri_per_u Numeric 10 Not null Price Per Unit

8 T_price Numeric 10 Not null Total Price

9 Billno Int 10 Not null Bill Number

10 S_date Datetime 10 Not null Sales Date

44
MEDICAL INVENTORY SYSTEM

SALES RETURN TABLE

NO NAME TYPE SIZE CONSTRAIN DESCRIPTION

1 No Int 10 Primary Key Customer Number

2 Billno Int 10 Not Null Bill Number

3 C_code Int 10 Not Null Customer Code

4 C_name Varchar 20 Not Null Customer Name

5 I_code Int 10 Not Null Item code

6 I_name Varchar 20 Not Null Item Name

7 Quantity Float 10 Not Null Quantity

8 T_price Float 10 Not Null Total Price

9 S_date Datetime numric


10 Not Null Sales Date

10 C_no Numeric 10 Not Null Contact Number

11 Pri_per_uni Numeric 10 Not Null Price Per Unit

STOCK MASTER TABLE


NO NAME TYPE SIZE CONSTRAIN DESCRIPTION

1 I_code Int 10 Primary Key Item Code

2 I_name Varchar 20 Not Null Item Name

3 Quantity Numeric 10 Not Null Quantity

4 P_date Datetime 10 Not Null Purchase Date

5 Price Numeric 10 Not Null Price Per Unit

45
MEDICAL INVENTORY SYSTEM

E-R Diagram

46
MEDICAL INVENTORY SYSTEM

47
MEDICAL INVENTORY SYSTEM

BRIEF DESCRIPTION OF PROCESS

Proposed system includes updating of master file and generation of Reports. Using VB.NET as
Front-end and Sql Server 2008 as Back-end. Detail of purposed system is as below.

Item Details:

This stores the information about the Item in the Medical store. Store the information such as Item
code, Item name, stock,etc.

Purchase Details:

This keeps information about the purchase Item from dealer . This stores information such as
dealer name, Item name, price , quantity etc.

Billing Details:

This keeps details of all billing information. This keeps records customer who purchase our item
including customer name, bill no, and total amount.

Process Algorithm

 Step-1:- Start

 Step-2:- Login Process

 Step-3:- Check user name and password.

 Step-4:- If No then Back the Login process. If Yes then enter the main process.

 Step-5:-Check for the Item availability. If No then add dealer/Item entry. If Yes then sale
and receive payment.

 Step-6:- Check for the dealer/Item identify. If No any dealer then add dealer entry and go
to step-5;

 Step-7:- If return Item Yes then check bill no and return Item or payment. If No then Exit.

 Step-8:- Generate bill.

 Step-9:- Exit.

48
MEDICAL INVENTORY SYSTEM

Input Design

49
MEDICAL INVENTORY SYSTEM

LOGIN FORM

THIS IS LOGIN FORM. WHICH IS USED TO PROVIDE PERSON TO INCLUDE


HIS/HER SELF?

THIS IS FOR EXITING PERSON HOW WANTS TO USE PROVIDED SERVICE.

IN OUR LOGIN FORM ONE TYPES OF THE USER LIKE USER ARE LOGIN.

THIS FORM IS SELECT ADMINISTRATOR AND GIVES USER ARE LOGIN.

IF THE USER NAME AND PASSWORD ARE CORRECT THEN WILL BE OPEN
THE APPLICATION.

50
MEDICAL INVENTORY SYSTEM

MEDICAL MASTER

IF USER LOGIN. THIS MAIN FORM WILL BE OPEN AND USER HAVE FOLLOWING
WRITES:

SAVE RECORD IN DATABASE

UPDATE RECORD

DELETE RECORD AND E.T.C.

51
MEDICAL INVENTORY SYSTEM

MEDICAL MASTER WITH MULTIPLE MENU

THIS FORM IS DESPLAYING THE INFORMATION ABOUT MEDICAL MASTER


WITH MENU LIKE STOCK MASTER , ITEM MASTER , ETC

52
MEDICAL INVENTORY SYSTEM

DEALER INFORMATION

THIS FORM IS DISPLAING THE INFORMATION ABOUT DIFFERENT TYPES OF


DEALERS.

53
MEDICAL INVENTORY SYSTEM

CUSTOMER INFORMATION

THIS FORM IS DISPLAYING THE INFORMATION ABOUT CUSTOMERS

54
MEDICAL INVENTORY SYSTEM

ITEMS INFORMATION

THIS FORM IS DISPLAYING THE INFORMATION ABOUT DIFFERENT TYPES OF


ITEM.

55
MEDICAL INVENTORY SYSTEM

PURCHASE INFORMATION

THIS FORM IS DISPLAYING THE INFORMATION ABOUT PURCHASE .

56
MEDICAL INVENTORY SYSTEM

STOCK INFORMATION

THIS FORM IS DISPLAYING THE INFORMATION ABOUT STOCK INFORMATION OF


ITEMS.

57
MEDICAL INVENTORY SYSTEM

SALES INFORMATION

FORM IS DISPLAYING THE THIS INFORMATION ABOUT ALL LAST SALES .

58
MEDICAL INVENTORY SYSTEM

PURCHASE RETURN INFORMATION

THIS FORM IS DISPLAYING THE INFORMATION ABOUT PURCHASE RETURN


INFORMATION

59
MEDICAL INVENTORY SYSTEM

SALES RETURN INFORMATION

THIS FORM IS DISPLAYING THE INFORMATION ABOUT SALES AND RETURN OF


ITEMS.

60
MEDICAL INVENTORY SYSTEM

BILL INFORMATION

THIS FORM IS DISPLAYING THE INFORMATION ABOUT THE BILL INORMATION


FOR CUSTOMER

61
MEDICAL INVENTORY SYSTEM

Output
Design

62
MEDICAL INVENTORY SYSTEM

STOCK INFORMATION REPORT

63
MEDICAL INVENTORY SYSTEM

SEARCHING IN STOCK INFORMATION REPORT

64
MEDICAL INVENTORY SYSTEM

DEALER INFORMATION REPORT

65
MEDICAL INVENTORY SYSTEM

CUSTOMER INFORMATION REPORT

66
MEDICAL INVENTORY SYSTEM

PURCHASE INFORMATION REPORT

67
MEDICAL INVENTORY SYSTEM

SALES INFORMATION REPORT

68
MEDICAL INVENTORY SYSTEM

BILL INFORMATION REPORT

Testing

69
MEDICAL INVENTORY SYSTEM

After the preparation of our project we used it with the help of hypothetical
data. As the requirement was satisfied with these data, we implemented the
project on the original data.

The system though developed carefully, whenever it is taken in actual use


may generate errors. So the main purpose of testing is to remove such type of
runtime error and correct them. The scope of the system test includes both
manual operation and computerized operations. We performed various system
tests such as program test, string test, and system test.

Program test:

These are designed to test the logic of program. Under this testing, the
individual forms were considered as a program and verification was done by
entering hypothetical as well as original data.

System test:

These are used to test all programs which together constitute the system
consisted of various forms. All forms are liked with each other perfectly and make
our system a perfect one.

Testing is an important part of program


development. During this stage the program is checked for errors or
bugs.he purpose of doing test is not to demonstrate that there are no
errors in the program but to detect any bug that may exist.

It is a common misconception that the


Purpose of testing is to prove that a program is working correctly. This a
dangerous myth because it can load to insufficient testing and Program with
hidden fault.

It is very difficult to decide how much Testing is


enough. A good programmer may be able to reduce the Number of errors
in a program but he/she should know that is impossible to develop a
program that is 100% error free.

TEST PLAN:

70
MEDICAL INVENTORY SYSTEM

Test plan is required before testing starts. It severs


as a guide to carry out of tests. During the generation of Test plan the
objective must be to ensure that the components is Tested thoroughly .

STAGE 1:
In this stage module testing ,sub system testing and
system testing is done.

STAGE 2:

In this stage tests are to be


done to check whether input procedures are errors free
and generate sufficient errors messages whenever invalid
data is input.

STAGE 3:

In these stages extensive off line


testing and on line testing are to be done using test data
and output to be checked against expected results.

71
MEDICAL INVENTORY SYSTEM

PROCESS RELATED TESTING:

TESTING AND OPTIMIZATION

Testing:-the hardest task

You can write a program in an hour that can have 50 million


possible combinations to test. The labor involved can cost
fortunes. Therefore testing is often the first thing to slip when
resources stretch - but it's the entire organization that suffers when
a defect causes problems. Lost revenue or reputation is probably
the least harmful result of defects. Measurements show that a
defect discovered during design that costs $1 to rectify will cost
$1,000 to repair in production. This is a tremendous cost
differential and clearly points out the advantage of early error
detection.

Testing vs. Quality Assurance

Quality Assurance is the process of making sure that the customers


gets enough of what they pay for to satisfy their needs. Testing is
the means by which we perform the process. You can test without
assuring quality, but you can't assure quality without testing. A
common problem with software quality is that the assurance is in
the hands of the producers. While the producers can certainly
create and perform insightful, powerful tests, it is perfectly possible
to design tests that will churn away forever and never discover a
defect. This is the psychological temptation when the software
producers program tests to evaluate them.

72
MEDICAL INVENTORY SYSTEM

Testing Levels

Software testing is usually done at several levels. They are


commonly referred to as unit testing, integration testing, and
system testing.

Test Phases

There is several type of testing in a comprehensive software test


process, many of which occur simultaneously.

73
MEDICAL INVENTORY SYSTEM

1 MODUL TESTING:

module testing implies that the module can be


tested without the presence of other module in the system. However in other
to make the testing practicle and simple, other elements of the
environment within which the program will eventually reside must be
included.

2. SUB SYSTEM TESTING:

Sub system testing attempts to test the


interface between various modules in the program. What we expected to
find here is a collection of large errors, interface errors as opposed to
the relatively trivial coding errors that were discovered at the module
testing.

3. SYSTEM TESTING:

System testing is impied to test the Entire


system. Most stuble errors occur at this stage. For instance interface
errors, complex control and logic errors, recovery errors and timing
errors. Whole system was run as one entity. A whole lot of errors
described above occurred.

RESULT:

The above process is repeated until program with the


desired accuracy and to be satisfaction of the programmer and Users.

INPUT RELATED TESTING:

The input was broadly classified into following

Categories:

 STRING
 CHARACTER
 INTEGER
 REAL
 DATE

74
MEDICAL INVENTORY SYSTEM

STRING TESTING:

Each program is tested to see whether it conforms to


related program in the system. Each portion of the system is tested
against the entire module with both test and live data before the entire
system is ready to be tested.

At this stage program was run and a broad


variety of data was input, including both correct data and erroneous Data.
In all the cases results were noted. The program performed Satisfactorily.

OUTPUT RELATED TESTING:

Output testing implies checking and verifying Of the


output generated by the program. It is done to verify whether The
program does the work.

In this stage the output was matched


with expected output. There were no deviations noticed between expected
And actual output.

Preparation of the test data:

The first step in the testing is to prepare a plan

That will test all aspects of the system in a way to promote it’s
Credibility.

 Weigh system performance and cost data.


 Select the best candidate system.
Prepare and report final project directive to management

Unit Test

The objective of unit testing is to verify that individual units -- the


smallest compliable components, such as functions & modules--
function correctly. This is done to ensure that no bugs are present
in the very basic structure of the program.

Unit testing is also called component testing. However, component


testing is sometimes considered to be a level of testing above unit
testing. This may be the case with a system that contains

75
MEDICAL INVENTORY SYSTEM

individually testable components that are composed of multiple


units. For example in the visual basic interface, in a system that
contains forms and modules, the functions could be tested as units
and the whole form could be tested as component.

Unit testing tests software in terms of a unit: a module, a function,


a specific section of code. This testing occurs while the software is
being developed and before all the pieces of code complete.

My Project Network Management software each function and event


has been tested individually.

Integration Testing

The objective of integration testing is to test the integration of and


communication between components. Additionally, it may include
testing the integration of subsystems or communication with
external systems

On some projects, integration testing may be divided into two


levels: Assembly Testing and System Integration Testing.

During Assembly testing, the integration of the software


components is tested.

During system Integration testing, the communication with external


systems is tested.

In Integration testing, individual modules are put together making a larger


application. This can be done repeatedly until the program is assembled in its
entirety.

The individual components are combined with other components to


make sure that necessary communications, links and data sharing
occur properly. It is not truly system testing because the

76
MEDICAL INVENTORY SYSTEM

components are not implemented in the operating environment.


The integration phase requires more planning and some reasonable
sub-set of production-type data. Larger systems often require
several integration steps.

There are three basic integration test methods:

 All-at-once
 Bottom-up

 Top-down

The all-at-once method provides a useful solution for simple


integration problems, involving a small program possibly using a
few previously tested modules.

Bottom-up testing involves individual testing of each module using


a driver routine that calls the module and provides it with needed
resources. Bottom-up testing is a more intuitive approach to testing
that also usually finds errors in critical routines earlier than the top-
down method. However, in a new system many modules must be
integrated to produce system-level behavior, thus interface errors
surface late in the process.

Top-down testing fits a prototyping environment that establishes an


initial skeleton that fills individual modules are completed. The
method lends itself to more structured organizations that plan out
the entire test process. Although interface errors are found
earlier, errors in critical low-level modules can be found later than
you would like.

What all this implies is that a combination of low-level bottom-up


testing works best for critical modules, while high-level top-down
modules provide an early working program that can give

77
MEDICAL INVENTORY SYSTEM

management and users more confidence in results early on in the


process. There may be need for more than one set of integration
environments to support this hybrid approach.

System Testing

The objectives of system testing are to find defects that are


attributable to the behavior of the system as a whole, rather than
the behavior of individual components, and to test that the software
functions as a complete system. This level of testing is different
from integration testing in that the tests are concerned with the
entire system, not just the interactions between components. Other
than system functionality and behavior, system testing may include
testing configuration, throughput, security, resource utilization, and
performance.

Test Design

Just as the components of a system must be designed, tests for a


system must be designed. Two common methods of test design are
black box testing and white box testing. After the tests are
implemented, though, the test design method may not be evident.

Black Box

In black box testing the tester knows nothing at all about the inside of the system
he or she is testing. The system is tested by throwing inputs at it like throwing
pennies down a well and waiting for a splash.

Black box testing focuses on designing tests that view


components as opaque. The implementation details of the
components are not known (or, at least, are ignored), and only
externally observable behavior or functionality is tested. Other

78
MEDICAL INVENTORY SYSTEM

terms for black box testing are functional testing and behavioral
testing.

However, behavioral testing and black box testing are slightly


different. Even though both view components as black boxes,
behavioral testing allows knowledge of the implementation details
of components to be used in test design if necessary.

You can re-run black box tests after a change to make sure the
change only produced intended results with no inadvertent effects.

White Box

In white box testing (also called glass box), the tester has knowledge of the
internals of the system. Software developers on a project are best able to do this
kind of testing, since they know which areas may be weak.

White box testing focuses on designing tests that view components


as transparent. The implementation details of the components are
known, and that knowledge is used in test design and creation of
test data. Other terms for white box testing are structural testing
and clear box testing.

Testing Techniques

There are many techniques that can be used to test software. Some
are better than others, and some can be used in conjunction with
others to get better test coverage. Here is a summary of some
common testing techniques:

Manual testing

Tests are done by a human with test data that may be


predetermined but may also be determined per test. In some cases,

79
MEDICAL INVENTORY SYSTEM

manual testing could be characterized as "banging away" at the


software.

Automated Testing

Tests can be run by a tool or an unattended process, such as a


nightly build, and they can be re-run many times. Test data is
predetermined or generated.

Regression Testing

Tests, usually automated, are run to determine if modifications or


enhancements have negatively affected functionality that passed
previous testing.

Stress Testing

Tests are run to determine if the software can withstand an


unreasonable load with insufficient resources or extreme usage.

Load Testing

Tests are run to determine if the software can handle a typical or


maximum load or to determine the maximum sustainable load.

Performance Testing

Tests are run to determine actual performance as compared to


predicted performance.

System Test

The system test phase begins once modules are integrated enough
to perform tests in a whole system environment. System testing

80
MEDICAL INVENTORY SYSTEM

can occur in parallel with integration test, especially with the top-
down method.

Performance / Stress Test

An important phase of the system test, often called load, volume or


performance test, stress tests try to determine the failure point of a
system under extreme pressure. Stress tests are most useful
when systems are being scaled up to larger environments or being
implemented for the first time. Web sites, like any other large-
scale system that requires multiple access and processing, contain
vulnerable nodes that should be tested before deployment.
Unfortunately, most stress testing can only simulate loads on
various points of the system and cannot truly stress the entire
network as the users would experience it. Fortunately, once stress
and load factors have been successfully overcome, it is only
necessary to stress test again if major changes take place.

A drawback of performance testing is that can easily confirm that


the system can handle heavy loads, but cannot so easily determine
if the system is producing the correct information. In other words,
processing incorrect transactions at high speed can cause

Much more damage and liability than simply stopping or slowing the
processing of correct transactions.

Regression Test

Regression tests confirm that implementation of changes have not


adversely affected other functions. Regression testing is a type of
test as opposed to a phase in testing. Regression tests apply at all
phases whenever a change is made.

81
MEDICAL INVENTORY SYSTEM

Quality Assurance Test

Some organizations maintain a Quality Group that provides a


different point of view, uses a different set of tests, and applies the
tests in a different, more complete test environment. The group
might look to see that organization standards have been followed in
the specification, coding and documentation of the software. They
might check to see that the original requirement is documented,
verify that the software properly implements the required functions,
and see that everything is ready for the users to take a crack at it.

User Acceptance Test and Installation Test

Traditionally, this is where the users ‘get their first crack’ at the
software. Unfortunately, by this time, it's usually too late. If the
users have not seen prototypes, been involved with the design, and
understood the evolution of the system, they are inevitably going to
be unhappy with the result. If you can perform every test as user
acceptance tests, you have a much better chance of a successful
project.

Repair

The whole point of all quality processing is to prevent defects as


much as possible, and to discover those defects that do occur
before the customer does. The repaired code should start the
testing process all over again.

82
MEDICAL INVENTORY SYSTEM

Functional testing features

Destructive vs. validation testing

Validation tests are positive tests. They confirm that the software
meets requirements - that an input or set of inputs give the desired
output.

Destructive tests try to determine if the software does things it


shouldn't do. The ratio of destructive tests to validation tests in a
mature test suite should be about 4:1.

Reproducibility

Reproducibility is critical for good functional testing. You must


ensure that the same input drives the same output. This means
that the test environment cannot change in unknown ways or the
integrity of the test will be compromised.

Risk analysis

New circle addition

System crash

Network flaws (busy or crashed)

Careless data entry

Platform specific (windows compatible)

Code Optimization

83
MEDICAL INVENTORY SYSTEM

 The required changes are being brought about according to


user’s requirements.
 The modularity is being enforced wherever possible (if not
already present

IMPLEMENTATION PHASE
The implementation phase involves installing approved applications into
production environments. Primary tasks include announcing the implementation
schedule, training end users, and installing the product. Additionally, organizations
should input and verify data, configure and test system and security parameters,
and conduct post-implementation reviews. Management should circulate
implementation schedules to all affected parties and should notify users of any
implementation responsibilities.

After organizations install a product, pre-existing data is manually input or


electronically transferred to a new system. Verifying the accuracy of the input data
and security configurations is a critical part of the implementation process.
Organizations often run a new system in parallel with an old system until they
verify the accuracy and reliability of the new system. Employees should document
any programming, procedural, or configuration changes made during the
verification process.

User Training

The user was given an exhaustive training to train him how to


handle the application according to his user rights. Regular training
sessions were conducted after the application was implemented so
that maximum uses would be given personnel attention. Any doubts
of the user were tried to clear up to his satisfaction.

84
MEDICAL INVENTORY SYSTEM

The users were made to operate to application on their own a


number of times before they actually started using the application
so that they get well used to the environment under which they
would be working thereon which would result in saving precious
time of the company as the user would not spend any extra time in
learning about the use of the application after it has been
implemented for use in their official work.

Post Implementation Review

The review about post implementation from them is completely satisfactory.


They are pleased with our services and our nature. We followed the rules of there
school. We plan out our system according to their convenience. They were totally
satisfied and pleased with our system. They haven’t any problem regarding our
project work.

85
MEDICAL INVENTORY SYSTEM

Coding

86
MEDICAL INVENTORY SYSTEM

Login form
Imports System

Imports System.Data

Imports System.Data.SqlClient

Public Class FRMLOGIN

Dim db As New Clsdb

Dim dr As SqlDataReader

Dim cmd As New SqlCommand

Public user As String

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


System.EventArgs) Handles cmdlogin.Click

Try

user = txtusername.Text

db.cnopen()

cmd = New SqlCommand("select * from LOGIN where Username='" +


txtusername.Text + "' and Password='" + txtpassword.Text + "'", db.cn)

dr = cmd.ExecuteReader()

If (dr.HasRows = True) Then

Timer1.Enabled = True

Else

MessageBox.Show("WRONG USERNAME AND PASSWORD")

txtpassword.Text = ""

txtusername.Text = ""

End If

Catch EX As Exception

MsgBox(EX.Message)

End Try

End Sub

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


System.EventArgs) Handles cmdCancel.Click

Me.Close()

End Sub

87
MEDICAL INVENTORY SYSTEM

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


System.EventArgs) Handles Timer1.Tick

ProgressBar1.Value = ProgressBar1.Value + 1

If ProgressBar1.Value = 100 Then

Timer1.Enabled = False

Dim medical_master As New FRMMEDICAL_MASTER

medical_master.Show()

Me.Hide()

End If

End Sub

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


Handles Me.Load

Timer1.Interval = 30

Timer1.Enabled = False

End Sub

End Class

88
MEDICAL INVENTORY SYSTEM

Classdb form
Imports System

Imports System.Data

Imports System.Data.SqlClient

Public Class Clsdb

Public cn As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|


DataDirectory|\Database1.mdf;Integrated Security=True;User Instance=True")

Dim cmd As New SqlCommand

Dim dt As New DataTable

Dim da As New SqlDataAdapter

Public Sub cnopen()

If cn.State = ConnectionState.Open Then

cn.Close()

End If

cn.Open()

End Sub

Public Sub query_execute(ByVal q As String)

cnopen()

cmd = New SqlCommand(q, cn)

cmd.ExecuteScalar()

End Sub

Public Function loaddata(ByVal q As String) As DataTable

cnopen()

dt.Clear()

cmd = New SqlCommand(q, cn)

da = New SqlDataAdapter(cmd)

da.Fill(dt)

Return dt

End Function

Dim i As Integer

cnopen()

If para_name.Count = para_val.Count Then

cmd = New SqlCommand(sp_name, cn)

89
MEDICAL INVENTORY SYSTEM

cmd.CommandType = CommandType.StoredProcedure

For i = 0 To para_name.Count - 1

cmd.Parameters.AddWithValue(para_name(i), para_val(i))

Next

cmd.ExecuteNonQuery()

Else

MessageBox.Show("FILL ALL THE PARAMETER")

End If

End Function

End Class

90
MEDICAL INVENTORY SYSTEM

Bill Form
Public Class FRMBILL

Dim db As New Clsdb

Dim dt As New DataTable

Dim rownumber As Integer

Dim objval As New Validation

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


System.EventArgs) Handles cmdnew.Click

txtbillno.Text = ""

TXTCCODE.Text = ""

TXTCNAME.Text = ""

TXTiCODE.Text = ""

TXTiNAME.Text = ""

Txtprice_per_unit.Text = ""

TXTquantity.Text = ""

TXTSEARCH.Text = ""

TXTTOTAL.Text = ""

DTPsalesDATE.Text = ""

End Sub

Private Sub Txtprice_per_unit_TextChanged(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles Txtprice_per_unit.TextChanged

TXTTOTAL.Text = Val(Txtprice_per_unit.Text) * Val(TXTquantity.Text)

End Sub

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


System.EventArgs) Handles cmdsave.Click

If txtbillno.Text <> "" And TXTCCODE.Text <> "" And TXTCNAME.Text <> "" And
TXTiCODE.Text <> "" And TXTiNAME.Text <> "" And Txtprice_per_unit.Text <> "" And
TXTquantity.Text <> "" And TXTTOTAL.Text <> "" Then

db.query_execute("insert into BILL values(" + txtbillno.Text + "," +


TXTCCODE.Text + ",'" + TXTCNAME.Text + "'," + TXTiCODE.Text + ",'" + TXTiNAME.Text
+ "'," + TXTquantity.Text + "," + Txtprice_per_unit.Text + "," + TXTTOTAL.Text +
",'" + DTPsalesDATE.Value.Date + "') ")

MessageBox.Show("data saved succesfully")

CLEAR_CONTROL()

FILL_GRID()

bind_control()

91
MEDICAL INVENTORY SYSTEM

Else

MessageBox.Show("FIRST FILL ALL DATA")

End If

End Sub

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


System.EventArgs) Handles DELETE.Click

If txtbillno.Text <> "" Then

db.query_execute("delete from BILL where BILLNO=" + txtbillno.Text +


"")

MessageBox.Show("DATA DELETED SUCCESFULLY")

CLEAR_CONTROL()

FILL_GRID()

bind_control()

Else

MessageBox.Show("FIRST ENTER BILL NO")

End If

End Sub

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


System.EventArgs) Handles cmdedit.Click

If txtbillno.Text <> "" And TXTCCODE.Text <> "" And TXTCNAME.Text <> "" And
TXTiCODE.Text <> "" And TXTiNAME.Text <> "" And Txtprice_per_unit.Text <> "" And
TXTquantity.Text <> "" And TXTTOTAL.Text <> "" Then

db.query_execute("UPDATE BILL SET CU_CODE=" + TXTCCODE.Text +


" ,CU_NAME='" + TXTCNAME.Text + "',ITEM_CODE=" + TXTiCODE.Text + ",ITEM_NAME='" +
TXTiNAME.Text + "',QUANTITY=" + TXTquantity.Text + ",PRICE_PER_UNIT=" +
Txtprice_per_unit.Text + ",TOTAL_PRICE=" + TXTTOTAL.Text + ",SALESDATE='" +
DTPsalesDATE.Value.Date + "' WHERE BILLNO=" + txtbillno.Text + "")

MessageBox.Show("DATA UPDATED SUCCESFULLY")

CLEAR_CONTROL()

FILL_GRID()

bind_control()

Else

MessageBox.Show("FIRST FILL ALL THE DATA")

End If

End Sub

Function FILL_GRID()

dt = db.loaddata("select * from BILL")

92
MEDICAL INVENTORY SYSTEM

DataGridView1.DataSource = dt

Return 0

End Function

End Function

Function CLEAR_CONTROL()

txtbillno.DataBindings.Clear()

TXTCCODE.DataBindings.Clear()

TXTCNAME.DataBindings.Clear()

TXTiCODE.DataBindings.Clear()

TXTiNAME.DataBindings.Clear()

Txtprice_per_unit.DataBindings.Clear()

TXTquantity.DataBindings.Clear()

TXTTOTAL.DataBindings.Clear()

DTPsalesDATE.DataBindings.Clear()

dt.Clear()

Return 0

End Function

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


System.EventArgs) Handles MyBase.Load

rownumber = 0

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


System.EventArgs) Handles SEARCH.Click

Try

If TXTSEARCH.Text <> "" Then

CLEAR_CONTROL()

dt = db.loaddata("select * from BILL where BILLNo=" +


TXTSEARCH.Text + "")

If dt.Rows.Count <> 0 Then

DataGridView1.DataSource = ""

DataGridView1.DataSource = dt

bind_control()

cmd_show_all_record.Visible = True

93
MEDICAL INVENTORY SYSTEM

Else

MessageBox.Show("RECORD NOT FOUND")

CLEAR_CONTROL()

bind_control()

FILL_GRID()

End If

Else

MessageBox.Show("FIRST EMTER BILLNO TO FIND")

End If

Catch ex As Exception

MsgBox(ex.Message)

End Try

End Sub

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


System.EventArgs) Handles cmd_show_all_record.Click

CLEAR_CONTROL()

FILL_GRID()

bind_control()

cmd_show_all_record.Visible = False

End Sub

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


System.Windows.Forms.KeyPressEventArgs) Handles txtbillno.KeyPress

e.Handled = objval.allowdigit(e.KeyChar)

End Sub

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


System.Windows.Forms.KeyPressEventArgs) Handles TXTCCODE.KeyPress

e.Handled = objval.allowdigit(e.KeyChar)

End Sub

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


System.Windows.Forms.KeyPressEventArgs) Handles TXTCNAME.KeyPress

e.Handled = objval.allowtext(e.KeyChar)

End Sub

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


System.Windows.Forms.KeyPressEventArgs) Handles TXTiCODE.KeyPress

e.Handled = objval.allowdigit(e.KeyChar)

94
MEDICAL INVENTORY SYSTEM

End Sub

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


System.Windows.Forms.KeyPressEventArgs) Handles TXTiNAME.KeyPress

e.Handled = objval.allowtext(e.KeyChar)

End Sub

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


System.Windows.Forms.KeyPressEventArgs) Handles TXTquantity.KeyPress

e.Handled = objval.allowdigit(e.KeyChar)

End Sub

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


As System.Windows.Forms.KeyPressEventArgs) Handles Txtprice_per_unit.KeyPress

e.Handled = objval.allowdigit(e.KeyChar)

End Sub

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


System.Windows.Forms.KeyPressEventArgs) Handles TXTTOTAL.KeyPress

e.Handled = objval.allowdigit(e.KeyChar)

End Sub

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


System.Windows.Forms.KeyPressEventArgs) Handles TXTSEARCH.KeyPress

e.Handled = objval.allowdigit(e.KeyChar)

End Sub

End Class

95
MEDICAL INVENTORY SYSTEM

Dealer Form
Imports System

Imports System.Data

Imports System.Data.SqlClient

Public Class FRMDealer

Dim db As New Clsdb

Dim dt As New DataTable

Dim rownumber As Integer

Public cn As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|


DataDirectory|\Database1.mdf;Integrated Security=True;User Instance=True")

Dim objval As New Validation

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


System.EventArgs) Handles MyBase.Load

rownumber = 0

cmdShow_all_record.Visible = False

clear_control()

fill_grid()

bind_control()

End Sub

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


System.EventArgs) Handles txtcode.TextChanged

End Sub

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


System.EventArgs) Handles cmdnew.Click

Dim A As String

Dim CMD As SqlCommand

cn.Open()

CMD = New SqlCommand("select max(Dealer_code) from DEALER_MASTER1")

A = CMD.ExecuteScalar()

cn.Close()

If A = "" Then

A = 1

Else

96
MEDICAL INVENTORY SYSTEM

A = A + 1

End If

txtcode.Text = A

txtdname.Text = ""

txtphno.Text = ""

txtdaddress.Text = ""

txtcity.Text = ""

DTPdate.Text = ""

txtpincode.Text = ""

txtemail.Text = ""

End Sub

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


System.EventArgs) Handles cmdedit.Click

Try

If txtcode.Text <> "" And txtdname.Text <> "" And txtphno.Text <> ""
And txtdaddress.Text <> "" And txtcity.Text <> "" And DTPdate.Text <> "" Then

db.query_execute("update DEALER_MASTER1 set De_name='" +


txtdname.Text + "',Contact_no='" + txtphno.Text + "',Address='" + txtdaddress.Text
+ "',City='" + txtcity.Text + "',Date='" + DTPdate.Value.Date + "',Pincode=" +
txtpincode.Text + ",Email='" + txtemail.Text + "' where Dealer_code=" +
txtcode.Text + "")

MessageBox.Show("DATA UPDATED SUCCESFULLY")

clear_control()

bind_control()

fill_grid()

Else

MessageBox.Show("FIRST FILL ALL THE FEILD")

End If

Catch ex As Exception

MsgBox(ex.Message)

End Try

End Sub

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


System.EventArgs) Handles cmdcancel.Click

bind_control()

97
MEDICAL INVENTORY SYSTEM

fill_grid()

End Sub

Function fill_grid()

dt = db.loaddata("select * from DEALER_MASTER1")

DataGridView1.DataSource = ""

DataGridView1.DataSource = dt

Return 0

End Function

Function bind_control()

Try

txtcode.DataBindings.Add("Text", dt, "Dealer_code")

txtdname.DataBindings.Add("Text", dt, "De_name")

txtphno.DataBindings.Add("Text", dt, "Contact_no")

txtdaddress.DataBindings.Add("Text", dt, "Address")

txtcity.DataBindings.Add("Text", dt, "City")

DTPdate.DataBindings.Add("Text", dt, "Date")

txtpincode.DataBindings.Add("Text", dt, "Pincode")

txtemail.DataBindings.Add("Text", dt, "Email")

Catch ex As Exception

MsgBox(ex.Message)

End Try

Return 0

End Function

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


System.EventArgs) Handles cmdfirst.Click

Me.BindingContext(dt).Position = 0

rownumber = 0

End Sub

Function clear_control()

Try

txtcode.DataBindings.Clear()

txtdname.DataBindings.Clear()

txtphno.DataBindings.Clear()

98
MEDICAL INVENTORY SYSTEM

txtdaddress.DataBindings.Clear()

txtcity.DataBindings.Clear()

DTPdate.DataBindings.Clear()

txtpincode.DataBindings.Clear()

txtemail.DataBindings.Clear()

dt.Clear()

Catch ex As Exception

MsgBox(ex.Message)

End Try

Return 0

End Function

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


System.Windows.Forms.KeyPressEventArgs) Handles txtcode.KeyPress

e.Handled = objval.allowdigit(e.KeyChar)

End Sub

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


System.Windows.Forms.KeyPressEventArgs) Handles txtdname.KeyPress

e.Handled = objval.allowtext(e.KeyChar)

End Sub

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


System.Windows.Forms.KeyPressEventArgs) Handles txtpincode.KeyPress

e.Handled = objval.allowdigit(e.KeyChar)

End Sub

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


System.Windows.Forms.KeyPressEventArgs) Handles txtcity.KeyPress

e.Handled = objval.allowtext(e.KeyChar)

End Sub

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


System.Windows.Forms.KeyPressEventArgs) Handles txtphno.KeyPress

e.Handled = objval.allowdigit(e.KeyChar)

End Sub

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


System.Windows.Forms.KeyPressEventArgs) Handles txtsearch.KeyPress

e.Handled = objval.allowdigit(e.KeyChar)

End Sub

99
MEDICAL INVENTORY SYSTEM

End Class

100
MEDICAL INVENTORY SYSTEM

Items form
Imports System

Imports System.Data

Imports System.Data.SqlClient

Public Class FRMITEMS

Dim db As New Clsdb

Dim dt As New DataTable

Dim rownumber As Integer

Public cn As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|


DataDirectory|\Database1.mdf;Integrated Security=True;User Instance=True")

Dim objval As New Validation

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


System.EventArgs) Handles cmdnew.Click

Dim A As String

Dim cmd As SqlCommand

cn.Open()

cmd = New SqlCommand("select max(Item_code) from ITEM_MASTER", cn)

A = cmd.ExecuteScalar()

cn.Close()

If A = "" Then

A = 1

Else

A = A + 1

End If

End Sub

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


System.EventArgs) Handles cmdsave.Click

Try

If txtcode.Text <> "" And txtname.Text <> "" And txtdetail.Text <> ""
And Txtprice.Text <> "" Then

db.query_execute("insert into ITEM_MASTER values(" + txtcode.Text +


",'" + txtname.Text + "','" + txtdetail.Text + "'," + Txtprice.Text + ")")

MessageBox.Show("DATA SAVED SUCCESFULLY")

clear_control()

fill_grid()

101
MEDICAL INVENTORY SYSTEM

bind_control()

Else

MessageBox.Show("FIRST FILL ALL THE FEILD")

End If

Catch ex As Exception

MsgBox(ex.Message)

End Try

End Sub

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


System.EventArgs) Handles DELETE.Click

Try

If txtcode.Text <> "" Then

db.query_execute("delete from ITEM_MASTER where Item_code=" +


txtcode.Text + "")

MessageBox.Show("DATA DELETED SUCCESFULLY")

clear_control()

fill_grid()

bind_control()

Else

MessageBox.Show("FIRST FILL ITEM CODE TO DELETE")

End If

Catch ex As Exception

MsgBox(ex.Message)

End Try

End Sub

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


System.EventArgs) Handles cmdcancel.Click

clear_control()

fill_grid()

bind_control()

End Sub

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


System.EventArgs) Handles cmdprevious.Click

Me.BindingContext(dt).Position = rownumber - 1

102
MEDICAL INVENTORY SYSTEM

rownumber = rownumber - 1

End Sub

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


System.EventArgs) Handles cmdnext.Click

Me.BindingContext(dt).Position = rownumber + 1

rownumber = rownumber + 1

End Sub

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


System.EventArgs) Handles cmdlast.Click

Me.BindingContext(dt).Position = dt.Rows.Count + 1

rownumber = dt.Rows.Count + 1

End Sub

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


System.Windows.Forms.KeyPressEventArgs) Handles txtcode.KeyPress

e.Handled = objval.allowdigit(e.KeyChar)

End Sub

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


System.Windows.Forms.KeyPressEventArgs) Handles txtname.KeyPress

e.Handled = objval.allowtext(e.KeyChar)

End Sub

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


System.Windows.Forms.KeyPressEventArgs) Handles txtdetail.KeyPress

e.Handled = objval.allowtext(e.KeyChar)

End Sub

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


System.Windows.Forms.KeyPressEventArgs) Handles Txtprice.KeyPress

e.Handled = objval.allowdigit(e.KeyChar)

End Sub

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


System.Windows.Forms.KeyPressEventArgs) Handles TXTSEARCH.KeyPress

e.Handled = objval.allowdigit(e.KeyChar)

End Sub

End Class

103
MEDICAL INVENTORY SYSTEM

Stock Form
Imports System

Imports System.Data

Public Class FRMSTOCK

Dim db As New Clsdb

Dim DT As New DataTable

Dim rownumber As Integer

Dim objval As New Validation

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


System.EventArgs) Handles MyBase.Load

rownumber = 0

clear_control()

fill_grid()

CMBiNAME.DataSource = DT

CMBiNAME.DisplayMember = "Item_name"

CMBiNAME.ValueMember = "Item_code"

bind_control()

cmd_show_all_record.Visible = False

End Sub

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


System.EventArgs) Handles delete.Click

Try

If txticode.Text <> "" Then

db.query_execute("delete from STOCK_MASTER where item_code=" +


txticode.Text + "")

MessageBox.Show("DATA DELETED SUCCESFULLY")

clear_control()

fill_grid()

bind_control()

Else

MessageBox.Show("FIRST ENTER ITEM CODE TO DELETE DATA")

End If

Catch ex As Exception

104
MEDICAL INVENTORY SYSTEM

MsgBox(ex.Message)

End Try

End Sub

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


System.EventArgs) Handles cmdedit.Click

Try

If txticode.Text <> "" And CMBiNAME.Text <> "" And txtquantity.Text <>
"" And DTPPURCHASE.Text <> "" And txtprice.Text <> "" Then

db.query_execute("update STOCK_MASTER set Item_name='" +


CMBiNAME.Text + "',Quantity=" + txtquantity.Text + ",Purchase_Date='" +
DTPPURCHASE.Value.Date + "',price=" + txtprice.Text + " where Item_code=" +
txticode.Text + "")

MessageBox.Show("DATA UPDATED SUCCESFULLY")

clear_control()

fill_grid()

bind_control()

Else

MessageBox.Show("FIRST FILL ALL THE FEILD")

End If

Catch ex As Exception

MsgBox(ex.Message)

End Try

End Sub

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


System.EventArgs) Handles cmdexit.Click

Me.Close()

End Sub

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


System.EventArgs) Handles cmdcancel.Click

clear_control()

fill_grid()

bind_control()

End Sub

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


System.EventArgs) Handles cmdfirst.Click

Me.BindingContext(DT).Position = 0

105
MEDICAL INVENTORY SYSTEM

rownumber = 0

End Sub

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


System.EventArgs) Handles cmdlast.Click

Me.BindingContext(DT).Position = DT.Rows.Count + 1

rownumber = DT.Rows.Count + 1

End Sub

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


System.EventArgs) Handles cmdsave.Click

Try

If txticode.Text <> "" And CMBiNAME.Text <> "" And txtquantity.Text <>
"" And DTPPURCHASE.Text <> "" And txtprice.Text <> "" Then

db.query_execute("insert into STOCK_MASTER values(" + txticode.Text


+ ",'" + CMBiNAME.Text + "'," + txtquantity.Text + ",'" + DTPPURCHASE.Value.Date +
"'," + txtprice.Text + ")")

MessageBox.Show("DATA SAVED SUCCESFULLY")

clear_control()

fill_grid()

bind_control()

Else

MessageBox.Show("FIRST FILL ALL THE FEILD")

End If

Catch ex As Exception

MsgBox(ex.Message)

End Try

End Sub

Function bind_control()

Try

txticode.DataBindings.Add("Text", DT, "Item_code")

CMBiNAME.DataBindings.Add("Text", DT, "Item_name")

txtquantity.DataBindings.Add("Text", DT, "Quantity")

DTPPURCHASE.DataBindings.Add("Text", DT, "Purchase_Date")

txtprice.DataBindings.Add("Text", DT, "price")

Catch ex As Exception

MsgBox(ex.Message)

106
MEDICAL INVENTORY SYSTEM

End Try

Return 0

End Function

Function clear_control()

txticode.DataBindings.Clear()

CMBiNAME.DataBindings.Clear()

txtquantity.DataBindings.Clear()

DTPPURCHASE.DataBindings.Clear()

txtprice.DataBindings.Clear()

DT.Clear()

Return 0

End Function

Private Sub cmd_show_all_record_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles cmd_show_all_record.Click

clear_control()

fill_grid()

bind_control()

cmd_show_all_record.Visible = False

End Sub

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


System.Windows.Forms.KeyPressEventArgs) Handles txtquantity.KeyPress

e.Handled = objval.allowdigit(e.KeyChar)

End Sub

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


System.Windows.Forms.KeyPressEventArgs) Handles txtprice.KeyPress

e.Handled = objval.allowdigit(e.KeyChar)

End Sub

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


System.Windows.Forms.KeyPressEventArgs) Handles txtsearch.KeyPress

e.Handled = objval.allowdigit(e.KeyChar)

End Sub

End Class

107
MEDICAL INVENTORY SYSTEM

Further Enhancement

In the system you can get the reports which includes bills,customers
information. In the bills we can know the item information and also stock
information.

Since modular and structure approach has been taken towards development
of system, it can also expand other functions of the part of organization. It also
very useful for the management. With the used of these system user can easily
update the record, view the record and quickly generate the report.

108
MEDICAL INVENTORY SYSTEM

Bibliography

1. www.freelancer.com

2. www.mednetus.com

3. www.captera.com

4. www.henryschein.com

109

You might also like