Você está na página 1de 72

CHAPTER 1

1.INTRODUCTION

In this Computer era, for an organization it is essential to keep track of the


details about the employees and their works. The project elaborates the work done for
developing the software application Phone Shop to monitor the daily item sales works
done by an employee. The objective of this project is to automate sales item assets
available in the company through a centralized on-line system and to
provide easy monitoring of various cell phones in the company. Collecting
the data’s of all assets can activate this project. The module used in this
projects are a log in page for registration, Assigning projects to the employees, giving
approvals to access, tracking theirs daily works done and generating the report.

Where people order the toys peripherals, my project maintains that order to
create invoice entry and go to some step way sales and stock section. This system is
totally a centralized System. This Project operation is depth and manages with a
scientific approach and with latest techniques. This Project gives a model of how to
manage the sales Information through a software package called as “Phone Shop”.

The following are the Objectives that are to be addressed by the system
Management Administrative in their respective Locations.

 Identifying the Drawbacks in the existing Operations in the old Tool and
manual systems of Documents.
 Whether the existing system is able to low information.
 Whether is it possible to get information about business activities, Which is a
difficult process at present

1
Based in the above, the research scope is widened further to strength this
project Operations by eliminating the Existing System and introducing an effective
Information System. The existing drawbacks are addressed to improve the system in
a better way and the new System should take care of the future requirements and
Demand for the Organization in the Scope and also the Customer needs are addressed
in the System.

2
CHAPTER 2

2. PROBLEM DESCRIPTION AND METHODOLOGY

2.1 SYSTEM STUDY

System Study is an activity that encompasses most of the tasks.

The main tasks involved are:

• Learn the details of the current system.

• Develop insight into the future demands.

• Document the details of the current system.

• Evaluate the effectiveness and efficiency of the current system.

• Recommend the necessary revisions and improvements.

• Document the new system features.

After knowing about the old system’s limitation we move to the important phase of
the system analysis that is proposed solution. This proposed solution means the solution
to the limitation of the present old system. This proposed solution should be prefect and
useful for whom its going to be developed and based on what limitations of the old
system the new system is going to be developed. So in this part we have to clearly define
what are the proposed solution should be carefully developed so that end user attains the
maximum advantage from it.

3
2.1.1 FEASIBILTY STUDY

The work of actuaries is typically concerned with the projection of asset and
liability cash flows for insurance companies, pension funds and social security systems.
But these asset and liability cash flows cannot be projected with absolute certainty; there
is an inherent element of uncertainty associated with any actuarial projection. In
Principles Underlying Asset Liability Management the Society of Actuaries Task Force
on Asset Liability Management Principles identified the dynamic environments in which
these institutional entities operate, as well as the effects of pure randomness, as factors
that create uncertainties in the measures of cash flows and, hence, in the true future risk
exposures of the entity. Risk varies as the underlying risk factors, such as interest rates
and mortality, change in a dynamic manner over time, with either positive or negative
financial implications, and as the original estimated future expected cash flows are
replaced by the results emerging from the actual cash flows that are experienced. This
process, reflecting how cash flows react to factor changes will often result, over time, in
revisions being made to future risk factor assumptions.

The management and oversight of the financial condition of Social Security


systems will require the use of models to project the systems’ future uncertain cash flows.
In many cases, simple deterministic models are used and the management and oversight
activities are based on one single projection of expected future cash flows. In other cases,
such as when future cash flows are expected to depend on future economic conditions,
more complex stochastic models (or multiple sets of deterministic scenarios) may be
required to understand the interaction of the various factors that affect future cash flows.
Stochastic models are often used to simulate future expected cash flows under various
scenarios to help identify the associated risk exposures.

These models produce statistical distributions of potential results and, as a


consequence, different management strategies and policy options can be evaluated by
studying the range of results produced from modeling these cash flow projections.
Modeling can also be used to construct many possible futures or scenarios, and then,

4
results across all the scenarios can be used to measure risks inherent in the system. There
are also certain risks associated with the use of a particular model; model risk is created
when the model does not adequately represent the underlying process or reality. There are
two general classes of model risk; the risk of model misspecification or
oversimplification, and the risk of a changing environment not anticipated in the model.

Using a particular model with a too simple characterization of the distribution of


an economic variable may not disclose the inherent risk to the system. Model risk would,
for example, exist in circumstances where an inappropriate model is used with too few
extreme value sample points to adequately assess the risk for extreme events that have a
low incidence but significant financial impact. In addition, the volatility of certain
economic factors may vary over time and this may not be accurately captured in the
model. Communicating the nature of uncertainty requires particular care and skill to
ensure that the intended users of actuarial projections adequately comprehend the
implications of reliance on single-scenario or multi-scenario deterministic projections.
Even greater care and skill is required in communicating the uncertainties and the degree
of credibility associated with stochastic projections.

My project fully cover the sports item to sales, stocks and employee management
Administration, Supplier and product, purchase , sales and theirs reports.

2.1.2 EXISTING SYSTEM

• The system department maintains record of daily sales


activities manually
• Less time management
• Less items

Trace ability is very difficult for monitoring the activities.


Difficult in record maintenance.
.

5
2.1.3 PROPOSED SYSTEM

In this project, in the company there are stock and sales planning.
Each phone item has a various company. When user add the stock item and
sales man, supplier and etc all are goes to sales item

In the end of the process the consolidated report are generated.

2.2 SYSTEM SPECIFICATION

2.2.1 HARDWARE CONFIGURATION

The Hardware’s used for the development of the project is:

PROCESSOR - Intel Pentium IV DUAL Processor


RAM - 4GB
PRINTER - HEWLETT PACKARD (HP)
PROCESSOR - Intel Pentium Processor
CLOCK SPEED - 600MHz
RAM - 248MB
MONITOR - COMPAQ
HARD DISK - 10 GB
FLOPPY DISK - 1.44 MB
MOUSE - COMPAQ
KEYBOARD - 101 Keys – COMPAQ

6
2.2.2 SOFTWARE CONFIGURATION

The Software’s used for the development of the project is:

OPERATING SYSTEM - Windows XP


BACK END - Ms Access
FRONT END - VB 6.0

7
2.3. LANGUAGE SPECIFICATION

VISUAL BASIC 6.0

Traditional programming is essentially linear and based on the flow of execution.


Operation run for a fixed span or until they reach decision points written in to the
program and interrupting an on-going activity is either difficult or impassible to manage
programmers are responsible and use interface, and must write the code to do everything.
Microsoft visual basic is one of the best GUI and version 6.0 is the
Largest version of the popular programming language with its new features is a
visual basic is an even stronger content in the applications development area then ever
before.
Visual basic is object – oriented, i. e it involves around ready made objects,
and it is event-driven, i. e the visual basic systems knows how to handle image menus,
dialog boxes, drive and directory lists and much else.
Microsoft visual basic, the fastest and easiest to create applications for micro
soft windows. Visual basic provides with a complete set of tools to simplify repaid
applications developments.

Why visual basic?

It is possible to turn the visual basic as spreadsheet, word processor a pertly chart. It is
powerful windows programming tool, which works on GUI (Graphical User Interface)

What is visual basic?


The “Visual” part refers to the method used to create the graphical user interface (GUI).
Rather than writing numerous lines of code to describe the appearance and location of
interface elements, you simply drag and drop rebuilt object in to place on screen. If you
have ever used a drawing program such as pain, you already have most of the skills
necessary to create on effective user interface.

8
The “Basic” part refers to the BASIC (Beginners All-purpose Symbolic Instruction
Code ) language, a language used by more programmers than any other language in the
history of computing. Visual Basic has evolved from the original BASIC language and
now contains several hundred statements functions, and key words, the many of which
relate directly to the windows GUI.

The purpose of visual basic is to develop robust stand alone application, games and
utilities less time than it takes in other languages we can use also ActiveX technology to
create internet enable applications that are limited only by our imagination.

Visual Basic 6.0 is the newest addition to the family of visual basic products.
It allows us to create applications for our PC without being an export in C++ or other
programming languages.

Visual Basic 6.0 is specially designed to unitize the internet. It comes with
several control that allow us to create web based applications called active executables
they will work just like stand-alone Visual Basic applications but they are accessed
through the micro soft internet explorer 3.1 web browser. This allows us to revise our
applications and distributes then through the Internet.

SOME NEW FEATURES IN VISUAL BASIC 6.0 ARE GIVEN BELOW:

1. VB 6.0 is most productive tool for creating high-performance enterprise ans. web –
bared applications.
2. VB 6.0 integrated visual database tools and new data environment designer can
visually design oracle and Ms SQL server database and creak erasable data access
queries all without leaving the VB environment.
3. Data report designer can quickly crag forms or reports. Creation of custom data
hierarchies is an easy as filling out a dialog box and dragging the command to the
form.

9
4. VB 6.0 professional edition is designed for individual professional or corporate
developer who needs to create a Client/Server or Internet based applications.
5. With the emergency of dynamic HTML page designer, Multimedia rich applications
can be developed using the document.
6. Object model and dynamic HTML surface.

10
System Requirements for Visual Basic6.0 Applications

The following hardware and Software is required for Visual Basic applications.

Pentium 900 MHZ or higher microprocessor VGA 640* 480 or higher –


resolution screen supported is Microsoft windows NT 3.51 or letter or letter, or Microsoft
Windows 95 or later.

Microsoft Internet Explore version 4.01 or later (version 4.01 service pack or
later for DHTML application developers and 4x for end users of these applications).

Disk space requirements.


Standard edition. Typical installation 48 MB, full installation 80MB.
Professional o Edition. Typical installation 128MB, full installation 147MB.
Enterprise edition. Typical installation 48MB, full installation 80MB.
Additional components (if required) MSDN for (documentation); 64MB, Internet
employer 4x.application 66MB
CD-ROM (No MS – DOS support assumed).

ADO CONTROL (Active Data Object)

The ADO Data control user Microsoft ActiveX Data object (ADO) to quickly
create connection between data bound control and data provides. Data bound control are
any controls that feature a Data source property. Data provides can be any sources
written to provides can be any sources written to the OLEDB specification. We can also
easily create our own data provider using visual basic’s class module.

Although we can use the ActiveX data object directly in our application the ADO
Data control has the advantages of being a graphic control and an easy - to – use
interface that allows we to create database application with minimum of code.

11
USES:

Connect to a local or remote database. Open a specification database table or


define a set of records based on MS-ACCESS or view of the tables in that database

Pass data field values to data bound controls. Where we can display are change
the values. Add new records of update based on any changes make to data displayed in
the bound controls .

ACTIVE-X CONTROL :

An ActiveX control is an extension to the Visual Basic toolbar. You are ActiveX
controls just as you would any of the standard built – in controls such as the check box
control when you add on ActiveX control to a program. It becomes part of the
development and runtime environment and provides new functionality for your
applications.

COMMAND

The command button controls is used to begin, interrupt, or end a process. When
chosen a command button appears. Pushed in and released and is therefore sometimes
called a push button.

CHECK BOX

A Check box control displays an x when selected the x disappears when the
check box is cleared . Use this control to give the user a True/False or Yes/No option.
You can use check box controls in groups to display multiple choices from which the
user can select one of or more you can also set the value of check box programmatically
with the value of property.

12
COMMON DIALOG

The common Dialog control provides a standard set of dialog boxes for operations
such as opening and saving files. Setting print options, and selecting colors and fonts.
The control also has the ability to display help by running the windows help engine.

DATA REPORTS

The Microsoft data report s designers is a versatile data report generator has
features the ability to be crated banded hirerarcuical reports. Used in conjunction with a
data sources such as the data environment designers

USES

1.Automatically create reports that are exported in HTML format for instant distribution
the internet
2.Create reports that slow the sum of transaction occurring on a daily basis.

DATA GRID
The Data grid control is a sprout sheet – like bound control that display a sepsis
of rows and columns representing records and fees from a records and fields from a
records object. We can use the data grid to create on applications that also the end user
and write to most database. The Datgrid control can be quickly
Configured at design time with little or no code when we set the data source property at
design time with little or no code. When we set the data source property at design time,
the control is automatically filled and
Its column headers are automatically set from the data sources recordsets .
We can than edit the grid’s ,columns, delete, rearranged column head gears to or
adjusted columns width.

13
DRIVE LIST BOX

A drive list box control enables a user to select a valid disk drive at run time. Use
this control to display a list of all the valid drives in a user’s system. You can create
dialog boxes that enable the user to open to filefrom a list of files on a disk in any
available drive.

DIR LIST BOX

A DIR list box control displays directories and paths at run time. Use this
controls to display a hierarchical list of directories. You can create dialog boxes that for
example, enable a user to open a file from a list of files in all available directories.

DATACOMBO

The data combo and data list controls strangle resemble the standard list box and
combo controls but there are sum important different that give them great flexibility and
usefulness in database application. Both controls can be automatically filled from a
database field from the data control to which they can optionally pass selected field to a
second data control making them ideal for “lookup table” applications.

FILE LIST BOX

A File List Box control locates and lists files in the directory specified by the path
property at run time. Use this control to display a list of files selected by file type. You
can create a dialog Boxes in your application that, for example, enable the user to select a
file or group of files.

FRAME

14
Frame controls are used to provide an identifiable grouping for other controls.
For example you can use frame controls to subdivide a form functionally to repartee
groups of option button controls.

HIERARCHAL FLEX GRID

The Microsoft Hierarchical Flex Grid and Microsoft Flex Grid controls present
recordsets data, form one or more tables in the grid format.

The Hierarchical Flex Grid control the Hierarchical Flex Grid control provides
we with advanced features for displaying data in a grid . It is similar to the Microsoft
data bound grid (Data Grid) control but with the distinct difference that the Hierarchical
Flex Grid control does not allow the uses to edit data bound to, or contained within it.
This control therefore allows as to display data to the user while ensuring that the
original/Data remains secure and unchanged. It is also possible, however, to as cell –
editing features to our Hierarchical Flex Grid control combining it Edith the Text Box.

LABEL
A Label control is graphical control and we can use to display text that a user
can’t change directly.

TEXTBOX
A Text Box control, sometimes called on edit field or edit control, displays
information entered at design time, entered by the user, or assigned to the control in code
at run time.

TOOL BAR
A Toll Bar control contains a collection of button objects used to create a tool bar
that is associated with an application.

15
OPTION BUTTON
An option button control displays an option that can be turned on of off.

LIST BOX
A List Box control displays a list of items from which the user can select one or
more. If the number of items exceeds the number that can be displayed the scroll bar is
automatically added to list box control.
If no item is select the list index property value is – 1. The first item in the list is
list index 0, and the value of the list count property is always one more than the largest
list index value.

TIMER
A Timer control is can execute code at regular intervals by causing a timer event
to occur time control, in visible to the user is useful for background processing.

SHAPE
The shape control is used to create the following predefined shapes on forms,
frames, or picture boxes, rectangle, square, oval, circle rounded rectangle or rounded
square.
LINE
The line control is used to create simple line segments on a form of frame, or in a
picture box .
IMAGE LIST
An Image list control contains a collection of list image objects, each of which
can be referred to by its index or key. The image list control is meant by used alone, but
as a central to conveniently supply other controls with image.

IMAGE CONTROL
Use this image control to display a graphic . An from a bitmap, icon or metafiles
well as enhanced metafile well as enhanced metafile JBEG, or GIF files.

16
SCROL BAR CONTROLS
Scroll bar provide easy navigation through a long list of items or a large amount
of information.

STATUS BAR CONTROL


A status bar control provides a window, usually at the bottom of a parent from.
Through which an application can display various kinds of status data. The status bar
can be divided up into a maximum of sixteen panel object that are contained is a panels
collection.

DELETE
The Delete event occurs when the user performance some action , such as
processing the DEL key, to delete a record, but before the record is actually deleted.

DOBULE CLICK
The Double click event occurs when the user process and releases the left mouse
button twice over on object within double – click time limit of the system.
On a form the Double click event occur when the user double – clicks a blank
area or records selector on the from. For a control it occurs. When the user double-click
a control or its label in form view. The double –click events occurs. When the user
double-clicks the forms are control but before the result of the double click action
occurs. (for example before, Microsoft access select the word that the insertion point is
on in a text box.)

VISUAL BASIC 6.0 FEATURES

One of the major features enterprise edition of visual basic 6.0. It ‘s the
application of the crystal reports. This version acts as a front end and user Microsoft
access as it’s backend. The application of visual basic for application makes it a easier

17
to program OLE automation objects and means that visual basic code can be easily
moved between in the application that supports it.

The visual basic enterprise editor contains all of the features includes with the
visual basic professional edition and the visual basic learning edition. In addition, it
contains following features, available in the enterprise edition only for more information
about other editions of visual basic , see visual basic edition

NOTE
These features are also part of the visual studio enterprise edition, which
contains the full complement of Microsoft enterprise developments tools.

APPLICATION PERFORMANCE EXPLORER:

This tool enables you to testing the run time performance and resource load
characteristics of various enterprise application design scenarios you are considering.

ROMOTE DATA CONTROL:

The remote data control implements data access by using RDO, the Microsoft
Remote data object.

INFORMATION REPRESENTATION
All information in a relational data base is represented explicitly at the logical
level and in exactly one way as values in table.

GUARANTED ACCESS
We can design a multiple table Query to automatically fill in certain field values
for a new records. When we enter a value in the one field in the query or in a form based
on the query Microsoft access looks up and fill in existing information related to that
value. For example, if we know the value in the join field between a customer table and

18
an order table (typically a customer, identifier such as customer ID).We could enter the
customer ID and have Microsoft access enter the rest of the information for the
customer. If no matching information is found, Microsoft access displays on error
massage than the focus leaves the records.

DATA DICTIONARY
Data dictionary is the repository of data about data. A relational data base system
needs to maintain data about the relations. This information is called as data dictionary
or system data catalog.

Among the types of information the system must store

 Name of the relations .


 Names of the attributes of each relations.
 Domains of the attributes
 Names of views defined on the data base definition of those views
 Integrity constraints for each relations.
In systems that are highly sophisticated structures to stores relations statistical and
descriptive data about relations may be kept on the

 Number of tupelos in each relation.


 Method of storage used for each relations.
There are two type of data base dictionary standards. They are
 Conceptual standard
 Notional standard

CONTENTS OF DATA DICTIONARY

DATA ELEMENTS DESCRIPTION

19
A data elements is other wise called as on entity which corresponds to a thing a
object in real world is distinguishable from all other objects. In short a data elements
describe the data field are used in the application.

DATA STRUCTURE DESCRIPTION


In deals with the fields related to our project and now they are handle in our
project. This basically consist of structure before normalization .

DATA FLOW DESCRIPTION


The represents the normalized list of table and the existing relationship between
them through a common key.

PROCESS DESCRIPTION
Describes general and special policies that are carried out which serves as a basic
sources for generating reports.

20
MS-ACCESS

The RDBMS concept is gaining momentum all over the world. The MS-
ACCESS is a recently developed RDBMS for windows released in U.S.A by the
Microsoft corporation . Since operating performance for a public transport system call
for extensive data input and processing retrieval of required information must be quick
and efficient Access supports the event driven nature of the Windows environments and
has many event trapping features like on click, on open, on B1 click, before, update, after
update etc.
Event procedure are coded and tagged to those events according to the necessarily
of the application these procedure are run at those particular events and this the whole
coding based on event methodology. The forms of an Access help to create tables
screens queries aid in complicated queries and generating information reports is mage an
easy task.
MS ACCESS provides the user with the other feature like the MACROS &
MODULES to aid in designing completed applications

FEATURES OF MS-ACCESS

Access to data regardless of database format location, viewing and editing data in
servile popular database formats such as paradox database retrieved mad Micros soft
server.
The case of use made possible with window, for example creation of complex
queries with just few clicks of mouse using graphical query by exam.

Powerful Macros for creating database applications aid for application that
requires complex custom feature a complex programming language Access basic with
fully integrated development

21
2.4 SYSTEM DESIGN

Design is multi-step process that focuses on data structure software architecture,


procedural details, (algorithms etc.) and interface between modules. The design process
also translates the requirements into the presentation of software that can be accessed for
quality before coding begins.

Computer software design changes continuously as new methods; better analysis


and broader understanding evolved. Software Design is at relatively early stage in its
revolution.

Therefore, Software Design methodology lacks the depth, flexibility and


quantitative nature that are normally associated with more classical engineering
disciplines. However techniques for software designs do exist, criteria for design qualities
are available and design notation can be applied.

2.4.1 INPUT DESIGN

Input design is the process of converting user-originated inputs to a computer-


based format. Input design is one of the most expensive phases of the operation of
computerized system and is often the major problem of a system.

In the project, the input design is made in various window forms with various
methods. Toys Company Management is totally a centralized System. This Project
operation is depth and manages with a good approach and with latest techniques. This
Project gives a model of maintained the toys manufacture company production. Varieties
of toys assign and stored to databases and their cloths type, size, quality be given a toys
production. At a time toys accessories stock will be maintained.

The following features are the Objectives that are to be addressed by the toys
company management for an effective Administrative in their respective manure.

22
• Production based project
• Stock maintain
• Sales entry
• New Item
• Add Customer
• Invoice
• Search
• Stock, employee, customer report
Module Description

Module: 1
Employee Information:

This is the module, which contains details such as employee id, name, gender,
date of birth, address, position, salary, telephone number, start date. It contains the full
details of employee, which is making useful for this system.
The features included in it as,

• Add
• Update
• Select
• Delete All
• Delete
• Print
• Show All
• Clear
• Close

Module: 2
Customer Information:

This module contains the customer details, which is maintained in this project.
This customer details is maintained in this section to easy processing of a customer to be
identified. This module involves the features of

23
• Add
• Update
• Delete
• Close

Module: 3
Product details:

This module includes the details of the product to be installed in the market.
This is the module contains the fields as phone id, name, made by, quantity, price in,
percentage, price out. This module has the features as

• Add
• Update
• Delete All
• Delete
• Clear
• Search
• Close
• Open Stock

Module: 4
Invoice:

This module contains the details, which is useful for providing invoice description
to the particular product. It contains the data’s as product id, quantity, customer name,
employee name, and invoice number. It added the data in the grid format. This module
has the features as
• Add
• Remove
• Clear
• Print
• Exit

Module: 5
Stock Details:

24
The stock details contain nothing but only the full data’s stored. It also may check
the stock to be present or not and it is done through only by providing condition and
prints the resulting products. This module contain a feature add new product which is
used to add new item.

Module: 6
Search Product:

Particular product should be searched in this module. Here it contain features as


The process of searching is done by giving values of product id. It is maintained by
selecting the number, or through input values. This process brings the detailed data of a
particular product.

Module: 7
Windows Application:

The windows application used in this system is

• Windows Calculator
• Windows Notepad

25
DFD: Phone Shop

Employee

Employee Employee Details TblEmployee


and descriptions are
maintained.

Customer
Tblcustomer
Customer Details of customers
should be
maintained.

Product Tblproduct
Productio
Code, id , price,
n
percentages are
included.

Invoice
Used to print the
Invoice total production. Tblinvoice
And displays the
details.

Report
SFD: Phone Shop Used to print the
Report total production.
And displays the
details.

Administration

26
Employee

Windows
Application
Customer

Invoice
Report

Product

2.4.2 OUTPUT DESIGN

Output design generally refers to the results and information that are generated
by the system for many end-users; output is the main reason for developing the system
and the basis on which they evaluate the usefulness of the application. In any system, the
output design determines the input to be given to the application.

2.4.3 DATABASE DESIGN

The database design is a must for any application developed especially more for
the data store projects. In the project, admin table is designed to be unique in accepting
the username and the length of the username and password should be greater than zero.

27
2.4.3.1. Table Design

28
29
2.4.4 SYSTEM FLOW DIAGRAM:

Cell/stock

Employee

Sales

Invoice

Report

Fig 5. System Flow Diagram

30
Data Flow Diagram

Data Flow Diagram: Toys Company Management

Admin Add Mixing


New Item
Stock

Customer/

Add Customer

Sales and stock


Report

31
2.5 SYSTEM TESTING AND MAINTENANCE

2.5.1 UNIT TESTING:

The procedure level testing is made first. By giving improper inputs, the errors
occurred are noted and eliminated. Then the web form level testing is made. For example
storage of data to the table in the correct manner.

In the company as well as seeker registration form, the zero length username and
password are given and checked. Also the duplicate username is given and checked. In
the job and question entry, the button will send data to the server only if the client side
validations are made.

The dates are entered in wrong manner and checked. Wrong email-id and web site
URL (Universal Resource Locator) is given and checked.

2.5.2 INTEGRATION TESTING:

Testing is done for each module. After testing all the modules, the modules are
integrated and testing of the final system is done with the test data, specially designed to
show that the system will operate successfully in all its aspects conditions. Thus the
system testing is a confirmation that all is correct and an opportunity to show the user that
the system works.

2.5.3 VALIDATION TESTING:

The final step involves Validation testing, which determines whether the software
function as the user expected. The end-user rather than the system developer conduct this
test most software developers as a process called “Alpha and Beta testing” to uncover
that only the end user seems able to find.

32
The compilation of the entire project is based on the full satisfaction of the end
users. In the project, validation testing is made in various forms. In question entry form,
the correct answer only will be accepted in the answer box. The answers other than the
four given choices will not be accepted.

2.5.4 MAINTENANCE:

The objectives of this maintenance work are to make sure that the system gets into
work all time without any bug. Provision must be for environmental changes which may
affect the computer or software system. This is called the maintenance of the system.
Nowadays there is the rapid change in the software world. Due to this rapid change, the
system should be capable of adapting these changes. In our project the process can be
added without affecting other parts of the system.

Maintenance plays a vital role. The system is liable to accept any modification
after its implementation. This system has been designed to favor all new changes. Doing
this will not affect the system’s performance or its accuracy.

In the project system testing is made as follows:

o The procedure level testing is made first. By giving improper inputs, the errors
occurred are noted and eliminated. Then the web form level testing is made. For
example, storage of data to the table in the correct manner.

o In the form, the zero length username and password are given and checked. Also
the duplicate username is given and checked. The client side validations are made.

o The dates are entered in wrong manner and checked. Wrong email-id is given and
checked.

33
This is the final step in system life cycle. Here we implement the tested error-free
system into real-life environment and make necessary changes, which runs in an online
fashion. Here system maintenance is done every months or year based on company
policies, and is checked for errors like runtime errors, long run errors and other
maintenances like table verification and reports.

Implementation is the stage of the project when the theoretical design is turned
out into a working system. Thus it can be considered to be the most critical stage in
achieving a successful new system and in giving the user, confidence that the new system
will work and be effective.

The implementation stage involves careful planning, investigation of the existing


system and it’s constraints on implementation, designing of methods to achieve
changeover and evaluation of changeover methods.

Implementation is the process of converting a new system design into operation.


It is the phase that focuses on user training, site preparation and file conversion for
installing a candidate system. The important factor that should be considered here is that
the conversion should not disrupt the functioning of the organization.

The application is implemented in the Internet Information Services 5.0 web


server under the Windows 2000 Professional and accessed from various clients.

34
2.6 SYSTEM IMPLEMENTATION

Implementation is the most crucial stage in achieving a successful system and


giving the user’s confidence that the new system is workable and effective.
Implementation of a modified application to replace an existing one. This type of
conversation is relatively easy to handle, provide there are no major changes in the
system.

Each program is tested individually at the time of development using the data and
has verified that this program linked together in the way specified in the programs
specification, the computer system and its environment is tested to the satisfaction of the
user. The system that has been developed is accepted and proved to be satisfactory for the
user. And so the system is going to be implemented very soon. A simple operating
procedure is included so that the user can understand the different functions clearly and
quickly.

Initially as a first step the executable form of the application is to be created and
loaded in the common server machine which is accessible to the entire user and the server
is to be connected to a network. The final stage is to document the entire system which
provides components and the operating procedures of the system.

35
CHAPTER 3

3. CONCLUSIONS AND FUTURE WORK

3.1. CONCLUSION

It is concluded that the application works well and satisfy the users. The
application is tested very well and errors are properly debugged. The site is
simultaneously accessed from more than one system. Simultaneous login from more than
one place is tested.

The site works according to the restrictions provided in their respective browsers.
Further enhancements can be made to the application, so that the web site functions very
attractive and useful manner than the present one. The speed of the transactions become
more enough now.

3.2. FUTURE ENHANCEMENT

Every application has its own merits and demerits. The project has covered almost
all the requirements. Further requirements and improvements can easily be done since the
coding is mainly structured or modular in nature. Changing the existing modules or
adding new modules can append improvements. Further enhancements can be made to
the application, so that the web site functions very attractive and useful manner than the
present one.

36
APPENDIX – I

SCREEN SHOTS:

Main

37
New Product

38
Employee

39
Add Cutomer

40
Invoice

41
Search

42
Product Report

43
Employee Report

44
Cutomer Report

45
Invoice report

46
Source code

Employee Information
Xcxc Option Explicit
Dim ID As Boolean
Dim i As Variant

Private Sub CmdAdd_Click()


Dim add As String

'On Error GoTo Err


If Me.TxtEmpId = "" Then
MsgBox "Employee ID is Invalid", vbOKCancel, "Error ID"
Me.TxtEmpId.SetFocus
ElseIf Me.TxtName = "" Then
MsgBox "Employee Name is Invalid", vbOKCancel, "Error Name"
Me.TxtName.SetFocus
ElseIf Me.MEBDOB = "" Then
MsgBox "Employee Name is Ivalid", vbOKCancel, "Error DOB"
Me.MEBDOB.SetFocus
ElseIf Me.TxtPosition = "" Then
MsgBox "Position Is Invalid", vbOKCancel, "Error Position"
Me.TxtPosition.SetFocus
ElseIf Me.TxtSalary = "" Then
MsgBox "Salary Is Invalid", vbOKCancel, "Error Salary"
Me.TxtSalary.SetFocus
ElseIf Me.TxtTel = "" Then
MsgBox "Telephone Number is Invalid", vbOKCancel, "Error Telephon Number"
Me.TxtTel.SetFocus
ElseIf Me.txtstartdate = "" Then

47
MsgBox "Work Day Is Invalid", vbOKCancel, "Error Work Day"
Me.txtstartdate.SetFocus
ElseIf Me.txtAddress = "" Then
MsgBox "Address is Invalid", vbOKCancel, "Error Address"
Me.txtAddress.SetFocus
Else

With rst
.AddNew
!empID = Me.TxtEmpId
!EmpName = Me.TxtName
!Dob = Me.MEBDOB
!Gender = Me.cmbGender
!Position = Me.TxtPosition
!Salary = Me.TxtSalary
!Address = Me.txtAddress
!tel = Me.TxtTel
!startdate = Me.txtstartdate
!Picture = Path
.Update

End With
Me.ListView.ListItems.Clear
rst.MoveFirst
Do While Not rst.EOF
Addtolist ListView, rst(0), rst(1), rst(2), rst(3), rst(4), rst(5), rst(6), rst(7), rst(8)
rst.MoveNext
Loop

Me.TxtEmpId = ""
Me.TxtName = ""

48
Me.cmbGender.Text = ""
Me.MEBDOB.Format = ""
Me.TxtPosition = ""
Me.TxtSalary = ""
Me.TxtTel = ""
Me.txtstartdate.Format = ""
Me.txtAddress = ""

rst.MoveLast
Me.TxtEmpId.SetFocus

'Add Gender to Gender****************


For Each i In Array("Male", "Female")
Me.cmbGender.AddItem i
Next
'************************************

End If
Exit Sub
Err:
MsgBox "Dubicate Imployee ID", vbOKOnly, "Error"
Me.TxtEmpId.SetFocus

End Sub

Private Sub cmdclear_Click()


Me.TxtEmpId = ""
Me.TxtName = ""
Me.cmbGender.Clear
Me.MEBDOB.Format = ""
Me.TxtPosition = ""

49
Me.TxtSalary = ""
Me.TxtTel = ""
Me.txtstartdate.Format = ""
Me.txtAddress = ""

Me.ListView.ListItems.Clear
'Add Gender to Gender****************
For Each i In Array("Male", "Female")
Me.cmbGender.AddItem i
Next
'************************************

End Sub

Private Sub Cmdclose_Click(Index As Integer)


Unload Me
End Sub

Private Sub cmdDelete_Click()


'Set db = DAO.OpenDatabase(App.Path & "\Phone.mdb")
'Set rst = db.OpenRecordset("tblemployee")
db.Execute "delete * from tblemployee Where EmpID='" & Me.TxtEmpId & "'"

ListView.ListItems.Remove (ListView.SelectedItem.Index)
ListView.Refresh
End Sub

Private Sub cmddeleteall_Click()


On Error GoTo Err
'Set db = DAO.OpenDatabase(App.Path & "\Phone.mdb")
'Set rst = db.OpenRecordset("tblemployee")

50
db.Execute " delete * from tblemployee"
Me.ListView.ListItems.Clear
Exit Sub
Err:
MsgBox "Delete Faild"
End Sub

Private Sub CheckID(ByVal Item As MSComctlLib.ListItem)

If Me.TxtEmpId = Item.Text = True Then


MsgBox "Employee ID Is Already Added", vbInformation, " Add ID"
Me.TxtEmpId.SetFocus
Else
ID = False
End If
End Sub

Private Sub cmdprint_Click(Index As Integer)


DataEnvironment1.rsCommand2.Open "select * from tblemployee where empid='" &
Me.TxtEmpId & "'"
If DataEnvironment1.rsCommand2.BOF = True Then
MsgBox "Employee Name:" & Me.TxtEmpId & " not fund", vbInformation
DataEnvironment1.rsCommand2.Close
Else
DataReport2.Show 'vbModal
DataEnvironment1.rsCommand2.Close
End If
End Sub

Private Sub cmdShowAll_Click()

51
On Error Resume Next
Me.ListView.ListItems.Clear
rst.MoveFirst
Do While Not rst.EOF
Addtolist ListView, rst(0), rst(1), rst(2), rst(3), rst(4), rst(5), rst(6), rst(7), rst(8)
rst.MoveNext
Loop
Exit Sub
End Sub

Private Sub CmdSearch_Click()


Dim CheckStock As Boolean
Dim n As Integer
Set db = DAO.OpenDatabase(App.Path & "\Phone.mdb")
Set rst = db.OpenRecordset(" Select * from tblemployee ")
'Search by EmpID
If Me.TxtEmpId <> "" Then
n = Val(Me.TxtEmpId)
rst.MoveFirst
Do While Not rst.EOF
If rst(0) = n Then
'CheckStock = True
Me.ListView.ListItems.Clear
Addtolist ListView, rst(0), rst(1), rst(2), rst(3), rst(4), rst(5), rst(6), rst(7), rst(8)
End If
rst.MoveNext

Loop
Exit Sub
'Search by EmpName

52
ElseIf Me.TxtName <> "" Then
n = Val(Me.TxtName)
rst.MoveFirst
Do While Not rst.EOF
If rst(1) = n Then
CheckStock = True
Me.ListView.ListItems.Clear
Addtolist ListView, rst(0), rst(1), rst(2), rst(3), rst(4), rst(5), rst(6), rst(7), rst(8)
End If
rst.MoveNext
Loop
'Search by Gender
Exit Sub
ElseIf Me.cmbGender <> "" Then
n = Val(Me.cmbGender)
rst.MoveFirst
Do While Not rst.EOF
If rst(3) = n Then
CheckStock = True
Me.ListView.ListItems.Clear
Addtolist ListView, rst(0), rst(1), rst(2), rst(3), rst(4), rst(5), rst(6), rst(7), rst(8)
End If
rst.MoveNext
Loop
'Search by Position
Exit Sub
ElseIf Me.TxtPosition <> "" Then
n = Val(Me.TxtPosition)
rst.MoveFirst
Do While Not rst.EOF
If rst(4) = n Then

53
CheckStock = True
Me.ListView.ListItems.Clear
Addtolist ListView, rst(0), rst(1), rst(2), rst(3), rst(4), rst(5), rst(6), rst(7), rst(8)

End If
rst.MoveNext
Loop
'Search by Salary
Exit Sub
ElseIf Me.TxtSalary <> "" Then
n = Val(Me.TxtSalary)
rst.MoveFirst
Do While Not rst.EOF
If rst(5) = n Then
CheckStock = True
Me.ListView.ListItems.Clear
Addtolist ListView, rst(0), rst(1), rst(2), rst(3), rst(4), rst(5), rst(6), rst(7), rst(8)

End If
rst.MoveNext
Loop
'Search by Workday
Exit Sub
ElseIf Me.txtstartdate <> "" Then
n = Val(Me.txtstartdate)
rst.MoveFirst
Do While Not rst.EOF
If rst(8) = n Then
CheckStock = True
Me.ListView.ListItems.Clear
Addtolist ListView, rst(0), rst(1), rst(2), rst(3), rst(4), rst(5), rst(6), rst(7), rst(8)

54
End If
rst.MoveNext
Loop
'Search by Address
Exit Sub
ElseIf Me.txtAddress <> "" Then
n = Val(Me.txtAddress)
rst.MoveFirst
Do While Not rst.EOF
If rst(6) = n Then
CheckStock = True
Me.ListView.ListItems.Clear
Addtolist ListView, rst(0), rst(1), rst(2), rst(3), rst(4), rst(5), rst(6), rst(7), rst(8)

End If
rst.MoveNext
Loop
Else
MsgBox "Employee Not Found", vbOKOnly, "Search Not Found"

End If
End Sub

Private Sub cmdUpdate_Click()


On Error GoTo C

Set db = DAO.OpenDatabase(App.Path & "\Phone.mdb")


Set rst = db.OpenRecordset("tblemployee")
db.Execute "update tblemployee set empid='" & Me.TxtEmpId & "',EmpName='" &
Me.TxtName & "',DOB='" & Me.MEBDOB & "',Gender = '" & Me.cmbGender & "',

55
Position='" & Me.TxtPosition & "',Salary='" & Me.TxtSalary & "',Address='" &
Me.txtAddress & "',Tel='" & Me.TxtTel & "',StartDate='" & Me.txtstartdate & "', Where
EmpID='" & Me.TxtEmpId & "'"

ListView.ListItems.Clear
rst.MoveFirst
Do While Not rst.EOF
Addtolist ListView, rst(0), rst(1), rst(2), rst(3), rst(4), rst(5), rst(6), rst(7), rst(8)
rst.MoveNext
Loop
'Call Clear
Exit Sub
C:
MsgBox "Error update"
End Sub

Private Sub Form_Activate()


Dim w As Variant
For Each w In Array("Male", "Female")
Me.cmbGender.AddItem w
Next

Fillcol ListView, "Employee ID", "Employee Name", "DOB", "Gender", "Position",


"Salary", "Address", "Tel", "StartDate"

Set db = DAO.OpenDatabase(App.Path & "\Phone.mdb")


Set rst = db.OpenRecordset("tblemployee")

End Sub

Private Sub Form_Load()

56
On Error Resume Next
'Set db = DAO.OpenDatabase(App.Path & "\Phone.mdb")
'Set rst = db.OpenRecordset("tblEmployee")

Exit Sub
End Sub

Private Sub TxtEmpId_KeyPress(KeyAscii As Integer)


If (KeyAscii >= vbKey0 And KeyAscii <= vbKey9) Or KeyAscii = vbKeyBack Then
Exit Sub
Else
KeyAscii = 0
End If
End Sub

Private Sub TxtSalary_KeyPress(KeyAscii As Integer)


If (KeyAscii >= vbKey0 And KeyAscii <= vbKey9) Or KeyAscii = vbKeyBack Then
Exit Sub
Else
KeyAscii = 0
End If
End Sub

Private Sub TxtTel_KeyPress(KeyAscii As Integer)


If (KeyAscii >= vbKey0 And KeyAscii <= vbKey9) Or KeyAscii = vbKeyBack Then
Exit Sub
Else
KeyAscii = 0

57
End If
End Sub
Private Sub ListView_ItemClick(ByVal Item As MSComctlLib.ListItem)
Me.TxtEmpId.Text = Item.Text
Me.TxtName.Text = Item.SubItems(1)
Me.MEBDOB.Text = Item.SubItems(2)
'Me.cmbGender.AddItem Item.SubItems(3)
Me.TxtPosition.Text = Item.SubItems(4)
Me.TxtSalary.Text = Item.SubItems(5)
Me.txtAddress.Text = Item.SubItems(6)
Me.TxtTel.Text = Item.SubItems(7)
Me.txtstartdate = Item.SubItems(8)
End Sub

Customer
Private Sub CmdAdd_Click()
Dim Phone As String
If Me.txtcusID = "" Then
MsgBox "Invalid Customer ID", vbOKOnly, "Add Customer"
Me.txtcusID.SetFocus
ElseIf Me.TxtcusName = "" Then
MsgBox "Invalid Customer Name", vbOKOnly, "Add Customer"
Me.TxtcusName.SetFocus
ElseIf Me.cmbGender = "" Then
MsgBox "Invalid Customer Gender", vbOKOnly, "Add Customer"
Me.cmbGender.SetFocus
ElseIf Me.MEBDOB = "" Then
MsgBox "Invalid Customer Date Of Birth", vbOKOnly, "Add Customer"
Me.MEBDOB.SetFocus
ElseIf Me.TxtPhone = "" Then
MsgBox "Invalid Customer Phone number", vbOKOnly, "Add Customer"

58
Me.TxtPhone.SetFocus
ElseIf Me.txtAddress = "" Then
MsgBox "Invalid Customer Address", vbOKOnly, "Add Customer"
Me.txtAddress.SetFocus
Else
With rst
.AddNew
!CustomerID = Me.txtcusID
!customerName = Me.TxtcusName
!sex = Me.cmbGender
!DateOfBirth = Me.MEBDOB
!IdentificationCardNumber = Me.txtICN
!Phone = Me.TxtPhone
!Address = Me.txtAddress
.Update

End With
Me.ListViewcustomer.ListItems.Clear
rst.MoveFirst
Do While Not rst.EOF
Addtolist ListViewcustomer, rst(0), rst(1), rst(2), rst(3), rst(4), rst(5), rst(6), rst(7)
rst.MoveNext
Loop
End If
Me.txtcusID = ""
Me.TxtcusName = ""
Me.cmbGender.Text = ""
'Me.MEBDOB.Text = ""
Me.txtICN = ""
Me.TxtPhone = ""
Me.txtAddress = ""

59
End Sub

Private Sub Cmdclose_Click()


Unload Me
End Sub

Private Sub cmdDelete_Click()


db.Execute "delete * from tblcustomer Where CustomerID='" & Me.txtcusID & "'"

Me.ListViewcustomer.ListItems.Remove (ListViewcustomer.SelectedItem.Index)
Me.ListViewcustomer.Refresh

End Sub

Private Sub Form_Load()


Set db = DAO.OpenDatabase(App.Path & "\Phone.mdb")
Set rst = db.OpenRecordset("tblcustomer")

Dim w As Variant
For Each w In Array("Male", "Female")
Me.cmbGender.AddItem w
Next

Fillcol ListViewcustomer, "Customer ID", "Customer Name", "Gender", "DOB",


"Identification Number", "Tel", "Address", "Debt"

Do While Not rst.EOF


Addtolist ListViewcustomer, rst(0), rst(1), rst(2), rst(3), rst(4), rst(5), rst(6), rst(7)
rst.MoveNext
Loop

60
End Sub

Private Sub ListViewcustomer_ItemClick(ByVal Item As MSComctlLib.ListItem)


Me.txtcusID = Item.Text
Me.TxtcusName = Item.SubItems(1)
Me.cmbGender = Item.SubItems(2)
Me.MEBDOB = Item.SubItems(3)
Me.txtICN = Item.SubItems(4)
Me.TxtPhone = Item.SubItems(5)
Me.txtAddress = Item.SubItems(6)
End Sub

Private Sub txtICN_KeyPress(KeyAscii As Integer)


If (KeyAscii >= vbKey0 And KeyAscii <= vbKey9) Or KeyAscii = vbKeyBack Then
Exit Sub
Else
KeyAscii = 0
Beep
End If
End Sub

Product
Option Explicit
Dim db As DAO.Database
Dim rst As DAO.Recordset

Private Sub CmdAdd_Click()


On Error GoTo f
If txtProductID <> "" And txtProductName <> "" And txtMadeBy <> "" And txtQuantity
<> "" And txtPriceIn <> "" And txtPercentage <> "" Then

61
Set db = DAO.OpenDatabase(App.Path & "\Phone.mdb")
Set rst = db.OpenRecordset("tblProduct")
With rst
.AddNew
!ProductID = txtProductID
!ProductName = txtProductName
!MadeBy = txtMadeBy
!Quantity = txtQuantity
!PriceIn = Val(txtPriceIn)
!Percentage = txtPercentage
!PriceOut = txtPriceOut
.Update
End With
rst.MoveLast
Addtolist ListView1, rst(0), rst(1), rst(2), rst(3), rst(4), rst(5), rst(6)
rst.MoveNext

txtProductID.SetFocus
Call Clear
Else
MsgBox "Not engouh information or invalid ProductID"
End If
Call Disable
Exit Sub
f:
MsgBox "Invalid ProductID"
End Sub

Private Sub cmdclear_Click()


Call Clear
End Sub

62
Private Sub Disable()
CmdDelete.Enabled = False
CmdUpdate.Enabled = False
End Sub

Private Sub Enable()


CmdDelete.Enabled = True
CmdUpdate.Enabled = True
End Sub
Private Sub Clear()
txtProductID = ""
txtProductName = ""
txtMadeBy = ""
txtQuantity = ""
txtPriceIn = ""
txtPercentage = ""
txtPriceOut = ""
End Sub

Private Sub Cmdclose_Click()


Unload Me
End Sub

Private Sub cmdDelete_Click()


Set db = DAO.OpenDatabase(App.Path & "\Phone.mdb")
Set rst = db.OpenRecordset("tblProduct")
db.Execute "delete * from tblproduct Where ProductID='" & txtProductID.Text &
"'"

ListView1.ListItems.Remove (ListView1.SelectedItem.Index)

63
ListView1.Refresh
Call Clear
Call Disable
End Sub

Private Sub cmddeleteall_Click()


Set db = DAO.OpenDatabase(App.Path & "\Phone.mdb")
Set rst = db.OpenRecordset("tblProduct")
db.Execute "delete * from tblProduct"
Me.ListView1.ListItems.Clear
End Sub

Private Sub CmdOpenStock_Click(Index As Integer)


frmStock.Show
Unload Me
End Sub

Private Sub CmdSearch_Click(Index As Integer)


frmSearch.Show
Unload Me
End Sub

Private Sub cmdUpdate_Click()


Call Disable
On Error GoTo C

Set db = DAO.OpenDatabase(App.Path & "\Phone.mdb")


Set rst = db.OpenRecordset("tblProduct")
db.Execute "update tblproduct set ProductName='" & txtProductName.Text &
"',MadeBy='" & txtMadeBy.Text & "',Quantity='" & txtQuantity.Text & "',PriceIn = '" &

64
txtPriceIn.Text & "', Percentage='" & txtPercentage.Text & "',PriceOut='" &
txtPriceOut.Text & "' Where ProductID='" & txtProductID.Text & "'"

ListView1.ListItems.Clear
rst.MoveFirst
Do While Not rst.EOF
Addtolist ListView1, rst(0), rst(1), rst(2), rst(3), rst(4), rst(5), rst(6)
rst.MoveNext
Loop
Call Clear
Exit Sub
C:
MsgBox "Error update"
End Sub

Private Sub Form_Activate()


On Error Resume Next
Set db = DAO.OpenDatabase(App.Path & "\Phone.mdb")
Set rst = db.OpenRecordset("tblProduct")

rst.MoveFirst
Do While Not rst.EOF
Addtolist ListView1, rst(0), rst(1), rst(2), rst(3), rst(4), rst(5), rst(6)
rst.MoveNext
Loop
End Sub

Private Sub Form_Load()


Call Disable
Fillcol ListView1, "ProductID", "ProductName", "MadeBy", "Quantity", "PriceIn",
"Percentage", "PriceOut"

65
End Sub

Private Sub ListView1_ItemClick(ByVal Item As MSComctlLib.ListItem)


txtProductID.Text = Item.Text
txtProductName.Text = Item.SubItems(1)
txtMadeBy.Text = Item.SubItems(2)
txtQuantity.Text = Item.SubItems(3)
txtPriceIn.Text = Item.SubItems(4)
txtPercentage.Text = Item.SubItems(5)
txtPriceOut.Text = Item.SubItems(6)
Call Enable
End Sub

Private Sub txtPercentage_Change()


txtPriceOut = (Val(txtPriceIn) * Val(txtPercentage) / 100 + Val(txtPriceIn.Text))
End Sub

Private Sub txtPriceIn_KeyPress(KeyAscii As Integer)


If (KeyAscii >= vbKey0 And KeyAscii <= vbKey9) Or KeyAscii = vbKeyBack Then
Exit Sub
Else
KeyAscii = 0
Beep
End If
End Sub

Private Sub txtProID_KeyPress(KeyAscii As Integer)


If (KeyAscii >= vbKey0 And KeyAscii <= vbKey9) Or KeyAscii = vbKeyBack Then
Exit Sub

66
Else
KeyAscii = 0
Beep
End If
End Sub

Private Sub txtQTY_KeyPress(KeyAscii As Integer)


If (KeyAscii >= vbKey0 And KeyAscii <= vbKey9) Or KeyAscii = vbKeyBack Then
Exit Sub
Else
KeyAscii = 0
Beep
End If
End Sub

Stock
Option Explicit
Dim db As DAO.Database
Dim rst As DAO.Recordset

Private Sub CmbLessMore_KeyPress(KeyAscii As Integer)


KeyAscii = 0
Beep
End Sub

Private Sub cmdBack_Click()


frmProduct.Show
Unload Me
End Sub

Private Sub CmdBack1_Click()

67
frmProduct.Show
Unload Me
End Sub

Private Sub CmdShow_Click()


Dim n As Integer
Dim CheckStock As Boolean

ListView2.ListItems.Clear
Set db = DAO.OpenDatabase(App.Path & "\Phone.mdb")
Set rst = db.OpenRecordset(" Select * from tblProduct ")

If txtNumber.Text <> "" And CmbLessMore.Text <> "" Then


n = Val(txtNumber.Text)
If CmbLessMore.Text = "Less than" Then
rst.MoveFirst
Do While Not rst.EOF
If rst(3) < n Then
CheckStock = True
Addtolist ListView2, rst(0), rst(1), rst(2), rst(3), rst(4), rst(5), rst(6)
End If
rst.MoveNext
Loop
ElseIf CmbLessMore.Text = "Less than or equal to" Then
rst.MoveFirst
Do While Not rst.EOF
If rst(3) <= n Then
CheckStock = True
Addtolist ListView2, rst(0), rst(1), rst(2), rst(3), rst(4), rst(5), rst(6)
End If
rst.MoveNext

68
Loop
ElseIf CmbLessMore.Text = "More than" Then
rst.MoveFirst
Do While Not rst.EOF
If rst(3) > n Then
CheckStock = True
Addtolist ListView2, rst(0), rst(1), rst(2), rst(3), rst(4), rst(5), rst(6)
End If
rst.MoveNext
Loop
Else
rst.MoveFirst
Do While Not rst.EOF
If rst(3) >= n Then
CheckStock = True
Addtolist ListView2, rst(0), rst(1), rst(2), rst(3), rst(4), rst(5), rst(6)
End If
rst.MoveNext
Loop
End If

If CheckStock = False Then MsgBox "Nothing to show", vbOKOnly, "Stock"


ElseIf txtNumber.Text = "" Or CmbLessMore.Text = "" Then
MsgBox "Select an option or input number", vbRetryCancel, "Message"
Else
MsgBox "Select an option and fill in the TextBox", vbRetryCancel, "Message"
End If
End Sub

Private Sub Form_Activate()


Set db = DAO.OpenDatabase(App.Path & "\Phone.mdb")

69
Set rst = db.OpenRecordset("tblProduct")
rst.MoveFirst
Do While Not rst.EOF
Addtolist ListView1, rst(0), rst(1), rst(2), rst(3), rst(4), rst(5), rst(6)
rst.MoveNext
Loop
End Sub

Private Sub Form_Load()


Fillcol ListView1, "ProductID", "ProductName", "MadeBy", "Quantity", "PriceIn",
"Percentage", "PriceOut"
Fillcol ListView2, "ProductID", "ProductName", "MadeBy", "Quantity", "PriceIn",
"Percentage", "PriceOut"
End Sub

Private Sub txtNumber_Click()


txtNumber.Text = ""
End Sub

Private Sub txtNumber_KeyPress(KeyAscii As Integer)


If (KeyAscii >= vbKey0 And KeyAscii <= vbKey9) Or KeyAscii = vbKeyBack Then
Exit Sub
Else
KeyAscii = 0
Beep
End If
End Sub

70
REFERENCE :
1. VB Beginner’s Guide

-DAVE MERCER
TATA McGraw-Hill
EDITION

2.VISUAL BASIC
-GABRIEL OANCEA &
BOB DONALD,
BPB Publications.

3.VB Expert

-Matthew MacDonald,
SHROFF PUBLISHERS &
DISTRIBUTORS PVT.LTD. (SPD)

71
72

Você também pode gostar