Académique Documents
Professionnel Documents
Culture Documents
University,Mumbai
BACHELOR OF COMPUTR APPLICATION
Regal college of
technology
A
PROJECT REPORT
ON
CERTIFICATE
This is certify that the project report entitled,
BACHELOR OF COMPUTER
APPLICATION
DATE:
MRS. MORE RESHMA
(Project Guide)
PRINCIPAL
MRS.MORE RESHMA
(H.O.D)
EXTERNAL
2
EXAMINER
Index
Table of Contents
Sr. No
1.
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
2.
Phase Name
Preliminary Investigation
Acknowledgement
Organizational Overview
Current System
Limitations Of the system
Scope of proposed system
Advantage of proposed system
Feasibility Study
Gantt Chart
System Analysis
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
3.
3.1
3.2
3.3
3.4
4.
4.1
4.2
4.3
4.4
4.5
4.6
4.7
Menu Tree
Test Cases, Test Data, Test Result
Program Descriptor
Code
Screen Layout
Hardware & Software requirement
References & Bibliography
Page No.
4
5
6
7
7
7
8
9
11
12
13
14
18
24
32
35
41
52
57
58
63
64
65
66
67
68
81
88
113
116
117
Phase 1
4
Preliminary
Investigation
Acknowledgement
We here by taken an opportunity to express our
deep sense of gratitude to Mrs. Reshma More
for her valuable guidance and esteemed
suggestion along with constant encouragement
during each of our project,which enabled this
project work to be successful.
We are thankful to our beloved H.O.D Mrs.
Reshma More for this continuous encouragement
and valuable advice.
5
Yours sincerely,
MISS. AKSHAYA SUBHASH
KADAM .
Date:
Organizational Overview
Name of organization: Sai Pet
Shop
Address:At Post (Markandi)
Tal chiplun Dist - Ratnagiri
Contact No:9587440344
This project is made for the Sai Pet shop,which is one
of the popular Pet shop in Chiplun city.
This Pet shop was established in 2011 in
Chiplun Mr. Keralkar is the profiler of Pet shop.
Since 2011 this Pet shop is providing a very
good service to its own area and other places
Study Of Current
System
This project is of Computer System for Pet Shop
Management. Their current system is also manual system.
But this current system is very lass user friendly and
it have no facility of printed pay slip so whenever client comes
then receptionist first fill up all the information on computer
and then prepares the receipt manually .
This procedure consumes so much valuable time of
receptionist as well as client. In the existing system assigning
Limitations Of Current
System
Maintaining register s very tedious and time
making job.
Mistakes can happen while rewriting into in
register.
One can make error while calculations bill amount
in hand.
Any charge in staff information required.
Proposed System
This system is designed for Pet Shop Management.
The scope of the system includes:
Proposed system is able to allot & maintain record of client &
pet.
Drawbacks
The only drawbacks of this system are that the
system has no central database.
FEASIBILTY STUDY
Feasibility study is the system proposal according to its
work ability impaction the organization to meet the user needs
and effective use of the resources. The following point need to
be considered while studying the feasibility of the proposed
system.
Technical feasibility
The proposed system that has developed is found technology feasible for
the Pet shop system .The hardware and software resources are easily available to
the branch. The staff has efficient knowledge of hardware and software
technology, so there is no need to depend on outside experts.
Operational feasibility
Operational feasibility measures of how will the applications well work in
organization. Required operational skills and expertise is already been
available with the firm. Operational feasibility of the system can be
ensuring through the following:
The user of the system can be trained to use the application system adjust
with the new environment, so that they are capable to work on the new
system.
10
User friendliness of the proposed system makes the user to do the work
efficiently.
System work smoothly without any difficulties.
Well documentation of the proposed system gives complete idea about the
system design to the user.
So the proposed system has the support by applicants who makes
application . So the system is operationally feasible.
Economic feasibility
Economic feasibility is most important from the point of any system.
Before finalizing the decision it should be seen that whether the proposed system
is financial viable or not. Cost-benefit analysis is required to be carried out.
In case of the present system, it found as the firms business is
increasing day to day they should go far computerized system. The cost of
hardware and software is affordable to the branch.
The cost of development and maintenance of the system is justifiable to
the use and benefits of the owner.
As the existing system will be replace by the computerized one the
computerized one the complexities and difficulties will be reduced significantly.
Gantt chart
Sr.No
Phase
Remark
11
Preliminary Investigation
A Organizational
Overview
B Limitations of current
System advantages of
proposed system
C Feasibility Study
System Analysis
A Fact finding
B Even Table
C Use Case Diagram
D Activity Diagram
E Class Diagram
F Object Diagram
G Sequence/Collaboration
Diagram
System Design
A Derive Tables from
entities and relationships
B Component Diagram
C Package Diagram
20th June
D Deployment Diagram
12th Jan
15th Jan
Form/Report Layouts
25th June
30th June
5th July
25th Nov
30th Nov
5th Dec
10th Dec
15th Dec
20th Dec
3rd Jan
5th Jan
8th Jan
System Coding
A Design database(tables
with attributes &
constraints)
B Coding
20th Jan
25th Feb
System Implementation
5th March
7
8
Project Review
Project Report
Submission
20th Feb
1st March
7th March
10th March
12
13
Phase - 2
System Analysis
Event Table:
Sr. Event
Trigger
Source Activity
Response Destination
New
client
details
Searching
client
details
Updating
client
details
Admin
Create new
client record
Admin
Admin
Search for
client details
New client
record is
addad
Display
client
details
Client
record is
updated
Client
record is
Admin
2
3
Add new
client
record
Search
client
records
Update
client
record
Admin
i.
ii.
Delete
client
Deleting
client
Admin
i.
Search for
client
details
Update
client
record
Search for
client
Admin
Admin
15
record
details
Add new
vendor
record
New
vendor
details
Admin
Search
vendor
records
Update
vendor
record
Searching
vendor
details
Updating
vendor
details
Admin
Delete
vendor
record
Deleting
vendor
details
Admin
Add new
employee
record
New
employee
details
Admin
10
Search
employee
records
Update
employee
record
Searching
employee
details
Updating
employee
details
Admin
11
Admin
Admin
details
ii. Delete
client
details
Create new
vendor record
Search for
vendor details
i.
Search for
vendor
details
ii. Update
vendor
record
i. Search for
vendor
details
ii. Delete
vendor
details
Create new
employee record
deleted
New
vendor
record is
addad
Display
vendor
details
Vendor
record is
updated
Admin
Vendor
record is
deleted
Admin
New
employee
record is
added
Search for
Display
employee details employee
details
i. Search for Employee
employee record is
details
updated
ii. Update
employee
record
Admin
Admin
Admin
Admin
Admin
16
12
Delete
employee
record
Deleting
employee
details
Admin
13
Add new
pet record
New pet
details
Admin
14
Search pet
records
Update pet
record
Searching
pet details
Updating
pet details
Admin
16
Delete pet
record
Deleting
pet details
Admin
17
Add new
purchase
product
record
New
purchase
details
Admin
18
Search
purchase
product
records
Update
purchase
record
Searching
purchase
product
details
Updating
purchase
product
details
Admin
Delete
purchase
product
Deleting
purchase
product
Admin
15
19
20
Admin
Admin
i.
Search for
employee
details
ii. Delete
employee
details
Create new pet
record
Search for pet
details
i. Search for
pet details
ii. Update pet
record
i. Search for
pet details
ii. Delete pet
details
Create new
purchase
products record
Employee
record is
deleted
Admin
New pet
Admin
record is
added
Display pet Admin
details
Pet record Admin
is updated
Pet record
is deleted
New
purchase
product
record is
added
Search for
Display
purchase product purchase
details
product
details
i. Search for Purchase
purchase
product
product
record is
details
updated
ii. Update
purchase
product
record
i. Search for Purchase
purchase
product
product
record is
Admin
Admin
Admin
Admin
Admin
17
record
details
21
Add new
stock
New stock
details
Admin
22
Search
stock
records
Update
stock
record
Searching
stock
details
Updating
stock
details
Admin
24
Delete
stock
record
Deleting
stock
details
Admin
25
Add new
order
record
Search
order
records
Update
order
record
New order
details
Admin
Searching
order
details
Updating
order
details
Admin
23
26
27
Admin
Admin
details
deleted
ii. Delete
purchase
product
details
Create new stock New stock
record
record is
added
Search for stock Display
details
stock
details
i. Look up
Stock
product
record is
availabilit updated
y
ii. Search for
stock
details
iii. Update
stock
Record
i Search for Stock
stock
record is
details
deleted
ii Delete
stock
details
Create new order New order
record
record is
added
Search for order Order
details
record is
searched
i Search for Order
order
record is
details
updated
ii Update
order
record
Admin
Admin
Admin
Admin
Admin
Admin
Admin
18
28
Delete
order
record
Deleting
order
details
Admin
29
30
Generate
bill
Search bill
31
Update bill
Generating Admin
bill
Search old Admin
bill
Change
Admin
bill details
Search for
order
details
ii Delete
order
details
Generate bill/
Calculate bill
Search for bill
i
ii
Order
record is
deleted
Admin
Bill
generated
Bill found
Admin
Admin
Admin
19
Admin
21
22
23
24
Activity Diagram
25
1) Customer
a) Add new customer
2) Supplier
a) Add new supplier
b)
27
C)
3)Employee
28
7)Received Order
31
32
9)Update customer
33
Class Diagrams:
Customer
Supplier
Cust_id:numeric
Cust_name:varchar
cust_adds:varchar
contact_no:numeric
supp_id:numeric
supp_name:varchar
supp_adds:varchar
contact_no:numeric
Add():structure
Update():void
Delete():void
Delete():text
Add():structure
Update():void
Delete():void
Employee
Product
emp_id:numeric
emp_name:varchar
emp_adds:varchar
contact_no:numeric
prod_id:numeric
prod_name:varchar
prod_type:text
Add():structure
Update():void
Delete():void
New_prod:structure
Update():void
Delete():void
Stock
Pet
Prod_id:numeric
Prod__name:varchar
quantity:numeric
prod_weight:numeric
pet_id:numeric
pet_type:varchar
pet_color:varchar
pet_price:numeric
Update Stock():null
Add():structure
Update():void
Delete():void
34
Bill
Bill_no:numeric
Bill_date:date
Cust_id:numeric
Cust_name:varchar
Prod_qty:numeric
Total_amt:numeric
Create_bill():void
Print():void
Order
order_no:numeric
order_date:date
prod_list:varchar
Tax:numeric
discount:numeric
Total_amt:numeric
Create_order():void
Update():void
Delete():void
35
Employee
1
1
*
Customer
1
Pet
1
Supplier
1
*
Product
*
*
1
1
1
Stock
Customer Order
Supplier Order
1
1
Customer Bill
36
Object Diagrams
1) One employee has one or many pet
P1:Pet
Pet_id:101
Pet_type:cat
Pet_color:white
Pet_price:3000
e:Employee
P2:Pet
emp_id:111
emp_name:Abhishek
emp_address:pune
emp__salary:5000
cont__no:922297390
Pet_id:102
Pet_type:cat
Pet_color:white
Pet_price:3000
P3:Pet
Pet_id:101
Pet_type:cat
Pet_color:Brown
Pet_price:000
37
P1:Pet
Pet_id:101
Pet_type:cat
Pet_color:white
Pet_price:3000
C: Customer
Cust_id:1
Cust_Name: abc
Cust_Addr: chiplun
ContactNo: 258027
P2:Pet
Pet_id:102
Pet_type:cat
Pet_color:white
Pet_price:3000
P3:Pet
Pet_id:103
Pet_type:cat
Pet_color:white
Pet_price:3500
38
s1:stock
p2product
prod_id:101
prod_name:cat
prod_quant:10
prod_weight:8kg
prod_id:102
prod_name:cat
p3:product
prod_id:103
prod_name:cat
e:Employee
s:stock
emp_id:111
emp_name:Ankita
emp_address:chiplun
emp_salary:5000
cont_no:56669930
prod_id:101
prod_name:cat
prod_quant:10
prod_weight:8kg
39
order_id:100
order_date:11 jan 2014
supplier_name:sachin
prod_name:pet
prod_quantity:10
prod_weight:kg
40
e:Employee
emp_id:111
emp_name:Ankita
emp_address:chiplun
emp_salary:5000
cont_no:56669930
p2:product
prod_id:102
prod_name:cat
prod_price:4000
p3:product
prod_id:103
prod_name:cat
prod_price:4500
B:customer
8) One customer order to one customer
bill bill
o:customer order
order_id:100
order_date:11 jan 2014
customer_name:Amar
prod_name:pet
prod_quantity:10
prod_weight:kg
bill_id:101
date:11 feb 2016
customer_name:shakti
cont_no:8778447780
pet_type:cat
pet_color:black
pet_price:4000
41
p1:product
prod_id:101
prod_name:cat
prod_price:4500
o:supplier order
order_id:100
order_date:11 jan 2014
supplier_name:sachin
prod_name:pet
prod_quantity:10
prod_weight:kg
p2:product
prod_id:102
prod_name:cat
prod_price:4500
p3:product
prod_id:103
prod_name:cat
prod_price:4500
42
Sequence Diagrams:
1) Add new customer
43
44
45
5)
46
6)
47
48
10)
11)
12)
13)
14)
15)
16)
54
Collaboration Diagrams:
1) Add customer record
55
56
10)
:User Interface
1.add pet record
:Pet
1.1 add pet()
:Admin
11)
1.1search pet
1.2edit pet
1.3update pet
:Pet
57
12)
Generating order
13)
58
14)
Receive order
59
Phase 3
System
Design
60
Data Type
Description
Attributes
Customer Id
Customer Name
Number
Text
Hold customer Id
Hold customer name
Field size=50
Field size=50
Customer Address
Text
Contact Number
Number
Field size=50
2) Supplier Details
Field Name
Data Type
Description
Attributes
Supplier Id
Supplier Name
Number
Text
Hold supplier Id
Hold supplier name
Field size=50
Field size=50
Supplier Address
Text
Field size=50
Contact Number
Number
Field size=50
3) Pet Details
Field Name
Data Type
Description
Attributes
Pet Type
Text
Field size=50
Pet Id
Number
Hold Pet Id
Field size=50
Pet Color
Text
Field size=50
Pet Status
Text
Field size=50
Pet Price
Number
Field Size=50
61
4) Products Details
Field Name
Data Type
Description
Attributes
Product Id
Number
Hold product Id
Field size=50
Product Name
Text
Field size=50
5) Stock Details
Field Name
Data Type
Description
Attributes
Product Id
Number
Hold product Id
Field size=50
Product Name
Text
Field size=50
Product Quantity
Number
Field size=50
Product Weight
Number
Field size=50
Data Type
Description
Attributes
Order Id
Order Date
Customer Name
Pet Id
Pet Name
Number
Datetime
Text
Number
Text
Hold order Id
Hold order date
Hold customer name
Hold Pet Id
Hold pet name
Field size=50
Field size=50
Field size=50
Field size=50
Field size=50
Pet color
Text
Field size=50
Pet status
Text
Field size=50
Field Name
Data Type
Description
Attributes
Order Id
Order Date
Supplier Name
Product Name
Product Quantity
Number
Datetime
Text
Text
Number
Hold order Id
Hold order date
Hold supplier name
Hold product name
Hold product quantity
Field size=50
Field size=50
Field size=50
Field size=50
Field size=50
Product Weight
Number
Field size=50
8) Employee Details
Field Name
Data Type
Description
Attributes
Employee Id
Employee Name
Number
Text
Hold employee Id
Hold employee name
Field size=50
Field size=50
Employee Address
Text
Field size=50
Employee Salary
Number
Field Size=50
Contact Number
Number
Field size=50
Hold bill Id
Hold date
Hold customer name
Hold contact number
Hold pet type
Hold Pet Id
Hold Pet color
Hold Pet Status
Hold Pet Price
Hold total
Field size=50
Field size=50
Field size=50
Field size=50
Field size=50
Field size=50
Field size=50
Field size=50
Field size=50
Field size=50
Number
Datetime
Text
Number
Text
Number
Text
Text
Number
Number
63
Deployment Diagram:
DB:Database
AAAAAAAAAAAAAAA
Application Server:
SysAdmin:Executable
CommonApps:
Executable
User1:Admin
Printer
64
Component Diagram
65
Employe
e
Product
Put
custome
r
jorder
Maintain customer
order
Supplier
Supplier order
Stock
Billing
Employee
Product
Customer
order
66
order
Phase - 4
System Coding
67
Menu Tree
Customer
Supplier
Entry
Form
Employee
Product
Stock
Stationery
Management
System
Customer
Order
Order
Vendor
Order
SaleBill
Utility
Notepad
Calculator
Report
Description
This naming convention is
used to stored the customer id
This naming convention is
used to stored the customer
name
This naming convention is
used to stored the customers
address
This naming convention is
used to stored the customers
contact number
Function:
1. Add: this function add the customer record
2. Update: this function update the customer record
3. Delete: this function delete the customer record
4. Search: this function search the customer record
69
Function:
1) add: this function add the supplier record
2) update: this function update the supplier record
3) delete: this function delete the supplier record
4) search: this function search the supplier record
Pet Weight
Pet Quantity
Description
This naming convention is
used to stored the Pet type
This naming convention is
used to stored the Pet flavor
This naming convention is
used to stored the Pet weight
This naming convention is
70
Pet Price
Function:
1) add: this function add the Pet record
2) update: this function update the Pet record
3) search: this function search the Pet record
5) Class: Products form
Products form is hold all information about product.
Naming
Description
Product Id
This naming convention is
used to stored the product id
Product Name
This naming convention is
used to stored the product
name
Function:
1) add: this function add the product record
2) update: this function update the product record
3) search: this function search the product record
71
Product Name
Product Quantity
Product Weight
Function:
1) update: this function update the stock record
Pet Weight
Pet Quantity
72
Function:
1) add: this function add the supplier order record
2) update: this function update the supplier order record
3) cancel: this function cancel the supplier order record
4) search: this function search the supplier order record
73
Function:
1) add: this function add the employee record
2) update: this function update the employee record
3) delete: this function delete the employee record
4) search: this function search the employee record
10)
Description
This naming convention is
used to stored the order id
This naming convention is
used to stored the date
This naming convention is
used to stored the customer
74
name
This naming convention is
used to stored the contact
number
This naming convention is
used to stored the Pet type
This naming convention is
used to stored the Pet color
Contact Number
Pet Type
Pet Color
Pet Weight
Pet Quantity
Pet Price
Total
Function:
Testing
unit
Login
Assumption
Test data
Step to test
Excepted result
Actual result
Pass/F
ail
Username=text
Password=num
Username=Admin
Password=12345
Display message
welcome
Display
message
welcome
Pass
Username= Admin
Username=
1)open login
form
2)enter
username and
password
3)click ok
Step:1] ,2],3]
Display message
Display
Pass
75
module
Customer
module
Supplier
module
Pet
Password= 12345
C id=number
C name=text
Address=text
Contact no=number
S id=number
S name=text
S Address=text
Contact no=
number
Pet type=text
Password=
please enter
username
Username=12345
Password=23415
Step:1] ,2],3]
Display message
invalid login
Username=Admin
Password=
Step:1] ,2],3]
Display message
please enter
password
C id=1
C name= rohan
Address=khed
Contact
no=5690348954
1)open
customer form
2)fill all
details
3)click ok
Display message
record saved
successfully
C id= er
Step:1] ,2],3]
Display message
please enter
number
C name= 45
Step:1] ,2],3]
Display message
please enter
character
Contact no=106
Step:1] ,2],3]
Display message
at most 10 digit
are require
C id=1
C name=
Address=
Contact
no=4567890234
Step:1] ,2],3]
Display message
fill all details
s id=1
s name= rohan
S Address=khed
Contact
no=5690348954
1)open
supplier form
2)fill all
details
3)click ok
s id= er
message
please enter
username
Display
message
invalid login
Display
message
please enter
password
Display
message
record saved
successfully
Pass
Pass
Pass
Display
message
please enter
number
Display
message
please enter
character
Display
message at
most 10 digit
are require
Display
message=fill
all details
Pass
Display message
record saved
successfully
Display
message
record saved
successfully
Pass
Step:1] ,2],3]
Display message
please enter
number
Pass
s name= 45
Step:1] ,2],3]
Display message
please enter
character
Contact no=106
Step:1] ,2],3]
Display message
at most 10 digit
are require
s id=1
s name=
Address=
Contact
no=4567890234
Step:1] ,2],3]
Display message
fill all details
Display
message
please enter
number
Display
message
please enter
character
Display
message at
most 10 digit
are require
Display
message=fill
all details
Pet type=veg
1)open Pet
Display message
Display
Pass
Pass
Pass
Pass
Pass
Pass
Pass
76
module
Product
module
Stock
module
Pet color=text
Pet weight=num
Pet status=num
Pet price=num
p id=number
p name=text
P id=number
P name=text
P status=number
P weight=number
Pet color=white
Pet weight=10
Pet status=available
Pet price=3000
Pet type= 2
form
2)fill all
details
3)click ok
Step:1] ,2],3]
record saved
successfully
message
record saved
successfully
Display message
please enter
character
Pass
Pet color= 45
Step:1] ,2],3]
Display message
please enter
character
Pet weight=abc
Step:1] ,2],3]
Display message
please enter
number
Pet status=65
Step:1] ,2],3]
Display message
please enter
character
Pet price=fghg
Step:1] ,2],3]
Display message
please enter
number
Pet type=cvvv
Pet color=abc
Pet weight=
Pet status=
Pet price=
p id=1
p name= abc
Step:1] ,2],3]
Display message
fill all details
Display
message
please enter
character
Display
message
please enter
character
Display
message
please enter
number
Display
message
please enter
number
Display
message
please enter
number
Display
message=fill
all details
Display message
record saved
successfully
Display
message
record saved
successfully
Pass
p id= er
1)open
product form
2)fill all
details
3)click ok
Step:1] ,2],3]
Display message
please enter
number
Pass
P name= 45
Step:1] ,2],3]
Display message
please enter
character
p id=1
p name=
Step:1] ,2],3]
Display message
fill all details
p id=1
p name=avbc
p status= 60
P weight=10
Display message
record saved
successfully
P id= er
1)open stock
form
2)fill all
details
3)click ok
Step:1] ,2],3]
Display
message
please enter
number
Display
message
please enter
character
Display
message=fill
all details
Display
message
record saved
successfully
Pass
P name= 45
Step:1] ,2],3]
Display message
please enter
character
P status=a
Step:1] ,2],3]
Display message
please enter
number
Display
message
please enter
number
Display
message
please enter
character
Display
message
please enter
Display message
please enter
number
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
77
number
Cust
Order
module
Supp
Order
module
O id=number
O date=date
Cust name=text
Pet type= text
Pet status= number
Pet color=text
Pet weight=number
O id=number
O date=date
Supp name=text
Prod name= text
Prod status=
number
prod
P weight=a
Step:1] ,2],3]
Display message
please enter
number
Display
message
please enter
number
Display
message=fill
all details
Pass
P id=1
P name=
P status=70
P weight=
Step:1] ,2],3]
Display message
fill all details
O id=1
O date=14/11/2012
Cust name=pooja
Pet type= cat
Pet status= available
Pet color=black
Pet weight=5
O id= ret
1]open order
form
2]fill all
information
3]click ok
Display message
record saved
successfully
Display
message
record saved
successfully
Pass
Step:1] ,2],3]
Display message
please enter
number
Pass
O date= 14/3/
Step:1], 2],3]
Display message
please enter
year
Step:1] ,2],3]
Display message
please enter
character
Pet type=h67h
Step:1] ,2],3]
Display message
please enter
character
Pet status=566
Step:1] ,2],3]
Display message
please enter
character
Step:1] ,2],3]
Display message
please enter
character
Pet weight=tyre
Step:1] ,2],3]
Display message
please enter
number
O id=1
O date=
Cust name=pooja
Pet type= cat
Pet status= 1
Pet color=black
Pet weight=
O id=1
O date=14/11/2012
Supp name=suraj
Prod name= dalada
Prod status= 100
Prod weight=5
Step:1], 2],3]
Display message
fill all
information
Display
message
please enter
number
Display
message
please enter
year
Display
message
please enter
character
Display
message
please enter
character
Display
message
please enter
number
Display
message
please enter
character
Display
message
please enter
number
Display
message fill all
information
1]open order
form
2]fill all
information
3]click ok
Display message
record saved
successfully
Display
message
record saved
successfully
Pass
Pass
78
Pass
Pass
Pass
Pass
Pass
Pass
Pass
weight=number
Employee
module
E id=
number
E name=text
E Address=text
E salary=number
contact no=
number
O id= ret
Step:1] ,2],3]
Display message
please enter
number
Display
message
please enter
number
Display
message
please enter
year
Display
message
please enter
character
Display
message
please enter
character
Display
message
please enter
number
Display
message
please enter
number
Display
message fill all
information
Pass
O date= 14/3/
Step:1], 2],3]
Display message
please enter
year
Step:1] ,2],3]
Display message
please enter
character
Prod name=h67h
Step:1] ,2],3]
Display message
please enter
character
Prod status=lmn
Step:1] ,2],3]
Display message
please enter
number
Prod weight=pnv
Step:1] ,2],3]
Display message
please enter
number
O id=1
O date=14/11/2012
Supp name=
Prod name= dalada
Prod status=
Prod weight=5
e id=1
e name= rohan
E Address=khed
E salary=5000
Contact
no=5690348954
Step:1], 2],3]
Display message
fill all
information
1)open
employee
form
2)fill all
details
3)click ok
Display message
record saved
successfully
Display
message
record saved
successfully
Pass
E id= er
Step:1] ,2],3]
Display message
please enter
number
Pass
E name= 45
Step:1] ,2],3]
Display message
please enter
character
E salary=tyg
Step:1] ,2],3]
Display message
enter number
Display
message
please enter
number
Display
message
please enter
character
Display
message enter
number
Contact no=106
Step:1] ,2],3]
Display message
at most 10 digit
are require
Pass
e id=1
e name=
e Address=
e salary=4000
contact no=
Step:1] ,2],3]
Display message
fill all details
Display
message at
most 10 digit
are require
Display
message=fill
all details
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
79
10
Billing
module
Bill id=number
Date=date
Cust name=text
Contact
no.=number
Pet type=text
Pet color=text
Pet status=number
Pet weight=number
1] open billing
form
2] fill all
details
3]click ok
Display message
record saved
successfully
Display
message
record saved
successfully
Pass
Step:1] ,2],3]
Display message
please enter
number
Pass
Date=/2/2015
Step:1] ,2],3]
Display message
please enter
day
Cust name= 45
Step:1] ,2],3]
Display message
please enter
character
Pet type=459
Step:1], 2],3]
Display message
please enter
character
Pet color=n87
Step:1], 2],3]
Display message
please enter
character
Pet status=jk
Step:1], 2],3]
Display message
please enter
number
Pet weight=ab
Step:1], 2],3]
Display message
please enter
number
Pet price=ahg
Step:1], 2],3]
Display message
please enter
number
Total =nhj890
Step:1], 2],3]
Display message
please enter
number
Step:1], 2],3]
Display message
please fill all
information
Display
message
please enter
number
Display
message
please enter
day
Display
message
please enter
character
Display
message
please enter
character
Display
message
please enter
character
Display
message
please enter
number
Display
message
please enter
number
Display
message
please enter
number
Display
message
please enter
number
Display
message
please fill all
information
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
80
Naming
Username
Password
Function:
3. Login: This function gives the access to program application
4. Exit: This function close the login form.
12)
13)
Supplier Name
Supplier Address
Contact Number
Function:
1) add: this function add the supplier record
2) update: this function update the supplier record
3) delete: this function delete the supplier record
4) search: this function search the supplier record
14)
Naming
Pet Type
Pet Color
Pet Weight
Pet Status
Pet Price
Description
This naming convention is used
to stored the Pet type
This naming convention is used
to stored the Pet color
This naming convention is used
to stored the Pet weight
This naming convention is used
to stored the Pet status
This naming convention is used
to stored the Pet price
Function:
1) add: this function add the Pet record
2) update: this function update the Pet record
3) search: this function search the Pet record
83
15)
Function:
1) add: this function add the product record
2) update: this function update the product record
3) search: this function search the product record
16)
Product Weight
Function:
2) update: this function update the stock record
84
17)
Function:
1) add: this function add the customer order record
2) update: this function update the customer order record
3) cancel: this function cancel the customer order record
4) search: this function search the customer order record
18)
order.
Naming
Order Id
Description
This naming convention is used
to stored the order id
85
Order Date
Supplier Name
Product Name
Product Status
Product Weight
Function:
1) add: this function add the supplier order record
2) update: this function update the supplier order record
3) cancel: this function cancel the supplier order record
4) search: this function search the supplier order record
19)
Function:
1) add: this function add the employee record
86
20)
bill.
Naming
Bill Id
Date
Customer Name
Pet Type
Pet Color
Pet Weight
Pet Status
Pet Price
Total
Description
This naming convention is used
to stored the order id
This naming convention is used
to stored the date
This naming convention is used
to stored the customer name
This naming convention is used
to stored the Pet type
This naming convention is used
to stored the Pet flavour
This naming convention is used
to stored the Pet weight
This naming convention is used
to stored the Pet status
This naming convention is used
to stored the Pet price
This naming convention is used
to stored the total
Function:
1) add: this function add the customer bill record
2) update: this function update the customer bill record
3) search: this function search the customer bill record
87
Code :-
Login Form:88
Imports System.Data.SqlClient
Public Class Form1
Dim i As Integer
Dim con As New sqlconnection
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles OK.Click
If txtusernm.Text = "admin" And txtpasswrd.Text = "admin" Then
MsgBox("Log In Successful")
Loading.Show()
' MDIParent1.Show()
Me.Hide()
Else
MsgBox("Log In UnSuccessful")
txtusernm.Text = ""
txtpasswrd.Text = ""
i = i + 1
End If
If i = 3 Then
MsgBox("You Lost Your Log In! Please Try Later.")
End If
End Sub
Private Sub btncancel_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btncancel.Click
Me.Close()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Timer1.Start()
' My.Computer.Audio.Play(My.Resources.pause, AudioPlayMode.Background)
'con.ConnectionString = "Data
Source=.\sqlexpress;AttachDbFilename=C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\mydatabase.mdf;Integrated Security=True"
' con.ConnectionString = "Data
Source=.\sqlexpress;AttachDbFilename=C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\mydatabase.mdf;Integrated Security=True"
con.ConnectionString = "Data
Source=.\sqlexpress;AttachDbFilename=C:\Program Files (x86)\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\mydatabase.mdf;Integrated Security=True"
' con.ConnectionString = "Data Source=.\sqlexpress;Initial
Catalog=mydatabase;Integrated Security=True;User Instance=False"
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Label1.Click
End Sub
Private Sub txtpasswrd_TextChanged(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles txtpasswrd.TextChanged
Dim j = txtpasswrd.Text
If j.Length >= 5 Then
MsgBox("Minimum 5 characters")
End If
End Sub
End Class
89
90
91
92
93
dr = cmd.ExecuteReader
While dr.Read
cbcustname.Items.Add(dr(0).ToString)
End While
dr.Close()
Catch ex As Exception
End Try
con.Close()
Return 0
End Function
Function idgenerate()
txtcustaddrss.Text = ""
txtcustcont.Text = ""
'cbcustname.Text = ""
TextBox1.Text = ""
Try
con.Open()
cmd.CommandText = "select max(CustomerID) from customer"
cmd.Connection = con
dr = cmd.ExecuteReader
If dr.Read Then
id = dr(0) + 1
txtcustid.Text = id
End If
dr.Close()
Catch Excep As Exception
txtcustid.Text = "1"
End Try
con.Close()
Return 0
End Function
Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Label3.Click
End Sub
Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnadd.Click
Try
If txtcustcont.TextLength < 10 Then
MessageBox.Show("mobile number not valid only 10 digit
required")
con.Close()
txtcustcont.Focus()
Else
con.Open()
cmd.CommandText = "insert into customer values('" &
txtcustid.Text & "','" & TextBox1.Text & "','" & txtcustaddrss.Text & "','" &
txtcustcont.Text & "')"
cmd.Connection = con
cmd.ExecuteNonQuery()
con.Close()
MessageBox.Show("Record Inserted In System")
idgenerate()
94
End If
Catch ex As Exception
MsgBox("Blank Record Cannot Be Inserted")
con.Close()
End Try
End Sub
Private Sub btnmodify_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnmodify.Click
Try
con.Open()
cmd.CommandText = "update customer set CustomerID='" &
txtcustid.Text & "', CustomerAddress='" & txtcustaddrss.Text & "',
CustomerContNo='" & txtcustcont.Text & "'where CustomerName='" &
cbcustname.Text & "' "
cmd.Connection = con
cmd.ExecuteNonQuery()
MessageBox.Show("Record Updated In System")
con.Close()
txtcustid.Text = ""
txtcustaddrss.Text = ""
txtcustcont.Text = ""
Catch
End Try
End Sub
Private Sub btndelete_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btndelete.Click
If RadioButton2.Checked = True Then
Try
con.Open()
cmd.CommandText = "delete from customer where CustomerName='"
& cbcustname.Text & "'"
cmd.Connection = con
cmd.ExecuteNonQuery()
MessageBox.Show("RECORD DELETED")
con.Close()
txtcustid.Text = ""
txtcustaddrss.Text = ""
txtcustcont.Text = ""
cbcustname.Items.Remove(cbcustname.SelectedItem)
Catch ex As Exception
MessageBox.Show("No Such Record Found")
End Try
End If
End Sub
Private Sub btnview_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnview.Click
CustomerInfo.Show()
End Sub
Private Sub btnclose_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnclose.Click
95
Me.Close()
End Sub
Private Sub txtcustid_TextChanged(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles txtcustid.TextChanged
End Sub
Private Sub txtcustaddrss_TextChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles txtcustaddrss.TextChanged
End Sub
Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles GroupBox1.Enter
End Sub
Private Sub txtcustcont_TextChanged(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles txtcustcont.TextChanged
Dim I As Integer = 9
Dim Nam = txtcustcont.Text
For I = 0 To Nam.Length - 1
ch = Nam.Chars(I)
If Not Char.IsDigit(ch) Then
MessageBox.Show("The contactno must be in digits")
txtcustcont.Focus()
End If
Next
If txtcustcont.TextLength > 10 Then
MessageBox.Show("mobile number not valid only 10 digit required")
End If
End Sub
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
If RadioButton1.Checked = True Then
idgenerate()
btnadd.Enabled = True
txtcustid.Enabled = False
btnmodify.Enabled = False
btndelete.Enabled = False
cbcustname.Visible = False
TextBox1.Visible = True
txtcustaddrss.Text = ""
TextBox1.Text = ""
txtcustcont.Text = ""
End If
End Sub
Private Sub GroupBox2_Enter(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles GroupBox2.Enter
End Sub
96
con.Open()
cmd.CommandText = "select * from customer where
CustomerName='" & cbcustname.Text & "' "
cmd.Connection = con
dr = cmd.ExecuteReader
dr.Read()
txtcustid.Text = dr(0)
cbcustname.Text = dr(1)
txtcustaddrss.Text = dr(2)
txtcustcont.Text = dr(3)
con.Close()
Catch ex As Exception
End Try
End If
End Sub
' Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles TextBox1.TextChanged
'If Char.IsDigit(e.KeyChar) = True Or Char.IsPunctuation(e.KeyChar) = True
Or Char.IsSymbol(e.KeyChar) = True Then
' MessageBox.Show("Please Alphabets Only")
'e.Handled = True
'End If
'End Sub
Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Label2.Click
End Sub
End Class
Bill :97
Imports System.Data.SqlClient
Public Class SaleBill
Dim con As New SqlConnection '(dbconnection.conStr)
Dim cmd As New SqlCommand
Dim dr As SqlDataReader
Dim da As SqlDataAdapter
Dim dt As DataTable
Dim pname As String
Dim total As Integer
Dim qty As Integer
Dim amount As Integer
Dim str As String
Dim id As Integer
Dim avail As Integer
Function idgenerate()
txtcustname.Text = ""
txtQuantity.Text = ""
txtAvailable.Text = ""
txttotal.Text = ""
cbProductnm.Text = ""
con.Open()
Try
cmd.CommandText = "select max(ID) from SaleBill"
cmd.Connection = con
dr = cmd.ExecuteReader
dr.Read()
Dim id As String
id = dr(0).ToString
id = id.Remove(0, 1)
Dim oid As Integer
oid = CInt(id)
oid = oid + 1
id = "b" & oid
txtBillNo.Text = id
dr.Close()
Catch ex As Exception
txtBillNo.Text = "b101"
End Try
con.Close()
Return 0
End Function
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object,
ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles
DataGridView1.CellContentClick
End Sub
Private Sub SaleBill_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the
'MydatabaseDataSet5.SaleBill' table. You can move, or remove it, as needed.
'Me.SaleBillTableAdapter.Fill(Me.MydatabaseDataSet5.SaleBill)
98
'con.ConnectionString = "Data
Source=.\sqlexpress;AttachDbFilename=C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\mydatabase.mdf;Integrated Security=True"
' con.ConnectionString = "Data Source=.\sqlexpress;Initial
Catalog=mydatabase;Integrated Security=True;User Instance=False"
con.ConnectionString = "Data
Source=.\sqlexpress;AttachDbFilename=C:\Program Files (x86)\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\mydatabase.mdf;Integrated Security=True"
' con.ConnectionString = "Data
Source=.\sqlexpress;AttachDbFilename=C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\mydatabase.mdf;Integrated Security=True"
rbnewbill.Checked = True
con.Open()
cmd.CommandText = "select * from Stock1 "
cmd.Connection = con
dr = cmd.ExecuteReader
While dr.Read
cbProductnm.Items.Add(dr(1).ToString)
End While
dr.Close()
con.Close()
idgenerate()
End Sub
Private Sub rbnewbill_CheckedChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles rbnewbill.CheckedChanged
If rbnewbill.Checked = True Then
dtp1.Text = System.DateTime.Today
btnGenerate.Enabled = True
txtBillNo.Enabled = False
cbProductnm.Enabled = True
txtQuantity.Enabled = True
txtAmount.Visible = True
txtAvailable.Visible = True
txttotal.Visible = True
txtAmount.Enabled = True
txtAvailable.Enabled = True
txttotal.Enabled = True
idgenerate()
txtcustname.Text = ""
txtQuantity.Text = ""
txtAvailable.Text = ""
txttotal.Text = ""
cbProductnm.Text = ""
End If
End Sub
Private Sub btnGenerate_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnGenerate.Click
Dim sum As Single = 0
Dim i As Integer
con.Close()
For i = 0 To DataGridView1.Rows.Count - 1
total = DataGridView1.Rows(i).Cells(3).Value
sum = sum + total
Next
99
txtfinal.Text = sum
For x = 0 To DataGridView1.Rows.Count - 1
pname = DataGridView1.Rows(x).Cells(0).Value
amount = DataGridView1.Rows(x).Cells(1).Value
qty = DataGridView1.Rows(x).Cells(2).Value
total = DataGridView1.Rows(x).Cells(3).Value
str = "insert into SaleBill Values('" & txtBillNo.Text & "','" &
txtcustname.Text & "','" & pname & "','" & amount & "','" & qty & "','" &
total & "')"
con.Open()
cmd.CommandText = str
cmd.Connection = con
cmd.ExecuteNonQuery()
cmd.Dispose()
con.Close()
MessageBox.Show("Record Inserted")
con.Open()
avail = txtAvailable.Text - qty
cmd.CommandText = "update Stock1 set Quantity='" & avail & "'where
ProductName='" & pname & "' "
cmd.Connection = con
cmd.ExecuteNonQuery()
con.Close()
Next
'frmBillGenerator.Show()
End Sub
Private Sub cbProductnm_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cbProductnm.SelectedIndexChanged
If rbnewbill.Checked = True Then
Try
con.Open()
cmd.CommandText = "select * from Product where ProductName='"
& cbProductnm.Text & "' "
cmd.Connection = con
dr = cmd.ExecuteReader
dr.Read()
txtAmount.Text = dr(2)
con.Close()
con.Open()
cmd.CommandText = "select * from Stock1 where ProductName='" &
cbProductnm.Text & "' "
cmd.Connection = con
dr = cmd.ExecuteReader
dr.Read()
txtAvailable.Text = dr(2)
con.Close()
Catch ex As Exception
End Try
End If
End Sub
'
Private Sub txtQuantity_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtQuantity.TextChanged
100
'
If Char.IsLetter(e.KeyChar) = True Or
Char.IsPunctuation(e.KeyChar) = True Or Char.IsSymbol(e.KeyChar) = True Then
'
MessageBox.Show("Please Enter Only Digit")
'
e.Handled = True
'
End If
'
End Sub
'End Class
Private Sub txtQuantity_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtQuantity.KeyPress
If Char.IsLetter(e.KeyChar) = True Or Char.IsPunctuation(e.KeyChar) =
True Or Char.IsSymbol(e.KeyChar) = True Then
MessageBox.Show("Please Enter Only Digit")
e.Handled = True
End If
End Sub
Private Sub txtQuantity_Leave(ByVal sender As Object, ByVal e As
System.EventArgs) Handles txtQuantity.Leave
If txtQuantity.Text = "" Then
MsgBox("Empty Field")
txtQuantity.Focus()
Else
txttotal.Text = CDbl(txtAmount.Text * txtQuantity.Text)
If txtQuantity.Text > txtAvailable.Text Then
MsgBox("Product Quantity Not Available")
txtQuantity.Text = ""
End If
End If
End Sub
Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnadd.Click
Dim rowNum As Integer = DataGridView1.Rows.Add()
DataGridView1.Rows.Item(rowNum).Cells(0).Value = cbProductnm.Text
DataGridView1.Rows.Item(rowNum).Cells(1).Value = txtAmount.Text
DataGridView1.Rows.Item(rowNum).Cells(2).Value = txtQuantity.Text
DataGridView1.Rows.Item(rowNum).Cells(3).Value = txttotal.Text
End Sub
101
102
DataGridView1.Rows.Add(dr(0).ToString, dr(1).ToString,
dr(2).ToString)
End While
dr.Close()
con.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
Return 0
End Function
Public Sub clear()
' txtproductidd.Text = ""
txtquantity.Text = ""
'txtvendid.Text = ""
cbVendorname.Text = ""
cbprdname.Text = ""
'txtAvailable.Text = ""
End Sub
Private Sub PurchaseOrder_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the
'MydatabaseDataSet6.POrder' table. You can move, or remove it, as needed.
'Me.POrderTableAdapter.Fill(Me.MydatabaseDataSet6.POrder)
' con.ConnectionString = "Data
Source=.\sqlexpress;AttachDbFilename=C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\mydatabase.mdf;Integrated Security=True"
con.ConnectionString = "Data
Source=.\sqlexpress;AttachDbFilename=C:\Program Files (x86)\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\mydatabase.mdf;Integrated Security=True"
' con.ConnectionString = "Data
Source=.\sqlexpress;AttachDbFilename=C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\mydatabase.mdf;Integrated Security=True"
' con.ConnectionString = "Data
Source=.\sqlexpress;AttachDbFilename=C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\mydatabase.mdf;Integrated Security=True"
'con.ConnectionString = "Data Source=.\sqlexpress;Initial
Catalog=mydatabase;Integrated Security=True;User Instance=False"
rdneworder.Checked = True
con.Open()
cmd.CommandText = "select [ID], count([ID]) totalCount from POrder
group by [ID]"
cmd.Connection = con
dr = cmd.ExecuteReader
While dr.Read
cbID.Items.Add(dr(0).ToString)
End While
dr.Close()
con.Close()
con.Open()
cmd.CommandText = "select * from Vendor "
cmd.Connection = con
dr = cmd.ExecuteReader
While dr.Read
cbVendorname.Items.Add(dr(1).ToString)
End While
103
dr.Close()
con.Close()
con.Open()
cmd.CommandText = "select * from Stock1 "
cmd.Connection = con
dr = cmd.ExecuteReader
While dr.Read
cbprdname.Items.Add(dr(1).ToString)
End While
dr.Close()
con.Close()
idgenerate()
dr.Close()
con.Close()
End Sub
Private Sub rdneworder_CheckedChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles rdneworder.CheckedChanged
DataGridView1.Rows.Clear()
If rdneworder.Checked = True Then
rdneworder.Checked = True
TextBox1.Enabled = False
TextBox1.Visible = True
cbID.Visible = False
cbprdname.Visible = True
'ComboBox2.Visible = False
txtprodname.Visible = False
txtvendname.Visible = False
cbVendorname.Enabled = True
idgenerate()
btnAdd.Enabled = True
btngenerate.Enabled = True
btngenerate.Visible = True
clear()
End If
End Sub
Private Sub rbrecieved_CheckedChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles rbrecieved.CheckedChanged
cbVendorname.Enabled = True
cbID.Enabled = True
TextBox1.Visible = False
cbID.Visible = True
btngenerate.Visible = False
cbID.DropDownStyle = ComboBoxStyle.DropDownList
TextBox1.Visible = False
cbID.Items.Clear()
Try
con.Open()
104
105
End Sub
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnAdd.Click
''dr.Close()
'Try
'
'DataGridView1.Rows.Add(dr(2).ToString, dr(3).ToString,
dr(4).ToString)
'
DataGridView1.Rows.Add(dr(0).ToString, dr(1).ToString,
dr(2).ToString)
'Catch ex As Exception
'
MsgBox(ex.Message)
'End Try
cbID.Enabled = False
cbVendorname.Enabled = False
If rdneworder.Checked = True Then
Dim rowNum As Integer = DataGridView1.Rows.Add()
DataGridView1.Rows.Item(rowNum).Cells(0).Value = cbprdname.Text
DataGridView1.Rows.Item(rowNum).Cells(1).Value = txtquantity.Text
DataGridView1.Rows.Item(rowNum).Cells(2).Value = txtAvailable.Text
End If
End Sub
Private Sub btngenerate_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btngenerate.Click
cbVendorname.Enabled = True
con.Close()
Dim str As String
For x = 0 To DataGridView1.Rows.Count - 1
'pid = DataGridView1.Rows(x).Cells(0).Value
pname = DataGridView1.Rows(x).Cells(0).Value
qty = DataGridView1.Rows(x).Cells(1).Value
availb = DataGridView1.Rows(x).Cells(2).Value
Next
str = "insert into POrder values('" & TextBox1.Text & "','" &
cbVendorname.Text & "','" & cbprdname.Text & "','" & txtAvailable.Text & "','"
& txtquantity.Text & "') "
con.Open()
cmd.CommandText = str
cmd.Connection = con
cmd.ExecuteNonQuery()
cmd.Dispose()
con.Close()
' Next
MessageBox.Show("Record Inserted In System")
End Sub
Private Sub cbVendorname_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cbVendorname.SelectedIndexChanged
If rdneworder.Checked = True Then
Try
con.Open()
106
cmd.CommandText = "select
cbVendorname.Text & "' "
cmd.Connection = con
con.Close()
Catch ex As Exception
End Try
End If
dr.Close()
con.Close()
End Sub
107
cbVendorname.Text = ""
'txtvendid.Text = ""
' txtproductidd.Text = ""
''.Text = ""
cbprdname.Text = ""
cbID.Items.Remove(cbID.SelectedItem)
Catch ex As Exception
MessageBox.Show("No Such Record Found")
End Try
End If
ref()
End Sub
Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles GroupBox1.Enter
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
'txtproid.Enabled = True
'txtsid.Enabled = True
cbVendorname.Enabled = True
If rbrecieved.Checked = True Then
con.Close()
For x = 0 To DataGridView1.Rows.Count - 1
' pid = DataGridView1.Rows(x).Cells(0).Value
pname = DataGridView1.Rows(x).Cells(0).Value
qty = DataGridView1.Rows(x).Cells(1).Value
availb = DataGridView1.Rows(x).Cells(2).Value
con.Open()
avail = availb + qty
cmd.CommandText = "update Stock1 set Quantity='" & avail &
"'where [ProductName]='" & pname & "' "
cmd.Connection = con
cmd.ExecuteNonQuery()
con.Close()
'MessageBox.Show("Order Received")
Next
MessageBox.Show("Order Received")
ref()
End If
108
'
con.Open()
'
avail = availb + qty
'
cmd.CommandText = "update Stock set Quantity='" & avail & "'where
[ProductName]='" & pname & "' "
'
cmd.Connection = con
'
cmd.ExecuteNonQuery()
'
con.Close()
'
MessageBox.Show("Order Received")
'
'Next
'
ref()
'End If
''Dim row As Integer = DataGridView1.Rows.Add()
' ''txtproid.Enabled = True
' ''txtsid.Enabled = True
''cbVendorname.Enabled = True
''If rbrecieved.Checked = True Then
''
con.Close()
''
'For x = 0 To DataGridView1.Rows.Count - 1
''
' pid = DataGridView1.Rows(x).Cells(0).Value
''
pname = DataGridView1.Rows(row).Cells(0).Value
''
qty = DataGridView1.Rows(row).Cells(1).Value
''
availb = DataGridView1.Rows(row).Cells(2).Value
''
'Next
''
ref()
''End If
End Sub
Private Sub cbID_SelectedIndexChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles cbID.SelectedIndexChanged
If rdneworder.Checked = False Then
Try
con.Open()
cmd.CommandText = "select * from POrder where [ID]='" &
cbID.Text & "' "
cmd.Connection = con
dr = cmd.ExecuteReader
dr.Read()
cbID.Text = dr(0)
cbVendorname.Text = dr(1).ToString()
'cbprdname.Text = dr(2).ToString()
'txtquantity.Text = dr(3)
'txtAvailable.Text = dr(4)
'txtcmp.Text = dr(3)
'dtp1.Text = dr(6)
dr.Close()
con.Close()
Catch ex As Exception
MessageBox.Show(ex.Message.ToString())
End Try
End If
DataGridView1.Rows.Clear()
con.Open()
Try
109
110
'con.Close()
'DataGridView1.Rows.Clear()
End Sub
111
rpt.SetDataSource(ds)
CrystalReportViewer1.ReportSource = rpt
con.Close()
Catch Excep As Exception
MessageBox.Show(Excep.Message, "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
Case "SaleBill"
'PrintBill.Show()
Dim rpt As New RSaleBill
con.Open()
Try
cmd.CommandText = "select * from SaleBill"
cmd.Connection = con
cmd.CommandType = CommandType.Text
da.SelectCommand = cmd
da.Fill(ds, "SaleBill")
rpt.SetDataSource(ds)
CrystalReportViewer1.ReportSource = rpt
con.Close()
Catch Excep As Exception
MessageBox.Show(Excep.Message, "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
Case "POrder"
'PrintBill.Show()
Dim rpt As New RPOrder
con.Open()
Try
cmd.CommandText = "select * from POrder"
cmd.Connection = con
cmd.CommandType = CommandType.Text
da.SelectCommand = cmd
da.Fill(ds, "POrder")
rpt.SetDataSource(ds)
CrystalReportViewer1.ReportSource = rpt
con.Close()
Catch Excep As Exception
MessageBox.Show(Excep.Message, "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
Case "Customer"
'PrintBill.Show()
Dim rpt As New RCustomer
con.Open()
Try
cmd.CommandText = "select * from Customer"
cmd.Connection = con
cmd.CommandType = CommandType.Text
da.SelectCommand = cmd
da.Fill(ds, "Customer")
rpt.SetDataSource(ds)
CrystalReportViewer1.ReportSource = rpt
con.Close()
Catch Excep As Exception
MessageBox.Show(Excep.Message, "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error)
112
End Try
Case "Vendor"
'PrintBill.Show()
Dim rpt As New RVendor
con.Open()
Try
cmd.CommandText = "select * from Vendor"
cmd.Connection = con
cmd.CommandType = CommandType.Text
da.SelectCommand = cmd
da.Fill(ds, "Vendor")
rpt.SetDataSource(ds)
CrystalReportViewer1.ReportSource = rpt
con.Close()
Catch Excep As Exception
MessageBox.Show(Excep.Message, "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
Case "Employee"
'PrintBill.Show()
Dim rpt As New REmployee
con.Open()
Try
cmd.CommandText = "select * from Employee"
cmd.Connection = con
cmd.CommandType = CommandType.Text
da.SelectCommand = cmd
da.Fill(ds, "Employee")
rpt.SetDataSource(ds)
CrystalReportViewer1.ReportSource = rpt
con.Close()
Catch Excep As Exception
MessageBox.Show(Excep.Message, "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
Case "Product"
'PrintBill.Show()
Dim rpt As New RProduct
con.Open()
Try
cmd.CommandText = "select * from Product"
cmd.Connection = con
cmd.CommandType = CommandType.Text
da.SelectCommand = cmd
da.Fill(ds, "Product")
rpt.SetDataSource(ds)
CrystalReportViewer1.ReportSource = rpt
con.Close()
Catch Excep As Exception
MessageBox.Show(Excep.Message, "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Select
End Sub
Private Sub CrystalReportViewer1_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles CrystalReportViewer1.Load
113
con.ConnectionString = "Data
Source=.\sqlexpress;AttachDbFilename=C:\Program Files (x86)\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\mydatabase.mdf;Integrated Security=True"
'con.ConnectionString = "Data
Source=.\sqlexpress;AttachDbFilename=C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\mydatabase.mdf;Integrated Security=True"
'con.ConnectionString = "Data
Source=.\sqlexpress;AttachDbFilename=C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\mydatabase.mdf;Integrated Security=True"
'con.ConnectionString = "Data Source=.\sqlexpress;Initial
Catalog=mydatabase;Integrated Security=True;User Instance=False"
End Sub
End Class
MDI Form:
114
Customer Form:
Bill :-
115
Order:-
Report
116
Reference Bibliography
Murachs Visual Basic 2008
Mastering Visual Basic 2008
Complete Reference VB.Net
Referred Websites
117
https://www.thenewboston.com
http://www.msdn.microsoft.com
Hardware/Software Requirement
HARDWARE REQUIREMENT
PROCESSOR
RAM
1 GB &Above.
40 GB & above.
PRINTER
Inkjet/Laser Printer
MONITOR
Color
SOFTWARE REQUIRMENT
OPERATING SYSTEM
Above
Windows 7 and
2008 Express
3.5 or above
118
119