You are on page 1of 50

MOHAMED SATHAK COLLEGE OF ART

AND SCIENCE
SHOLLINGANALLUR CHENNAI-119
BCA
FINAL YEAR PROJECT
3rd review
Project title
LOGISTIC MANAGEMENT SYSTEM

GROUP PROJECT:
STUDENT NAME:
LOKESHWARAN.S(20BCA37)
PRAKASH.P(20BCA40)

GUIDE NAME HOD


(K.SATHYA) (DR S BALAJI)

Page 1
Logistic management system

ABSTRACT
Logistic management system is a process of supply goods to one place to another
place. The logistic management systems used for scheduling the allotment of the
goods. Logistics management system is a supply chain management component that is
used to meet customer demands. Logistics management system includes warehouse
management, processing order, inventory control. Admin has authority to add or
remove goods from the system , logistic management system also maintain record of
the goods available and issued in the warehouse. Logistic management system can
also update the goods details if required. This logistics management system project
can track transportation duration of goods. This logistics management can also update
information like, at what time has the goods arrived at the destination.

INTRODUCTION
Logistic management system is a system of managing the supply chain and
logistic operations of a business. It is used to track and monitor inventory, shipments,
order, and delivery timelines. Logistic management is the core of modern supply
chain management, as it serves as a platform between the point or origin and the point
of consumption. Its operational efficiency will directly impact the overall efficiency
of the supply chain. Logistic management system is a software solution that helps
companies and organization to effectively manage the movement of goods, service
and personnel. It is designed to assist in the planning, execution and tracking of
freight, transportation and warehousing operations. Logistic management system
helps companies to improve their efficiency and cost-effectiveness in managing their
supply chain operations. The system can be used to manage inventory, track inventory
levels, manage order fulfillment, optimize shipping costs and improve customer

Page 2
service. It also helps in managing supply chain activities such as procurement,
distribution, warehousing and transportation.

MODULES
Admin login
Warehouse
Goods arrival
Goods dispatch

MODULES DESCRIPTION

Admin login : This module will allow user to authenticate themselves as


administrators in order to gain access to the system. It will provide a secure login page
that will authenticate user credential and grant access

Warehouse: This module will allow administrators. To manage inventory in the


warehouse. It will provide feature to add, edit, and delete item from the inventory.
It will also provide information about the current inventory levels and stock levels.

Goods arrival: This module will allow administrators to track and record incoming
shipments of goods. It will provide information about the shipment details, as well as
any relevant documentation associated with the shipment.

Good dispatch: The goods dispatch module is designed to help manage the dispatch
and delivery of goods. It allows users to track the shipment and delivery of goods as
well as view and update delivery information. The module also include features to
facilitate the efficient scheduling of shipments and to facilitate communication
between customers and dispatchers.

Page 3
EXISTING SYSTEM AND PROPOSED SYSTEM

Existing system : The existing system for logistic management is manual and paper-
based. This system involves manually tracking and recording of shipments. Orders,
invoice, and other logistic activities. It also requires manual input of data into
spreadsheets, and manual calculation of charges for different services. This system is
time consuming and inefficient, and prone to errors

Proposed system: The proposed system for logistic management is automated and
computerized. This system involves the automated tracking and recording of
shipments, order, invoices, and other logistic activities. It also requires the automated
input of data into a database, and automated calculation of charges for different

Page 4
services. This system is more efficient, accurate, and faster than the existing system. It
also provides better visibility into the entire logistic process.

HARDWARE REQUIREMENT

Processor - i3
Hard disk - 5GB
Memory - 1GB RAM

SOFTWARE REQUIREMENT

Front end : visual basic


Back end : SQL

Page 5
SOFTWARE REQUIREMENT SPECIFICATION

( i ) Functional Requirements :

User Interface : Here , our the user interface of the proposed system shall be VB
forms containing Menu bars , Buttons , Keyboard Shortcuts , Check boxes , List
boxes etc. according to the requirement . User can use Mouse to click the button or
choose from the menu and Keyboard to enter the data .

Hardware Interfaces : This software product shall be run properly on IBM PC or


any other PC the minimum hardware requirement for this software product shall be 1
GB RAM , 10 GB or more secondary memory . This software product shall use
WINDOW 11 operating system for establish the interface between software and
hardware . Oracle and VB also use same interfaces .

Software Interfaces : We shall uses the following software to design this product :
Microsoft VISUAL BASIC version 6.0 as programming language and as front end
user interface.ORACLE version as a data base . WINDOW version 10as an operating
system.ODBC is a S / W that acts as an interface between Oracle and VB forms . In
case of Intranet / LAN workstations , where same data is shared among many users ,
global data area is used .

Communication Interfaces : Since our proposed system shall be net - enabled so ,


communication interface is Required . Proposed system contains four sites working
concurrently . In the proposed system , single database which is common to all four
sites will be available on server and all sites will be attached to server actively .
Microsoft Outlook Express is by default used by the Windows OS .

Page 6
( ii ) Non - Functinal Requirements :

Performance Requirements : The performance requirements of this product shall be


not very critical . The system shall be perform efficiently at 64 MB RAM . The
product could run also at 32 MB RAM but to perform well it is necessary to require
the above specified quantity of RAM .

Safety Requirements : Our product is absolutely safe to use . Its usage won't provide
any damage or any type of loss to the systems already in use . Also the security model
is prepared regarding the safety of Database so that data is not lost in case of any
damage to the system .

Security Requirements : Security of the system shall definitely be maintained


through the password system . The system is devided in the four security module
concern . These are administrator , enquiry department , working department ,
dispatching department . Each and every employee of every department will be
authenticated with a login id and password . Any employee can not change the system
date to make proxy presentation of yourself .

Software Quality Attributes :

Adaptability : Since it shall be simple to use for any non computer background user .
This software product shall not required the acute knowledge of computers .

Availability : Since this product shall use the S / W which are easily available and
runs under very nominal conditions .

Portability : This product shall perfectly portable since it shall easy to install this
product normally on any systems with minimum hardware and software requirements

Reliability : The reliability of this product shall be dependent upon maintenance of


the database .

Page 7
Reusability : This product shall not for just single time useable . User shall reuse this
product many time as he or she wants .

Conclusion
A logistic management system is a computerized system that helps organizations
manage the flow of products and materials. It can help to optimize the flow of
products and materials to meet customer demand, and can help to ensure that products
and materials are delivered on time and in the correct quantities. Logistics systems
and transportation consist of interdependent relationships that logistics management
requires transportation to perform its day to day activities and meanwhile, a good
logistics system can efficiently improve transportation development and traffic
environment. Since transportation contribute the highest cost among the related
elements in logistics systems, the improvement of transport efficiency can change the
overall performance of a logistics system. Transportation plays an important role in
logistics system and its activities appear in various sections of logistics processes.
Without the linking of transportation, a powerful logistics strategy cannot bring its
capacity into full play. The review of logistics system in a broad sense might help to
integrate the advantages from different application cases to overcome their current
demerits. Review of transport systems provides a clear notion on transport
applications in logistics activities. Development of logistics will be still vigorous in
the following decades and the logistics concepts might be applied in more fields.

Page 8
FORM DESIGN

Page 9
Page 10
Page 11
Page 12
SYSTEM DESIGN

ER DIAGRAM

ER DIAGRAM FOR LOGISTIC MANAGEMENT SYSTEM

Page 13
DATA FLOW DIAGRAM

ZERO LEVEL DFD - LOGISTIC MANAGEMENT SYSTEM

Page 14
LEVEL ONE- LOGISTIC MANAGEMENT SYSTEM

Page 15
SOURCE CODE

Public Class Form1


Private Sub Form1_Load(sender As Object, e As EventArgs) Handles
MyBase.Load
Timer1.Start()
End Sub
Private Sub btnclose_Click(sender As Object, e As EventArgs) Handles
btnclose.Click
Application.Exit()
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
ProgressBar1.Increment(1)
If ProgressBar1.Value = 100 Then

Page 16
Me.Hide()
Dim log = New Login
log.Show()
Timer1.Enabled = False
End If
End Sub
End Class

1.Admin login

Public Class Login

Page 17
Private Sub btnclose_Click(sender As Object, e As EventArgs) Handles
btnclose.Click
Application.Exit()
End Sub

Private Sub btnLogin_Click(sender As Object, e As EventArgs) Handles


btnLogin.Click
If txtUsername.Text = "" Or txtPassword.Text = "" Then
MsgBox("Please Enter Username and Password")
ElseIf txtUsername.Text = "Admin" And txtPassword.Text = "password" Then
Dim Obj = New Departments
Obj.Show()
Me.Hide()
Else
MsgBox("You have entered wrong Username and Password")
txtUsername.Text = ""
txtPassword.Text = ""
End If
End Sub

Private Sub btnReset_Click(sender As Object, e As EventArgs) Handles


btnReset.Click
txtUsername.Text = ""
txtPassword.Text = ""
End Sub

Private Sub ForgotPassword_LinkClicked(sender As Object, e As


LinkLabelLinkClickedEventArgs) Handles ForgotPassword.LinkClicked
MsgBox("Your Username is Admin and Password is password")
End Sub

Private Sub PicLogo_Click(sender As Object, e As EventArgs) Handles


PicLogo.Click

Page 18
MsgBox("Don't Angry me", MsgBoxStyle.Information, "Logistics Management
System")
End Sub

Private Sub PicLock_Click(sender As Object, e As EventArgs) Handles


PicLock.Click
MsgBox("Don't Angry me", MsgBoxStyle.Information, "Logistics Management
System")
End Sub

Private Sub Login_Load(sender As Object, e As EventArgs) Handles


MyBase.Load

End Sub
End Class

Page 19
2. Warehouse

Imports System.Data.SqlClient
Public Class Departments
Dim Con = New SqlConnection("Data
Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\prakash\Documen
ts\Visual Studio 2015\Projects\logistics management\logistics
management\LMSD.mdf;Integrated Security=True")
Private Sub DisplayDepartments()

Page 20
Con.Open()
Dim query = "Select * from WarehouseTbl"
Dim adapter As SqlDataAdapter
Dim cmd = New SqlCommand(query, Con)
adapter = New SqlDataAdapter(cmd)
Dim builder = New SqlCommandBuilder(adapter)
Dim ds As DataSet
ds = New DataSet
adapter.Fill(ds)
WarehouseDGV.DataSource = ds.Tables(0)
Con.Close()
End Sub
Private Sub PictureBox3_Click(sender As Object, e As EventArgs) Handles
ExitPicture.Click
Application.Exit()
End Sub
Private Sub Departments_FormClosed(sender As Object, e As
FormClosedEventArgs) Handles MyBase.FormClosed
Application.Exit()
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
txtCode.Text = ""
txtProductname.Text = ""
txtProducttype.Text = ""
txtQuantity.Text = ""
txtWeight.Text = ""
End Sub
Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles
PictureBox1.Click
Dim Obj = New Login()
Obj.Show()
Me.Hide()
End Sub

Page 21
Private Sub btnOk_Click(sender As Object, e As EventArgs) Handles btnOk.Click
For r As Integer = 0 To WarehouseDGV.Rows.Count - 1
Try
If txtCode.Text = WarehouseDGV.Rows(r).Cells(1).Value.ToString() Then
MsgBox("Code Already Exists", MsgBoxStyle.Exclamation,
"Warehouse")

Return

End If
Catch ex As Exception
End Try
Next

If txtCode.Text = "" Or txtProductname.Text = "" Or ILcb.Text = "" Or


txtInventorycategory.Text = "" Or txtProducttype.Text = "" Or txtQuantity.Text = ""
Or txtWeight.Text = "" Then
MsgBox("Missing Information ...!", MsgBoxStyle.Exclamation, "Warehouse")

Else
Try
Con.Open()
Dim query = "insert into WarehouseTbl values('" & txtCode.Text & "', '" &
txtProductname.Text & "', '" & ILcb.Text & "','" & txtInventorycategory.Text & "', '"
& txtProducttype.Text & "','" & txtQuantity.Text & "','" & txtWeight.Text & "')"
Dim cmd As SqlCommand
cmd = New SqlCommand(query, Con)
cmd.ExecuteNonQuery()
MsgBox("Warehouse Added Successfully", MsgBoxStyle.Information,
"Warehouse")
DisplayDepartments()
Reset()

Page 22
Con.Close()
Catch ex As Exception

End Try

End If

End Sub
Private Sub fortable()
For r As Integer = 0 To WarehouseDGV.Rows.Count - 1
If txtCode.Text = WarehouseDGV.Rows(r).Cells(1).Value.ToString() Then
MsgBox("Code Already Exists", MsgBoxStyle.Exclamation, "Warehouse")

Return

End If
Next
End Sub
Private Sub Departments_Load(sender As Object, e As EventArgs) Handles
MyBase.Load
DisplayDepartments()
End Sub
Private Sub btnUpdate_Click(sender As Object, e As EventArgs)
If txtCode.Text = "" Or txtProductname.Text = "" Or ILcb.Text = "" Or
txtInventorycategory.Text = "" Or txtProducttype.Text = "" Or txtQuantity.Text = ""
Or txtWeight.Text = "" Then
MsgBox("Missing Informaton...!", MsgBoxStyle.Exclamation, "Warehouse")
Else
Try
Con.Open()
Dim query = "Update WarehouseTbl set code='" & txtCode.Text & "', '" &
txtProductname.Text & "', '" & ILcb.Text & "','" & txtInventorycategory.Text & "', '"

Page 23
& txtProducttype.Text & "','" & txtQuantity.Text & "','" & txtWeight.Text & "' where
No=" & Key & ""
Dim cmd As SqlCommand
cmd = New SqlCommand(query, Con)
cmd.ExecuteNonQuery()
MsgBox("Warehouse Updated Successfully", MsgBoxStyle.Information,
"Warehouse")
DisplayDepartments()
Reset()
Con.Close()
Catch ex As Exception
End Try
End If
End Sub
Dim Key = 0
Private Sub btnDelete_Click(sender As Object, e As EventArgs) Handles
btnDelete.Click

If Key = 0 Then
MsgBox("Please Select the Warehouse to delete", MsgBoxStyle.Exclamation,
"Warehouse")

ElseIf txtCode.Text = "" Or txtProductname.Text = "" Or ILcb.Text = "" Or


txtInventorycategory.Text = "" Or txtProducttype.Text = "" Or txtQuantity.Text = ""
Or txtWeight.Text = "" Then
MsgBox("Missing Information ...!", MsgBoxStyle.Exclamation, "Warehouse")

Else
Try
Con.Open()
Dim query = "delete From WarehouseTbl where No=" & Key & ""
Dim cmd As SqlCommand
cmd = New SqlCommand(query, Con)
cmd.ExecuteNonQuery()

Page 24
MsgBox("Warehouse Deleted Successfully", MsgBoxStyle.Information,
"Warehouse")
Con.Close()
DisplayDepartments()
Reset()
Catch ex As Exception
End Try
End If
End Sub
Private Sub PicGoodsarrival_Click(sender As Object, e As EventArgs) Handles
PicGoodsarrival.Click
Dim Obj = New Good()
Obj.Show()
Me.Hide()
End Sub
Private Sub GoodsarrivalLbl_Click(sender As Object, e As EventArgs) Handles
GoodsarrivalLbl.Click
Dim Obj = New Good()
Obj.Show()
Me.Hide()
End Sub
Private Sub PicGoodsdispatch_Click(sender As Object, e As EventArgs) Handles
PicGoodsdispatch.Click
Dim Obj = New Goods()
Obj.Show()
Me.Hide()
End Sub
Private Sub GoodsdispatchLbl_Click(sender As Object, e As EventArgs) Handles
GoodsdispatchLbl.Click
Dim Obj = New Goods()
Obj.Show()
Me.Hide()
End Sub

Page 25
Private Sub Label3_Click(sender As Object, e As EventArgs) Handles
Label3.Click
Dim Obj = New Dashboard()
Obj.Show()
Me.Hide()
End Sub
Private Sub PictureBox4_Click(sender As Object, e As EventArgs) Handles
PictureBox4.Click
Dim Obj = New Dashboard()
Obj.Show()
Me.Hide()
End Sub
Private Sub txtCode_KeyDown(sender As Object, e As KeyEventArgs) Handles
txtCode.KeyDown, txtProductname.KeyDown, txtProducttype.KeyDown,
txtQuantity.KeyDown, txtWeight.KeyDown
If e.KeyCode = Keys.Enter Then
SendKeys.Send("{tab}")
Else
Exit Sub
End If
e.SuppressKeyPress = True
End Sub
Private Sub WarehouseDGV_CellContentClick_1(sender As Object, e As
DataGridViewCellEventArgs) Handles WarehouseDGV.CellContentClick
Dim row As DataGridViewRow = WarehouseDGV.Rows(e.RowIndex)
txtCode.Text = row.Cells(1).Value.ToString
txtProductname.Text = row.Cells(2).Value.ToString
ILcb.Text = row.Cells(3).Value.ToString
txtInventorycategory.Text = row.Cells(4).Value.ToString
txtProducttype.Text = row.Cells(5).Value.ToString
txtQuantity.Text = row.Cells(6).Value.ToString
txtWeight.Text = row.Cells(7).Value.ToString
If txtCode.Text = "" Then
Key = 0

Page 26
Else
Key = Convert.ToInt32(row.Cells(0).Value.ToString)
End If
End Sub
Private Sub btnsearch_Click(sender As Object, e As EventArgs) Handles
btnsearch.Click
If txtsearch.Text = "" Then
MsgBox("Missing Informaton...!", MsgBoxStyle.Exclamation, "Warehouse")
Else
Try
Con.open()
Dim pid As Integer = txtsearch.Text
Dim command As New SqlCommand("Select * from WarehouseTbl where
Code='" & pid & "'", Con)
Dim adapter As SqlDataAdapter
adapter = New SqlDataAdapter(command)
Dim dt As New DataTable
adapter.Fill(dt)
WarehouseDGV.DataSource = dt
Con.close
Catch ex As Exception
End Try
End If
End Sub
Private Sub txtSearch_KeyDown(sender As Object, e As KeyEventArgs) Handles
txtsearch.KeyDown, btnDelete.KeyDown
If e.KeyCode = Keys.Enter Then
SendKeys.Send("{tab}")
Else
Exit Sub
End If
e.SuppressKeyPress = True
End Sub
End Class

Page 27
CREATE TABLE [dbo].[DepartmentTbl]
(
[No] INT NOT NULL PRIMARY KEY IDENTITY,
[Code] INT NOT NULL,
[Product name] VARCHAR(100) NOT NULL,
[Inventory location] VARCHAR(100) NOT NULL,
[Inventory Category] VARCHAR(100) NOT NULL,
[Product type] VARCHAR(100) NOT NULL,
[Quantity] INT NOT NULL,
[Weight] INT NOT NULL,

Page 28
3. Goods arrivals

Imports System.Data.SqlClient
Public Class Good
Dim Con = New SqlConnection("Data
Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\prakash\Documen
ts\Visual Studio 2015\Projects\logistics management\logistics
management\LMSD.mdf;Integrated Security=True")
Private Sub DisplayGood()
Con.Open()
Dim query = "Select * from WareTbl"
Dim adapter As SqlDataAdapter
Dim cmd = New SqlCommand(query, Con)
adapter = New SqlDataAdapter(cmd)

Page 29
Dim builder = New SqlCommandBuilder(adapter)
Dim ds As DataSet
ds = New DataSet
adapter.Fill(ds)
WareDGV.DataSource = ds.Tables(0)
Con.Close()
End Sub
Private Sub ExitPicture_Click(sender As Object, e As EventArgs) Handles
ExitPicture.Click
Application.Exit()
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click

txtFrom.Text = ""
txtCode.Text = ""
txtProductname.Text = ""
txtQuantity.Text = ""
txtTransportname.Text = ""
End Sub

Private Sub Good_Load(sender As Object, e As EventArgs) Handles MyBase.Load


DisplayGood()
End Sub

Private Sub Good_Click(sender As Object, e As EventArgs) Handles Me.Click

End Sub

Private Sub btnOk_Click(sender As Object, e As EventArgs) Handles btnOk.Click


For r As Integer = 0 To WareDGV.Rows.Count - 1
Try
If txtCode.Text = WareDGV.Rows(r).Cells(3).Value.ToString() Then

Page 30
MsgBox("Code Already Exists", MsgBoxStyle.Exclamation, "Goods
Arrival")

Return

End If
Catch ex As Exception
End Try
Next
If txtArrivaldate.Text = "" Or txtFrom.Text = "" Or txtCode.Text = "" Or
txtProductname.Text = "" Or txtQuantity.Text = "" Or txtTransportname.Text = ""
Then
MsgBox("Missing Information ...!", MsgBoxStyle.Exclamation, "Goods
Arrival")
Else
Try
Con.Open()
Dim query = "insert into WareTbl values('" & txtArrivaldate.Text & "', '" &
txtFrom.Text & "', '" & txtCode.Text & "','" & txtProductname.Text & "', '" &
txtQuantity.Text & "','" & txtTransportname.Text & "')"
Dim cmd As SqlCommand
cmd = New SqlCommand(query, Con)
cmd.ExecuteNonQuery()
MsgBox("Goods Arrival Added Successfully", MsgBoxStyle.Information,
"Goods Arrivals")
DisplayGood()
Reset()
Con.Close()
Catch ex As Exception

End Try
End If
End Sub

Page 31
Private Sub WarehousePic_Click(sender As Object, e As EventArgs) Handles
WarehousePic.Click
Dim Obj = New Departments()
Obj.Show()
Me.Hide()
End Sub

Private Sub WarehouseLable_Click(sender As Object, e As EventArgs) Handles


WarehouseLable.Click
Dim Obj = New Departments()
Obj.Show()
Me.Hide()
End Sub

Private Sub GoodsdispatchPic_Click(sender As Object, e As EventArgs) Handles


GoodsdispatchPic.Click
Dim Obj = New Goods()
Obj.Show()
Me.Hide()
End Sub

Private Sub GoodsdispatchLabel_Click(sender As Object, e As EventArgs)


Handles GoodsdispatchLabel.Click
Dim Obj = New Goods()
Obj.Show()
Me.Hide()
End Sub

Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles


PictureBox1.Click
Dim Obj = New Login()
Obj.Show()
Me.Hide()
End Sub

Page 32
Private Sub GoodsdispatchPic_Click_1(sender As Object, e As EventArgs)
Handles GoodsdispatchPic.Click
Dim Obj = New Good()
Obj.Show()
Me.Hide()
End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs)


If txtArrivaldate.Text = "" Or txtFrom.Text = "" Or txtCode.Text = "" Or
txtProductname.Text = "" Or txtQuantity.Text = "" Or txtTransportname.Text = ""
Then
MsgBox("Missing Informaton...!", MsgBoxStyle.Exclamation, "Goods
Arrival")
Else
Try
Con.Open()
Dim query = "Update WareTbl set code='" & txtArrivaldate.Text & "', '" &
txtFrom.Text & "', '" & txtCode.Text & "','" & txtProductname.Text & "', '" &
txtQuantity.Text & "','" & txtTransportname.Text & "' where No=" & Key & ""
Dim cmd As SqlCommand
cmd = New SqlCommand(query, Con)
cmd.ExecuteNonQuery()
MsgBox("Warehouse Updated Successfully", MsgBoxStyle.Information,
"Goods Arrival")
DisplayGood()
Reset()
Con.Close()
Catch ex As Exception

End Try
End If
End Sub
Dim Key = 0

Page 33
Private Sub GoodsDGV_CellContentClick(sender As Object, e As
DataGridViewCellEventArgs) Handles WareDGV.CellContentClick
Dim row As DataGridViewRow = WareDGV.Rows(e.RowIndex)
txtArrivaldate.Text = row.Cells(1).Value.ToString
txtFrom.Text = row.Cells(2).Value.ToString
txtCode.Text = row.Cells(3).Value.ToString
txtProductname.Text = row.Cells(4).Value.ToString
txtQuantity.Text = row.Cells(5).Value.ToString
txtTransportname.Text = row.Cells(6).Value.ToString
If txtCode.Text = "" Then
Key = 0
Else
Key = Convert.ToInt32(row.Cells(0).Value.ToString)
End If
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles


Button2.Click
If Key = 0 Then
MsgBox("Please Select the Goods Arrival to delete",
MsgBoxStyle.Exclamation, "Goods Arrival")
ElseIf txtArrivaldate.Text = "" Or txtFrom.Text = "" Or txtCode.Text = "" Or
txtProductname.Text = "" Or txtQuantity.Text = "" Or txtTransportname.Text = ""
Then
MsgBox("Missing Informaton...!", MsgBoxStyle.Exclamation, "Goods
Arrival")
Else
Try
Con.Open()
Dim query = "delete From WareTbl where No=" & Key & ""
Dim cmd As SqlCommand
cmd = New SqlCommand(query, Con)
cmd.ExecuteNonQuery()

Page 34
MsgBox("Goods Arrival Deleted Successfully", MsgBoxStyle.Information,
"Goods Arrival")
Con.Close()
DisplayGood()
Reset()
Catch ex As Exception

End Try
End If
End Sub

Private Sub PictureBox4_Click(sender As Object, e As EventArgs) Handles


PictureBox4.Click
Dim Obj = New Dashboard()
Obj.Show()
Me.Hide()
End Sub

Private Sub Label8_Click(sender As Object, e As EventArgs) Handles


Label8.Click
Dim Obj = New Dashboard()
Obj.Show()
Me.Hide()
End Sub

Private Sub txtArrivaldate_KeyDown(sender As Object, e As KeyEventArgs)


Handles txtFrom.KeyDown, txtCode.KeyDown, txtProductname.KeyDown,
txtQuantity.KeyDown, txtTransportname.KeyDown
If e.KeyCode = Keys.Enter Then
SendKeys.Send("{tab}")

Else
Exit Sub
End If

Page 35
e.SuppressKeyPress = True
End Sub

Private Sub Panel5_Paint(sender As Object, e As PaintEventArgs) Handles


Panel5.Paint

End Sub

Private Sub btnsearch_Click(sender As Object, e As EventArgs) Handles


btnsearch.Click
If txtsearch.Text = "" Then
MsgBox("Missing Informaton...!", MsgBoxStyle.Exclamation, "Goods
Arrival")
Else
Try
Con.open()
Dim pid As Integer = txtsearch.Text
Dim command As New SqlCommand("Select * from WareTbl where
Code='" & pid & "'", Con)
Dim adapter As SqlDataAdapter
adapter = New SqlDataAdapter(command)
Dim dt As New DataTable
adapter.Fill(dt)
WareDGV.DataSource = dt
Con.close
Catch ex As Exception
End Try
End If
End Sub
Private Sub txtSearch_KeyDown(sender As Object, e As KeyEventArgs) Handles
txtsearch.KeyDown, btnsearch.KeyDown
If e.KeyCode = Keys.Enter Then
SendKeys.Send("{tab}")

Page 36
Else
Exit Sub
End If
e.SuppressKeyPress = True

End Sub
End Class

CREATE TABLE [dbo].[WareTbl]


(
[No] INT NOT NULL PRIMARY KEY IDENTITY,
[Arrival date] DATE NOT NULL,
[From] VARCHAR(100) NOT NULL,
[Code] INT NOT NULL,
[Product name] VARCHAR(100) NOT NULL,
[Quantity] INT NOT NULL,

Page 37
[Transport mode] VARCHAR(100) NOT NULL
)

4.Goods dispatch

Imports System.Data.SqlClient
Public Class Goods
Dim Con = New SqlConnection("Data
Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\prakash\Documen
ts\Visual Studio 2015\Projects\logistics management\logistics
management\LMSD.mdf;Integrated Security=True")
Private Sub DisplayGoods()
Con.Open()
Dim query = "Select * from GoodsdispatchTbl"
Dim adapter As SqlDataAdapter
Dim cmd = New SqlCommand(query, Con)

Page 38
adapter = New SqlDataAdapter(cmd)
Dim builder = New SqlCommandBuilder(adapter)
Dim ds As DataSet
ds = New DataSet
adapter.Fill(ds)
GoodsdispatchDGV.DataSource = ds.Tables(0)
Con.Close()
End Sub
Private Sub Goods_Load(sender As Object, e As EventArgs) Handles
MyBase.Load
DisplayGoods()
End Sub

Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles


PictureBox2.Click
Application.Exit()
End Sub

Private Sub btnOk_Click(sender As Object, e As EventArgs) Handles btnOk.Click


For r As Integer = 0 To GoodsdispatchDGV.Rows.Count - 1
Try
If txtCode.Text = GoodsdispatchDGV.Rows(r).Cells(3).Value.ToString()
Then
MsgBox("Code Already Exists", MsgBoxStyle.Exclamation, "Goods
Dispatch")

Return

End If
Catch ex As Exception
End Try
Next

Page 39
If txtDispatchdate.Text = "" Or txtTo.Text = "" Or txtCode.Text = "" Or
txtProductname.Text = "" Or txtQuantity.Text = "" Or txtTransportname.Text = ""
Then
MsgBox("Missing Information ...!", MsgBoxStyle.Exclamation, "Goods
Dispatch")
Else
Try
Con.Open()
Dim query = "insert into GoodsdispatchTbl values('" &
txtDispatchdate.Text & "', '" & txtTo.Text & "', '" & txtCode.Text & "','" &
txtProductname.Text & "', '" & txtQuantity.Text & "','" & txtTransportname.Text &
"')"
Dim cmd As SqlCommand
cmd = New SqlCommand(query, Con)
cmd.ExecuteNonQuery()
MsgBox("Goods Dispatch Added Successfully", MsgBoxStyle.Information,
"Goods Dispatch")
DisplayGoods()
Reset()
Con.Close()
Catch ex As Exception

End Try
End If
End Sub

Private Sub WarehousePic_Click(sender As Object, e As EventArgs) Handles


WarehousePic.Click
Dim Obj = New Departments()
Obj.Show()
Me.Hide()
End Sub

Page 40
Private Sub WarehouseLable_Click(sender As Object, e As EventArgs) Handles
WarehouseLable.Click
Dim Obj = New Departments()
Obj.Show()
Me.Hide()
End Sub

Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles


PictureBox1.Click
Dim Obj = New Login()
Obj.Show()
Me.Hide()
End Sub

Private Sub Goodsarrivalpic_Click(sender As Object, e As EventArgs) Handles


Goodsarrivalpic.Click
Dim Obj = New Good()
Obj.Show()
Me.Hide()
End Sub

Private Sub GoodsarrivalLabel_Click(sender As Object, e As EventArgs) Handles


GoodsarrivalLabel.Click
Dim Obj = New Good()
Obj.Show()
Me.Hide()
End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs)


If txtDispatchdate.Text = "" Or txtTo.Text = "" Or txtCode.Text = "" Or
txtProductname.Text = "" Or txtQuantity.Text = "" Or txtTransportname.Text = ""
Then
MsgBox("Missing Informaton...!", MsgBoxStyle.Exclamation, "Goods
Dispatch")

Page 41
Else
Try
Con.Open()
Dim query = "Update GoodsdispatchTbl set code='" & txtDispatchdate.Text
& "', '" & txtTo.Text & "', '" & txtCode.Text & "','" & txtProductname.Text & "', '" &
txtQuantity.Text & "','" & txtQuantity.Text & "','" & txtTransportname.Text & "'
where No=" & Key & ""
Dim cmd As SqlCommand
cmd = New SqlCommand(query, Con)
cmd.ExecuteNonQuery()
MsgBox("Goods Dispatch Updated Successfully",
MsgBoxStyle.Information, "Goods Dispatch")
DisplayGoods()
Reset()
Con.Close()
Catch ex As Exception

End Try
End If
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles


Button1.Click
txtDispatchdate.Text = ""
txtTo.Text = ""
txtCode.Text = ""
txtProductname.Text = ""
txtQuantity.Text = ""
txtTransportname.Text = ""
End Sub
Dim Key = 0
Private Sub GoodsdispatchDGV_CellContentClick(sender As Object, e As
DataGridViewCellEventArgs) Handles GoodsdispatchDGV.CellContentClick
Dim row As DataGridViewRow = GoodsdispatchDGV.Rows(e.RowIndex)

Page 42
txtDispatchdate.Text = row.Cells(1).Value.ToString
txtTo.Text = row.Cells(2).Value.ToString
txtCode.Text = row.Cells(3).Value.ToString
txtProductname.Text = row.Cells(4).Value.ToString
txtQuantity.Text = row.Cells(5).Value.ToString
txtTransportname.Text = row.Cells(6).Value.ToString
If txtCode.Text = "" Then
Key = 0
Else
Key = Convert.ToInt32(row.Cells(0).Value.ToString)
End If
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles


Button2.Click
If Key = 0 Then
MsgBox("Please Select the Goods Dispatch to delete",
MsgBoxStyle.Exclamation, "Goods Dispatch")

ElseIf txtDispatchdate.Text = "" Or txtTo.Text = "" Or txtCode.Text = "" Or


txtProductname.Text = "" Or txtQuantity.Text = "" Or txtTransportname.Text = ""
Then
MsgBox("Missing Informaton...!", MsgBoxStyle.Exclamation, "Goods
Dispatch")
Else
Try
Con.Open()
Dim query = "delete From GoodsdispatchTbl where No=" & Key & ""
Dim cmd As SqlCommand
cmd = New SqlCommand(query, Con)
cmd.ExecuteNonQuery()
MsgBox("Goods Dispatch Deleted Successfully",
MsgBoxStyle.Information, "Goods Dispatch")
Con.Close()

Page 43
DisplayGoods()
Reset()
Catch ex As Exception

End Try
End If
End Sub

Private Sub Panel1_Paint(sender As Object, e As PaintEventArgs) Handles


Panel1.Paint

End Sub

Private Sub PictureBox4_Click(sender As Object, e As EventArgs) Handles


PictureBox4.Click
Dim Obj = New Dashboard()
Obj.Show()
Me.Hide()
End Sub

Private Sub Label10_Click(sender As Object, e As EventArgs) Handles


Label10.Click
Dim Obj = New Dashboard()
Obj.Show()
Me.Hide()
End Sub

Private Sub txtDispatchdate_KeyDown(sender As Object, e As KeyEventArgs)


Handles txtTo.KeyDown, txtCode.KeyDown, txtProductname.KeyDown,
txtQuantity.KeyDown, txtTransportname.KeyDown
If e.KeyCode = Keys.Enter Then
SendKeys.Send("{tab}")

Else

Page 44
Exit Sub
End If
e.SuppressKeyPress = True
End Sub

Private Sub btnsearch_Click(sender As Object, e As EventArgs) Handles


btnsearch.Click
If txtsearch.Text = "" Then
MsgBox("Missing Informaton...!", MsgBoxStyle.Exclamation, "Goods
Dispatch")
Else
Try
Con.open()
Dim pid As Integer = txtsearch.Text
Dim command As New SqlCommand("Select * from GoodsdispatchTbl
where Code='" & pid & "'", Con)
Dim adapter As SqlDataAdapter
adapter = New SqlDataAdapter(command)
Dim dt As New DataTable
adapter.Fill(dt)
GoodsdispatchDGV.DataSource = dt
Con.close
Catch ex As Exception
End Try
End If
End Sub
Private Sub txtSearch_KeyDown(sender As Object, e As KeyEventArgs) Handles
txtsearch.KeyDown, btnsearch.KeyDown
If e.KeyCode = Keys.Enter Then
SendKeys.Send("{tab}")

Else
Exit Sub
End If

Page 45
e.SuppressKeyPress = True

End Sub
End Class

CREATE TABLE [dbo].[GoodsdispatchTbl]


(
[No] INT NOT NULL PRIMARY KEY IDENTITY,
[Dispatch date] DATE NOT NULL,
[To] VARCHAR(100) NOT NULL,
[Code] INT NOT NULL,
[Product name] VARCHAR(100) NOT NULL,
[Quantity] INT NOT NULL,
[Transport name] VARCHAR(100) NOT NULL
)

Page 46
Dashboard

Imports System.Data.SqlClient
Public Class Dashboard
Dim Con = New SqlConnection("Data
Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\prakash\Documen
ts\Visual Studio 2015\Projects\logistics management\logistics
management\LMSD.mdf;Integrated Security=True")
Private Sub CountWarehouse()
Dim TNum As Integer
Con.Open()
Dim sql = "Select COUNT(*) from WarehouseTbl "
Dim cmd As SqlCommand
cmd = New SqlCommand(sql, Con)
TNum = cmd.ExecuteScalar
NOW.Text = TNum
Con.Close
End Sub

Page 47
Private Sub CountGoodsArrival()
Dim TNum As Integer
Con.Open()
Dim sql = "Select COUNT(*) from WareTbl "
Dim cmd As SqlCommand
cmd = New SqlCommand(sql, Con)
TNum = cmd.ExecuteScalar
NOA.Text = TNum
Con.Close
End Sub
Private Sub CountGoodsdispatch()
Dim TNum As Integer
Con.Open()
Dim sql = "Select COUNT(*) from GoodsdispatchTbl "
Dim cmd As SqlCommand
cmd = New SqlCommand(sql, Con)
TNum = cmd.ExecuteScalar
NOD.Text = TNum
Con.Close
End Sub
Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles
PictureBox2.Click
Application.Exit()
End Sub

Private Sub WarehousePic_Click(sender As Object, e As EventArgs) Handles


WarehousePic.Click
Dim Obj = New Departments()
Obj.Show()
Me.Hide()
End Sub

Private Sub WarehouseLable_Click(sender As Object, e As EventArgs) Handles


WarehouseLable.Click
Dim Obj = New Departments()
Obj.Show()
Me.Hide()
End Sub

Private Sub Goodsarrivalpic_Click(sender As Object, e As EventArgs) Handles


Goodsarrivalpic.Click
Dim Obj = New Good()
Obj.Show()
Me.Hide()
End Sub

Private Sub GoodsarrivalLabel_Click(sender As Object, e As EventArgs) Handles


GoodsarrivalLabel.Click
Dim Obj = New Good()
Obj.Show()

Page 48
Me.Hide()
End Sub

Private Sub GoodsdispatchPic_Click(sender As Object, e As EventArgs) Handles


GoodsdispatchPic.Click
Dim Obj = New Goods()
Obj.Show()
Me.Hide()
End Sub

Private Sub GoodsdispatchLabel_Click(sender As Object, e As EventArgs)


Handles GoodsdispatchLabel.Click
Dim Obj = New Goods()
Obj.Show()
Me.Hide()
End Sub

Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles


PictureBox1.Click
Dim Obj = New Login()
Obj.Show()
Me.Hide()
End Sub

Private Sub Panel6_Paint(sender As Object, e As PaintEventArgs) Handles


Warehouse.Paint

End Sub

Private Sub Dashboard_Load(sender As Object, e As EventArgs) Handles


MyBase.Load
CountWarehouse()
CountGoodsArrival()
CountGoodsdispatch()
End Sub

Private Sub GoodsArrival_Paint(sender As Object, e As PaintEventArgs) Handles


GoodsArrival.Paint
End Sub
End Class

Page 49
Page 50

You might also like