Project Report PDF
Project Report PDF
Project Report PDF
Introduction To Project:-
We want to create software which is useful for the all event planers name as “Grocery Store
Management ”.
The information include home page that includes login form ,Product sell form, Todays sell
form ,Customer data form, User form and logout. Consider the entire requirement ;
To store the secure data because all the record in computerized , with this software manual
works in terms of records are store in database, which are necessity and the way to automate the
manual work. This software easy to handle and access product , customer and sell information
etc., also provide to the system database.
1
2.Hardware And Software Requirement:
❖ Software Requirement:
• Windows 7
• Microsoft access 2007
• Visual basis .net 2012
❖ Hardware Requirement:
• 2.00 GHZ Processor
• 4 GB RAM
• 1 TB Hard disk
• 64 BYTE
2
I.Introduction to Visual Basic.net
This back of the given project is based on visual basis .net without any inclusion of other
languages or resources Microsoft access which is used in data base .
That’s due the conversion and ease of the language that is an appropriate too for creating such
mini project. Also it has several advantages over its other which is explain the below .
This mini project makes the use of Microsoft access for creating data base and storing the
values. Although it could have been done with other tools either but access has been
implemented in it for certain reasons , some of them being compatibility and ease.
3
3.DFD:
Login Form
MENU FORM
Data
Base
Retrieve
4
4.ER-Diagram:
Password
Customer Username
Name
Add Edit
Delete
Search
User
Type
ID
Password
Username
5
5.Database Design :
1.Login Form:
6
3.Product Information Form :
Name of Field Data Type Description
ID Number Used For Entering Product ID
Name Text Used For Entering Name
Price Number Used For Entering Price
Date Number Used For Display Date
7
6.Source Code:
Login Form:
Imports System.Data.OleDb
Public a As Integer
Public b As Integer
Public security As String
Public user As String
8
Dim daa As New OleDb.OleDbDataAdapter("SELECT * FROM username where
uname='" & UsernameTextBox.Text & "' and upassword='" & PasswordTextBox.Text
& "' and type='administrator'", cnn)
Dim dtt As New DataTable
'fill data to datatable
daa.Fill(dtt)
b = dtt.Rows.Count
user = UsernameTextBox.Text.ToUpper
If a = 1 And b = 1 Then
security = "Administrator"
ElseIf a = 1 And b = 0 Then
security = "User"
End If
If a = 1 Then
af3.Show()
Else
MsgBox("Check your username password", MsgBoxStyle.Critical)
End If
End Sub
9
Menu Form:
Imports System.Data.OleDb
Public Class af3
ToolStripLabel2.Text = Today.Date
username.Text = LoginForm1.user
End If
ToolStripLabel1.Text = LoginForm1.security
Me.IsMdiContainer = True
End Sub
af1.MdiParent = Me
af2.Close()
sell.Close()
user.Close()
af1.Show()
End Sub
af2.MdiParent = Me
10
af1.Close()
sell.Close()
user.Close()
af2.Show()
End Sub
End Sub
End Sub
Me.Close()
End Sub
user.MdiParent = Me
af1.Close()
sell.Close()
af2.Close()
user.Show()
End Sub
11
sell.MdiParent = Me
af1.Close()
user.Close()
af2.Close()
sell.Show()
End Sub
12
Product Sell Form :
Imports System.Data.OleDb
sName.Text = LoginForm1.user
If LoginForm1.security = "Administrator" Then
ToolStripButton1.Enabled = True
ToolStripButton2.Enabled = True
ToolStripButton3.Enabled = True
End If
'for Bill No
If Not cnn.State = ConnectionState.Open Then
cnn.Open()
End If
End Sub
13
Dim da As New OleDb.OleDbDataAdapter("SELECT ProductID, ProductName,
UnitPrice, pdate" & " FROM Products ORDER BY ProductID", cnn)
Dim dt As New DataTable
'fill data to datatable
da.Fill(dt)
'close connection
cnn.Close()
End Sub
Try
DataGridView1.Enabled = 1
'valid number
Dim intValue As Double
If Not Double.TryParse(TxPID.Text, intValue) And Not
Double.TryParse(TxUP.Text, intValue) Then
Else
cmd.Connection = cnn
cmd.CommandText = "INSERT INTO Products(ProductID,
ProductName, UnitPrice, pdate) VALUES('" & TxPID.Text & "', '" &
TxPN.Text.ToUpper & "', " & TxUP.Text & ", '" & Today.Date & "')"
cmd.ExecuteNonQuery()
RefreshData()
ToolStripLabel1.Text = "New Data Is Added"
TxPID.Text = ""
TxPN.Text = ""
TxUP.Text = ""
TxPID.Focus()
14
cnn.Close()
End If
Catch ex As Exception
MsgBox("Product id repeat", MsgBoxStyle.Critical, "ERROR")
End Try
'update
End Sub
GroupBox2.Visible = False
GroupBox3.Visible = True
End Sub
GroupBox2.Visible = 1
GroupBox3.Visible = False
Save.Visible = 1
BtnUpdate.Visible = 0
TxPID.Focus()
TxPID.Text = ""
TxPN.Text = ""
TxUP.Text = ""
pdate.Text = ""
End Sub
'cancel keys
e.Handled = True
End If
End If
End Sub
15
Private Sub TxPID_TextChanged(sender As Object, e As EventArgs) Handles
TxPID.TextChanged
Dim intValue As Double
If Not Double.TryParse(TxPID.Text, intValue) Then
Star1.Visible = 1
End If
End Sub
'cancel keys
e.Handled = True
End If
End If
End Sub
End If
End Sub
16
cmd.CommandText = "DELETE FROM Products WHERE ProductID='" &
value & "'"
cmd.ExecuteNonQuery()
'refresh data
Me.RefreshData()
ToolStripLabel1.Text = "Selected Record is Deleted"
cnn.Close()
Next
End Sub
Try
'Do Stuff
End If
If e.KeyCode = Keys.Down Then
If DataGridView1.CurrentRow.Index <
DataGridView1.RowCount - 1 Then
MyDesiredIndex = DataGridView1.CurrentRow.Index + 1
End If
DataGridView1.ClearSelection()
DataGridView1.CurrentCell =
DataGridView1.Rows(MyDesiredIndex).Cells(0)
DataGridView1.Rows(MyDesiredIndex).Selected = True
End If
End If
17
If DataGridView1.RowCount > 0 Then
If DataGridView1.CurrentRow.Index <
DataGridView1.RowCount Then
MyDesiredIndex = DataGridView1.CurrentRow.Index - 1
End If
DataGridView1.ClearSelection()
DataGridView1.CurrentCell =
DataGridView1.Rows(MyDesiredIndex).Cells(0)
DataGridView1.Rows(MyDesiredIndex).Selected = True
End If
End If
Catch ex As Exception
End Try
End If
End Sub
'close connection
cnn.Close()
End Sub
18
Private Sub ToolStripButton3_Click(sender As Object, e As EventArgs)
Handles ToolStripButton3.Click
If DataGridView1.RowCount <= 0 Then
Else
BtnUpdate.Visible = 1
GroupBox2.Visible = 1
GroupBox3.Visible = 0
Save.Visible = 0
Dim i = DataGridView1.CurrentRow.Index
If i = -1 Then
MsgBox(" Can not be Update ")
End If
TxPID.Text = DataGridView1.Item(0, i).Value
TxPN.Text = DataGridView1.Item(1, i).Value
TxUP.Text = DataGridView1.Item(2, i).Value
pdate.Text = DataGridView1.Item(3, i).Value
End If
End Sub
Catch ex As Exception
End Try
End Sub
19
Catch ex As Exception
End Try
End Sub
cmd.Connection = cnn
cmd.ExecuteNonQuery()
cnn.Close()
RefreshData()
ToolStripLabel1.Text = "Record Updated"
Catch ex As Exception
MsgBox("something is wrong")
End Try
End Sub
20
LdATE.Text = Today.Date
End If
End If
ToolStripTextBox1.Focus()
ToolStripTextBox1.Text = ""
End Sub
If ListBox4.Items.Count = 0 Then
MsgBox("Nothing Added")
Else
For c = 0 To count - 1
sum = sum + ListBox4.Items(c)
Total.Text = sum
Next
TxCAddress.Text = ""
TxCname.Text = ""
TxCPhone.Text = ""
'saving
Try
For i = 0 To i
Dim a As String = ListBox1.Items(i)
Dim b As String = ListBox2.Items(i)
Dim d As String = ListBox3.Items(i)
PNlist = PNlist & "/" & a
BUnitPrice = BUnitPrice & "/" & b
BOrder = BOrder & "/" & d
Next
21
Dim cmd As New OleDb.OleDbCommand
cmd.Connection = cnn
cmd.CommandText = "INSERT INTO Customer(BillNo, CName, CAddress,
CPhone, BProduct, BUnitPrice, BOrder, CDate, GT, seller) VALUES(" &
lbillno.Text & ", '" & CName.Text & "', '" & CAddress.Text & "', '" &
Cphone.Text & "', '" & PNlist & "', '" & BUnitPrice & "', '" & BOrder & "',
'" & Today.Date & "', " & Total.Text & ", '" & sName.Text & "')"
cmd.ExecuteNonQuery()
cnn.Close()
Catch ex As Exception
End Try
End If
End Sub
End Sub
22
Private Sub TxBuyOrder_KeyDown(sender As Object, e As KeyEventArgs)
Handles TxBuyOrder.KeyDown
'Do Stuff
End If
End Sub
23
End If
End Sub
End Sub
'cancel keys
e.Handled = True
End If
End If
End Sub
'cancel keys
e.Handled = True
End If
End If
End Sub
24
Sell Form :
Imports System.Data.OleDb
'close connection
cnn.Close()
End Sub
txuser.Text = LoginForm1.UsernameTextBox.Text.ToUpper
If LoginForm1.security = "User" Then
txuser.Enabled = False
End If
search()
End Sub
End Sub
25
Public Sub search()
If dt = 0 Then
s = Today.Date
ElseIf dt = 1 Then
s = Today.Month
ElseIf dt = 2 Then
s = Today.Year
End If
'close connection
cnn.Close()
' End If
End Sub
26
Private Sub txuser_TextChanged(sender As Object, e As EventArgs) Handles
txuser.TextChanged
search()
End Sub
End Sub
27
Data Form :
Imports System.Data.OleDb
Public Class af2
Dim cnn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Users\Akshay\Documents\Visual Studio 2019\products.mdb")
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim a As String = ""
Private Sub RefreshData()
If Not cnn.State = ConnectionState.Open Then
'open connection
cnn.Open()
End If
If d = 0 Then
a = Today.Date
ElseIf d = 1 Then
a = Today.Month
ElseIf d = 2 Then
a = Today.Year
ElseIf d = 3 Then
a = ""
End If
28
If Not cnn.State = ConnectionState.Open Then
'open connection
cnn.Open()
End If
'close connection
cnn.Close()
End Sub
'close connection
29
cnn.Close()
End Sub
Ref()
RefreshData()
End Sub
'cancel keys
e.Handled = True
End If
End If
End Sub
'close connection
cnn.Close()
30
End Sub
End Sub
search()
End Sub
31
User Form:
Imports System.Data.OleDb
Public Class user
Me.dgUser.DataSource = dut
'close connection
cnn.Close()
End Sub
Private Sub Form2_Load(sender As Object, e As EventArgs) Handles
MyBase.Load
Me.BackColor = Color.Coral
Password.UseSystemPasswordChar = True
repassword.UseSystemPasswordChar = True
RefreshData()
End Sub
'add
Try
32
If repassword.Text = Password.Text Then
cmd.Connection = cnn
cmd.CommandText = "INSERT INTO username( id, uname,
upassword, type) VALUES(" & ID.Text & ", '" & username.Text & "', '" &
Password.Text & "', '" & Type.Text & "')"
cmd.ExecuteNonQuery()
cnn.Close()
RefreshData()
Else
MsgBox("Please enter valid password combination")
End If
Catch ex As Exception
MsgBox("cann't add new user somthing is wrong")
End Try
Else
'update
End If
ID.Text = ""
username.Text = ""
Password.Text = ""
repassword.Text = ""
Type.Text = ""
End Sub
33
Private Sub dgUser_CellDoubleClick(sender As Object, e As
DataGridViewCellEventArgs) Handles dgUser.CellDoubleClick
Try
btnupdate.Visible = 1
Btnsave.Visible = 0
Catch ex As Exception
MsgBox("somthing is wrong")
End Try
End Sub
Try
If e.KeyCode = Keys.Delete Then
34
If Not cnn.State = ConnectionState.Open Then
'open connection if it is not yet open
cnn.Open()
End If
RefreshData()
cnn.Close()
End If
End If
Catch ex As Exception
MsgBox("somthing is wrong")
End Try
End Sub
Try
cnn.Open()
Dim cmd As New OleDbCommand
cmd.Connection = cnn
cmd.CommandText = "UPDATE username set uname='" &
username.Text & "', upassword='" & Password.Text & "', type='" & Type.Text &
"' where id=" & ID.Text & ""
cmd.ExecuteNonQuery()
cnn.Close()
RefreshData()
btnupdate.Visible = False
Btnsave.Visible = True
Catch ex As Exception
MsgBox("something is wrong!!")
End Try
ID.Text = ""
username.Text = ""
Password.Text = ""
repassword.Text = ""
Type.Text = ""
Else
MsgBox("password do not match!!", MsgBoxStyle.Exclamation)
35
End If
End Sub
If CheckBox1.Checked Then
Password.UseSystemPasswordChar = False
repassword.UseSystemPasswordChar = False
Else
Password.UseSystemPasswordChar = True
repassword.UseSystemPasswordChar = True
End If
End Sub
'cancel keys
e.Handled = True
End If
End If
End Sub
36
Print Form :
With af1
lbillno.Text = .lbillno.Text
CName.Text = .CName.Text
CAddress.Text = .CAddress.Text
LdATE.Text = .LdATE.Text
Cphone.Text = .Cphone.Text
Total.Text = .Total.Text
sName.Text = .sName.Text
End With
End Sub
PrintForm1.Print()
End Sub
37
7.Screen Layout:
Login Form:
Menu form:
38
Product Sell :
Add Product:
39
Sell :
Data :
40
User :
Print Preview :
41
8.Scope And Limitations:
Daily functions like Sell Product, Add Product, monitor customer and
overall management of various sellers can be easily performed with higher accuracy after the
installation of Grocery software. The modules of Grocery Shop Management software are
user-friendly and easy to access.
Improve data security. Better revenue management. Disadvantages: The most important
disadvantage included reducing access, reducing the rate of Sell and increasing employees'
workload and dissatisfaction. How will we calculate damage product??
42
9.Conclusion:
Thus we have designed our project which is very useful to the Grocery Shop Management.It
includes following objectives Facility to store the information of login,Product sell, add, remove
and also edit product.
Our project is very user friendly and any user who uses it will find easy to use.
43
10.Bibilography:
Book Name:
and poject
Reference Website:
https://www.google.co.in/webhp
https://www.codewithc,com/category/projects/vb-net-project
https://www.w3school.com
44