music store managemant
TRANSCRIPT
-
7/29/2019 Music Store Managemant
1/102
PROJECT REPORT
ON
MUSIC STORE
MANAGEMENT SYSTEM
Submitted for partial fulfillment of
MCA IIIrd Sem.
ByShimbhu Dayal Meena
&
Vatan Rathorefor
University Centre For Computer Science & Information Technology
University Of Rajasthan Jaipur
1
Session : 2011-2012
-
7/29/2019 Music Store Managemant
2/102
2
-
7/29/2019 Music Store Managemant
3/102
INDEX
1. INTRODUCTION
2. CERTIFICATE
3. ACKNOWLEDGEMENT
4. STUDENT PROFILE
5. SELECTION OF TOOLS AND TECHONOLOGY
6. REQUIREMRNT ANALYSIS
7. FEASIBILITY STUDY
8. DATABASE STRUCTURE
9. DATA FLOW DIAGRAM
10. FORM DESIGN
11. CODING
12. BIBLIOGRAPHY
3
-
7/29/2019 Music Store Managemant
4/102
INTRODUCTION
4
-
7/29/2019 Music Store Managemant
5/102
INTRODUCTION
The present century has been a revolution in information
technology all over the word. Computer area playing an
increasingly vital role, touching upon every aspect of out day-to-
day life. Information processing has become a major social
activity. More then 70% of a typical executives time is spent in
processing in some type of information. The term KNOWLEDGE
WORKS has emerged, classifying individuals exclusively
involved in the information processing activity.
The computer is a electronic device designed to perform to
arithmetic operation. It can perform several non-arithmetic
operations on the alphabetic or numeric data used. There
operation are performed at very high speed with a high level of
accuracy.
The task of maintaining the inventory at different outlets through
centralized system with product , customer and employee
management for any distributor is accepted by me as the theme
of this project.
Every possible efforts have been made by me to solve, simplify
and generalize the problem and program in such a way that itfollows all software engineering concepts and provide
enhancement capabilities in the system as and when required.
This project assists the organization to maintain the everything
centralized with all reports and maintenance task.
5
-
7/29/2019 Music Store Managemant
6/102
MANUAL SYSTEM
The process of maintaining the inventory centralized require lots
of updating as well as entries to be done. Apart from this product, employee, customer and outlet management becomes very
difficult and require personal for different management.
Limitations of Manual System :
Besides various drawbacks of Manual system some of the majorlimitations are as described below :
A manual system require lot of time and labour to
accomplish a certain task.
The data pertaining to any entity been kept in various
registers and hence all these registers must be kept
carefully.
A manual system require more man power in order to
maintain the data.
Errors are liable to occur when the task is being perform
manually.
Lack of immediate storage of information.
Very slow computational processing.
Very slow report creation as it is done manually on sheets.
Very slow inquiry system.
It is very boring to maintain transaction of each activity.
6
-
7/29/2019 Music Store Managemant
7/102
AUTOMATED SYSTEM
Goals of the proposed system
To provide users of the system with automated file
maintained which will allow him/her to all or modify the
records in much more systematic and speedy way.
To provide the user a way to enter the information through
the system for online preparation of different schedule.1
To provide the immediate retrieval of information as
required.
To provide the user with various facilities so that user may
find the project friendly and comfortable to run.
To provide the system with greater degree of accuracy and
reliability. There is a less chance for redundancy as checks
are made at various points.
Various validation checks for data entry to prevent user to
enter garbage data.
7
-
7/29/2019 Music Store Managemant
8/102
ADVANTAGES OF THE PROPOSED SYSTEM
The automated system provide the user a fast and efficient
system in which all the records and information regarding
entities are stored electronically so that they may be
retrieved fast.
In the automated system there is a very less chance of
making errors as a system is designed in such a way that it
takes all measures before making any changes or updation
to the existing information
8
-
7/29/2019 Music Store Managemant
9/102
CERTIFICATE
9
-
7/29/2019 Music Store Managemant
10/102
CERTIFICATE
This is to certify that the project work entitled Music Store
Management System being submitted by Shimbhu Dayal Meena
and Vatan Rathore as partial fulfillment of the requirement foraward of the MCA IIIrd Sem. UCCS & IT by UOR , Jaipur
This Project Report has not been submitted earlier for this award
of any other degree/diploma.
Project Guide
(Mr. Hanumana Ram)
10
-
7/29/2019 Music Store Managemant
11/102
ACKNOWLEDGEMENT
11
-
7/29/2019 Music Store Managemant
12/102
ACKNOWLEDGEMENT
It is difficult to find appropriate words to express my feelings of
gratitude to Mr. Hanumana Ram for his keen interest and
guidance during the completion of this project work, without
which this might not have been seen this day.
I definitely owe my sincere thanks to Mr. I.K.Sharma (Director)
for providing me all the facilities and resources needed to develop
this software and encourage us from time to time.
I am very much in debited to other staff members and collogues,
who had always been a source of inspiration to me during the
course of this project work.
12
-
7/29/2019 Music Store Managemant
13/102
STUDENT PROFILE
13
-
7/29/2019 Music Store Managemant
14/102
SELECTIONOF
TECHNOLOGY
14
-
7/29/2019 Music Store Managemant
15/102
SELECTION OF TECHNOLOGY
Now a days GUI based environment is becoming very common in
the area of development. I am working in the Microsoft windows
XP and I used to learn Visual Basic in the course syllabus. So I
prefer to develop this project in the visual basic.
The Visual Basic environment is fully integrated and supports the
full development life cycle. Visual Basic fully supports all phases
of the windows software development life cycle from design to
development.
Language Requirements
I found that there were three primary steps involved in
developing an application using Visual Basic:-
Draw the user interface.
Assign properties to controls
Attach code to events
I primarily concern with step 3 that is attaching codes. I will
become more familiar with moving around in the code windows
and learn some of the elements of the basic for their final
selection.
15
-
7/29/2019 Music Store Managemant
16/102
Advantages of using Visual Basic
Platform Independence
One of the most compelling reasons to adopt visual basic is
its platform independence. Visual Basic runs on most major
hardware and software platforms, including Windows 95
and Windows NT.
Object Orientation
Visual Basic is a true object oriented language and provide
sufficient abstractions of different objects.
Security
Visual Basic is the first programming language to considersecurity as part of its design.
Reliability
Security and reliability are of very high quality in Visual Basic.
Security measures can not be implemented with any degree
of assurance without a reliable frame work for program
execution. The Visual Basic compiler provides several levels of
additional checks to identify type mismatch and other
consistencies.
Simplicity
16
-
7/29/2019 Music Store Managemant
17/102
Visual Basic language was designed to be a simple
language to learn, building on the syntax in order to
promote simplicity. Visual Basic has left out those elements
contribute to error an program complexity.
Rapid code generation
Visual Basic is an interpreted language, it can be used to
rapidly photo type application that would require
considerably more base software supports in language.
PLATFORM USED
Inter face : GUI
Operating System : Windows XP
Hardware : IBM Compatible Machines
FRONT END & BACK END USED
Front End : Visual Basic
Back End : MS Access 2000
17
-
7/29/2019 Music Store Managemant
18/102
REQUIREMENTANALYSIS
18
-
7/29/2019 Music Store Managemant
19/102
REQUIREMENT ANALYSIS
1. There is a need of centralized system that maintains
inventory of all the outlets.
2. System should maintain the employee wise sales as well as
sells from outlets.
3. System should maintain the customers data and record and
must be capable of providing the list of customers.
4. There is a requirement of such a system that reduce the
need of a personal to maintain such a small thing in
organization.
5. System should manage all the products with their entire
details.
6. A system that gives a feel of easy of doing that small thing.
7. Proper authentication protection should be implemented.
8. The system must handle the returns made from outlet to
distributor.
19
-
7/29/2019 Music Store Managemant
20/102
FEASIBILITYSTUDY
20
-
7/29/2019 Music Store Managemant
21/102
FEASIBILITY STUDY
Technical Feasibility : I had found in my analysis that there are
quite sufficient technical resources available at the organization
and capable of handling user requirement.
Economical Feasibility : Because of already availability of
computer software and hardware in the organization it is
economical feasible.
Operational Feasibility : no qualified and trained person is
required for this system because all the transactions and entry
are through integrated development environment so it is quite
easy to operate.
21
-
7/29/2019 Music Store Managemant
22/102
FEASIBILITY REPORT
Objective
The primary objective of this feasibility report is to inform the
user about following matters :
What are the problem with conventional (manual) system?
What are the goals and sub goals of the new system?
What the proposed system would achieve?
What will be the requirements for this achievement?
Who will be involved in operating the system?
The benefits, the system will give over conventional
(Manual) System?
The estimated cost of implementation?
22
-
7/29/2019 Music Store Managemant
23/102
CUSTOMER
FIELD NAME DATA TYPE
Customer_Id Number Primary Key
Customer_Name Text
Address Text
City Text
State Text
Zip Number
Phone Number
Employee
FIELD NAME DATA TYPE
Outlet_Number Number
Emp_Number Number Primary key
Emp_Name Text
23
-
7/29/2019 Music Store Managemant
24/102
Inventory
FIELD NAME DATA TYPE
Outlet_Number Number Primary key
Product_code Number Primary key
Quantity Number
Outlet
FIELD NAME DATA TYPE
Outlet_Number Number
Address Text
City Text
State Text
Zip Text
Phone Text
24
-
7/29/2019 Music Store Managemant
25/102
Product
FIELD NAME DATA TYPE
Product_code Number
Artist Text
Title Text
Cost Number
Sale_proce Number
Return
FIELD NAME DATA TYPE
Return_id Number
ship_id Number
outlet_number Number
product_code Number
Return_Date Date/time
Quantity Number
Reason Text
25
-
7/29/2019 Music Store Managemant
26/102
Sales
FIELD NAME DATA TYPE
Sale_id Number
Customer_id Number
outlet_number Number
product_code Number
Emp_code Number
Sale_Date Date/time
Sale_time Date/time
Quantity Number
Shiping
FIELD NAME DATA TYPE
Ship_id Number
outlet_number Number
product_code Number
Quantity Number
26
-
7/29/2019 Music Store Managemant
27/102
Users
FIELD NAME DATA TYPE
Username Text
Password Text
27
-
7/29/2019 Music Store Managemant
28/102
DATA FLOWDIAGRAMS
28
-
7/29/2019 Music Store Managemant
29/102
Order
for
ProductsReturn
Products
Shipping
Order
Maintenance
SoldProducts
Products
Bill
Report
Of Sold
Products Receipt
Payment
CONTEXT DIAGRAM``
29
Customer Outlet
Music Sore
Management
Employee
-
7/29/2019 Music Store Managemant
30/102
Order
For Products
Sold Products
Return
Products
Shipping
Order
Products Report of
sold Products
Maintenance
Bill
Payment
Receipt
TOP LEVEL DFD
30
Customer
Outlet
Purchase
System
Order
Processing
Stock
Managemen
t
Product Master Item Master
Employee
-
7/29/2019 Music Store Managemant
31/102
FORMDESIGN
31
-
7/29/2019 Music Store Managemant
32/102
FRMSPLASH
32
-
7/29/2019 Music Store Managemant
33/102
FRMLOGIN
33
-
7/29/2019 Music Store Managemant
34/102
MDIMAIN
34
-
7/29/2019 Music Store Managemant
35/102
FRMSALES
35
-
7/29/2019 Music Store Managemant
36/102
FRMVIEWSALES
36
-
7/29/2019 Music Store Managemant
37/102
FRMRETURN
37
-
7/29/2019 Music Store Managemant
38/102
FRMVIEWRETURN
38
-
7/29/2019 Music Store Managemant
39/102
FRMOUTLET
39
-
7/29/2019 Music Store Managemant
40/102
FRMEMPLOYEE
40
-
7/29/2019 Music Store Managemant
41/102
FRMCUSTOMER
41
-
7/29/2019 Music Store Managemant
42/102
FRMPRODUCT
42
-
7/29/2019 Music Store Managemant
43/102
FRMSHIP
43
-
7/29/2019 Music Store Managemant
44/102
TABLESTRUCTURE
44
-
7/29/2019 Music Store Managemant
45/102
MONTHLY SALES REPORT
45
-
7/29/2019 Music Store Managemant
46/102
EMPLYEE WISE SALES REPORT
46
-
7/29/2019 Music Store Managemant
47/102
TOP SELLING PRODUCTS REPORT
47
-
7/29/2019 Music Store Managemant
48/102
CODING
48
-
7/29/2019 Music Store Managemant
49/102
Module1.bas
Public user As String
Public con As ADODB.Connection
Public login As Integer
Sub Main()
Set con = New ADODB.Connection
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=OUTLET.MDB;Persist Security Info=False"
frmSplash.Show
End Sub
Public Sub valid(ob As Form, flag As Integer)
For Each Control In ob.Controls
If TypeOf Control Is ListBox Then
If Control.Text = "" Then
If Control.Visible = True Then
MsgBox "Please fill in the entry"
Control.SetFocus
flag = 1
Exit Sub
End If
End If
49
-
7/29/2019 Music Store Managemant
50/102
End If
Next Control
For Each Control In ob.Controls
If TypeOf Control Is TextBox Then
If Len(Control.Text) = 0 Then
If Control.Visible = True Then
MsgBox "Please fill in the entry"
Control.SetFocus
flag = 1
Exit Sub
End If
End If
End If
Next Control
End Sub
Public Sub checkuser()
MDImain.StatusBar1.Panels(1) = UCase(user)
MDImain.StatusBar1.Panels(2) = Time
If UCase(user) UCase("Admin") Then
MDImain.mnu2.Enabled = False
Unload frmoutlet
Unload frmproduct
50
-
7/29/2019 Music Store Managemant
51/102
Unload frmcustomer
Unload Frmship
Unload frmemployee
Else
MDImain.mnu2.Enabled = True
End If
End Sub
Frmlogin.frm
Option Explicit
Private Sub Command1_Click()
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
Dim str1 As String
str1 = "select * from users where username=" & "'" & Text1.Text
& "'"
rs.Open str1, con, adOpenDynamic, adLockOptimistic
If rs.EOF Then
MsgBox "Invalid user name"
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
51
-
7/29/2019 Music Store Managemant
52/102
Else
If rs!Password = Text2.Text Then
login = 1
user = Text1.Text
MDImain.Show
MDImain.Enabled = True
Unload Me
Call checkuser
Else
MsgBox "Invalid Password"
Text2.Text = ""
Text2.SetFocus
End If
End If
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
MDImain.Enabled = False
End Sub
52
-
7/29/2019 Music Store Managemant
53/102
Frmsplash.frm
Option Explicit
Private Sub Form_KeyPress(KeyAscii As Integer)
Unload Me
End Sub
Private Sub Timer1_Timer()
Timer1.Enabled = False
frmlogin.Show
Unload Me
End Sub
Mdimain.frm
Private Sub mnu11_Click()
frmsales.Show
End Sub
Private Sub mnu12_Click()
frmviewsale.Show
End Sub
Private Sub mnu13_Click()
53
-
7/29/2019 Music Store Managemant
54/102
frmreturn.Show
End Sub
Private Sub mnu14_Click()
frmviewreturn.Show
End Sub
Private Sub mnu21_Click()
frmoutlet.Show
End Sub
Private Sub mnu22_Click()
frmemployee.Show
End Sub
Private Sub mnu23_Click()
frmcustomer.Show
End Sub
Private Sub mnu24_Click()
frmproduct.Show
End Sub
54
-
7/29/2019 Music Store Managemant
55/102
Private Sub mnu25_Click()
Frmship.Show
End Sub
Private Sub mnu31_Click()
DataReport2.Show
End Sub
Private Sub mnu32_Click()
DataReport1.Show
End Sub
Private Sub mnu33_Click()
DataReport3.Show
End Sub
Private Sub mnu41_Click()
frmlogin.Show
End Sub
Private Sub mnu42_Click()
Unload MDImain
End Sub
55
-
7/29/2019 Music Store Managemant
56/102
Private Sub mnu51_Click()
MDImain.Arrange vbTileVertical
End Sub
Private Sub mnu52_Click()
MDImain.Arrange vbTileHorizontal
End Sub
Private Sub mnu53_Click()
MDImain.Arrange vbCascade
End Sub
Private Sub Timer1_Timer()
StatusBar1.Panels(2) = Time
End Sub
Frmsales.frm
Dim rsq As ADODB.Recordset
Private Sub Command1_Click()
Dim flag As Integer
Call valid(Me, flag)
If flag = 1 Then
56
-
7/29/2019 Music Store Managemant
57/102
Exit Sub
Else
If Not IsNumeric(txtquantity.Text) Then
MsgBox "You can enter only integer"
txtquantity.Text = ""
txtquantity.SetFocus
Exit Sub
Else
Dim rs1 As ADODB.Recordset
Set rs1 = New ADODB.Recordset
rs1.Open "select * from sales", con, adOpenDynamic,
adLockOptimistic
Dim f As Integer
f = checkquantity(Val(List1.Text), Val(List4.Text),
Val(txtquantity.Text))
If f -1 Then
If f = 0 Then
MsgBox "required quantity is not available"
txtquantity.Text = ""
txtquantity.SetFocus
Exit Sub
Else
rsq!quantity = rsq!quantity - Val(txtquantity.Text)
57
-
7/29/2019 Music Store Managemant
58/102
rsq.Update
End If
rsq.Close
If rs1.EOF Then
temp = 1
Else
rs1.MoveLast
temp = rs1!sale_id + 1
End If
rs1.AddNew
rs1!sale_id = temp
rs1!outlet_number = Val(List1.Text)
rs1!emp_number = Val(List2.Text)
rs1!customer_id = Val(List3.Text)
rs1!product_code = Val(List4.Text)
rs1!sale_date = Format(txtsaledate.Text, "mm-dd-yyyy")
rs1!sale_time = Format(txtsaletime.Text, "hh:mm:ss")
rs1!quantity = Val(txtquantity.Text)
rs1.Update
rs1.Close
End If
End If
58
-
7/29/2019 Music Store Managemant
59/102
End If
List1.ListIndex = -1
List2.ListIndex = -1
List3.ListIndex = -1
List4.ListIndex = -1
txtquantity.Text = ""
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Open "select Outlet_Number from outlet", con,
adOpenDynamic, adLockOptimistic
Do While Not rs.EOF
List1.AddItem rs!outlet_number
rs.MoveNext
Loop
rs.Close
rs.Open "select emp_Number from employee", con,
adOpenDynamic, adLockOptimistic
59
-
7/29/2019 Music Store Managemant
60/102
Do While Not rs.EOF
List2.AddItem rs!emp_number
rs.MoveNext
Loop
rs.Close
rs.Open "select customer_id from customer", con,
adOpenDynamic, adLockOptimistic
Do While Not rs.EOF
List3.AddItem rs!customer_id
rs.MoveNext
Loop
rs.Close
rs.Open "select Product_Code from product", con,
adOpenDynamic, adLockOptimistic
Do While Not rs.EOF
List4.AddItem rs!product_code
rs.MoveNext
Loop
rs.Close
txtsaledate.Text = Date
txtsaletime.Text = Time
txtsaledate.Enabled = False
txtsaletime.Enabled = False
60
-
7/29/2019 Music Store Managemant
61/102
End Sub
Private Function checkquantity(OUTNO As Long, PRODNO
As Long, q As Integer) As Integer
Set rsq = New ADODB.Recordset
Dim str1 As String
str1 = "select * from inventory where outlet_number=" & OUTNO
& " and " & "product_code =" & PRODNO
rsq.Open str1, con, adOpenDynamic, adLockOptimistic
'MsgBox rsq!quantity
'MsgBox q
If rsq.EOF Then
MsgBox "item is not available at outlet"
checkquantity = -1
Else
If rsq!quantity >= q Then
checkquantity = rsq!quantity
Else
checkquantity = 0
End If
End If
End Function
Frmviewsales.frm
61
-
7/29/2019 Music Store Managemant
62/102
Dim rss As ADODB.Recordset
Private Sub cmdfirst_Click()
rss.MoveFirst
txtsaleid.Text = rss!sale_id
txtoutletnumber.Text = rss!outlet_number
Txtemployee.Text = rss!emp_number
Txtcustomer.Text = rss!customer_id
txtproductcode.Text = rss!product_code
Txtsaledate.Text = rss!sale_date
txtsaletime.Text = rss!sale_time
txtquantity.Text = rss!quantity
End Sub
Private Sub cmdlast_Click()
rss.MoveLast
txtsaleid.Text = rss!sale_id
txtoutletnumber.Text = rss!outlet_number
Txtemployee.Text = rss!emp_number
Txtcustomer.Text = rss!customer_id
txtproductcode.Text = rss!product_code
Txtsaledate.Text = rss!sale_date
txtsaletime.Text = rss!sale_time
txtquantity.Text = rss!quantity
62
-
7/29/2019 Music Store Managemant
63/102
End Sub
Private Sub cmdnext_Click()
rss.MoveNext
If rss.EOF Then
rss.MoveLast
End If
txtsaleid.Text = rss!sale_id
txtoutletnumber.Text = rss!outlet_number
Txtemployee.Text = rss!emp_number
Txtcustomer.Text = rss!customer_id
txtproductcode.Text = rss!product_code
Txtsaledate.Text = rss!sale_date
txtsaletime.Text = rss!sale_time
txtquantity.Text = rss!quantity
End Sub
Private Sub cmdprevious_Click()
rss.MovePrevious
If rss.BOF Then
rss.MoveFirst
End If
txtsaleid.Text = rss!sale_id
txtoutletnumber.Text = rss!outlet_number
63
-
7/29/2019 Music Store Managemant
64/102
Txtemployee.Text = rss!emp_number
Txtcustomer.Text = rss!customer_id
txtproductcode.Text = rss!product_code
Txtsaledate.Text = rss!sale_date
txtsaletime.Text = rss!sale_time
txtquantity.Text = rss!quantity
End Sub
Private Sub Form_Load()
txtsaleid.Enabled = False
txtoutletnumber.Enabled = False
Txtemployee.Enabled = False
Txtcustomer.Enabled = False
txtproductcode.Enabled = False
Txtsaledate.Enabled = False
txtsaletime.Enabled = False
txtquantity.Enabled = False
Set rss = New ADODB.Recordset
rss.Open "select * from sales", con, adOpenDynamic,
adLockOptimistic
If Not rss.EOF Then
txtsaleid.Text = rss!sale_id
txtoutletnumber.Text = rss!outlet_number
64
-
7/29/2019 Music Store Managemant
65/102
Txtemployee.Text = rss!emp_number
Txtcustomer.Text = rss!customer_id
txtproductcode.Text = rss!product_code
Txtsaledate.Text = rss!sale_date
txtsaletime.Text = rss!sale_time
txtquantity.Text = rss!quantity
Else
cmdnext.Enabled = False
cmdprevious.Enabled = False
cmdlast.Enabled = False
cmdfirst.Enabled = False
MsgBox "No return to display"
End If
End Sub
Frmreturn.frm
Dim rsr As ADODB.Recordset
Private Sub cmdadd_Click()
If cmdadd.Caption = "&Add" Then
If rsr.EOF Then
X = 1
txtreturnid.Text = X
Else
rsr.MoveLast
65
-
7/29/2019 Music Store Managemant
66/102
X = rsr!return_id + 1
txtreturnid.Text = X
End If
rsr.AddNew
cmdadd.Caption = "&Save"
Else
Dim f As Integer
f = 0
Call valid(Me, f)
If f = 1 Then
Exit Sub
Else
rsr!return_id = Val(txtreturnid)
rsr!ship_id = Val(Lstsaleid.Text)
rsr!outlet_number = Val(lstoutlet.Text)
rsr!product_code = Val(lstproduct.Text)
rsr!return_date = Date
rsr!quantity = Val(txtquantity)
rsr!reason = Lstreason.Text
rsr.Update
Call updateinventory
End If
cmdadd.Caption = "&Add"
66
-
7/29/2019 Music Store Managemant
67/102
txtquantity.Text = ""
End If
End Sub
Private Sub Form_Load()
Dim rsl As ADODB.Recordset
Set rsl = New ADODB.Recordset
rsl.Open "select distinct ship_id from shiping", con,
adOpenDynamic, adLockOptimistic
Do While Not rsl.EOF
Lstsaleid.AddItem rsl!ship_id
rsl.MoveNext
Loop
Set rsr = New ADODB.Recordset
rsr.Open "select * from returns", con, adOpenDynamic,
adLockOptimistic
txtreturnid.Enabled = False
Lstreason.AddItem "Broken"
Lstreason.AddItem "bad quality"
Lstreason.AddItem "not sold"
txtreturndate.Text = Date
txtreturndate.Enabled = False
End Sub
67
-
7/29/2019 Music Store Managemant
68/102
Private Sub updateinventory()
Dim rsi As ADODB.Recordset
Set rsi = New ADODB.Recordset
Dim n As Integer, out As Integer
out = Val(lstoutlet.Text)
n = Val(lstproduct.Text)
str1 = "select * from inventory where outlet_number = " & out &
" and product_code =" & n
rsi.Open str1, con, adOpenDynamic, adLockOptimistic
If Not rsi.EOF Then
rsi!quantity = rsi!quantity - Val(txtquantity.Text)
rsi.Update
End If
End Sub
Private Sub Lstoutlet_Click()
lstproduct.Clear
Dim rso As ADODB.Recordset
Set rso = New ADODB.Recordset
str1 = "select * from shiping where ship_id = " &
Val(Lstsaleid.Text) & "and outlet_number = " & Val(lstoutlet.Text)
rso.Open str1, con, adOpenDynamic, adLockOptimistic
Do While Not rso.EOF
68
-
7/29/2019 Music Store Managemant
69/102
lstproduct.AddItem rso!product_code
rso.MoveNext
Loop
End Sub
Private Sub Lstsaleid_Click()
lstoutlet.Clear
Dim rso As ADODB.Recordset
Set rso = New ADODB.Recordset
str1 = "select distinct outlet_number from shiping where ship_id
= " & Val(Lstsaleid.Text)
rso.Open str1, con, adOpenDynamic, adLockOptimistic
Do While Not rso.EOF
lstoutlet.AddItem rso!outlet_number
rso.MoveNext
Loop
lstoutlet.Refresh
End Sub
Frmviewreturn.frm
Dim rsr As ADODB.Recordset
Private Sub cmdfirst_Click()
rsr.MoveFirst
Txtoutlet.Text = rsr!outlet_number
69
-
7/29/2019 Music Store Managemant
70/102
txtproduct.Text = rsr!product_code
txtreturnid.Text = rsr!return_id
txtreturndate.Text = rsr!return_date
txtquantity.Text = rsr!quantity
txtsaleid.Text = rsr!ship_id
txtreason.Text = rsr!reason
End Sub
Private Sub cmdlast_Click()
rsr.MoveLast
Txtoutlet.Text = rsr!outlet_number
txtproduct.Text = rsr!product_code
txtreturnid.Text = rsr!return_id
txtreturndate.Text = rsr!return_date
txtquantity.Text = rsr!quantity
txtsaleid.Text = rsr!ship_id
txtreason.Text = rsr!reason
End Sub
Private Sub cmdnext_Click()
rsr.MoveNext
If rsr.EOF Then
rsr.MoveLast
End If
70
-
7/29/2019 Music Store Managemant
71/102
Txtoutlet.Text = rsr!outlet_number
txtproduct.Text = rsr!product_code
txtreturnid.Text = rsr!return_id
txtreturndate.Text = rsr!return_date
txtquantity.Text = rsr!quantity
txtsaleid.Text = rsr!ship_id
txtreason.Text = rsr!reason
End Sub
Private Sub cmdprevious_Click()
rsr.MovePrevious
If rsr.BOF Then
rsr.MoveFirst
End If
Txtoutlet.Text = rsr!outlet_number
txtproduct.Text = rsr!product_code
txtreturnid.Text = rsr!return_id
txtreturndate.Text = rsr!return_date
txtquantity.Text = rsr!quantity
txtsaleid.Text = rsr!ship_id
txtreason.Text = rsr!reason
End Sub
71
-
7/29/2019 Music Store Managemant
72/102
Private Sub Form_Load()
Set rsr = New ADODB.Recordset
rsr.Open "select * from returns", con, adOpenDynamic,
adLockOptimistic
Txtoutlet.Enabled = False
txtproduct.Enabled = False
txtreturnid.Enabled = False
txtreturndate.Enabled = False
txtquantity.Enabled = False
txtsaleid.Enabled = False
txtreason.Enabled = False
If Not rsr.EOF Then
Txtoutlet.Text = rsr!outlet_number
txtproduct.Text = rsr!product_code
txtreturnid.Text = rsr!return_id
txtreturndate.Text = rsr!return_date
txtquantity.Text = rsr!quantity
txtsaleid.Text = rsr!ship_id
txtreason.Text = rsr!reason
Else
cmdnext.Enabled = False
cmdprevious.Enabled = False
cmdlast.Enabled = False
72
-
7/29/2019 Music Store Managemant
73/102
cmdfirst.Enabled = False
MsgBox "No return to display"
End If
End Sub
Frmoutlet.frm
Dim rso As ADODB.Recordset
Private Sub cmdnext_Click()
rso.MoveNext
If rso.EOF Then
rso.MoveLast
End If
txtoutlet = rso!outlet_number
txtaddress = rso!address
txtcity = rso!city
txtstate = rso!State
txtzip = rso!zip
txtphone = rso!phone
End Sub
Private Sub cmdprevious_Click()
rso.MovePrevious
If (rso.BOF) Then
rso.MoveFirst
73
-
7/29/2019 Music Store Managemant
74/102
End If
txtoutlet = rso!outlet_number
txtaddress = rso!address
txtcity = rso!city
txtstate = rso!State
txtzip = rso!zip
txtphone = rso!phone
End Sub
Private Sub Command1_Click()
Dim X As Integer
If Command1.Caption = "&Add" Then
Call enadis(0)
rso.MoveLast
X = rso!outlet_number
X = X + 1
txtoutlet.Text = X
txtoutlet.Enabled = False
txtaddress = ""
txtcity = ""
txtstate = ""
txtzip = ""
txtphone = ""
rso.AddNew
74
-
7/29/2019 Music Store Managemant
75/102
Command1.Caption = "&Save"
Else
Dim f As Integer
Call valid(Me, f)
If f = 1 Then
Exit Sub
Else
Call modifyrec
Command1.Caption = "&Add"
txtoutlet.Enabled = True
Call enadis(1)
End If
End If
End Sub
Private Sub Command2_Click()
Call modifyrec
End Sub
Private Sub Command3_Click()
rso.Delete
If Not rso.EOF Then
Call cmdnext_Click
Else
75
-
7/29/2019 Music Store Managemant
76/102
Call cmdprevious_Click
End If
End Sub
Private Sub Form_Load()
txtoutlet.Enabled = False
Set rso = New ADODB.Recordset
rso.Open "select * from outlet", con, adOpenDynamic,
adLockOptimistic
txtoutlet = rso!outlet_number
txtaddress = rso!address
txtcity = rso!city
txtstate = rso!State
txtzip = rso!zip
txtphone = rso!phone
End Sub
Private Sub modifyrec()
rso!outlet_number = txtoutlet
rso!address = txtaddress
rso!city = txtcity
rso!State = txtstate
rso!zip = txtzip
rso!phone = txtphone
76
-
7/29/2019 Music Store Managemant
77/102
rso.Update
End Sub
Private Sub enadis(a As Integer)
If a = 0 Then
Command2.Enabled = False
Command3.Enabled = False
cmdnext.Enabled = False
cmdprevious.Enabled = False
Else
Command2.Enabled = True
Command3.Enabled = True
cmdnext.Enabled = True
cmdprevious.Enabled = True
End If
End Sub
Frmcustomer.frm
Dim rso As ADODB.Recordset
Private Sub cmdadd_Click()
Dim X As Integer
If cmdadd.Caption = "&Add" Then
Call enadis(0)
rso.MoveLast
77
-
7/29/2019 Music Store Managemant
78/102
X = rso!customer_id
X = X + 1
txtcustomerid.Text = X
txtcustomerid.Enabled = False
txtcustomername = ""
txtaddress = ""
txtcity = ""
txtstate = ""
txtzip = ""
txtphone = ""
rso.AddNew
cmdadd.Caption = "&Save"
Else
Dim f As Integer
Call valid(Me, f)
If f = 1 Then
Exit Sub
Else
Call modifyrec
cmdadd.Caption = "&Add"
txtcustomerid.Enabled = True
End If
Call enadis(1)
78
-
7/29/2019 Music Store Managemant
79/102
End If
End Sub
Private Sub cmdedit_Click()
Call modifyrec
End Sub
Private Sub cmdfirst_Click()
rso.MoveFirst
txtcustomerid = rso!customer_id
txtcustomername = rso!customer_name
txtaddress = rso!address
txtcity = rso!city
txtstate = rso!State
txtzip = rso!zip
txtphone = rso!phone
End Sub
Private Sub cmdlast_Click()
rso.MoveLast
txtcustomerid = rso!customer_id
txtcustomername = rso!customer_name
txtaddress = rso!address
txtcity = rso!city
txtstate = rso!State
79
-
7/29/2019 Music Store Managemant
80/102
txtzip = rso!zip
txtphone = rso!phone
End Sub
Private Sub cmdnext_Click()
rso.MoveNext
If rso.EOF Then
rso.MoveLast
End If
txtcustomerid = rso!customer_id
txtcustomername = rso!customer_name
txtaddress = rso!address
txtcity = rso!city
txtstate = rso!State
txtzip = rso!zip
txtphone = rso!phone
End Sub
Private Sub cmdprevious_Click()
rso.MovePrevious
If (rso.BOF) Then
rso.MoveFirst
End If
txtcustomerid = rso!customer_id
80
-
7/29/2019 Music Store Managemant
81/102
txtcustomername = rso!customer_name
txtaddress = rso!address
txtcity = rso!city
txtstate = rso!State
txtzip = rso!zip
txtphone = rso!phone
End Sub
Private Sub Command1_Click()
rso.Delete
If Not rso.EOF Then
Call cmdnext_Click
Else
Call cmdprevious_Click
End If
End Sub
Private Sub Form_Load()
txtcustomerid.Enabled = False
Set rso = New ADODB.Recordset
rso.Open "select * from customer", con, adOpenDynamic,
adLockOptimistic
txtcustomerid = rso!customer_id
txtcustomername = rso!customer_name
81
-
7/29/2019 Music Store Managemant
82/102
txtaddress = rso!address
txtcity = rso!city
txtstate = rso!State
txtzip = rso!zip
txtphone = rso!phone
End Sub
Private Sub modifyrec()
rso!customer_id = txtcustomerid
rso!customer_name = txtcustomername
rso!address = txtaddress
rso!city = txtcity
rso!State = txtstate
rso!zip = txtzip
rso!phone = txtphone
rso.Update
End Sub
Private Sub enadis(a As Integer)
If a = 0 Then
Command1.Enabled = False
cmdfirst.Enabled = False
cmdnext.Enabled = False
cmdprevious.Enabled = False
82
-
7/29/2019 Music Store Managemant
83/102
cmdlast.Enabled = False
cmdedit.Enabled = False
Else
cmdedit.Enabled = False
cmdlast.Enabled = True
Command1.Enabled = True
cmdfirst.Enabled = True
cmdnext.Enabled = True
cmdprevious.Enabled = True
End If
End Sub
Frmproduct.frm
Dim rso As ADODB.Recordset
Private Sub cmdadd_Click()
Dim X As Integer
If cmdadd.Caption = "&Add" Then
Call enadis(0)
rso.MoveLast
X = rso!product_code
X = X + 1
txtproductcode.Text = X
txtproductcode.Enabled = False
83
-
7/29/2019 Music Store Managemant
84/102
txtartist = ""
txttitle = ""
txtcost = ""
txtsaleprice = ""
rso.AddNew
cmdadd.Caption = "&Save"
Else
Dim f As Integer
Call valid(Me, f)
If f = 1 Then
Exit Sub
Else
Call modifyrec
cmdadd.Caption = "&Add"
Call enadis(1)
txtproductcode.Enabled = True
End If
End If
End Sub
Private Sub cmdedit_Click()
Call modifyrec
End Sub
84
-
7/29/2019 Music Store Managemant
85/102
Private Sub cmdfirst_Click()
rso.MoveFirst
txtproductcode = rso!product_code
txtartist = rso!artist
txtcost = rso!cost
txtsaleprice = rso!Sale_price
End Sub
Private Sub cmdlast_Click()
rso.MoveLast
txtproductcode = rso!product_code
txtartist = rso!artist
txttitle = rso!Title
txtcost = rso!cost
txtsaleprice = rso!Sale_price
End Sub
Private Sub cmdnext_Click()
rso.MoveNext
If rso.EOF Then
rso.MoveLast
End If
txtproductcode = rso!product_code
txtartist = rso!artist
85
-
7/29/2019 Music Store Managemant
86/102
txttitle = rso!Title
txtcost = rso!cost
txtsaleprice = rso!Sale_price
End Sub
Private Sub cmdprevious_Click()
rso.MovePrevious
If (rso.BOF) Then
rso.MoveFirst
End If
txtproductcode = rso!product_code
txtartist = rso!artist
txttitle = rso!Title
txtcost = rso!cost
txtsaleprice = rso!Sale_price
End Sub
Private Sub Command1_Click()
rso.Delete
If Not rso.EOF Then
Call cmdnext_Click
Else
Call cmdprevious_Click
End If
86
-
7/29/2019 Music Store Managemant
87/102
End Sub
Private Sub Form_Load()
txtproductcode.Enabled = False
Set rso = New ADODB.Recordset
rso.Open "select * from product", con, adOpenDynamic,
adLockOptimistic
txtproductcode = rso!product_code
txtartist = rso!artist
txttitle = rso!Title
txtcost = rso!cost
txtsaleprice = rso!Sale_price
End Sub
Private Sub modifyrec()
rso!product_code = txtproductcode
rso!artist = txtartist
rso!Title = txttitle
rso!cost = txtcost
rso!Sale_price = txtsaleprice
rso.Update
End Sub
Private Sub enadis(a As Integer)
87
-
7/29/2019 Music Store Managemant
88/102
If a = 0 Then
Command1.Enabled = False
cmdfirst.Enabled = False
cmdnext.Enabled = False
cmdprevious.Enabled = False
cmdlast.Enabled = False
cmdedit.Enabled = False
Else
cmdedit.Enabled = False
cmdlast.Enabled = True
Command1.Enabled = True
cmdfirst.Enabled = True
cmdnext.Enabled = True
cmdprevious.Enabled = True
End If
End Sub
Frmemployee.frm
Dim rso As ADODB.Recordset
Dim lt As Integer
Private Sub cmdfirst_Click()
rso.MoveFirst
End Sub
88
-
7/29/2019 Music Store Managemant
89/102
Private Sub cmdlast_Click()
rso.MoveLast
End Sub
Private Sub cmdnext_Click()
rso.MoveNext
If rso.EOF Then
rso.MoveLast
End If
txtoutlet = rso!outlet_number
txtemp = rso!emp_number
txtempname = rso!emp_name
End Sub
Private Sub cmdprevious_Click()
rso.MovePrevious
If (rso.BOF) Then
rso.MoveFirst
End If
txtoutlet = rso!outlet_number
txtemp = rso!emp_number
txtempname = rso!emp_name
End Sub
89
-
7/29/2019 Music Store Managemant
90/102
Private Sub Command1_Click()
Dim X As Integer
If command1.Caption = "&Add" Then
Call enadis(0)
txtoutlet.Visible = False
Lstoutlet.Visible = True
txtempname.Enabled = True
lt = 1
rso.MoveLast
X = rso!emp_number
X = X + 1
txtemp.Text = X
txtemp.Enabled = False
txtoutlet = ""
txtempname = ""
rso.AddNew
command1.Caption = "&Save"
Else
Dim f As Integer
Call valid(Me, f)
If f = 1 Then
Exit Sub
90
-
7/29/2019 Music Store Managemant
91/102
Else
Call modifyrec
command1.Caption = "&Add"
End If
txtoutlet.Visible = True
txtoutlet.Text = Left(Lstoutlet.Text, 1)
Lstoutlet.Visible = False
txtempname.Enabled = False
lt = 0
Call reflist
Call enadis(1)
End If
End Sub
Private Sub Command2_Click()
If command2.Caption = "&Modify" Then
Lstoutlet.Visible = True
txtoutlet.Visible = False
txtempname.Enabled = True
command2.Caption = "&Save"
lt = 1
Else
txtoutlet.Text = Left(Lstoutlet.Text, 1)
91
-
7/29/2019 Music Store Managemant
92/102
Lstoutlet.Visible = False
txtoutlet.Visible = True
Dim X As Integer
Call valid(Me, X)
If X = 1 Then
Exit Sub
Else
Call modifyrec
txtempname.Enabled = False
command2.Caption = "&Modify"
lt = 0
End If
End If
End Sub
Private Sub Command3_Click()
rso.Delete
If Not rso.EOF Then
Call cmdnext_Click
Else
Call cmdprevious_Click
End If
End Sub
92
-
7/29/2019 Music Store Managemant
93/102
Private Sub Form_Load()
lt = 0
txtoutlet.Enabled = False
txtempname.Enabled = False
txtemp.Enabled = False
Lstoutlet.Visible = False
Lstoutlet.Top = txtoutlet.Top
Lstoutlet.Left = txtoutlet.Left
Set rso = New ADODB.Recordset
rso.Open "select * from employee", con, adOpenDynamic,
adLockOptimistic
txtoutlet = rso!outlet_number
txtemp = rso!emp_number
txtempname = rso!emp_name
Call reflist
End Sub
Private Sub modifyrec()
If lt = 0 Then
rso!outlet_number = Val(txtoutlet)
Else
rso!outlet_number = Val(Left(Lstoutlet.Text, 1))
End If
93
-
7/29/2019 Music Store Managemant
94/102
rso!emp_name = txtempname
rso.Update
End Sub
Private Sub enadis(a As Integer)
If a = 0 Then
cmdnext.Enabled = False
cmdprevious.Enabled = False
command2.Enabled = False
command3.Enabled = False
Else
command2.Enabled = True
command3.Enabled = True
cmdnext.Enabled = True
cmdprevious.Enabled = True
End If
End Sub
Private Sub reflist()
Lstoutlet.Clear
Dim rsl As ADODB.Recordset
Set rsl = New ADODB.Recordset
94
-
7/29/2019 Music Store Managemant
95/102
rsl.Open "select * from outlet", con, adOpenDynamic,
adLockOptimistic
Do While Not rsl.EOF
Lstoutlet.AddItem rsl!outlet_number & rsl!address
rsl.MoveNext
Loop
End Sub
Frmship.frm
Dim rstemp As ADODB.Recordset
Private Sub cmdadd_Click()
Static pc As Integer
Static outn As Integer
Static sid As Integer
Dim f As Integer
Dim rsadd As ADODB.Recordset
Set rsadd = New ADODB.Recordset
Call valid(Me, f)
If f = 1 Then
Exit Sub
Else
If sid = Val(Txtshipid.Text) And outn = Val(Lstoutlet.Text) And
pc = Val(Lstproduct.Text) Then
95
-
7/29/2019 Music Store Managemant
96/102
MsgBox "you can not ship same item twise to same outlet in a
shiping"
Exit Sub
Else
rsadd.Open "select * from shiping", con, adOpenDynamic,
adLockOptimistic
rsadd.AddNew
rsadd!ship_id = Val(Txtshipid.Text)
rsadd!outlet_number = Val(Lstoutlet.Text)
rsadd!product_code = Val(Lstproduct.Text)
rsadd!quantity = Val(txtquantity.Text)
rsadd.Update
sid = Val(Txtshipid.Text)
outn = Val(Lstoutlet.Text)
pc = Val(Lstproduct.Text)
Call updateinventory(outn, pc, Val(txtquantity.Text))
End If
End If
rsadd.Close
End Sub
Private Sub cmdnew_Click()
Dim rsnew As ADODB.Recordset
96
-
7/29/2019 Music Store Managemant
97/102
Set rsnew = New ADODB.Recordset
rsnew.Open "select * from shiping", con, adOpenDynamic,
adLockOptimistic
If rsnew.EOF Then
f = 1
Else
rsnew.MoveLast
f = rsnew!ship_id + 1
End If
Txtshipid.Text = f
cmdadd.Enabled = True
End Sub
Private Sub Form_Load()
Txtshipid.Enabled = False
cmdadd.Enabled = False
Call reflist
End Sub
Private Sub reflist()
Set rstemp = New ADODB.Recordset
rstemp.Open "select * from product", con, adOpenDynamic,
adLockOptimistic
Do While Not rstemp.EOF
97
-
7/29/2019 Music Store Managemant
98/102
Lstproduct.AddItem rstemp!product_code
rstemp.MoveNext
Loop
rstemp.Close
rstemp.Open "select * from outlet", con, adOpenDynamic,
adLockOptimistic
Do While Not rstemp.EOF
Lstoutlet.AddItem rstemp!outlet_number
rstemp.MoveNext
Loop
rstemp.Close
End Sub
Private Sub updateinventory (outlet As Integer, prod As
Integer, q As Integer)
Dim rsu As ADODB.Recordset
Set rsu = New ADODB.Recordset
str1 = "select * from inventory where outlet_number = " & outlet
& " and product_code = " & prod
rsu.Open str1, con, adOpenDynamic, adLockOptimistic
If Not rsu.EOF Then
rsu!quantity = rsu!quantity + q
rsu.Update
98
-
7/29/2019 Music Store Managemant
99/102
End If
rsu.Close
End Sub
99
-
7/29/2019 Music Store Managemant
100/102
-
7/29/2019 Music Store Managemant
101/102
BIBLIOGRAPHY
101
-
7/29/2019 Music Store Managemant
102/102