Anda di halaman 1dari 63

MEDICAL INVENTORY SYSTEM: A CASE STUDY OF ENESMAY

MEDICS

BY

..................................................

TO

WISCONSIN INTERNATIONAL UNIVERSITY COLLEGE, GHANA.


DEPARTMENT OF BUSINESS COMPUTING

IN PARTIAL FULFILMENT OF THE REQUIREMENT FOR THE AWARD OF A


BARCHELOR DEGREE IN MANAGEMENT AND COMPUTER STUDIES
DEGREE.

ON

10TH JUNE 2013

I, , hereby declare that this long easy is an original piece of


research conducted under the supervision of Mr. Emmanuel Sam of Wisconsin
International University College. In places where other peoples work has been
adapted, full acknowledgement has been given. No part of this easy has either been
presented in full or part to any other academic institution for any award.

DATE..
()
(STUDENT)

DATE..
EMMANUEL SAM
(SUPERVISOR)

DEDICATION
I dedicate this project work to the Almighty God for making it possible for me to
complete my university education in good health I am so grateful to him for his grace,
mercies and blessings in my entire live.

ii

ACKNOLEDGEMENT
My profound gratitude goes to my supervisor Mr. Emmanuel Sam of the Department
of Computer Science and Management for availing his expertise, suggestions, advices
comments and constructive criticisms to the completion of this write-up, and to all
lecturers of Wisconsin International University College for the knowledge they
impacted unto me throughout my studies.
Finally I would like to extend my appreciation to all my friends at Wisconsin
international university college and all persons or authors whose work and materials I
referenced for this project work. Thank you and God bless you

iii

TABLE OF CONTENT

iv

ABSTRACT
In healthcare industries, inventory management system is widely involved in their daily
activities. The inventory is needed to be updated frequently. Currently, some of the
transactions and inventory at Ernesmay medical s. This has led to problems such as human
errors in recording and calculating which in turn has led to delay in other activities This
project documents the development of a medical inventory system which involves few main
activities that are, drugs registration, drugs ordering, stock balance calculation and report
generation. The development was done using Ernesmay medical store as a case study. All
related information has been gathered from interview, observations and facts finding.
. This project reports documents the development of an inventory management software for
pharmacy inventory tracking system This thesis documents the design and implementation of
an integrated sales and inventory management system for bookshops. The development was
an attempt to find solutions to some of the limitations in existing bookshop inventory systems
being used currently by paperback bookshop, the design and implementation was therefore
based on recommendations and requirement of a sample of 11 paperback bookshops in the
Accra Metropolis who were selected based on the convenience sampling technique.
Information about sales and inventory management in bookshops, and sample data needed to
design and test the system were gathered through observations and interviews. The planning,
requirement specification, design, implementation, testing processes followed the waterfall
model, and the entire development was done in the Visual Studio Integrated development
environment, with Visual Basic as the programming language for the front end and MS
Access as the database management server.

CHAPTER ONE
BACKGROUND OF THE STUDY

The pharmacy is one of the most extensively used therapeutic facilities of the hospital
and one of the few areas where a large amount of money is spent on buying items
(Devnani, Gupta, Nigah & VED, 2010). Hospital supply system should ensure
adequate stock of all the required items to maintain uninterrupted supply. This
necessitates the effective and efficient inventory management of pharmacy store by
keeping a close supervision on important drugs, prevention of stealing, and priority
setting in purchase and distribution of drugs. A study suggested that review for
expensive drugs could bring out 20% savings in pharmacy store budget (Mahatma,
Dakhale, Hiware, Shinde, & Salve, 2012). This emphasizes the importance of
inventory management in the pharmacy.
This project reports documents the design and development of medical inventory
management software for small and medium community-based hospitals using
Enesmay medical store as a case study. Currently, this pharmacy is using a
computerized inventory management system. This system was built using DOS
environment and it is use to handle daily activities such as purchase order. Though the
system is serving it intended purpose it has led to new problems:
It runs slow in terms of page navigation since users need to jump from one page to
another page using hyperlink. Interaction between the user and the system is only via
the keyboard. Users either key in data or use the system/function keys. This leads to
time wastage.

Page 1 of 63

Since the current system was built to run DOS mode, the interface screen is also in
DOS environment (black screen).
The goal of this project was to improve on the usability of the current system by
transforming it into a graphical user interface application. This system will come
integration with a database created and management by MS SQL Server 2005
Database Management System. Therefore users will be able to retrieve pharmacy
information in more effective and efficient way.
According to Loudon (2010) a system that provides information to its users or clients
consist of people, equipments, and effective and efficient procedures to gather, sort,
analyze, evaluate and distribute needed, timely and accurate information to help
make market decision. Therefore the system will also provide three main services to
its users. This includes registration of new users, savings, withdrawals, and accessing
loans online. Others services will include teaching and assisting clients on how to
manage their loans and monies.

1.2

PROBLEM STATEMENT

As outlined above, the current inventory management of Enesmay medical store is


done with an application which runs in a DOS terminal, and this has given rise to
problems largely affecting the productivity of the store and its relationship with
customers.
Since the current system is unable to do back-up, part of sales transactions and greater
part of the inventory management is still done manually in books and this leads to
data redundancy. There is waste of resources since part of the information about
customers and transactions are written in note books as a form of back-up

Page 2 of 63

Again the manual system is exposed to mistakes such as human weakness and the
environment which leads to inaccurate information. This makes the integrity of the
existing system questionable.
Another problem is retrieval of information. Because part of the inventory is
managed manually, it is difficult and time consuming to generate information based
on data in books and data managed by the system, as this must be done manually.
To identify products that are reaching reorder level, the pharmacy clerk needs to
check stocks. The current system is unable search for specific items it displays all
items (whether in stock or out of stock) and since there are many products stock, it
may cost a lot time for the user to look through one by one.
Pharmacy clerks are unable to make right decision regarding when to order and how
to maintain the delicate balance between carrying too much and too little stock.
Carrying too much stock results in high inventory operating cost and carrying too
little may cause stock-outs and high order-cost.
The current system cannot generate monthly reports; only generate daily sales
transaction reports. Therefore pharmacy clerks will need to spend a lot of time to refer
the daily reports for producing the monthly or yearly report. In accurate inventory
report due to human error such as mistake in checking stock, mistake in changing
product and so on. So they are unable to obtain accurate figures and the repetitive
work will occur.

Page 3 of 63

1.3

OBJECTIVES OF THE PROJECT

The main objective of this project is to transform the DOS-based application of


Enesmay medical store into a more efficient and effective graphical user interface
application.
1.3.1 Specific Objectives
The specific objectives are as follows:

To study the functionalities of the existing system and improve on the


user interface

To re-design the database using a relational database management system,


MS SQL Server

To provide a graphical user interface for the generation of timely report

To improve on the security of inventory management system by


authenticating users through a login interface.

RESEARCH QUESTIONS

1.4

What are the functionalities of the existing system and how can the user
interface be transformed into a GUI?

How can the existing database be mapped unto a relational database


management system?

How can the current report generation be done in a graphical user interface
mode?

How can the security of inventory management be ensured using a login


interface?

Page 4 of 63

1.5

JUSTIFICATION OF THE STUDY

Medical inventory systems currently on the market have been identified to be too
expensive for small and medium sized pharmacies in most communities. These
medical facilities are therefore deprived of effective and efficient inventory
management. The proposed system will focus primarily on the most important aspects
of inventory management such as billing and balancing of stock, and eliminate
expensive technologies like the bar code readers, which thought adds to the efficiency
of the system increases the initial cost of deployment and maintenance. This will
enable small and medium size pharmaceutical stores to also benefit from similar
effective and efficient management of inventory enjoyed by large scale
pharmaceutical stores or medical facilities.
1.6

SCOPE OF STUDY

The scope of this project covers the study and the analysis of the existing system,
finding its merits and demerits, incorporating its merits into the new system and
improving the demerits for use by the new system. This system is a single-user
desktop based application targeted at the department manager, pharmacy clerk and
pharmacy manager and it can only.
1.7

LIMITATION OF THE STUDY

The research is limited by time and thus a study conducted to identify the data
requirement of the medical store was not in-depth. Besides, the needs of other medical
store could not be taken into consideration. Therefore, though the goal of the project
was to make the software for all small and medium size community based
pharmaceutical stores, this could not be achieved.

Page 5 of 63

1.1.2 ORGANIZATION OF THE STUDY


Chapter 2: this chapter reviews literature of existing system on e-banking, savings,
loan and concepts used in developing the system.
Chapter 3: this chapter deals with the methodology employed to achieve the
objectives of the project. These methods include observation and interview.
Chapter 4: This chapter captures the detailed design of the proposed system. The
design system comprises: entity- relationship diagrams, flowcharts of the existing
system etc. It will include coding, implementation and testing of the existing system.
Chapter 5: This chapter shall provide conclusion and recommendation for further
research work.

Page 6 of 63

CHAPTER TWO
LITERATURE REVIEW
2.0 Background of Inventory Management
According to Oxford dictionary, inventory means list of household goods, items and
stock. Inventory represents an important decision variable at all stages of product
manufacturing, distribution and sales, in addition to being a major portion of total
current assets of many business. Inventory often represents as much as 40% of total
capital of industrial organizations. It may represent 33% of company assets and as
much as 90% of working capital. Since inventory constitutes a major segment of total
investment, it is crucial that good inventory management be practiced to ensure
growth and profitability (Temeng, Eshun, & Essey, 2010).
The principal goal of inventory management involves having to balance the
conflicting economics of not wanting to hold too much stock (Adeyemi & Salami,
2010). The inventory management can bring out significant improvement not only in
patient care but also in the optimal use of resources. Continuous management can
provide the value added services to the patients (Mahatma, Dakhale, Hiware, Shinde,
& Salve, 2012)
Definition and Concept of Inventory Management
In pharmacy operations, inventory is referred to the stock of pharmaceutical products
retained to meet future demand. Inventory represents the largest current asset, as well
as liquid asset in pharmacy practice and its value continues to rise because of the
growth in variety and cost of pharmaceutical products (Dwivedi S., Kumar A,
Kothiyal P, 2012).

Page 7 of 63

Inventory management is defined as the continuing process of planning, organizing


and controlling inventory that aims at minimizing the investment in inventory while
balancing supply and demand (Desselle, & Zgarrick, 2009).
Inventory management refers to all the activities involved in developing and
managing the inventory levels of raw materials, semi-finished materials (work-inprogress) and finished good so that adequate supplies are available and the costs of
over or under stocks are low (Kotler, 2002). The cost of maintaining inventory is
included in the final price paid by the consumer. Good inventory represents a cost to
their owner. The manufacturer has the expense of materials and labour. The
wholesaler also has funds tied up. Therefore, the basic goal of the researchers is to
maintain a level of inventory that will provide optimum stock at lowest cost
(Rosenblatt, 1977). Inventory management in its broadest perspective is to keep the
most economical amount of one kind of asset in order to facilitate an increase in the
total value of all assets of the organization human and material resources (Morris,
2004). The major objective of inventory management and control is to inform
managers how much of a good to re-order, when to re-order the good, how frequently
orders should be placed and what the appropriate safety stock is, for minimizing stock
outs. Thus, the overall goal of inventory is to have what is needed, and to minimize
the number of times one is out of stock (Keth, Muhlemen, & Oakland, 1994).
Inventory as a stock of goods that is maintained by a business in anticipation of some
future demand (Drury, 1996). This definition was also supported by author who
stressed that inventory management has an impact on all business functions,
particularly operations, marketing, accounting, and finance. He established that there
are three motives for holding inventories, which are transaction, precautionary and

Page 8 of 63

speculative motives. The transaction motive occurs when there is a need to hold stock
to meet production and sales requirements (Schroeder, 2000).
Inventory Management Systems
Hence an Inventory management system is a system that replaces a manual system in
an organization (in this project, the focus on a pharmaceutical organization) to
manage their inventory adjustment and movement record. The purpose of inventory
system is to help user keep track of their inventory. Besides, it can help user manage
to make right decision in both when to order and how to maintain the delicate balance
between carrying too much and too little stock. Carrying too much stock results in
high inventory operating cost and carrying too little may cause stock-outs and high
order-cost. Therefore having the objective of an inventory management system is to
make inventory decisions that minimize the total cost of inventory, which is distinctly
different from minimizing inventory. It is often more expensive to run out of an item
than simply to keep more units in stock.
According to Hughes most pharmacy inventory decisions involve replenishment: how
much to order medicine, when to decide to order medicine, and when to place the
order. There are three costs associated with pharmacy inventory: (1) carrying costs,

(2) shortage costs, and (3) replenishment costs. For instance, the "costs" associated
with running out of a medicine product used in critical care might well involve
increased morbidity and mortality, clearly an unacceptable situation.
However, the basic tenets of these inventory-control systems should be examined by
hospital pharmacy managers and applied when appropriate. The availability of
microcomputers and relatively p o w h l spreadsheets will increase the utility of
complex models of inventory control that are too complicated for manual calculations.

Page 9 of 63

Hedrick et al (2008) infer that a successful inventory management involves


balancing the costs of inventory with the benefits of inventory. They go on to present
some pointers as to what a good inventory management should entail. Some of these
are:
1.

Maintaining a wide assortment of stock

2.

Increasing inventory turnover

3.

Keeping stock low

4.

Lower prices by making volume purchases.

5.

Having adequate inventory on hand.

The list above is all about ensuring that maintaining stock should not become a very
expensive function and positively affecting the business. The rate at which stock item
are used should balance the rate at which they are bought. One must ensure that stock
levels are monitored at all times to ensure that items do not run out completely.
Indeed the benefits that inventory module will offer the business is immense as it
would also be integrated with reporting systems to allow the manager and owner.
2.1

Studies on Information System

Very little attention has been paid to in Information Systems (IS) research to human
information behavior. An information technology-based approach to IS research may
be seen to emphasis the functional capabilities of the information technology
available. It is difficult to see where human information processing, beyond
interaction with the information technology-based system, naturally fits in.

An information system (IS) is a subset of the overall internal controls of a business


covering the application of people, documents, technologies, and procedures by
management accountants to solve business problems such as costing a product,
service or a business-wide strategy. Management information systems are distinct
from regular information systems in that they are used to analyze other information
Page 10 of 63

systems applied in operational activities in the organization. MIS is a planned system


of the collecting, processing, storing and disseminating data in the form of
information needed to carry out the functions of management. In a way it is a
documented report of the activities those were planned and executed.

According to Kotler (2010) "A marketing information system consists of people,


equipment, and procedures to gather, sort, analyze, evaluate, and distribute needed,
timely, and accurate information to marketing decision makers. Technology is no
longer an afterthought in forming or formulating business strategies but rather, the
actual cause and drive. In effect any business that wants to survive and succeed must
develop and implement strategies to effectively counter the competitive forces that
shape the structure of competition in industries.
John (2010) considers the potential role of anthropology as a source discipline for
information systems. Although anthropology has been largely neglected in the IS
research literature, it is argued that important insights can be gained by adopting an
anthropological perspective on information systems phenomena. Illustrates the value
of an anthropological perspective by looking at the relationship between information
technology and organizational culture. Shows that the concept of culture has generally
been used rather narrowly in the IS literature, and argues that a more critical,
anthropological view of the relationship between IT and organizational culture is
required.

Generally, IS covers those parts of the business processes where information handling
can be effectively automated. The nature of this IS requires every information
processing option to be specified and programmable. The modern IS relies on the
establishment of generalized, systematic behaviour and cannot recognize the diversity

Page 11 of 63

of human preferences and behaviour. Nor would we necessarily expect, or even want
it.

Zuboff (1988), the information technology-based IS also requires every data item
used by the IS to be uniquely and precisely defined, and storable on a computer. This
represents an information engineer's view: a hard view of information. Received
wisdom tends to set the boundary of an IS at the point at which it produces outputs
for end-users. This is pervasive in traditional analysis and design literature, in which a
key task is identifying the system scope. This is defined as bound by interfaces to the
external world through which the system receives inputs and produces outputs. In his
view, the usefulness of these outputs in creating meaning and information for the
person receiving them are not of concern to the IS development team, once the
requirements for the input or output have been agreed. This is not to say that human
involvement with IS has been completely ignored. Some IS researchers have
identified the gap in understanding of how people work with the information
produced by computer systems, although we were not able to identify any studies that
addressed the gap.

Kling had frequently written about the need for a better understanding of how people
work before improved productivity from new information technologies can be
expected (Kling 1987, 1991; Iacono and Kling 1987). He observed, "...it is common
for organizations to under invest in the support for helping people effectively to
integrate computerized systems into their work." (Kling: 302). To integrate
information technology-based- and human information processing more effectively,
Bacon argues for information provision to take into account how end-users translate
information into action. His research demonstrated how information needs to be made

Page 12 of 63

"...purposeful, relevant, and of optimal value". He defined the type of information


designed to optimize these desirable attributes as kinetic information - "...that which is
oriented to or energizes purposeful and relevant action in critical or key areas of the
organization" (Bacon 1994: 448). A focus on information behaviour could help
identify the kind of information that lends itself to 'purposeful and relevant action'.
Furthermore, aspects of exhibited information behaviour could serve as measures
reflecting the extent of the information worker's information awareness.

Boland noted with concern that, "The researcher must... assume that the users of data
systems employ a standard and shared set of interpretive structures to gain meaning
from the data". (Boland, 1987): 364)
As Davenport concludes, Humans prefer information and knowledge over data. For
40 years we've managed data and called it information. But people prefer richer
information diets - information with human context, experience, insight and
elaboration." (Davenport,1997: 7)

DeLone and McLean (1992) published a widely quoted causal model for judging IS
success, based on a detailed consideration of 180 (mainly positivist) seminal IS
articles. Six critical dimensions of success are proposed, including information use
(the other five are: system quality, information quality, user satisfaction, individual
impact, and organization impact). However, 'use' in this case refers to whether or not
the information received is used, not how or how well it is used.

Bonner applied DeLone and McLean's model to a case study and found some
evidence supporting an additional dimension of success: information awareness "...an individual's level of awareness for the existence, purpose and value of

Page 13 of 63

information and of its probable impact at the individual and organizational level"
(Bonner, 1996: 8). Not only is an important information behaviour component
missing from DeLone and McLean's model, but it was missed because the articles
reviewed did not consider information behaviour to be important in IS research.

Landauer (1995), having argued how unproductive modern computer-based systems are, we
went on to strongly advocate user-centered design, designing human-computer interfaces to be
both useful and usable to the end-user. His book represents a rare, thoughtful, pragmatic look at
the issues and practicalities surrounding user-centered design. In particular, human information
behaviour is examinedalbeit on the periphery of the systemin a way that relates to design
issues. This appears to be consistent with what Davenport (1994) refers to as Human-Centered
Information Management (HCIM)

(Allen, 1996: 1, 16) he provides a rich insight into how a user's 'knowledge structures'
and 'abilities, styles and preferences' influence their information behaviour. He argues
that these factors must be incorporated into the system design process. Allen claims
that systems developed using traditional approaches are "...opaque to the user. They
are complex, because of built in functional complexity and because they are designed
to accommodate multiple agents: authors, value-added information professionals, and
(perhaps least of all) users." By contrast, he argues the user-centered design "...begins
with the user rather than the data. User-centered design emphasizes the process by
which users become informed, rather than the information that are used in the
process."

It appears that Davenport's concerns about singularity of meaning and contextual


concerns, and Landauer's strong argument for more user-centered design, have been
issues for information scientists as well. Certainly both Information Systems and

Page 14 of 63

Information Science, as disciplines, have research interests in human information


processing. But to what degree can the interdisciplinary research be integrated?

In an oft-quoted seminal paper, Dervin and Nilan (1986: 16) saw only limited value in
information systems research. The problem, they argued, was fundamental - IS
academics tended to see information, information processing, and consequently
information systems from an engineering perspective. IS research was based on what
they called the traditional paradigm, "...one in which information is seen as
objective... It is one that searches for trans-situational propositions about the nature
and use of information systems. It does this by focusing on externally observable
dimensions of behaviour and events."

CHAPTER THREE
METHODOLOGY
3.0 INTRODUCTION
This chapter explains the methods and models followed and tools used in designing
the database and the GUI for the software. Some of the method applied here are
observation and interview. The methods were used to bring out some deficiencies in

Page 15 of 63

the old manual system and to adapt these weaknesses and improve on them to develop
the new system.
3.1
Population
The processes and data requirement used for this project was based on a case study of
Enesmay medical store whose medical inventory software needed an upgrade. The
population for this project was therefore the staff of Enesmay medical store,
specifically the administrators, clerks and other users of the existing system.
3.2
Data Collection
Data was collected through observations and interviews as follows:
3.2.1 Observation
An observational study was conducted to take note of Enesmays business processes
and data requirements. Users of the existing systems and personnel of the medical
store were observed while they going about their daily activities. This was done to
take note of business processes in order to identify how they have been represented in
the old system and redesign or re-model them if necessary. Through this, the data
requirements of the users were also identified. It was observed that the users actually
performed their job and recorded the information manually into the note book and
card of the customer respectively. The user goes about performing this same
processes or activities or task from customer to customer and how he or she acts or
reacts is in response to specific situations. He or she does that through explaining core
issues to customer. The norms and attitudes expressed by the user also present an
important source of data. This method was used because the activities of the user were
fairly routine. The essential characteristics of the users job were identified. The
processes and activities carried out were time consuming and tiresome.

Page 16 of 63

3.2.1 Interview
Convenient sampling method was employed to interview the users about the existing
system. A cross section of the staff was interviewed. Though the staffs were reluctant
to give some vital information, open ended question was used to gather data about the
business processes of the organization. It was found out that all the activities carried
out by the business were all manual.
3.4

Software Design Model

The software design model adopted for the development process is the water fall
model and it is illustrated in the diagram below. It shows the various stages of the
development and what was done at each stage.
Medical Inventory System

Requirement Analysis

Testing
Maintenance
Coding

Problem
Definition

System testing

Requirement
specification

Design
Planning
and
scheduling

Integration testing
Data Design

S/w and h/w


requirement

Unit
testing

Modular
design

Figure 1.1: Software Development Model


3.5

The Logical Database Table

This model describes the properties of the attributes of the individual entities
constituting the database for the new system.
Table 3.1: Log In Master

Page 17 of 63

NO

NAME

TYPE

SIZE

CONSTRAINT DESCRIPTION

Username

Varchar

10

Not Null

Username

Password

Varchar

10

Not Null

Password

Table 1.1 shows the logical design of the table which stores data about login, that is
user name and passwords of users who have been given access to the system.
Table 3.2: Billing Data
NO

NAME

TYPE

SIZE

CONSTRAINT DESCRIPTION

No

Int

10

Primary Key

No

Billno

Int

10

Not Null

Billno

C_code

Int

10

Not Null

Customer Code

C_name

Varchar

15

Not Null

Customer Name

Itemcode

Int

10

Not Null

Item Code

Itemname

Varchar

15

Not Null

Item Name

Quantity

Float

10

Not Null

Quantity

Price_Per_Unit

Float

10

Not Null

Price per unit

Total_Price

Float

10

Not Null

Total Price

10

Salesdate

Datetime

Not Null

Salesdate

Table 3.2 shows how the attributes associated with billing processes were modeled: their data
types, domain, and data integrity constraints set. This table stores details of all billing
information. This keeps records customer who purchase our item including customer name, bill
no, and total amount.
Table 3.3: Customer Master Table
NO

NAME

TYPE

SIZE

CONSTRAINT

DESCRIPTION

Cid

Int

10

Primary Key

Customer Id

Page 18 of 63

C_name

Varchar

15

Not Null

Customer Name

C_no

Numeric

10

Not Null

Contact Number

C_add

Varchar

15

Not Null

Customer Address

City

Varchar

15

Not Null

City

Pin

Int

Not Null

Pin code

Email

varchar

15

Not Null

Email Address

Table 1.3 shows how the attributes customer attributes were modeled: their data types,
domain, and data integrity constraints set.

Table 3.4: Dealer Data


NO

NAME

TYPE

SIZE

CONSTRAINT

DESCRIPTION

D_code

Int

10

Primary Key

Dealer Code

D_name

Varchar

15

Not Null

Dealer Name

C_no

Numeric

10

Not Null

Contact Number

Add

Varchar

15

Not Null

Address

City

Varchar

10

Not Null

City

Date

Datetime

Not Null

Datetime

Pin

Numeric

Not Null

Pin Time

Email

Varchar

15

Not Null

Email Address

Page 19 of 63

Table 3.5 Items


NO

NAME

TYPE

SIZE

CONSTRAINT

DESCRIPTION

I_code

Int

10

Primary Key

Item Code

I_name

Varchar

15

Not Null

Item Name

I_details

Varchar

15

Not Null

Item details

Price

Float

10

Not Null

Price

Table 3.6: Sales Data


NO

NAME

TYPE

SIZE

CONSTRAINT

DESCRIPTION

NO

Int

10

Primary Key

Dealer Number

D_code

Int

15

Not Null

Dealer Code

D_name

Varchar

20

Not Null

Dealer Name

I_code

Int

10

Not Null

Item code

I_name

Varchar

20

Not Null

Item Name

Total_pur

Numeric

10

Not Null

Total Purchase

Pri_per_uni

Numeric

10

Not Null

Price Per Unit

To_price

Numeric

10

Not Null

Total Price

Pu_date

Datetime

10

Not Null

Perchase Date

10

Billno

Int

10

Not Null

Bill No

Page 20 of 63

Table 3.7: Purchase Return Table


NO

NAME

TYPE

SIZE

CONSTRAIN

DESCRIPTION

No

Int

10

Primary Key

Dealer Number

Billno

Int

10

Not Null

Bill Number

D_code

Int

10

Not Null

Dealer Code

D_name

Varchar

20

Not Null

Dealer Name

I_code

Int

10

Not Null

Item Code

I_name

Varchar

20

Not Null

Item Name

Quantity

Float

10

Not Null

Quantity

T_price

Float

10

Not Null

Total Price

P_date

Datetime

10

Not Null

Purchase Date

Table 3.8: Sales Details


NO

NAME

TYPE

SIZE

CONSTRAINT

DESCRIPTION

No

Int

10

Primary Key

Customer Number

C_code

Int

10

Not null

Customer Code

C_name

Varchare

20

Not null

Customer Name

I_code

Int

10

Not null

Item code

I_name

Varchare

20

Not null

Item Name

Quntity

Int

10

Not null

Quantity

Pri_per_u

Numeric

10

Not null

Price Per Unit

T_price

Numeric

10

Not null

Total Price

Billno

Int

10

Not null

Bill Number

10

S_date

Datetime

10

Not null

Sales Date

Page 21 of 63

Table 3.9: Sales Return Table


NO

NAME

TYPE

SIZE

CONSTRAIN

DESCRIPTION

No

Int

10

Primary Key

Customer Number

Billno

Int

10

Not Null

Bill Number

C_code

Int

10

Not Null

Customer Code

C_name

Varchar

20

Not Null

Customer Name

I_code

Int

10

Not Null

Item code

I_name

Varchar

20

Not Null

Item Name

Quantity

Float

10

Not Null

Quantity

T_price

Float

10

Not Null

Total Price

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

Table 3.10: Stock Master Table


NO

NAME

TYPE

SIZE

CONSTRAIN

DESCRIPTION

I_code

Int

10

Primary Key

Item Code

I_name

Varchar

20

Not Null

Item Name

Quantity

Numeric

10

Not Null

Quantity

P_date

Datetime

10

Not Null

Purchase Date

Price

Numeric

10

Not Null

Price Per Unit

Page 22 of 63

3.6:

Entity Relationship Diagram

The diagram below shows the entities whose logical designs are illustrated in the
tables above, and the relationships between them. A dealer for instance supplies the
medical store with products. A Product can be supplied by more than one dealer and
a Dealer can be associated with more than one product. Therefore there is many-tomany relationship between Dealer and Product and this is shown as M:M

Medical
Store
D. Name

Dealer

D. Code

Supplies

Item. Code

Item
.Code

M
M

D.Add

Product

Sales

M
C.Code

C.Name

Item
. Name
Price

C.City
Purchase
Bill
1

Customer

Sales
items

1
Owner

C.Ph.No
Figure 3.2: Entity Relationship Diagram for the proposed System

Page 23 of 63

3.7 SOFTWARE AND HARDWARE REQUIREMENT


Table 3.11 General Requirement for Server/Client
Type

Software

Hardware

Work Station/ Node

1. Windows XP
2. .Net Framework 2.0
3. Microsoft Office 2003

1. P-4
2. RAM -256 MB
3.Hard Disk-40GB

Database Server

1.Win2000 Advance Server


2. Microsoft Access

1.P-4
2.RAM- 1GB
3.Hard Disk-40GB

Application Server

1.Win 2000 Advance Server

1.P-4
2.RAM- 1GB
3.Hard Disk-40GB

3.8

DESIGN REQUIREMENTS

3.8.1 Development Tools and Technologies


Front End: The front of the application was developed in Visual Basic Programming
language based on the .Net framework Technology.
.NET is built on the Windows Server System to take major advantage of the OS and
which comes with a host of different servers which allows for building, deploying,
managing and maintaining Web-based solutions. The Windows Server System is
designed with performance as priority and it provides scalability, reliability, and
manageability for the global, Web-enabled enterprise. The Windows Server System
integrated software products are built for interoperability using open Web standards
such as XML and SOAP.
.NET is a "Software Platform". It is a language-neutral environment for developing
rich .NET experiences and building applications that can easily and securely operate
within it. When developed applications are deployed, those applications will target

Page 24 of 63

.NET and will execute wherever .NET is implemented instead of targeting a particular
Hardware/OS combination. The components that make up the .NET platform are
collectively called the .NET Framework.
The .NET Framework is a managed, type-safe environment for developing and
executing applications. The .NET Framework manages all aspects of program
execution, like, allocation of memory for the storage of data and instructions, granting
and denying permissions to the application, managing execution of the application
and reallocation of memory for resources that are not needed.
The .NET Framework is designed for cross-language compatibility. Cross-language
compatibility means, an application written in Visual Basic .NET may reference a
DLL file written in C# (C-Sharp). A Visual Basic .NET class might be derived from a
C# class or vice versa.
Back End: The backend which consist mainly of the database was developed with
Microsoft SQL Server, because of the following reasons:

Easy to use and easy to deployment.

Integration with Windows OS

Scalability

Import and Export of data in all major database system.

Centralized Management

Reliability

Automating Tasks

Page 25 of 63

Context Level Diagram


OWNER
Permit For
Sale

Supply Item
info

DEALER
Return Item
Info

Item
Info

MEDICAL Item Detail


INVENTORY Item Info
SYSTEM

Payment Info

USER

Payment Info

Figure 3.3: Context Level DFD for the software

It shows how various data flow to the medical inventory system from different
sources. The user sends data on times, payments to the system, and Data on item
details come from the system to the user. With regards to dealers, information on
items supplied from them to the system and data on rejected items, and payment goes
to them.

Page 26 of 63

3.9: First Level Data Flow Diagram

User Name & Pwd


ADMINSTOR
Verify

User info
LOGIN_MST

1.0
Login

Verify Info

Valid User
Order For Item Detail
DEALER
Supply Item Info
Payment Info

2.0
Purchase

DEALER_MST

Dealer Info
Item Info
Update Item Detail

ITEM_MST

Purchase Info.

STOCK_MST

Purchase Info
PURCHASE_MST

List Of Item Info


USER

3.0
Sales

Supply Item Detail


Payment Info

Sales Info
4.0
Generate
Report

Sales Info
Item Info

SALES_MST

Update Item Info


Report Info

Report Detail

REPORT

Figure 3.4: Second Level DFD For Process

Page 27 of 63

3.1
Sales
Order

Item info
USER

Item Detail

SALES_MST

Item Info
Give Item Info
Payment Info

3.2
Sales
porcess

STOCK_MST

Update Item Info


Update Info

Sales Info
Bill/Item Info

Return Item
Return Payment

3 .3
Generate Bill

3 .4
Sales
Return

Item Info
Bill Info

BILL_MST

Customer Add Sales


Info
Return Info

SALES RETURN _MST

Update Item Detail

Sales Info
3 .5 Sales Report Info
Generate
Report Detail
Report

REPORT

Figure 3.5: Overall DFD for all levels

Page 28 of 63

CHAPTER FOUR

DEVELOPMENT AND IMPLEMENTATION

4.0 INTRODUCTION
This chapter describes data flow diagrams and sequence diagrams of the manual
system and the inventory management system. It describes how users interact with the
system. Again it shows screen shorts of the various interface and explain what is
being illustrated
4.3 PROCESS ALGORITHM

Start
Login
Check
UserName&
Password

NO
Add Dealer
Entry

NO

Yes
NO

Available
Items info

Identify
Dealer/Item

Yes
Yes

Sales
A

Figure 4.1: Process Algorithm

Page 29 of 63

The algorithm for the system is illustrated in figure 4.1 above, and the steps are
explained below:
4.3.1: Start
The user starts the application by clicking on its icon on desktop. The application begins to load
by showing a splash screen to keep the users busy and also to assure them that the application is
working
4.3.2: Login Process
The user must provide their user name and password to get access to the system, the
system validates the user name and password, and after a successful login the system
displays the main screen with menu option available to the user as per rights. Figure
4.2 below shows a snap shot of a login session

Figure 4.2: Login Screen


4.3.2.1 Login and Main Screen
If No, that is if the login process fails, a message is displayed telling the user what went wrong
and offers the user more chances to try to login. The system automatically shuts down after three
unsuccessful attempts. If Yes, that is if the login process succeed then the user gains access to the
main screen.

Page 30 of 63

Figure 4.3a: Main Screen

Figure 4.3b: New User Information

Page 31 of 63

4.3.3: Check for Item availability


One of the things a user can do once in the system is to check for availability of items. If no
items have been entered then the user accesses the add dealer/Item entry screen and populates the
database with data. If Yes, that is if there are items available, the user can perform sales and
receive payment.

Figure 4.4: Items on Sale

4.4.5 Check for the dealer


Figure below is the interface where dealer information is added and modified. \

Page 32 of 63

Figure 4.4: Dealer


Information about customers are also recorded and stored in the database. The GUI that enables
one to add/modify customer data with ease is shown in the figure below:

Figure 4.5: Customer Data

Page 33 of 63

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

Figure 4.6: Sales Information

Figure 4.7: Bill Information

Page 34 of 63

Figure 4.8: Purchase Information

Page 35 of 63

Figure 4.9: Sales Information

Figure 4.10: Sales return Information

Page 36 of 63

Step-8:- Generate bill.

Figure 4.11: Item Report

Figure 4.11: Stock Report

Page 37 of 63

Transaction Process

A
Bill
Receive
Payment
Update
Stock

Return
Item

NO

Yes
Check Bill&
Take Item

Return
Payment
Exit
Figure Transaction Process

Page 38 of 63

Testing
After the preparation of the 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. various system tests such as program test, string test, and
system test were performed.
Program test:
These were 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 were 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.

Page 39 of 63

CHAPTER FIVE
CONCLUSION AND RECOMMENDATION
CONCLUSIONS
Through the observational study and interviews conducted it was gathered that the
existing manual system to assess the efficiency of the manual system. Though the
manual system aided the business to performing some business process, it was not
effective.
This documentation contains the preliminary studies for an online savings and loan
management system. The system was developed to enable Combine Business
Association to streamline its activities or processes such as registration, savings
withdrawals, and accessing of loans. The researchers achieved some of its objectives
due to time and financial constraints. The researchers were able to develop the online
savings and loan system management system for the business and it is working
effectively and efficiently.
It was found out that combine business association use manual methods to gather
data, analyze and evaluate these data. The business lacks scanners, printers and a good
internet system. The users move from customer to customer to transact business.
Again the researchers discovered that a staff was asked to proceed on leave because
thieves attacked him and collected the money he took from customers.
Combine business association find it difficult to give loans to clients who were not
their customer. This is because they find it difficult in collecting their monies or to
locate the defaulter

Page 40 of 63

RECOMMENDATION
Due to time and financial constraints, the researchers could not achieve the entire
objectives stated. In view of this, the researchers would like to recommend that, other
financial institutions in Ghana must be included in the studies to broaden or wind the
scope of studies. Again a database must be created to gather information on people
who took loans with the organization
Furthermore, the following should be under taken in the business; the system should
be periodically updated, maintenance must be immediately carried out when needed,
the various departments of Combined Business Association should be networked, as
the association expands other departmental systems must be computerized to enable
fast access to relevant information, that in the future, with any availability of funds,
Combined Business Association should be in a Wide Area Network (WAN) for data
to be remotely accessed and lastly training is needed for any new system to work
without any or minimum failure. Without knowledge about the system, end user
would see the proposed system as rocket signs and may even reject the system.
Therefore, end users in this case data entry personnel, coordinators, employees, not
forgetting the system administrators must be made to understand how the system
operates as well as their rights and responsibilities. This can be achieved through well
structured training procedures. Training sections on this system would not take more
than two weeks.

Page 41 of 63

REFERENCES
Aderson J. C (2006) Customer Value Proportion of Business Market. Havard:
Business Press
Anake C (1999) Managing Customers. New York: The Free Press
Brian, K. Williams & Stacey, C. Sawyer (2001) Using Information Technology. USA:
McGraw-Hill Companies Inc,
Douclas Hilman, Richard F Kochanek, Corine Norgaard (1991). Modeen Banking and
Finance technology.USA: Fird Inc
Davis F. D (2000). The use of acceptance information technology. New York:
Kenneth, C. Loudon & Jane, P. Loudon (2010). Management Information Systems.
USA: John Willey & Sons Inc
Rob, Peter and Colonel, Carlos (1997). Database System Design and Implementation.
USA: McGraw-Hill Companies Inc,
Retrieved April 5, 2013, from Wikipedia en.wikipedia.org/wiki/Microfinance
Retrieved

May

16,

2013,

from

Modern

Ghana

www.modernghana.com/news/110942/1/micro-credit-for-african-women.html
Stephen B Hask (2011) Management of Information System. Washinton DC: CCSD.
Williams C (1983) Decision Support System- Database Model Oriented User. New
York: Petroceli Books Inc.

Page 42 of 63

APPENDIX A
APPENDIX A 1.1

DEALER SOURCE CODE


Private Sub cmdsave_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs)
Handles cmdsave.Click
Try
If txtcode.Text <> "" And
txtdname.Text <> "" And txtphno.Text <> "" And
txtdaddress.Text <> "" And txtcity.Text <> "" And
DTPdate.Text <> "" And txtpincode.Text <> "" And
txtemail.Text <> "" Then
db.query_execute("insert into
DEALER_MASTER1 values(" + txtcode.Text + ",'" +
txtdname.Text + "'," + txtphno.Text + ",'" +
txtdaddress.Text + "','" + txtcity.Text + "','" +
DTPdate.Value.Date + "'," + txtpincode.Text +
",'" + txtemail.Text + "')")
MessageBox.Show("DATA SAVED
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 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
DEALER_MASTER1 where Dealer_code=" + txtcode.Text
+ "")
MessageBox.Show("DATA DELETED
SUCCESFULLY")

Page 43 of 63

clear_control()
bind_control()
fill_grid()
Else
MessageBox.Show("ENTER DEALER
CODE TO DELETE RECORD")
End If
Catch ex As Exception
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 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
Page 44 of 63

bind_control()
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

ITEMS SOURCE CODE


Private Sub cmdsave_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs)
Handles cmdsave.Click
Try

Page 45 of 63

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()
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

Page 46 of 63

Private Sub cmdedit_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs)
Handles cmdedit.Click
Try
If txtcode.Text <> "" And
txtname.Text <> "" And txtdetail.Text <> "" And
Txtprice.Text <> "" Then
db.query_execute("update
ITEM_MASTER set Item_name='" + txtname.Text +
"',Item_detail='" + txtdetail.Text + "',Price=" +
Txtprice.Text + " where Item_code=" +
txtcode.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 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
rownumber = rownumber - 1
End Sub

Page 47 of 63

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
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 CMDEXIT_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs)
Handles CMDEXIT.Click
Me.Close()
End Sub
Function fill_grid()
dt = db.loaddata("select * from
ITEM_MASTER ")
DataGridView1.DataSource = ""
DataGridView1.DataSource = dt
Return 0
End Function
Function bind_control()
Try
txtcode.DataBindings.Add("Text", dt,
"Item_code")
txtname.DataBindings.Add("Text", dt,
"Item_name")
txtdetail.DataBindings.Add("Text",
dt, "Item_detail")
Page 48 of 63

Txtprice.DataBindings.Add("Text", dt,
"Price")
Catch ex As Exception
MsgBox(ex.Message)
End Try
Return 0
End Function
Function clear_control()
txtcode.DataBindings.Clear()
txtname.DataBindings.Clear()
txtdetail.DataBindings.Clear()
Txtprice.DataBindings.Clear()
dt.Clear()
Return 0
End Function
Private Sub FRMITEMS_Load(ByVal sender As
System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
rownumber = 0
cmd_show_all_record.Visible = False
clear_control()
clear_control()
fill_grid()
bind_control()
End Sub
Private Sub btnsearch_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs)
Handles btnsearch.Click
Try
If TXTSEARCH.Text <> "" Then
clear_control()
dt = db.loaddata("select * from
ITEM_MASTER where Item_code=" + TXTSEARCH.Text +
"")
If dt.Rows.Count <> 0 Then
DataGridView1.DataSource = ""
DataGridView1.DataSource = dt
bind_control()
Page 49 of 63

cmd_show_all_record.Visible =
True
Else
MessageBox.Show("RECORD NOT
FOUND")
clear_control()
bind_control()
fill_grid()
End If
Else
MessageBox.Show("FIRST EMTER ITEM
CODE TO FIND")
End If
TXTSEARCH.Text = ""
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()
bind_control()
fill_grid()
cmd_show_all_record.Visible = False
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

Page 50 of 63

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
SALES SOURCE CODE
Private Sub cmdsave_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs)
Handles cmdsave.Click
Try
If txtno.Text <> "" And TXTcCODE.Text
<> "" And ComboBox1.Text <> "" And TXTiCODE.Text
<> "" And TXTiNAME.Text <> "" And
TXTquantity.Text <> "" And TXTprice_per_unit.Text
<> "" And TXTTOTAL.Text <> "" And Txtbillno.Text
<> "" And DTPsalesDATE.Text <> "" Then
db.query_execute("insert into
SALES_MASTER VALUES (" + txtno.Text + "," +
TXTcCODE.Text + ",'" + ComboBox1.Text + "'," +
TXTiCODE.Text + ",'" + TXTiNAME.Text + "'," +
TXTquantity.Text + "," + TXTprice_per_unit.Text +
"," + TXTTOTAL.Text + "," + Txtbillno.Text + ",'"
+ DTPsalesDATE.Value.Date + "')")
MessageBox.Show("DATA SAVED
SUCCESFULLY")

Page 51 of 63

Dim A As String
cn.Open()
Dim cmd As SqlCommand
cmd = New SqlCommand("select
Quantity from STOCK_MASTER WHERE Item_code=" +
TXTiCODE.Text + " ", cn)
A = cmd.ExecuteScalar()
A = (A) - (TXTquantity.Text)
db.query_execute("update
STOCK_MASTER set Quantity='" + A + "' where
Item_code=" + TXTiCODE.Text + "")
cn.Close()
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 DELETE_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs)
Handles DELETE.Click
Try
If txtno.Text <> "" Then
db.query_execute("delete from
SALES_MASTER where No=" + txtno.Text + "")
MessageBox.Show("DATA DELETED
SUCCESFULLY")
clear_control()
fill_grid()
bind_control()
Else
MessageBox.Show("FIRST ENTER NO
TO DELETE DATA")
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try

Page 52 of 63

End Sub
Private Sub cmdedit_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs)
Handles cmdedit.Click
Try
If txtno.Text <> "" And TXTcCODE.Text
<> "" And ComboBox1.Text <> "" And TXTiCODE.Text
<> "" And TXTiNAME.Text <> "" And
TXTquantity.Text <> "" And TXTprice_per_unit.Text
<> "" And TXTTOTAL.Text <> "" And Txtbillno.Text
<> "" And DTPsalesDATE.Text <> "" Then
db.query_execute("update
SALES_MASTER SET Cust_code=" + TXTcCODE.Text +
",Cust_Name='" + ComboBox1.Text + "',Item_code="
+ TXTiCODE.Text + ",Item_name='" + TXTiNAME.Text
+ "',Quantity=" + TXTquantity.Text +
",Price_Per_unit=" + TXTprice_per_unit.Text +
",Total_price=" + TXTTOTAL.Text + ",BillNo=" +
Txtbillno.Text + ",SalesDate='" +
DTPsalesDATE.Value.Date + "' WHERE No=" +
txtno.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 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
Page 53 of 63

Me.BindingContext(dt).Position = 0
rownumber = 0
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
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 cmdexit_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs)
Handles cmdexit.Click
Me.Close()
End Sub
Function bind_control()
Try
txtno.DataBindings.Add("Text", dt,
"No")
TXTcCODE.DataBindings.Add("Text", dt,
"Cust_code")
TXTiCODE.DataBindings.Add("Text", dt,
"Item_code")
TXTquantity.DataBindings.Add("Text",
dt, "Quantity")
TXTprice_per_unit.DataBindings.Add("Text", dt,
"Price_Per_unit")
TXTTOTAL.DataBindings.Add("Text", dt,
"Total_Price")
Page 54 of 63

Txtbillno.DataBindings.Add("Text",
dt, "BillNo")
DTPsalesDATE.DataBindings.Add("Text",
dt, "SalesDate")
ComboBox1.DataBindings.Add("Text",
dt, "Cust_name")
TXTiNAME.DataBindings.Add("Text", dt,
"Item_name")
Catch ex As Exception
MsgBox(ex.Message)
End Try
Return 0
End Function
Function clear_control()
txtno.DataBindings.Clear()
TXTcCODE.DataBindings.Clear()
ComboBox1.DataBindings.Clear()
TXTiCODE.DataBindings.Clear()
TXTiNAME.DataBindings.Clear()
TXTquantity.DataBindings.Clear()
TXTprice_per_unit.DataBindings.Clear()
TXTTOTAL.DataBindings.Clear()
Txtbillno.DataBindings.Clear()
DTPsalesDATE.DataBindings.Clear()
dt.Clear()
Return 0
End Function
Function fill_grid()
dt = db.loaddata("select * from
SALES_MASTER ")
DataGridView1.DataSource = ""
DataGridView1.DataSource = dt
Return 0
End Function
Private Sub SEARCH_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs)
Handles SEARCH.Click
Try
If TXTSEARCH.Text <> "" Then
clear_control()

Page 55 of 63

dt = db.loaddata("select * from
SALES_MASTER where BillNo=" + TXTSEARCH.Text +
"")
If dt.Rows.Count <> 0 Then
DataGridView1.DataSource = ""
DataGridView1.DataSource = dt
bind_control()
cmd_show_all_record.Visible =
True
Else
MessageBox.Show("RECORD NOT
FOUND")
clear_control()
bind_control()
fill_grid()
End If
Else
MessageBox.Show("FIRST EMTER
BILLNO TO FIND")
End If
TXTSEARCH.Text = ""
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub FRMSALES_Load(ByVal sender As
System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
Try
'Dim dt1 As New DataTable
'Dim CMD As SqlCommand
' Dim DR As SqlDataReader
' Dim da As New SqlDataAdapter
'dt1.Clear()
rownumber = 0
clear_control()
fill_grid()
bind_control()
' cn.Open()
'CMD = New SqlCommand("select * from
CUSTOMER_MASTER", cn)
' da = New SqlDataAdapter(CMD)
' da.Fill(dt1)
' ComboBox1.DataSource = dt1
Page 56 of 63

' ComboBox1.DisplayMember =
"Cust_name"
' ComboBox1.ValueMember = "Cid"
' cn.Close()
' Dim dt2 As New DataTable
' dt2.Clear()
' dt2 = db.loaddata("select * from
ITEM_MASTER ")
' TXTiNAME.DataSource = dt2
' TXTiNAME.DisplayMember =
"Item_name"
' TXTiNAME.ValueMember = "Item_code"
cmd_show_all_record.Visible = False
Catch ex As Exception
MsgBox(ex.Message)
End Try

Page 57 of 63