Sunteți pe pagina 1din 76

CONTENTS AT A

GLANCE
PREFACE
CHAPTER 1

INTRODUCTION TO THE PROJECT

CHAPTER 2

SYSTEM SPECIFICATION

CHAPTER 3

SYSTEM DESIGN

CHAPTER 4

CODING

REFERENCE

TABLE OF
CHAPTER 1: INTRODUCTION TO THE PROJECT
1.1

INTRODUCTION

1.2

HARDWARE REQUIREMENTS

1.3

SOFTWARE REQUIREMENTS

CHAPTER 2: SYSTEM STUDY AND ANALYSIS


2.1

INTRODUCTION

2.2
2.3
2.4

FEASIBILITY STUDY
EXISTING SYSTEM
PROPOSED SYSTEM

CHAPTER 3:
3.1

FRONT END VB

3.2

BACK END ACCESS

CHAPTER 4:

4.1

ABOUT PROJECT

4.2

STUDY OF PROJECT

4.3

DATAFLOW DIAGRAM

4.4

DATABASE DESIGN

4.5

DATABASE TABLE DESIGN

4.6

FORM DESIGN

4.7

TESTING

CHAPETR 5: CONCLUSION
CHAPTER 6: BIBLIOGRAPHY

PREFACE

We are now living in the Computer age. Now the computer is controlling all the
important works in our routine life. Man has invented many electronic devices but
out of these computers has made the greatest impact on society.
Computers are so versatile because they are indispensable to present day engineers,
scientists, businessmen and students. They have strengthened mens capability in
numerical computations, information processing etc. and there by increasing the
effectiveness of the organization.
To do some specific tasks computer need software. Software may be
Database software, Languages etc. During this summer training, I did work on
ONLINE SHOPPLING Software.
.

1.INTRODUCTION

Shopping Cart is an online store that enables website owners to sell their
product online. It is a web shopping cart that web enables the day-day sales
functions. The System helps the Customer to purchase the products with and
without Credit Card Information. It includes sophisticated product and customer
management modules. This website will be useful to anyone who wants to
purchase items using internet. Generates the Reports related to the system. This
system is developed as our company requirements.
Shopping Cart is a very important feature used in e-commerce to assist
people making purchases any products online. This project deals with developing
an e-commerce website for online different types of products. It provides the
user with a catalog of different types of products available for purchase in the
store. In order to facilitate online purchase a shopping cart is provided to the
user.
The Shopping Cart project has been developed to allow business grows
larger and faster. This site will let customers to view and order products
online from any part of the world. The site sells different types of. Under this
website many products and services can be ordered.
The Shopping Cart is expanded permanently through new products and
services in order to offer a product portfolio corresponding to the market. Private
customer and business customers can order the selected products of the Shopping
Cart Service online quickly and comfortably

ADMINISTRATIVE MODULE

This module is the main module which performs all the main operations
in the system. The major operations in the system are:
Admin login
Add/Delete/Update/View/Save Employee
User module
Item module
Customer module
Distributor module
Stock Module
Report Module

1.2 HARDWARE REQUIREMENTS


The hardware that is needed for our system is:
Processor (CPU)

Pentium Processor

Primary Memory (RAM)

64 MB

Hard Disk Drive

20 GB

Display Size

14 Monitor

Text Resolution

80 Columns by 25 Rows

Key Board

Total 104 keys with 12


Functions keys

Control

American Standard

Printer Available

HP Laser Jet 6 l

Power Requirement

220 250 Volts

1.3 SOFTWARE REQUIREMENTS


The software that is needed for our system is:

Microsoft Visual Basic 6.0


Microsoft Access 2000

2.SYSTEM STUDY AND ANALYSIS


2.1

INTRODUCTION
System analysis is a process of gathering and interpreting facts,

diagnosing problems and the information to recommend improvements on


the system. It is a problem solving activity that requires intensive
communication between the system users and system developers. System
analysis or study is an important phase of any system development process.
The system is studied to the minutest detail and analyzed. The system
analyst plays the role of the interrogator and dwells deep into the working of
the present system. The system is viewed as a whole and the input to the
system are identified. The outputs from the organizations are traced to the
various processes. System analysis is concerned with becoming aware of the
problem, identifying the relevant and decisional variables, analyzing and
synthesizing the various factors and determining an optimal or at least a
satisfactory solution or program of action.
A detailed study of the process must be made by various techniques
like interviews, questionnaires etc. The data collected by these sources must
be scrutinized to arrive to a conclusion. The conclusion is an understanding

of how the system functions. This system is called the existing system. Now
the existing system is subjected to close study and problem areas are
identified. The designer now functions as a problem solver and tries to sort
out the difficulties that the enterprise faces. The solutions are given as
proposals. The proposal is then weighed with the existing system
analytically and the best one is selected. The proposal is presented to the
user for an endorsement by the user. The proposal is reviewed on user
request and suitable changes are made. This is loop that ends as soon as the
user is satisfied with proposal.
Preliminary study is the process of gathering and interpreting facts,
using the information for further studies on the system. Preliminary study is
problem solving activity that requires intensive communication between the
system users and system developers. It does various feasibility studies. In
these studies a rough figure of the system activities can be obtained, from
which the decision about the strategies to be followed for effective system
study and analysis can be taken.

2.2

FEASIBILITY STUDY
An important outcome of the preliminary investigation is the

determination that the system requested is feasible. Feasibility study is


carried out to select the best system that meets the performance
requirements.
Feasibility study is both necessary and prudent to evaluate the
feasibility of the project at the earliest possible time. It involves preliminary
investigation of the project and examines whether the designed system will
be useful to the organization. Months or years of effort, thousand for
millions of money and untold professional embarrassment can be averted if
an in-conceived system is recognized early in the definition phase.
The different types of feasibility are: Technical feasibility, Operational
feasibility, Economical feasibility.
2.2.1 Technical feasibility
Technical Feasibility deals with the hardware as well as software
requirements. Technology is not a constraint to type system development.
We have to find out whether the necessary technology, the proposed
equipments have the capacity to hold the data, which is used in the project,

should be checked to carry out this technical feasibility.

The technical feasibility issues usually raised during the feasibility stage
of investigation includes these
This software is running in windows 2000 Operating System, which
can be easily installed.
The hardware required is Pentium based server.
The system can be expanded.
2.2.2 Behavioral Feasibility
This feasibility test asks if the system will work when it is developed
and installed.
Operational feasibility in this project:
The proposed system offers greater level of user-friendliness.

The proposed system produces best results and gives high


performance. It can be implemented easily .So this project is
operationally feasible.

2.2.3 Economical feasibility


Economical Feasibility deals about the economical impact
faced by the organization to implement a new system. Financial

benefits must equal or exceed the costs. The cost of conducting a full
system, including software and hardware cost for the class of
application being considered should be evaluated. Economic
Feasibility in this project:

The cost to conduct a full system investigation is possible.


There is no additional manpower requirement.
There is no additional cost involved in maintaining the proposed
system.

2.3 EXISTING SYSTEM


Existing system refers to the system that is being followed till now. The
existing system requires more computational time, more manual calculations, and
the complexity involved in Selection of features is high. The other disadvantages
are lack of security of data, Deficiency of Data accuracy, Time consuming etc. To
avoid all these limitations and make the working more accurately the system needs
to be computerized.
2.3.1 Draw backs of existing system.
Here in the Online Shopping , a detailed study of existing system is carried
along with all the steps in system analysis. An idea for creating a better project was
carried and the next steps were followed.
Lack of security of data.
More man power.
Time consuming.
Consumes large volume of pare work.
Needs manual calculations.

No direct role for the higher officials.


Damage of machines due to lack of attention.
To avoid all these limitations and make the working more accurately the system
needs to be computerized.

2.4

PROPOSED SYSTEM

The aim of proposed system is to develop a system of improved facilities.


The proposed system can overcome all the limitations of the existing system. The
system provides proper security and reduces the manual work. The existing system
has several disadvantages and many more difficulties to work well. The proposed
system tries to eliminate or reduce these difficulties up to some extent. The
proposed system will help the user to reduce the workload and mental conflict. The
proposed system helps the user to work user friendly and he can easily do his jobs
without time lagging.

2.4.1 Advantages of Proposed System


The system is very simple in design and to implement. The system requires
very low system resources and the system will work in almost all configurations. It
has got following features

Ensure data accuracy.


Minimize manual data entry.
Minimum time needed for the various processing
Greater efficiency
Better Service
Minimum time required
It would also help in providing adequate data to the corporation, particularly with
regard to inventory details and important points
This would help the corporation prepare and organize its schedules more
efficiently on the basis of traffic demand.
It would provide data on concessions given to various sections.

Introduction to
Microsoft Visual Basic6.0
And
Microsoft Access2000

3.1 TECHNOLOGY

OPERATING SYSTEM - WINDOWS 98


Assortment of appropriate Operating system and Programming
language for any project is very important. Basically it depends upon the nature of
project and its system requirements. Windows provides a Multitasking
Environment, enabling user to run various applications at a time. Windows offer
many advantages to both the user and the programmer besides GUIs such as pointand-click capabilities and multitasking.
3.2 FRONT END - MICROSOFT VISUAL BASIC 6.0
Microsoft Visual Basic development system is the most productive tool for
creating fast business solutions for Windows and the Web. A comprehensive, rapid
application development environment helps development environment help
developers quickly create and deploy client /server applications, plus easily
program for the Internet using familiar Visual Basic programming tools and
techniques.

The important requirements for a rapid, application-development client/server tool


include:
Comprehensive resources necessary for successful Windows 2000
development.
High-performance, scalable application and component creation.
Increased data application development productivity & control.
Greater service application development support.
A robust extensibility model for third party support & availability of
components and add in technology.
Enterprise application development.
With the introduction of Visual Basic 6.0, Microsoft builds upon its critically
acclaimed RAD enterprise development platform with the features that extended
and enhance the currently robust development environment. These features are
based on five design themes, in turn derived from these customer requirements.
Windows 2000 Development with Visual Basic:
The Microsoft Visual Basic development system now provides the
comprehensive resources necessary for successful Windows 2000 development.
From building e-commerce Web technologies, such as network and component
load balancing, to scalable data driven business applications, Visual Basic 6.0 has
what you need.
Windows 2000 Developer's Readiness Kit
Visual studio installer.
MSDN Library Subscription.

Microsoft Data Engine.

High Performance, Scalable Application and Component Creation


The goal of any development tool is to facilitate the developer's need for
quick and efficient creation and deployment of high performance, scalable
applications. Visual Basic 6.0 works to address these needs through the delivery of
a quick-executing, native-code environment. Tens of millions of Visual Basic
based applications in use today stand as a testament to the success of Visual Basic
in this area. With Visual Basic 6.0, Microsoft made improvements in the following
areas:
Deliver native-code compiled performance
Accelerated Microsoft Win 32 API based forms.
Provide scalable solutions.
Facilitate the development of thread-safe, persist able components.
Data-Centric Application Development
Ninety-five percent of developers using Visual Basic create solutions that
access either local or remote database and the vast majority of all corporate
applications are data-centric. In fact, a recent tracking study revealed that Visual
Basic is the most popular development tool used in Conjunction with Microsoft
SQL Server and Oracle Servers. Clearly, developers require more productive ways
to connect to and manipulate data with reduced complexity and open to access to a
wide variety of data sources.

While developing Visual Basic 6.0, Microsoft addressed these important


needs by focusing on the following data-productivity objectives:
Provide faster and more comprehensive data access.
Provide an integrated set of data base design and programming tool.
Simplify the creation of data-centric application for the mobile user.
Provide support for the latest data base management technology using ActiveX
Data Objects (ADO) and OLEDB.
Provide easier access to more data types.
Simplify the creation of reusable data consumers.
Server Application Development and Deployment
In recent years, PC-based enterprise client /server development has
gained widespread acceptance. At the center of these installations is Win 32 or
Internet based server applications. In response to this, Microsoft has enhanced
Visual Basic with the existing new server application features. Microsoft focused
on the following objectives to optimize Visual Basic 6.0 for server application
development.
Enable the creation of HTML based Web applications.
Utilize Web sites both inside and outside the corporate firewall as a
measure to reduce deployment costs.
Debug middle tier components running under Microsoft Transaction
Server.

Package and deploy middle-tier components with ease and peace of


mind.

Client Development Support


At the heart of the success Visual Basic has enjoyed is the ability it gives
developer to quickly create robust, powerful, and professional client applications,
components and user interfaces. Visual basic 6.0 provides the following
improvements that enhance client application development:
ActiveX Control creation that gives developers the ultimate in
Win32 flexibility.
Creation of browser-independent applications.
Enterprise Application Development
As the use of information technology changes to meet new business
needs, the very definition of enterprise applications is evolving. While enterprise
infrastructure and applications vary widely across organizations, common
attributes of enterprise applications include:
Being component based for flexibility and scalability.
Requiring life cycle support, including design, development, management
and analysis.
Requiring more sophisticated database architectures.
Being developed by teams.
Being distributed in nature, integrated with desperate backend system.

3.3

Back End: Microsoft Access


Microsoft access delivers powerful tools for managing and analyzing data.

With XML support, developers can create highly sophisticated


Enterprise - wide database solutions that integrate easily with the web. One can
find comprehensive tools that make building databases more intuitive Features like
Microsoft Pivot table and the Microsoft Pivot chart greatly improve data analysis
capabilities. Microsoft Access is one of the most versatile applications. This
versatility is evidenced by the rich set of tools that even the Most experienced
database user can take advantage of, offering the same level of simplicity for first
time database user. Access extends this versatility by giving developers and more
experienced users new functionality, enabling them to access and analyze their
important data as well as build powerful new data base solution. At same time,
access makes it easy for beginning users to discover and use more of the existing
application.

Project Information
4.1 About Project
This project is of ONLINE SHOPPING.
In this project Microsoft Visual Basic has been used as Front End and Microsoft
Access as the back end.
The functions performed by this project are as follows:
It Stores Information About CUSTOMER.
It contains information about EMPLOYEE .
It contains details of PURCHSE AND SALES etc.
It makes entries for Updating And Deletion.
It updates/enter details .

Advantages of the System


Advantages of the system over manual record handling are as follows:
Removes redundancy.
Reduces errors.
Provides better protection.
Makes work easier.
Reduces manual labor.

4.2 Study of project through Classical Model


A system model is a systematic approach towards software development. Before
any building is built it is necessary to make the drawing of that building, similar is
the case with any software. Here also before any coding of the software begins, it
is necessary to make the model of the software.
A model basically specifies all the steps to be followed during the system
development. This makes the task of the engineer quite simple and helps him build
software, which is less error prone.
Tasks accomplished by system modeling are:

Define the processes that serve the needs of the view under consideration.
Represent the behavior of the processes and the assumptions on which
behavior is based.
Explicitly define both exogenous and endogenous input to the model.
Represent all linkages that will enable the engineer to better understand the
view.

The model used is shown below:

SYSTEM DEVELOPMENT LIFE CYCLE


A crucial phase in the System Development Life Cycle (SDLC)
Is the successful implementation of the new system design? Implementation includes all
those activities that take place to convert from the old system to the new one. The new
system may be completely new, replacing an existing manual or automated system or it
may be major modification to an existing system. In either case, proper implementation
becomes necessary so that a reliable system based on the requirements of the
organization can be provided.
Successful Implementation may not guarantee improvement in the
organization using the new system, but improper installation will prevent it. It has
been observed that even the best system cannot show good results if the analyst
managing the implementation does not attend to every important detail. This is the
area where the system analyst needs to work most carefully
The proposed system is very simple to implement. As specified prior, the
required Hardware and Software are sufficient for implementing this software. The

implementation process is quite similar to most softwares. So the implementations


of this software become easy.

4.3

DATA FLOW DIAGRAM


Data flow oriented techniques advocate that the major data items

handled by a system must be first identified and then the processing required
on these data items to produce the desired outputs should be determined. The
DFD (also called as bubble chart) is a simple graphical formalism that can
be used to represent a system in terms of input data to the system, various
processing carried out on these data, and the output generated by the system.
It was introduced by De Macro (1978), Gane and Sarson (1979).The
primitive symbols used for constructing DFDs are:
Symbols used in DFD
A circle represents a process.

A rectangle represents external entity

A square defines a source or destination of the system data.


An arrow identifies dataflow.
Double line with
one end closed indicates data store

INPUT
DESIGN

PROCESS
DESIGN

Coding
DesignGather
of
of System
Design
Information

Testing of
Software

Debugging of
Software

Data Flow Diagram

OUTPUT
DESIGN

4.4 DATABASE DESIGN


A database is an organized mechanism that has the capability of
storing information through which a user can retrieve stored information in
an effective and efficient manner. The data is the purpose of any database
and must be protected.
The database design is a two level process. In the first step, user
requirements are gathered together and a database is designed which will
meet these requirements as clearly as possible. This step is called
Information Level Design and it is taken independent of any individual
Database Management System (DBMS).
In the second step, this Information level design is transferred into a
design for the specific DBMS that will be used to implement the system in
question. This step is called Physical Level Design, concerned with the
characteristics of the specific DBMS that will be used. A database design

runs parallel with the system design. The organization of the data in the
database is aimed to achieve the following two major objectives.
Data Integrity
Data independence

4.5 DATABASE TABLE DESIGN


Table Name: - Customer Table
Primary key: CustomerID

Table Name: - Distributor Product


Primary key: Dist ID

Table Name: - Distributor


Primary key: Distributor_ID

Table Name: - Product


Primary key: DistID

4.6 Design of Forms

Coding
Dim msg
Dim click

'Private Sub cmdnewuser_Click()


'Form3.Show
'Unload Me
'End Sub

Private Sub Label1_Click()


framemain.Height = 1
Timer1.Interval = 1
Timer1.Enabled = True

If framemain.Height >= 10575 Then


framemain.Height = 10575
Timer1.Enabled = False
framemain.Height = 1
Timer1.Interval = 1
Timer1.Enabled = True

End If
End Sub

Private Sub MDIForm_Load()


framemain.Height = 1
Timer1.Interval = 1
Timer1.Enabled = True
Label1.Enabled = False

End Sub

Private Sub mnuadd_Click()


Form9.Show
End Sub

Private Sub mnuaddcustomer_Click()


Form5.Show
Unload Me
End Sub

Private Sub mnubutitem_Click()


Form7.Show
End Sub

Private Sub mnuchangepass_Click()


Form2.Show
'Unload Me
End Sub

Private Sub mnudistdetails_Click()


Form6.Show
End Sub
Private Sub mnuexit_Click()
msg = MsgBox("Do you want to quit?", vbYesNo + vbQuestion)
If msg = vbYes Then
End
'Else
'Load MDIForm1
End If
End Sub
Private Sub mnulogout_Click()
click = MsgBox("Do u want to quit?", vbYesNo + vbQuestion)
If click = vbYes Then
End
End If
End Sub
Private Sub mnupurchaseitem_Click()
Form8.Show
Unload Me

End Sub

Private Sub mnureUserDetail_Click()


msg = MsgBox(" You are UserDetailg off. Do you want to continue",
vbYesNo + vbQuestion)
If msg = vbYes Then
Unload Me
Form1.Show
Else
End If
End Sub

Private Sub mnurelogin_Click()


Form1.Show
End Sub

Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, x As


Single, y As Single)
Picture2.Visible = True

Picture3.Visible = False
End Sub

Private Sub Picture2_MouseMove(Button As Integer, Shift As Integer, x As


Single, y As Single)
Picture3.Visible = True
Picture2.Visible = False
End Sub

Private Sub Timer1_Timer()


framemain.Height = framemain.Height + 200
If framemain.Height >= 10575 Then
Timer1.Enabled = False
End If
End Sub

Private Sub Timer2_Timer()


framemain.Height = framemain.Height - 100
If framemain.Height <= 300 Then

Timer2.Enabled = False
End If
End Sub

Private Sub Timer3_Timer()


Frame1.Width = Frame1.Width + 200
If Frame1.Width >= 10575 Then
Timer3.Enabled = False
End If
End Sub

Private Sub Timer4_Timer()


Frame1.Width = Frame1.Width - 200
If Frame1.Width <= 100 Then
Timer4.Enabled = False
End If
End Sub

Private Sub XPButton1_Click()


framemain.Height = 10575

Timer2.Interval = 1
Timer2.Enabled = True
Label1.Enabled = True
End Sub

Private Sub XPButton2_Click()


XPButton2.Visible = False
XPButton4.Visible = True
Frame1.Width = 1
Timer3.Interval = 1
Timer3.Enabled = True
'XPButton2.Visible = False
'XPButton4.Visible = True
End Sub

Private Sub XPButton3_Click()


XPButton2.Visible = True
XPButton4.Visible = False

Frame1.Width = 8000
Timer4.Interval = 1
Timer4.Enabled = True
End Sub

Private Sub XPButton4_Click()


XPButton2.Visible = True
XPButton4.Visible = False
Frame1.Width = 8700
Timer4.Interval = 1
Timer4.Enabled = True
End Sub

Coding
Option Explicit
Dim rs As New ADODB.Recordset
Dim rs1 As New ADODB.Recordset
Dim i As Integer
Dim ID As Integer
Dim ff As Integer
Dim sql As String

Dim j As Integer
Dim x As String
Dim y As String
Dim str As String
Dim addflag As Boolean
Dim click
Private Sub cmdadd_Click()
frmcustdetail.Enabled = True
cmdclear_Click
cmdbottom.Enabled = False
cmdtop.Enabled = False
cmdprevious.Enabled = False
cmdnext.Enabled = False
cmdedit.Enabled = False
cmdsave.Enabled = True
cmdsearch.Enabled = False
cmddelete.Enabled = False
cmdendsearch.Enabled = False
cmdadd.Enabled = False
addflag = True

'''TO GENERATE AUTOMATIC CUSTOMER ID


If custgrid.Rows = 1 Then
txtcustid.Text = "Cust1"
'

ElseIf custgrid.Rows = 2 Then

'

txtcustid.Text = "Cust2"
Else
txtcustid.Text = "Cust" & (custgrid.Rows - 1 + 1)
txtcustid.Enabled = False
End If
txtcustname.SetFocus

'''-------------------------------------------------------------------------End Sub

Private Sub cmdbottom_Click()


custgrid.Row = custgrid.Rows - 1
custgrid_Click
End Sub

Private Sub cmdCancel_Click()


cmdclear_Click
If cmdadd.Enabled = False Then
cmdbottom.Enabled = True
cmdtop.Enabled = True
cmdprevious.Enabled = True
cmdnext.Enabled = True
cmdedit.Enabled = True
cmdsave.Enabled = True
cmdsearch.Enabled = True
cmddelete.Enabled = True
cmdendsearch.Enabled = True
cmdadd.Enabled = True
End If
End Sub

Private Sub cmdclear_Click()


txtcustid.Text = ""
txtcustname.Text = ""
txtcustaddress.Text = ""

optmale.Value = False And optfemale.Value = False


txtbirthdate.Value = Now
txtcustmobileno.Text = ""
End Sub

Private Sub cmdclose_click()


MDIForm1.Show
Unload Me
End Sub

Private Sub cmdclosemenu_Click()


framefunctiom.Height = 6700
Timer2.Interval = 1
Timer2.Enabled = True
End Sub

Private Sub cmddelete_Click()


If custgrid.Rows = 1 Then
MsgBox "No Record found in Database"
Exit Sub

Else
click = MsgBox("Do u want to Delete this Record from database?",
vbYesNo + vbQuestion)
If click = vbYes Then
rs.MoveFirst
While rs.EOF = False
If rs.Fields("Customer ID") = txtcustid.Text Then
rs.Delete
custgrid.Clear
'custgrid.Rows = 1
'ff = 1
rs.MoveFirst
gridload
cmdclear_Click
Exit Sub
Else
rs.MoveNext
End If
Wend
End If

End If
cmdclear_Click
End Sub

Private Sub cmdedit_Click()


frmcustdetail.Enabled = True
addflag = False
cmdsave.Enabled = True
txtcustid.Enabled = True
txtcustname.Enabled = True
txtcustaddress.Enabled = True
txtcustmobileno.Enabled = True
txtbirthdate.Enabled = True
End Sub

Private Sub cmdendsearch_Click()


Form_Load
Timer1.Enabled = False
framefunctiom.Height = 10300
framesearch.Visible = False

cmdendsearch.Visible = False
cmdsearch.Visible = True
End Sub

Private Sub cmdnext_Click()


If custgrid.Row < custgrid.Rows - 1 Then
custgrid.Row = custgrid.Row + 1
custgrid_Click
cmdnext.SetFocus
End If
End Sub

Private Sub sgrid()


txtcustid.Text = rs.Fields("Customer ID")
txtcustname.Text = rs.Fields("Full Name")
txtcustaddress.Text = rs.Fields("Address")
If rs.Fields("Gender") = "Male" Then
optmale.Value = vbChecked
Else
optfemale.Value = vbChecked

End If
txtbirthdate.Value = rs.Fields("Birthdate")
txtcustmobileno.Text = rs.Fields("Mobile")
custgrid.Rows = i + 1
custgrid.Row = j
custgrid.TextMatrix(custgrid.Row, 0) = custgrid.Row
custgrid.TextMatrix(custgrid.Row, 1) = rs.Fields("Customer ID")
custgrid.TextMatrix(custgrid.Row, 2) = rs.Fields("Full Name")
custgrid.TextMatrix(custgrid.Row, 3) = rs.Fields("Address")
custgrid.TextMatrix(custgrid.Row, 4) = rs.Fields("Gender")
custgrid.TextMatrix(custgrid.Row, 5) = rs.Fields("Birthdate")
custgrid.TextMatrix(custgrid.Row, 6) = rs.Fields("Mobile")
End Sub

Private Sub cmdprevious_Click()


If custgrid.Row > 1 Then
If custgrid.Row - 1 < custgrid.Rows Then
custgrid.Row = custgrid.Row - 1
custgrid_Click

cmdprevious.SetFocus
End If
End If
End Sub

Private Sub cmdsave_Click()


If txtcustname.Text = "" Or txtcustaddress.Text = "" Or (optmale.Value =
False And optfemale.Value = False) Or txtcustmobileno.Text = "" Then
MsgBox "Please fill all the information.", vbInformation, "Field missing"
Exit Sub
End If

cmdsave.Enabled = False
cmdbottom.Enabled = True
cmdtop.Enabled = True
cmdprevious.Enabled = True
cmdnext.Enabled = True
cmdedit.Enabled = True
cmdsearch.Enabled = True
cmddelete.Enabled = True

cmdendsearch.Enabled = True
cmdadd.Enabled = True

''' FOR ADDING RECORD TO DATABASE AND GRID


If addflag = True Then
rs.AddNew
rs.Fields("Customer ID") = txtcustid.Text
rs.Fields("Full Name") = txtcustname.Text
rs.Fields("Address") = txtcustaddress.Text
If optmale.Value = vbChecked Then
rs.Fields("Gender") = optmale.Caption
ElseIf optfemale.Value = vbChecked Then
rs.Fields("Gender") = "Female"
End If
rs.Fields("Birthdate") = txtbirthdate.Value
rs.Fields("Mobile") = txtcustmobileno.Text
rs.Update
Call gridfill

Else

''''' FOR EDITING RECORDS IN DATABASE AND GRID


rs.MoveFirst
Do While Not rs.EOF
If rs.Fields("Customer Id") = txtcustid.Text Then
Exit Do
End If
rs.MoveNext
Loop

''' TO EDIT DATABASE


rs.Fields("Customer ID") = txtcustid.Text
rs.Fields("Full Name") = txtcustname.Text
rs.Fields("Address") = txtcustaddress.Text
If optmale.Value = vbChecked Then
rs.Fields("Gender") = optmale.Caption
ElseIf optfemale.Value = vbChecked Then
rs.Fields("Gender") = "Female"
End If
rs.Fields("Birthdate") = txtbirthdate.Value
rs.Fields("Mobile") = txtcustmobileno.Text

rs.Update

''' TO FILL GRID FROM DATABASE


custgrid.TextMatrix(custgrid.Row, 2) = rs.Fields("Full Name")
custgrid.TextMatrix(custgrid.Row, 3) = rs.Fields("Address")
custgrid.TextMatrix(custgrid.Row, 4) = rs.Fields("Gender")
custgrid.TextMatrix(custgrid.Row, 5) = rs.Fields("Birthdate")
custgrid.TextMatrix(custgrid.Row, 6) = rs.Fields("Mobile")
End If
cmdclear_Click
End Sub

Private Sub cmdsearch_Click()


framesearch.Visible = True
cmdsearch.Visible = False
cmdendsearch.Visible = True
End Sub

Private Sub cmdtop_Click()


custgrid.Row = 1

custgrid.SetFocus
custgrid_Click
End Sub

Private Sub custgrid_Click()


frmcustdetail.Enabled = False
frmcustdetail.Enabled = False
''' FOR ADDING DATA FROM GRID TO TEXTBOX
txtcustid.Text = custgrid.TextMatrix(custgrid.Row, 1)
txtcustname.Text = custgrid.TextMatrix(custgrid.Row, 2)
txtcustaddress.Text = custgrid.TextMatrix(custgrid.Row, 3)
'''for Gender selection
If custgrid.TextMatrix(custgrid.Row, 4) = "Male" Then
optmale.Value = vbChecked
ElseIf custgrid.TextMatrix(custgrid.Row, 4) = "Female" Then
optfemale.Value = vbChecked
End If
'''for empty grid click
If custgrid.Rows = 1 Then
txtbirthdate.Value = Now

Else
txtbirthdate.Value = custgrid.TextMatrix(custgrid.Row, 5)
txtcustmobileno.Text = custgrid.TextMatrix(custgrid.Row, 6)
End If
End Sub

Private Sub Form_Load()


Call connection
Set rs = New ADODB.Recordset
sql = "select * from CustomerDetail"
rs.Open sql, cn, adOpenDynamic, adLockOptimistic

framesearch.Visible = False
frmcustdetail.Enabled = False
If cmdadd.Enabled = True Then
cmdsave.Enabled = False
End If

framefunctiom.Height = 1
Timer1.Interval = 1
Timer1.Enabled = True
gridload
End Sub
Private Sub gridload()
''' TO GENERATE CUSTOMER GRID
custgrid.TextMatrix(0, 0) = "ID"
custgrid.TextMatrix(0, 1) = "Customer ID"
custgrid.TextMatrix(0, 2) = "Full Name"
custgrid.TextMatrix(0, 3) = "Address"
custgrid.TextMatrix(0, 4) = "Gender"
custgrid.TextMatrix(0, 5) = "Birthdate"
custgrid.TextMatrix(0, 6) = "Mobile"
custgrid.ColWidth(0) = 400
custgrid.ColWidth(1) = 1000
custgrid.ColWidth(2) = 2200
custgrid.ColWidth(3) = 4100
custgrid.ColWidth(4) = 1200
custgrid.ColWidth(5) = 1600

custgrid.ColWidth(6) = 1900
''' FOR ADDING RECORDS FROM DATABASE TO GRID
custgrid.Rows = 1
ff = 1
Do While Not rs.EOF
custgrid.Rows = custgrid.Rows + 1
custgrid.TextMatrix(ff, 0) = ff
custgrid.TextMatrix(ff, 1) = IIf(IsNull(rs.Fields("customer ID")), "",
rs.Fields("customer ID"))
custgrid.TextMatrix(ff, 2) = IIf(IsNull(rs.Fields("Full Name")), "",
rs.Fields("Full Name"))
custgrid.TextMatrix(ff, 3) = IIf(IsNull(rs.Fields("Address")), "",
rs.Fields("Address"))
custgrid.TextMatrix(ff, 4) = IIf(IsNull(rs.Fields("Gender")), "",
rs.Fields("Gender"))
custgrid.TextMatrix(ff, 5) = IIf(IsNull(rs.Fields("Birthdate")), "",
rs.Fields("Birthdate"))
custgrid.TextMatrix(ff, 6) = IIf(IsNull(rs.Fields("Mobile")), "",
rs.Fields("Mobile"))
ff = ff + 1

rs.MoveNext
Loop
End Sub

Private Sub gridfill()


custgrid.Rows = custgrid.Rows + 1
If custgrid.Rows = 2 Then
custgrid.TextMatrix(custgrid.Rows - 1, 0) = 1
Else
custgrid.TextMatrix(custgrid.Rows - 1, 0) =
custgrid.TextMatrix(custgrid.Rows - 2, 0) + 1
End If
custgrid.TextMatrix(custgrid.Rows - 1, 1) = txtcustid.Text
custgrid.TextMatrix(custgrid.Rows - 1, 2) = txtcustname.Text
custgrid.TextMatrix(custgrid.Rows - 1, 3) = txtcustaddress.Text
'''FOR GENDER SELECTION
If optmale.Value = vbChecked Then
custgrid.TextMatrix(custgrid.Rows - 1, 4) = "Male"
ElseIf optfemale.Value = vbChecked Then
custgrid.TextMatrix(custgrid.Rows - 1, 4) = "Female"

Else
End If
custgrid.TextMatrix(custgrid.Rows - 1, 5) = txtbirthdate.Value
custgrid.TextMatrix(custgrid.Rows - 1, 6) = txtcustmobileno.Text
End Sub

Private Sub Label1_Click()


framefunctiom.Height = 1
Timer1.Interval = 1
Timer1.Enabled = True
End Sub

Private Sub Timer1_Timer()


framefunctiom.Height = framefunctiom.Height + 1000
If framefunctiom.Height >= 10300 Then
framefunctiom.Height = 10300
Timer1.Enabled = False
End If
End Sub

Private Sub Timer2_Timer()


framefunctiom.Height = framefunctiom.Height - 100
If framefunctiom.Height <= 350 Then
Timer2.Enabled = False
End If
End Sub

Private Sub txtcustmobileno_KeyPress(KeyAscii As Integer)


If KeyAscii >= 48 And KeyAscii <= 57 Then
Else
If KeyAscii = 8 Then
Else
KeyAscii = 0
End If
End If
End Sub

Private Sub txtcustname_KeyPress(KeyAscii As Integer)


If (KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii
<= 122) Then

Else
If KeyAscii = 8 Then
Else
KeyAscii = 0
End If
End If
End Sub

Private Sub txtscustid_KeyPress(KeyAscii As Integer)


If KeyAscii = 13 Then
x = "Customer ID"
y = txtscustid.Text
search
End If
End Sub

Private Sub txtscustname_KeyPress(KeyAscii As Integer)


If (KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii
<= 122) Then

ElseIf KeyAscii = 8 Then


ElseIf KeyAscii = 13 Then
x = "Full Name"
y = txtscustname.Text
search
Else
KeyAscii = 0
End If
End Sub

Private Sub txtscustmobile_KeyPress(KeyAscii As Integer)


If (KeyAscii >= 48 And KeyAscii <= 57) Then
ElseIf KeyAscii = 8 Then
search
ElseIf KeyAscii = 13 Then
x = "Mobile"
y = txtscustmobile.Text
search
Else
KeyAscii = 0

End If
End Sub

'Private Sub XPButton1_Click()


'x = "Full Name"
'y = txtscustname.Text
'search
'End Sub

'Private Sub XPButton2_Click()


'x = "Mobile"
'y = txtscustmobile.Text
'search
'End Sub
Private Sub XTab1_BeforeTabSwitch(ByVal iNewActiveTab As Integer,
bCancel As Boolean)
txtscustid.Text = "Cust"
txtscustname.Text = ""
txtscustmobile.Text = ""
End Sub

Private Sub search()


custgrid.Clear
i=1
j=0
rs.MoveFirst
While rs.EOF = False
If rs.Fields(x) = y Then

custgrid.Rows = custgrid.Rows + 1
custgrid.TextMatrix(0, 0) = "ID"
custgrid.TextMatrix(0, 1) = "Customer ID"
custgrid.TextMatrix(0, 2) = "Full Name"
custgrid.TextMatrix(0, 3) = "Address"
custgrid.TextMatrix(0, 4) = "Gender"
custgrid.TextMatrix(0, 5) = "Birthdate"
custgrid.TextMatrix(0, 6) = "Mobile"
j=j+1

Call sgrid

i=i+1
Else
End If
rs.MoveNext
Wend
End Sub

4.7 TESTING
Testing is a process of executing a program with the interest of finding
an error. A good test is one that has high probability of finding the yet
undiscovered error. Testing should systematically uncover different classes
of errors in a minimum amount of time with a minimum amount of efforts.
Two classes of inputs are provided to test the process
1. A software

configuration

that

includes

software

requirement specification, a design specification and source


code.
2. A software configuration that includes a test plan and
procedure, any testing tool and test cases and their expected
results.
Testing is divided into several distinct operations:
1. Unit Testing
Unit test comprises of a set tests performed by an individual program
prior to the integration of the unit into large system. A program unit is
usually the smallest free functioning part of the whole system. Module unit
testing should be as exhaustive as possible to ensure that each representation
handled by each module has been tested. All the units that makeup the
system must be tested independently to ensure that they work as required.

During unit testing some errors were raised and all of them
were rectified and handled well. The result was quiet satisfactory and
it worked well.
2. Integration Testing
Integration testing is a system technique for constructing the program
structure while at the same time conducting tests to uncover errors
associated with interfacing. The objective is to take unit tested modules and
build a program structure that has been dictated by design. Bottom-up
integration is the traditional strategy used to integrate the components of a
software system into functioning whole.
Bottom-up integration consists of unit test followed by testing of the
entire system. A sub-system consists of several modules that communicated
with other defined interface.
The system was done the integration testing. All the modules were tested
for their compatibility with other modules .They test was almost successful.
All the modules coexisted very well, with almost no bugs. All the modules
were encapsulated very well so as to not hamper the execution of other
modules.

3. Validation Testing
After validation testing, software is completely assembled as a package,
interfacing errors that have been uncovered and corrected and the final series
of software test; the validation test begins. Steps taken during software
design and testing can greatly improve the probability of successful
integration in the larger system. System testing is actually a series of
different tests whose primary purpose is to fully exercise the compute
based system.
4. Recovery Testing
It is a system that forces the software to fail in a variety of ways and
verifies that the recovery is properly performed.
5. Security Testing
It attempts to verify that protection mechanisms built into a system will
in fact protect it from improper penetration. The systems security must of
course be tested from in vulnerability form frontal attack.
6. Stress Testing
Stress tools are designed to confront programs with abnormal
situations. Stress testing executes a system in a manner that demands
resources in abnormal quantity and volume.

7. Black Box Testing


Black box testing is done to find out the following information as shown
in below:
1. Incorrect or missing functions.
2. Interface errors.
3. Errors or database access.
4. Performance error.
5. Termination error.
The mentioned testing is carried out successfully for this
application according to the users requirement specification.
8. Test Data Output
After preparing test data, the system under study is tested using the
test data. While testing the system using test data, errors are again uncovered
and corrected by using above testing and corrections are also noted for
future use.

5. CONCLUSION & FUTURE ENHANCEMENT


The project Online Shopping is completed, satisfying the required design
specifications. The system provides a user-friendly interface. The software is
developed with modular approach. All modules in the system have been tested with
valid data and invalid data and everything work successfully. Thus the system has
fulfilled all the objectives identified and is able to replace the existing system. The
constraints are met and overcome successfully. The system is designed as like it
was decided in the design phase. This software has a user-friendly screen that
enables the user to use without any inconvenience. This would help the corporation
prepare and organize its schedules more efficiently on the basis of traffic demand.
Besides, it would provide data on concessions given to various sections.

6. BIBLIOGRAPHY
BOOKS:

1. Charles Hampfed (2000) Visual Basic University of


Toronto
2. Herbert Schildt (2000) Visual Basic 6.0 Tata McGraw Hill
3. John Zukowski (2000) Visual Basic 6.0 BPB Publications
4. Jamie Jaworsky Visual Basic 6.0Techmedia
5. Stefen Denninger Visual Basic 6.0Authors Press
6. Ian Somerville Software engineering
7. Rajeev mall Software engineering
8. Elmasri Navathe Fundamentals of database systems

ONLINE REFERENCE:

www.w3schools.com
www.theserverside.com
www.visual.com

S-ar putea să vă placă și