You are on page 1of 77

WHOLESALE AUTOMATION FOR GARMENTS

SYNOPSIS

The project entitled “Wholesale Automation for Garments” is a VB.NET


windows application which eases the activities in the Textile Management. It tracks
entire workflow of the product purchase order and product information. It tracks the
return of the product to the vendors and customer.

It is a business application to manage the entire Purchase and Sales activities


of the product. Administrator defines and manages the master entities of this
application. The user can perform transactions required for the business. Regarding
the purchase order raised to the vendors a SMS intimation will be sent to their mobile.
It tracks the sales order details such as confirmed orders, out of stock etc.

The company will generate the information about the products sold and
maintain the details of the item for future correspondence about their product. The
reports generated will provide the in depth view of the business which helps the top
management to increase the business profit.
CHAPTER – 1
INTRODUCTION

1.1 OVERVIEW OF THE PROJECT

Whole Sale Automation is a VB.NET windows application used to record and


maintains the process for textile whole sale shop. The application can record the
details of the authenticated users, the product type and the product in the shop, the
vendor information and the customer information. The administrator records the role
and the authenticated users to login into the application. The administrator also stores
the product type and the product type details in the textile shop. He can also record
the vendor details and the customer details. It tracks the process of purchase order,
purchase from the vendor, sales order and sales information. The vendor and the
customer payment information are recorded for each vendor purchase and customer
sales. The balance amount for each payment is also being calculated and stored. SMS
intimation will be sent to the vendors for the purchase order. This system helps to
send SMS about the offers to the customers.
Customized reports are generated to ease the work of user. The reports
consists of various reports like List of PO Raised and the Purchase details, Stock
Report, Sales order and the Sales details, Purchase return, Sales Return Report,
Payment Received.
CHAPTER – 2
2.1 SYSTEM STUDY
It is the process of studying the problem to find the feasible solution to that
problem, by which the existing system is learnt and understood, objectives and
requirements are of the system defined and the solution are evaluated. Once analysis
is completed the analyst has a firm understanding of what is to be done.

2.1.1 STUDY ON THE EXISTING SYSTEM


The existing system lacks complete process of the textile shop and is not
automated fully. The Customer details are maintained in excel which will take more
time to search from the long lists, so it is very difficult to maintain the details. As the
current data is maintained through ledgers and excel sheet so there is no proper
reports for facilitation of the administration of the showroom. This system also lacks
in reporting information which is difficult for maintaining the day to day business
operations. Only accounts are systemized whereas other process like customer
details, purchase details, vendor details are maintained in papers and ledgers. This
will increase the time taken to complete the order by the customers.

DRAWBACKS OF THE EXISTING SYSTEM:

 The Existing system is a manual system using ledgers and excels sheets
and it leads to time consumption.
 No integrated process for the entire textile shop management.

 Lack of reports and search misleads to in accurate information and the


time take to calculate the cost for the order will increase.

 Data duplication can be occurred by repeating the same thing over and
over.
2.1.2 STUDY ON THE PROPOSED SYSTEM

The proposed system overcomes the disadvantages of the existing system and
implements efficient monitoring of order by customer and payment management. The
sales details are processed with the ordering by the vendor and stock management is
computerized. The system is created for maintaining the customer details, order
details and payment details. The purchase return to the vendor is monitored and is
recorded for each purchase and the amount reduced for the purchase return is also
recorded for the corresponding purchase. The customer returned product will be
added to the stock and the amount for the product returned is reduced for the
corresponding payment. The SMS alert is given to the vendor and the customer while
the purchase order and sales order is being raised.

ANTICIPATED ADVANTAGES:

 Integrated process for the textile shop management.


 Paper works and ledgers are eradicated which will helps in increasing the
efficiency to serve the customer quicker.
 Reports generated will increase the quick business decisions.
 The SMS alert is given to the vendor and the customer while delivering the
products.
2.2 SYSTEM SPECIFICATION

2.2.1 HARDWARE CONFIGURATION

Processor - Pentium III

RAM - 128MB

Hard Disk - 40 GB

Floppy Disk Drive - 1.44 MB

Motherboard - Mercury Intel chipset board

Printer - HP Laser 6 plus

Mouse - logitech two buttons

Keyboard - 104 keys Keyboard

Monitor - “15 ” SVGA Colour monitor

2.2.2 SOFTWARE CONFIGURATION

Platform : Windows 7

Front end tool : VB.Net

Back End : MS SQL Server


2.3 SOFTWARE REQUIREMENT SPECIFIACTION

Front end used

Microsoft Visual Basic.NET used as front end tool.

The VB.NET Language

The VB.NET language is disarmingly simple, but it is highly expressive when


it comes to implementing modern programming concepts. VB.NET includes all the
support for structured, component-based, object-oriented programming that one
expects of a modern language.

The goal of VB.NET is to provide a simple, safe, object-oriented, Internet-


centric, high performance language for .NET development. VB.NET is simple
because there are relatively few keywords. This makes it easy to learn and easy to
adapt to our specific needs.

 Windows console mode applications

 Standard Windows applications

 Windows services

 Windows controls and Windows control libraries

 Web controls and web control libraries and .NET classes and namespaces

Visual Basic .NET

The Microsoft .NET Framework is an integrated and managed environment


for the development and execution of your code. The .NET Framework is a managed,
type safe environment for application development and execution. The framework
manages all aspects of the execution of your program, it allocates memory for the
storage of data and instructions, grants or denies the appropriate permissions to your
application, initiates and manages application execution, and manages the
reallocation of memory for resources that are no longer needed. The .NET Framework
consists of two main components: the Common Language Runtime and .NET
Framework Class Library.

VB.NET is a programming language designed to create applications that work


with Microsoft’s new .NET Framework. The .NET platform in turn aims at
addressing many of the limitations of “classic” COM, Microsoft’s Component Object
Model, which provided one approach toward application and component
interoperability. These limitations included type incompatibilities when calling COM
components, versioning difficulties when developing new versions of COM
components, and the need for developers to write a certain amount of code to handle
the COM “plumbing” In contrast to VB, with its reliance on COM, VB.NET offers a
number of new features and advantages.

The development environment for the VB.NET language is Visual


Studio.NET. It is a true integrated development environment that provides many new
useful functions and features. If fulfils the long-felt need of a really user-friendly and
comprehersive IDE. It offers every feature that we need to build client-side as well as
server-side applications using VB.NET.
Features of VB.NET

With its language enhancements and its tight integration into the .NET
Framework, Visual Basic is a thoroughly modernized language that will likely
become the premier development tool for creating a wide range of .NET applications.
In the past, Visual Basic was often seen as a “lightweight” language that could be
used for particular kinds of tasks, but was wholly unsuitable for others.

 Object Orientation
 Common Type System
 Access to System Services: The Framework Class Library
 A Common Runtime Environment

VB.NET has a number of features that help it retain backwards compatibility


with Visual Basic6 (VB6). Other features have been added specifically to adapt
Visual Basic to Object Oriented Programming and to the .NET platform.

VB.NET provides support in the language to find bugs early in the development
process. This makes easier to maintain codes and programs that are more reliable.

The reason for selecting Visual Basic.NET

 Visual Basic.NET has flexibility, allowing one or more languages to


interoperate to provide the solution. This Cross Language Compatibility
allows to do project at a faster rate.

 Visual Basic.NET has Common Language Runtime (CLR), that allows all the
components to converge into one intermediate format and then can interact.

 Visual Basic.NET provides excellent security when an application is executed


in the system.
 Visual Basic.NET has flexibility, allowing us to configure the working
environment to best suit our individual style. We can choose between a single
and multiple document interfaces, and we can adjust the size and positioning
of the various IDE elements.

 Visual Basic.NET has intelligence feature that make the coding easy and also
dynamic that provides very less coding time.

The working environment in Visual Basic.NET is often referred to as


Integrated Development Environment because it integrates many different functions
such as design, editing, compiling and debugging within a common environment. The
Visual Basic.NET language is quite powerful.

After creating a Visual Basic.NET application can freely distribute any


application to anyone who uses Microsoft windows. We can distribute our
applications on disk, on CDs, across networks or over an intranet or the internet.

Advantages of Microsoft Visual Basic.NET

Visual Basic is the fastest and easiest way to create application for Microsoft
windows; it provides with a complete set of tools to simplify rapid application
development.

“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 elements, you simply drag and drop pre built object into
place on screen.

The .NET framework is the next evolution of the Microsoft development


platform, it supports multiple languages and allows them to seamlessly interact with
each other via common standards. One of the standards is the Common Language
Runtime (CLR), which provides a set of service that are common to all application
such as memory management, cross-language integration, access security, debugging
and more.
Like CLR, Common Type System (CTS) is an important common standard. It
provides a standard set of data types that are used by all .NET languages such as
VB.NET and VC#.NET.

The .NET Platform

In July 2000, Microsoft announced the .NET platform, a development


framework that provides a new way to create Windows applications. However, .NET
goes beyond traditional windows programming to facilitate creating web application
quickly and easily. And VB.NET is one of the premier languages that Microsoft
supports for development in this new and exciting .NET space.

Reports are that Microsoft is devoting 80% of its research and development
budget to .NET and its associated technologies. The results of this commitment are
impressive.

The VB.NET language can be used to develop two types of applications that
can be run on windows:

 Console applications display no graphics


 Windows applications use the standard windows interface.
The .NET Framework

The .NET Framework specifies how .NET programming constructs, such as


intrinsic types, classes and interfaces are implemented. The .NET Frame work sits on
top of any flavor of the Windows operating systems. The most important components
of the Framework are the Common Language Runtime (CLR) and the so-called
Framework Class Library (FCL), which provides an enormous number of predefined
types of classes for us to use in our programs.

Different from other Language

 VB.NET is a truly Object Oriented Language. Even the primitive data types
are implemented as objects with methods that call for type conversions and
output formatting. VB.NET supports all the three basic concepts of OOPS,
namely encapsulation, inheritance and polymorphism.

 VB.NET is consistent. It supports a unified data type system. Programmers


can extend the data type system easily.

 VB.NET is easier and safer.

 Many type-safe measures have been incorporated into VB.NET. Unsafe type
casting is not permitted. VB.NET supports the garbage collection feature,
which prevents the memory leakage problem.

 In VB.NET, classes are declared and defined in the same code blocks.

 VB.NET makes the development and implementation of components easy.


With VB.NET, it is possible to build reliable and durable components that
help us to handle several real-life applications.

 VB.NET supports the versioning features.


 Web forms in VB.NET enable us to develop very efficient web-based
applications that will generate dynamic web content.

The Development Environment

The Visual Studio.NET Integrated Development Environment provides


enormous advantages to the VB.NET programmer.

The Visual Studio.NET IDE is centered on an editor. An editor is much like a


word processor, except that it produces simple text. The Visual Studio.NET IDE also
provides support for building GUIs, which are integral to windows and web projects.

some of the key features of the IDE are

 Layout
 Intelligence

Common Language Runtime (CLR)

The CLR is the heart of the .NET framework. It is the engine that drives key
functionality. “Runtime” is a component that a computer processes in order to execute
programs written in a particular programming language.

Here is how the CLR works. First of all, the source code written in a .NET
language gets compiled to the Intermediate Language (IL) and at the same time
metadata information is created by using the metadata engine. These are optimally
linked with other code compiled by different compilers and the result is an EXE or
DLL containing the IL code, which is saved to disk.

Then, on execution, the IL code and any functionality from the .NET Base
Class Libraries is brought together by using the class loader. Then, the combined code
is optimally tested for type safely by using the verifier before the Just-In-Time (JIT)
compiler comes to play. The JIT compiler processes the IL, creating managed native
code. Then, the managed native code is passes on to the .NET runtime manager.
Finally, the .NET runtime manager executes the native code. The native code
is cached and users can select the caching schemes that best fit their execution
environments.

VB.NET
Source Code IL code Managed native code
Back end used

Microsoft SQL Server used as back end tool.

Microsoft SQL Server 2000

Microsoft SQL Server is an application used to create computer databases for


the Microsoft windows family of server operating system. It provides an environment
used to generate databases that can access workstations, the web or other media such
as a Personal Digital Assistant (PDA).

Microsoft SQL Server is a probably the most accessible and the most
documentation enterprise database environment right now. The following is a list of
the features provided in SQL Server 2000.

 User-defined functions

 Indexed views

 Distributed partitioned views

 Cascading RI constraints

 Multiple SQL Server instances

 XML support

User-Defined Functions

SQL Server has always provided the ability to store and execute SQL code
routines via stored procedures. In addition, SQL Server has always supplied a number
of built-in functions. Functions can be used almost anywhere. An expression can be
specified in query.
SQL Server 2000 introduces the long-awaited support for user-defined
functions. User-defined functions can take zero or more input parameters and return a
single value like the system-defined functions, or a table result.

Table valued functions can be used anywhere. Table or view expressions can
be used in queries, and they can perform more complex logic than is allowed in a
view.

Indexed Views

Views are often used to simplify complex queries, and they can contain joins
and aggregate functions. However, in the past, queries against views were resolved to
queries against the underlying base table, and any aggregates were recalculated each
time you ran a query against the view.

Indexed views can improve performance for the following types of queries:

 Joins and aggregate that process many rows.

 Join and aggregation operations that performed frequently with in


many queries.

 Decision support queries that rely on summarized, aggregated data that


is infrequently updated.

Distributed partitioned views

SQL server 7.0 provided the ability to create partitioned views using the
UNION ALL statement in a view definition. It was limited, however, in that all the
tables had to reside within the same SQL Server where the view was defined. SQL
Server 2000 expands the ability to create partitioned views by allowing to
horizontally partition tables across multiple SQL Servers.
The features helps to scale out one database server to multiple database
servers, while making the data appear as if it comes from a single table on a single
SQL Server. In addition, partitioned views are now able to be updated.
Cascading RI Constraints

In previous versions of SQL Server, referential integrity (RI) constraints were


restrictive only. If an insert, update, or delete operation violated referential integrity, it
was aborted with an error message.

SQL Server 2000 provides the ability to specify the action to take when a
column referenced by a foreign key constrain is updated or deleted. You can still abort
the update or delete if related foreign key records exist by specifying the NO
ACTION option, or you can specify the new CASCADE option, which will cascade
the update or delete operation to the related foreign key records.

Multiple SQL Server Instances

Previous versions of SQL Server supported the running of only a single


instance of SQL Server at a time on a computer.

Running multiple instance or multiple versions of SQL Server required


switching back and forth between the instances, requiring changes in the Windows
registry. (The SQL Server Switch provides with 7.0 switches between 7.0 and 6.5
performed the registry changes for us.)

SQL Server 2000 provides support for running multiple instances of SQL
Server on the same system. This allows you to simultaneously run one instance of
SQL Server 6.5 or 7.0 along with one or more instances of SQL Server 2000.
Each SQL Server instance runs independently of the others and has its own set
of system and user databases, security configuration and so on. Applications can
connect to the different instance in the same way they connect to different SQL
Servers on different machine.

XML Support

Extensible Markup Language has became a standard in web-related


programming to describe the contents of a set of data and how the data should be
output or displayed on a web page. XML, like HTML, is derived from the Standard
Generalize Markup Language (SGML).
When linking a web application to SQL Server, a translation needs to take
place from the result set returned from SQL Server to a format that can be understood
and displayed web applications. Previously, this translation needed to be done in a
client application.

SQL Server 2000 provides native support XML. These new features provide
the ability to do the following:

Return query result sets directly in XML format.

Retrieve data from an XML document as it were a SQL Server table.

 Access SQL Server through a URL using HTTP. Through


Internet Information Services (IIS), you can define a virtual root that gives
you HTTP access to the data and XML functionality of SQL Server 2000.

The features of the SQL Server 2000

It is a client-server architecture and not shared-file application as access.

 Symmetric Multiprocessing (SMP) supports up to 32 simultaneous processors.

 It can have database up to 1 terabyte (1024 GB) in size.


 It can handle up to 32,767 simultaneous user connections.

 It provides data integrity, data recovery and functionalities that are transparent
to the developer.

 SQL Server optimizes network resources. Only the data requested by the
client needs to be sent across the network.

 Security can be enforced at ones central location.

Benefits of SQL

 SQL has become the database language of choice because it is flexible,


powerful and easy to learn.
 SQL is a non-procedural language.
 Process sets of records rather than just one at a time and provides automatic
navigation to the data.
 SQL provides commands for a variety of tasks including: querying data,
creating, updating and replacing and inserting, updating and deleting rows.

All major relational database management systems support SQL thus one can
transfer all the skills gained with SQL from one RDBMS to another.
CHAPTER -3

SYSTEM DESIGN AND DEVELOPMENT

3.1 DATA FLOW DIAGRAM:


Vendor
details Purchase order
details

Custom
er Purchase order
details details

Purchas
e details Purchase order
details

Purchas
e Purchas
details
Admin e order Purchase
details

Sales
details Purchas
e details sales order
details

Paymen Purchas
t details e order Sales
details

Vendor
payment Vendor payment

Customer
payment Customer payment
Vendor
details
Vendor

Admin
Customer
details
Customer

Purchase
details Purchase

Sales
details Sales

Payment
details
Payment
3.2 DATABASE DESIGN
The most important consideration in designing the database is how
information will be used.
The main objectives of designing a database are:
Data Integration

In a database, information from several files are coordinated, accessed and


operated upon as through it is in a single file. Logically, the information are
centralized, physically, the data may be located on different devices, connected
through data communication facilities.

Data Integrity
Data integrity means storing all data in one place only and how each
application to access it. This approach results in more consistent information, one
update being sufficient to achieve a new record status for all applications, which use
it. This leads to less data redundancy; data items need not be duplicated; a reduction
in the direct access storage requirement.

Data Independence
Data independence is the insulation of application programs from changing
aspects of physical data organization. This objective seeks to allow changes in the
content and organization of physical data without reprogramming of applications and
to allow modifications to application programs without reorganizing the physical
data.

The tables needed for each module were designed and the specification of
each and every column was given based on the records and details collected during
record specification of the system study.
TABLE DESIGN
Table Name: Role Table
FIELD NAME DATA TYPE KEY DESCRIPTION
Roleid Int PK Role Id
RoleName Varchar(50) Not Null Role Name

Table Name : User Details


FIELD NAME DATA TYPE KEY DESCRIPTION
UserId Varchar(20) PK Login id
Username Varchar(50) Not Null Username
Password Varchar(50) Not Null Password
RoleID Varchar(20) FK Rold Id
UEmailid Varchar(50) Null Email Id
UContactno Varchar(12) Null Contact Number

Table Name :Product Type


FIELD NAME DATA TYPE KEY DESCRIPTION
PTCode Varchar(10) PK Product Type Code

PTName Varchar(20) Not Null Product Type Name

Table Name : Product


FIELD DATA TYPE KEY DESCRIPTION
NAME
PCode Varchar(10) PK Product Code

PName Varchar(20) Not Null Product Name

PTCode Varchar(10) FK Product Type Code

Pprice Varchar(20) Not Null Per Product Price


Table Name :Vendor
FIELD NAME DATA TYPE KEY DESCRIPTION
VCode Varchar(10) PK Vendor Code
VName Varchar(20) Not Null Vendor Name
VAddress Varchar(50) Not Null Vendor Address
VMblNo Int(12) Not Null Vendor Mobile Number
VEmailid Varchar(10) Null Vendor Email id
VCPerson Varchar(20) Null Contact Person

Table Name :Customer


FIELD DATA TYPE KEY DESCRIPTION
NAME
CCode Varchar(10) PK Customer Code
CName Varchar(20) Not Null Customer Name
CAddress Varchar(50) Not Null Customer Address
CMblNo Int(12) Not Null Customer Mobile Number
CEmailid Varchar(10) Null Customer Email id

Table Name : Stock


FIELD NAME DATA TYPE KEY DESCRIPTION
Sid Varchar(10) PK Stock ID
Pname Varchar(10) FK Product Code
Aqty Varchar(20) Not Null Available Quantity
Loat Varchar(20) Not Null Loat Number
Date Varchar(50) Not Null Date
Table Name :Purchase Order
FIELD NAME DATA TYPE KEY DESCRIPTION
PONo Varchar(10) PK Purchase Order Number
VCode Varchar(10) FK Vendor Code
PCode Varchar(10) FK Product Code
OQty Varchar(10) Not Null Order Quantity
Date Varchar(10) Not Null Date of Order
Tamt Varchar(10) Not Null Total amount

Table Name : Purchase


FIELD NAME DATA TYPE KEY DESCRIPTION
Pno Varchar(10) PK Purchase Number
PONo Varchar(10) FK Purchase Order Number
MRQty Varchar(10) Not Null Received Quantity
Date Varchar(10) Not Null Date of Product Purchased
Tamt Int(20) Not Null Total amount

Table Name : Sales Order


FIELD NAME DATA TYPE KEY DESCRIPTION
SONo Varchar(10) PK Sales Order Number
CCode Varchar(10) FK Customer Code
PCode Varchar(10) FK Product Code
OQty Varchar(10) Not Null Order Quantity
Date Varchar(10) Not Null Date of Order
Tamt Varchar(10) Not Null Total amount
Table Name : Sales
FIELD NAME DATA TYPE KEY DESCRIPTION
Pno Varchar(10) PK Sales Number
SONo Varchar(10) FK Sales Order Number
MRQty Varchar(10) Not Null Received Quantity
Date Varchar(10) Not Null Date of Product
Tamt Int(20) Not Null Total amount

Table Name : Return


Purchase Return
FIELD NAME DATA TYPE KEY DESCRIPTION
PRid Int PK Purchase Return ID
Pno Varchar(10) FK Purchase Number
Dqty Varchar(10) Not Null Damage Quantity
Date Varchar(10) Not Null Date of Product Purchased
Tamt Varchar(10) Not Null Total amount
Amt Varchar(10) Not Null Amount for damaged quantity
Remark Varchar(10) Not Null Remark

Table Name : Sales Return


FIELD DATA TYPE KEY DESCRIPTION
NAME
SRid Int PK Sales Return ID
Sno Varchar(10) FK Sales Number
Dqty Varchar(10) Not Null Damage Quantity
Date Varchar(10) Not Null Date of Product
Tamt Varchar(10) Not Null Total amount
Amt Varchar(10) Not Null Amount for damaged quantity
Remark Varchar(10) Not Null Remark
Table Name :Vendor Payment
FIELD DATA TYPE KEY DESCRIPTION
NAME
PVno Varchar(10) PK Vendor Payment Number
Pno Varchar(10) Not Null Purchase Number
Ptype Varchar(10) Not Null Payment Type
Pmode Varchar(10) Not Null Payment Mode
Tamt Varchar(10) Not Null Total Amount
Iamt Varchar(10) Not Null Initial Amount
Ramt Varchar(10) Not Null Remaining Amount
Date Varchar(10) Not Null Date of Payment

Table Name : Customer Payment


FIELD NAME DATA TYPE KEY DESCRIPTION
Pcno Varchar(10) PK Customer Payment Number
Sno Varchar(10) Not Null Sales Number
Ptype Varchar(10) Not Null Payment Type
Pmode Varchar(10) Not Null Payment Mode
Tamt Varchar(10) Not Null Total Amount
Iamt Varchar(10) Not Null Initial Amount
Ramt Varchar(10) Not Null Remaining Amount
Date Varchar(10) Not Null Date of Payment
3.3 INPUT DESIGN:
The input data are collected and organized to make data entry easy, logical,
and error free. Each area in the input form should be identified should be specified for
the user what to write and where to write. A screen is an actually a display station that
has a buffer for storing data. The main objective of screen design is for simplicity,
accurate and quick data capture or entry. The objective in the input design is to ensure
that the data which will be processed by the system is collected and inserted into the
system efficiently according to the specified requirements, and with the minimum
errors. The basic design consideration that would satisfy the user requirements were
as follows.

When the design input has been reviewed and the design input requirements
are determined to be acceptable, an iterative process of translating those requirements
into a device design begins. The first step is conversion of the requirements into
system or high-level specifications. Thus, these specifications are a design output.
Upon verification that the high-level specifications conform to the design input
requirements, they become the design input for the next step in the design process,
and so on. Input facilities the entry of data into the computer system. Input design
involves the selection of the best strategy for getting data into the computer system at
the right time and as accurately as possible.
3.4 OUTPUT DESIGN

Report design is very important concept in the computerized system, without


reliable output the user may feel the entire system is unnecessary and avoids using it.
The proper output design is important in any system and facilitates effective decision
making.

The basic output considerations were as follows

 Simple and legible methods were used for output using standard display
controls

 All the output screens were informative and integrative in such a way the user
can fulfill his requirements

 Quality reports were made available to the user

The output is verified as conforming to its input; and it then becomes the design input
for another step in the design process.
3.5 MODULE DESCRIPTION

MODULES
 Master Module
 Purchase Module
 Sales Module
 Return Module
 Payment Module

Master Module
This module contains the Role Definition and the user creation details. This
module contains the entire master data management like Vendor master, customer
master, Product type and Product Master. These master data are used in the
transactions to avoid the mistake of typing in the transactions instead by selecting
from the respective master.
 Vendor Master

This screen capture the information like vendor name, address, contact person,
mobile no, phone no and email id if available.
 Customer Master

This screen capture the information like customer name, customer address,
email, phone no, mobile no and contact person
 Product Master

This screen captures the information regarding the Product data such as
Product name, product type and its price.
Purchase Module

This module manages the transaction regarding the purchase of product given
to the vendor such as Purchase Order (PO) and purchase details from the vendor. On
Receipt of goods the information is updated in the stock.
 Purchase Order

This screen captures the information like product, no of quantity, vendor


information and date required.
 Purchase Details

This screen captures the information of the product received against the
purchase order and the amount for the purchase is also being calculated.
According the product received from the vendor, stock is updated.
Sales Module
The customer orders are maintained here and calculate the product needed for
the order and checks with the stock availability and helps in identifying the product to
be purchased for that order.
 Sales Order

This screen captures the information regarding the order of the customer like
customer name, no of quantity required, date of requirements.
 Sales

This screen captures the product needed for the order given by the
customer and calculates the amount needed to complete the order. The stock is
being updated as the sales details are recorded for each customer.
Return Module

The product being returned to the vendors and the customer returned product
details are maintained in this module. According to the products returned the stock
details will be updated.
 Purchase Return

This screen captures the information regarding the product returned to the
vendor like vendor name, the purchase number, quantity returned and date.
The returned quantity is reduced from the stock and the stock is updated. The
amount for the returned quantity is also calculated and maintained.
 Sales Return

This screen captures the information regarding the product returned from the
customer like customer name, the sales number, quantity returned and date.
The returned quantity is added to the stock and the stock is updated. The
amount for the returned quantity is also calculated and maintained.
Payment Module

Payment module deals with the payment to the vendor for purchased product. This
module also handles the customer payment against the Sales.
 Vendor Payment

This screen captures the information like Quantity of product purchased from
the vendor, amount for that order are stored.
 Customer Payment

This screen captures the information regarding customer payment like sales
number, no of quantities delivered to the customer and its amount information.
CHAPTER – 4

SYSTEM TESTING AND IMPLEMENTATION

4.1SYSTEM TESTING

System testing is a type of testing to confirm that all code modules work as specified,
and that the system as a whole performs adequately on the platform on which it will
be deployed. System testing should be performed by testers who are trained to plan,
execute, and report on application and system code. They should be aware of
scenarios that might not occur to the end user, like testing for null, negative, and
format inconsistent values.
System testing of software or hardware is testing conducted on a
complete, integrated system to evaluate the system's compliance with its specified
requirements. A tester should be able to repeat the steps that caused an error. Test
techniques include, but are not limited to, the process of executing a program or
application with the intent of finding software bugs.
Testing and Methodologies
We begin the testing process by developing a comprehensive plan to test the
general functionality and special features on a variety of platform combinations. Strict
quality control procedures are used. The process verifies that the application meets
the requirements specified in the system requirements document and is bug free.
At the end of each testing day, we prepare a summary of completed and failed
test. And the application is redeveloped and retested until every item is resolved. All
changes and retesting are tracked through spreadsheets. Applications are not allowed
to launch until all identification problem are fixed. Finally a report is prepared at the
end of testing to show exactly what was tested and to list the final outcomes. Our
software testing methodology is applied in four distinct phases:
• Unit testing

• Integration testing

• Validation testing
Unit Testing
Unit testing is designed to test small pieces of functionality rather than the
system as a whole. This allows us to conduct the first round of testing to eliminate
bugs before the other major tests (i.e.) each module is tested individually. Unit testing
is testing changes made in a existing or new program to find out each module is found
to be working satisfactorily. Here every module will be tested.
Student Registration and Login module test.
Component test-whether the mail services device is working or not.
Integration Testing
Integration testing is a type of testing in which software and/or hardware
components are combined and tested to confirm that they interact according to their
requirements. Integration testing can continue progressively until the entire system
has been integrated.
It is also a software testing methodology used to test individual software components
or units of code to verify interaction between various software components and detect
interface defects. Components are tested as a single group or organized in an iterative
manner. After the integration testing has been performed on the components, they are
readily available for system testing. The following are the types of integration testing:
• Top down Integration

• Bottom-up Integration

Validation Testing
Tests to determine whether an implemented system fulfills its
requirements. The checking of data for correctness or for compliance with applicable
standards, rules, and conventions. Validation testing is used to validate the fields in
the form. It mainly focuses on text field and numeric field.
Numeric field validation
• The mobile number field can contain only numbers that should be 10 number.

• The individual modules are checked for accuracy and what it has to perform

Text field validation:


• The text field can contain only the number of characters lesser than or equal to
its size.
• The text fields are alphanumeric in some tables and alphabetic in other tables.
Incorrect entry always flashes an error message.

System Testing
System testing ensures that the entire integrated software system meets
requirements. It tests a configuration to ensure known and predictable results. An
example of system testing is the configuration oriented system integration test.
System testing is based on process descriptions and flows, emphasizing pre-driven
process links and integration points.
Functional Testing
Functional Tests provide systematic demonstrations that functions tested
are available as specified by the business and technical requirements, system
documents and user manuals.
Functional testing is centered on the following items:
• Valid Input : identified classes of valid input must

be accepted.
• Invalid Input : identified classes of invalid input must

be rejected.
• Functions : identified functions must be exercised

• Output : identified classes of application must

be exercised.
• System Procedures : interfacing systems or procedures

must be invoked.
Organization and preparation of functional tests is focused on requirements,
key functions, or special test cases. In addition, systematic coverage pertaining to
identify business process flows, data fields,
predefined processes, and successive processes must be considered for testing. Before
functional testing is complete, additional tests are identified and the effective value of
current tests is determined.
White Box Testing
White Box Testing is a testing in which the software tester has knowledge of the
inner workings, structure and language of the software, or at least its purpose. It is
used to test areas that cannot be reached from a black box level.
Black Box Testing
Black Box Testing is testing the software without any knowledge of the inner
workings, structure or language of the module being tested. Black box tests, as most
other kinds of tests, must be written from a definitive source document, such as
specification or requirements document, such as specification or requirements
document. It is a testing in which the software under test is treated, as a black box
.you cannot “see” into it. The test provides inputs and responds to outputs without
considering how the software works.
Quality Assurance

Quality assurance consists of the auditing and reporting functions of


management. The goal of quality assurance is to provide management with the data
necessary to be informed about product quality, thereby gaining insight and
confidence that product quality is meeting its goal.

QUALITY ASSURANCE GOALS


Correctness

The extent to which the program meets system specifications and user
objectives.
Reliability
The degree to which the system performs its intended functions overtime.
Efficiency
The amount of computer resources required by a program to perform a
function.
Usability
The effort required learning and operating a system.
Maintainability
To use with which program errors are located and corrected.
Testability
The effort required testing a program to ensure its correct performance.
Portability
The ease of transporting a program from one hardware configuration to
another.
Accuracy
The required position in input editing, computations and output.

SECURITY TECHNOLOGIES AND POLICIES

Any system developed should be secured and protected against


possible hazards. Security measures are provided to prevent unauthorized access of
the database at various levels. At uninterrupted power supply should be so that the
power failure or voltage fluctuations will not erase the data in the files.

Password protection and simple procedures to change the unauthorized


access are provided to the users. The system allows the user to enter the system for
product management and order status entry only through login utility. The user will
have to enter the user name and password.

A multi-layered security architecture comprising firewalls, filtering


routers, encryption and digital certification must be ensured in this project in real time
that order and payment details protected from unauthorized access. The customer can
access this order status only by using his customer code and order number.

USER TRAINING

User Training is designed to prepare the user for testing & conventing the system. .
They are
1) User Manual.
2) Help Screens.
3) Training Demonstration.
1) User Manual:

The summary of important functions about the system and software can be
provided as a document to the user.

2) Help Screens:

This features now available in every software package, especially when it is


used with a menu. The user selects the “Help” option from the menu. The system
access the necessary description or information for user reference.

3) Training Demonstration:

Another User Training element is a Training Demonstration. Live


demonstrations with personal contact are extremely effective for Training Users.

PERATIONAL DOCUMENTATION

Documentation means of communication; it establishes design and


performance criteria for phases of the project. Documentation is descriptive
information that portrays the use and / or operation of the system.

(i) Documentation Tools:

Document production and desktop publishing tool support nearly ever aspect
of software developers. Most software development organizations spend a substantial
amount of time developing documents, and in many cases the documentation process
itself is quite inefficient. It is not use unusual for a software development effort on
documentation. For this reason, documentation tools provide an important
opportunity to improve productivity.
(ii) Document Restructuring:

Creating document is far too timed consuming. If the system work’s, we’ll
live with what we have. In some cases, this is the correct approach. It is not possible
to recreate document for hundreds of computer programs.
Documentation must be updated, but we have limited resources. It may not be
necessary to fully redocument an application. Rather, those portions of the system that
are currently undergoing change are fully documented.

The system is business critical and must be fully redocumented. Even in this
case, an intelligent approach is to pare documentation to an essential minimum.

4.2 SYSTEM IMPLEMENTATION


Implementation is the stage in the project where the theoretical design is
turned into a working system. The most crucial stage is achieving a successful new
system & giving the user confidence in that the new system will work efficiently &
effectively in the implementation state.

THE STAGE CONSISTS OF

 Testing the developed program with simple data.


 Detection’s and correction of error.
 Creating whether the system meets user requirements.
 Testing whether the system.
 Making necessary changes as desired by the user.
 Training user personnel.

4.3.1 IMPLEMENTATION PROCEDURES

The implementation phase is less creative than system design. A system


project may be dropped at any time prior to implementation, although it becomes
more difficult when it goes to the design phase.
The final report to the implementation phase includes procedural flowcharts,
record layouts, report layouts, and a workable plan for implementing the candidate
system design into an operational one. Conversion is one aspect of implementation.

Several procedures of documents are unique to the conversion phase. They

include the following,

 The conversion portion of the implementation plan is finalized and


approved.
 Files are converted
 Parallel processing between the existing and the new system are logged
on a special form.
 Assuming no problems, parallel processing is discontinued.
Implementation results are documented for reference.

4.4 SYSTEM MAINTENANCE

Maintenance is actually the implementation of the review plan. As important


as it is, many programmers and analysts are to perform or identify themselves with
the maintenance effort. There are psychological, personality and professional reasons
for this. Analysts and programmers spend far more time maintaining programs than
they do writing them. Maintenance accounts for 50-80 percent of total system
development

Maintenance is expensive. One way to reduce the maintenance costs are


through maintenance management and software modification audits.

 Maintenance is not as rewarding as exciting as developing systems. It is


perceived as requiring neither skill not experience.
 Users are not fully cognizant of the maintenance problem or its high
cost.
 Few tools and techniques are available for maintenance.
 A good test plan is lacking.
 Standards, procedures, and guidelines are poorly defined and enforced.
 Programs are often maintained without care for structure and
documentation.
 There are minimal standards for maintenance.
 Programmers expect that they will not be in their current commitment by
time their programs go into the maintenance cycle.

Corrective Maintenance

It means repairing, processing or performance failure or making changes


because of previously uncovered problems or false assumptions.

Perfective Maintenance

It means changes made to a system to add new features or to improve


performance.

Preventive Maintenance

Changes made to a system to avoid possible future problems.

NORMALIZATION

Normalization is a process of simplifying the relationship between the data in a


record. Normalization helps in accomplishing following process:

 To simply the maintenance of data through updates, insertions and deletions


 To allow simple retrieval of data in response to query and requests
 To avoid restructuring of data when new application requirements arises
 To structure the data so that any relationship can be easily represented

Normalization has numerous benefits. It enables faster sorting and index


creation, more clustered indexes, few nulls, and an increase in the compactness of the
database.normaliztion helps to simplify the structure of the tables.
Normalization results in the formation of tables that satisfy certain specified
rules certain normal forms. The normal forms are used to ensure that various types of
anomalies and inconsistencies are not introduced in the database. Several normal
forms have been identified. The most important and widely used normal forms are:

 First normal form(1NF)


 Second normal form(2NF)
 Third normal form(3NF)
 Boycee-coded normal form

FIRST NORMAL FORM (1NF)

Definition
A relation scheme is said to be in first normal form (1nf) if the values in the
domain of each attribute of the relation atomic. In other words, only one value
is associated with each attribute and the value is not a set of values or list of
values. A database scheme is in the first normal form. If every relation scheme
included in the database scheme is in the first normal form.

According to definition of first normal form alone, all the tables used in this
project are normalized to 1nf because the domain of each attribute of the relation
contain only atomic values and not group of values.
SECOND NORMAL FORM (2NF)

Definition:
A relation scheme is in second normal form if it is in 1NF and if all non-
prime attributes are fully functionally dependent on the relation keys. A
database scheme is in second normal form if every relation scheme include in
the database scheme is in second normal form.

A table is said to be in 2NF when it is in 1NF and every attribute in the row is
functionally dependent upon the whole key and not just part of the key.
THIRD NORMAL FORM (3NF)

Definition:

A relation scheme is in third normal form if for all non trivial functional
dependence in F+ of the form X A, either X contains a key or A is a
prime attribute. A database scheme is in 3NF. In other words a relation
scheme in third NF form does not allow partial or transitive
dependencies.

A relation is said to be in 3NF when it is in 2NF and every non-key attribute is


functionality dependent only on the primary key.

BOYCEE-CODED NORMAL FORM

A relation is in the Boycee-coded normal form (BCNF) if and only if every


determinant is a candidate key.
All the tables that are used is undergone all the normalization process and it is
found to be of away from kind of data redundancy. Since some of the tables are
independent of each other tables the process of normalization is made accurately and
perfectly.
CHAPTER – 5
CONCLUSION
5.1 CONCLUSION

Grament purchase, production and sales management is carried out using this
project. The project helps administrator to maintain all transactions and customers to
view the past sales and receipt details. Since the application is designed as web, any
browser can be used to view the application. The change password helps to protect
the accessibility of users. The application is tested well and end users satisfaction is
found to be more. The application is designed such that minimum internet knowledge
is required for end users to browse the web site. For the user login it enhances the
One Time Password techniques, it makes the high reliability and the security
enhancement also.
5.1.1 SCOPE FOR FURTHER ENHANCEMENT
The application become useful if the below enhancements are made in future.

1. The purchase and sales returns details can also be maintained.


2. For online sales transaction, PayPal Integration can be made to web
site so that customers pay through online.
3. Item stock updated details can be attached as mails to customer so that
they make request easily.

The application is developed such that above said enhancements can be integrated
with current modules.
BIBLIOGRAPHY

REFERENCES

1. Jesus Castagnetto, Sascha Schumann,” Proffesional Php Programming”,


Addison wosley Publication, Fifth Edition.

2. Jay Greenspan, Brad Bulgar ,”Mysql/Php Database Applications”,Tata McGraw-


Hill Publishing Company, Third Edition.

3. William Stallings,”Cryptography And Network Security”,Tata McGraw-Hill


Publishing Company, Third Edition.

4. Rogres Pressman,”Software Engineering And Applications”, Galgotie Publication,


Sixth Edition

5. Richard Fairley,”Software Engineering Concepts”,Tata McGraw-Hill Publishing


Company, Fourth Edition.

6. Ellias M.Award “System Analysis And Design” Tata McGraw-Hill Publishing


Company, Second Edition.

Reference WebSites:
www.w3schools.com
www.onlinetutorial.com
www.phpnuke.com
www.php.net
www.java2s.com
ANNEXURE

A. INPUT DESIGN
B. OUTPUT DESIGN
C. SOURCE CODE

Public Class frmMainform

Private Sub CustomerMasterToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
CustomerMasterToolStripMenuItem.Click

Dim frm As New frmcustomer

frm.MdiParent = Me

frm.Show()

End Sub

Private Sub DealerMasterToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
DealerMasterToolStripMenuItem.Click

Dim frm As New frmSupplier

frm.MdiParent = Me

frm.Show()

End Sub

Private Sub ProductMasterToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
ProductMasterToolStripMenuItem.Click

Dim frm As New frmItemmaster


frm.MdiParent = Me

frm.Show()

End Sub

Private Sub PurchaseToolStripMenuItem_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles PurchaseToolStripMenuItem.Click

Dim frm As New frmPurchase

frm.MdiParent = Me

frm.Show()

End Sub

Private Sub SalesToolStripMenuItem_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles SalesToolStripMenuItem.Click

Dim frm As New frmSales

frm.MdiParent = Me

frm.Show()

End Sub

Private Sub StockToolStripMenuItem_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles StockToolStripMenuItem.Click

Dim frm As New frmstock

frm.MdiParent = Me

frm.Show()

End Sub
Private Sub DealerDetailsToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
DealerDetailsToolStripMenuItem.Click

Dim frm As New frmViewsupplier

frm.MdiParent = Me

frm.Show()

End Sub

Private Sub CustomerDetailsToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
CustomerDetailsToolStripMenuItem.Click

Dim frm As New frmViewCustomer

frm.MdiParent = Me

frm.Show()

End Sub

Private Sub ProductDetailsToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
ProductDetailsToolStripMenuItem.Click

Dim frm As New frmViewItems

frm.MdiParent = Me

frm.Show()

End Sub
Private Sub ServiceCallsToolStripMenuItem1_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ServiceCallsToolStripMenuItem1.Click

Dim frm As New frmViewPurchase

frm.MdiParent = Me

frm.Show()

End Sub

Private Sub ServiceStautsToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
ServiceStautsToolStripMenuItem.Click

Dim frm As New frmViewSales

frm.MdiParent = Me

frm.Show()

End Sub

Private Sub StockDetailsToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
StockDetailsToolStripMenuItem.Click

Dim frm As New frmViewStock

frm.MdiParent = Me

frm.Show()

End Sub
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles ExitToolStripMenuItem.Click

End

End Sub

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


System.EventArgs) Handles MyBase.Load

End Sub

End Class

Imports System.Data.OleDb

Public Class frmPurchase

Dim a1 As Integer

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


System.EventArgs) Handles MyBase.Load

If con.State = ConnectionState.Closed Then

con.ConnectionString = constr

con.Open()

End If

txtpurchaseID.Text = autono()

Call loadprodid()

Call loadmanuf()
End Sub

Private Function autono() As Integer

qry = "select max(PurchaseID) from tblpurchase"

cmd = New OleDbCommand(qry, con)

Dim dr As OleDbDataReader

dr = cmd.ExecuteReader

If dr.Read Then

autono = dr(0) + 1

Else

autono = 1000

End If

dr.Close()

End Function

Private Sub loadmanuf()

qry = "select SupplierID from tblsupplier"

cmd = New OleDbCommand(qry, con)

Dim dr As OleDbDataReader

dr = cmd.ExecuteReader

While dr.Read

cmbsupid.Items.Add(dr(0))

End While

dr.Close()

End Sub
Private Sub cmbsupid_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles cmbsupid.SelectedIndexChanged

Dim cmd1 As New OleDbCommand

qry = "select Suppliername,Address from tblsupplier where supplierID=" &


cmbsupid.SelectedItem

cmd1.Connection = con

cmd1.CommandText = qry

Dim seldr As OleDbDataReader

seldr = cmd1.ExecuteReader

If seldr.Read Then

txtsupname.Text = seldr(0)

txtaddress.Text = seldr(1)

End If

seldr.Close()

End Sub

Private Sub loadprodid()

qry = "select itemcode from tblProduct"

cmd = New OleDbCommand(qry, con)

Dim dr As OleDbDataReader
dr = cmd.ExecuteReader

While dr.Read

cmbprodid.Items.Add(dr(0))

End While

dr.Close()

End Sub

Private Sub cmbprodid_SelectedIndexChanged(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles cmbprodid.SelectedIndexChanged

Dim cmd1 As New OleDbCommand

qry = "select ItemName,category from tblProduct where Itemcode=" &


cmbprodid.SelectedItem

cmd1.Connection = con

cmd1.CommandText = qry

Dim seldr As OleDbDataReader

seldr = cmd1.ExecuteReader

If seldr.Read Then

txtprodname.Text = seldr(0)

txtcategory.Text = seldr(1)

End If

seldr.Close()

End Sub

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


System.EventArgs) Handles txtqty.LostFocus

txttotalamount.Text = CDbl(txtprice.Text) * CInt(txtqty.Text)


txtvat.Text = CDbl(txttotalamount.Text) * 4 / 100

txtnetamount.Text = CDbl(txttotalamount.Text) + CDbl(txtvat.Text)

End Sub

Sub add_to_stock()

Dim cmd1 As New OleDbCommand

Dim cmd2 As New OleDbCommand

Dim dr As OleDbDataReader

Dim qty As Integer

Dim qry1, qry2 As String

qty = 0

qry1 = "select sum(prod_in) from tmpstock where pname= '" &


Trim(txtprodname.Text) & "'"

cmd1.CommandText = qry1

cmd1.Connection = con

dr = cmd1.ExecuteReader()

If Not dr.Read Then

qty = 0

Else

If Not IsDBNull(dr(0)) Then qty = dr(0)

End If
dr.Close()

Dim q As Integer

' MsgBox(qty)

q = qty + a1

' MsgBox(q)

'Exit Sub

qry2 = "update tmpstock set prod_in=" & q & " where pname='" &
Trim(txtprodname.Text) & "'"

' MsgBox(qry2)

cmd.CommandText = qry2

cmd.Connection = con

cmd.ExecuteNonQuery()

'MsgBox("Product is Altered to stock")

End Sub

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


System.EventArgs) Handles Button2.Click
qry = "Insert into tblpurchase values(" & txtpurchaseID.Text & ",'" &
purchasedate.Value & "'," & cmbsupid.SelectedItem & ",'" & txtsupname.Text & "','"
& txtaddress.Text & "','" & cmbprodid.SelectedItem & "','" & txtprodname.Text &
"','" & txtcategory.Text & "','" & txtmodel.Text & "'," & txtprice.Text & "," &
txtqty.Text & "," & txttotalamount.Text & "," & txtvat.Text & "," &
txtnetamount.Text & ")"

cmd = New OleDbCommand(qry, con)

cmd.ExecuteNonQuery()

a1 = CInt(txtqty.Text)

Call add_to_stock()

MsgBox("Record Inserted..")

End Sub

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


System.EventArgs)

Dim pid As Integer

pid = InputBox("Enter a Purchase ID")

End Sub

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


System.EventArgs) Handles Button4.Click

Dim purid As Integer

purid = InputBox("Enter a Purchase ID")


qry = "select * from tblpurchase where purchaseid=" & purid

Dim dr As OleDbDataReader

cmd = New OleDbCommand(qry, con)

dr = cmd.ExecuteReader

If dr.Read Then

txtpurchaseID.Text = dr(0)

purchasedate.Value = dr(1)

'cmbsupid.Text = dr(2)

txtsupname.Text = dr(3)

txtaddress.Text = dr(4)

' cmbprodid.Text = dr(5)

txtprodname.Text = dr(6)

txtcategory.Text = dr(7)

txtmodel.Text = dr(8)

txtprice.Text = dr(9)

txtqty.Text = dr(10)

txttotalamount.Text = dr(11)

txtvat.Text = dr(12)

txtnetamount.Text = dr(13)

Else

MsgBox("Record Not Found")


End If

dr.Close()

End Sub

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


System.EventArgs) Handles Button1.Click

txtpurchaseID.Text = autono()

txtprodname.Text = ""

txtsupname.Text = ""

txtqty.Text = ""

txtsupname.Text = ""

txttotalamount.Text = ""

txtvat.Text = ""

txtnetamount.Text = ""

txtmodel.Text = ""

txtaddress.Text = ""

cmbsupid.Focus()

End Sub

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


System.EventArgs) Handles Button3.Click

If txtpurchaseID.Text = "" Then

MsgBox("Pls find the record to delete..")


Exit Sub

End If

qry = "delete from tblpurchase where purchaseid=" & txtpurchaseID.Text

cmd = New OleDbCommand(qry, con)

cmd.ExecuteNonQuery()

MsgBox("Record Deleted..")

End Sub

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


System.EventArgs) Handles Button5.Click

Me.Close()

End Sub

End Class

Imports System.Data.OleDb

Public Class frmSales

Dim a1 As Integer
Private Sub frmSales_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

If con.State = ConnectionState.Closed Then

con.ConnectionString = constr

con.Open()

End If

txtpurchaseID.Text = autono()

Call loadprodid()

Call loadmanuf()

End Sub

Private Function autono() As Integer

qry = "select max(SalesID) from tblsales"

cmd = New OleDbCommand(qry, con)

Dim dr As OleDbDataReader

dr = cmd.ExecuteReader

If dr.Read Then

autono = dr(0) + 1

Else

autono = 1000

End If

dr.Close()

End Function

Private Sub loadmanuf()


qry = "select CustomerID from tblCustomer"

cmd = New OleDbCommand(qry, con)

Dim dr As OleDbDataReader

dr = cmd.ExecuteReader

While dr.Read

cmbsupid.Items.Add(dr(0))

End While

dr.Close()

End Sub

Private Sub loadprodid()

qry = "select itemcode from tblProduct"

cmd = New OleDbCommand(qry, con)

Dim dr As OleDbDataReader

dr = cmd.ExecuteReader

While dr.Read

cmbprodid.Items.Add(dr(0))

End While

dr.Close()

End Sub

Private Sub cmbsupid_SelectedIndexChanged(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles cmbsupid.SelectedIndexChanged

Dim cmd1 As New OleDbCommand


qry = "select Customername,Address from tblCustomer where CustomerID=" &
cmbsupid.SelectedItem

cmd1.Connection = con

cmd1.CommandText = qry

Dim seldr As OleDbDataReader

seldr = cmd1.ExecuteReader

If seldr.Read Then

txtsupname.Text = seldr(0)

txtaddress.Text = seldr(1)

End If

seldr.Close()

End Sub

You might also like