0% found this document useful (0 votes)
67 views11 pages

VB.NET Stock Inventory Management System

Gad lecture notes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views11 pages

VB.NET Stock Inventory Management System

Gad lecture notes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Stock Inventory Management System

INTRODUCTION
A stock inventory management system using [Link] helps businesses keep track of their
inventory levels, sales, and purchases. Here's a basic introduction to such a system:

In today’s dynamic business environment, efficient management of inventory is critical for


the success of any organization. A Stock Inventory Management System developed in
[Link] offers a comprehensive solution to effectively monitor, control, and optimize
inventory levels. This system leverages the power of technology to streamline inventory
processes, enhance accuracy, and improve decision-making.

1. User Interface (UI):

- Design a user-friendly interface using [Link] forms.

- Include options for viewing, adding, updating, and deleting inventory items.

- Implement search and filter functionalities for easy navigation.

2. Database Integration:

- Utilize a database system like SQL Server or Microsoft Access to store inventory data.

- Create tables to store information such as product details, stock levels, transactions, etc.

3. Functionalities:

- Inventory Management: Allow users to add new products, update existing ones, and
remove obsolete items.

- Stock Tracking: Keep track of stock levels, including current quantity, minimum stock
levels, and reorder points.

- Sales Management: Record sales transactions, deducting sold items from the inventory.

- Reporting: Generate reports on inventory levels, sales trends, and stock movement.

- Alerts: Set up alerts for low stock levels or approaching expiry dates.

- User Authentication and Authorization: Implement login systems to control access to


different parts of the system based on user roles.

4. Error Handling:

- Implement error handling mechanisms to deal with unexpected inputs or system failures

- Provide informative error messages to guide users in resolving issues

1
[Link] Technical Campus Faculty Of Engineering & Faculty Of ManagementTalsande
(Polytechnic)
Stock Inventory Management System

Source Code

Login code:
Public Class frmlogin

Private Sub btnlogin_Click(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]
If [Link] = "program" And [Link] = "program" Then
[Link]()
Else
MsgBox("Invalid username or password ")
End If
End Sub

Private Sub Timer1_Tick(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]
If [Link] < 100 Then
[Link] = [Link] + 5
Else
[Link]()
[Link]()
[Link]()
End If
End Sub

Private Sub btnclear_Click(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]
[Link]()
[Link]()
End Sub

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


[Link]) Handles [Link]
If Asc([Link]) = 13 Then
[Link]()
End If
End Sub

Private Sub txtun_TextChanged(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]

End Sub

2
[Link] Technical Campus Faculty Of Engineering & Faculty Of ManagementTalsande
(Polytechnic)
Stock Inventory Management System

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


[Link]) Handles [Link]
If Asc([Link]) = 13 Then
[Link]()
End If
End Sub

Private Sub txtpass_TextChanged(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]

End Sub

Private Sub frmlogin_Load(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]

End Sub
End Class

3
[Link] Technical Campus Faculty Of Engineering & Faculty Of ManagementTalsande
(Polytechnic)
Stock Inventory Management System

Stock

Imports [Link]
Public Class frmstock

Dim dastockinfo As New OleDbDataAdapter


Dim dsstockinfo As New DataSet
Dim recpos As Integer
Dim Flag As Integer
Private Sub initialiseGrid()
With dgvstock
.ColumnCount = 0
.[Link]("Stock_Id", "Stock_Id")
.[Link]("Product_Name", "Product_Name")
.[Link]("Quantity", "Quantity")
.[Link]("Rate", "Rate")
.EditMode = [Link]
.[Link] = [Link]
End With
End Sub
Private Sub refreshdata()
OpenConnection()
dastockinfo = New OleDbDataAdapter("select * from Stock", Cn)
dsstockinfo = New DataSet
[Link](dsstockinfo, "Stock")
recpos = 0
[Link] = [Link](0)
[Link] = [Link]
[Link] = [Link]
CloseConnection()
End Sub
Private Sub displaydata()
disableText()
Try
[Link] = [Link](0).Rows(recpos).Item(0)
[Link] = [Link](0).Rows(recpos).Item(1)
[Link] = [Link](0).Rows(recpos).Item(2)
[Link] = [Link](0).Rows(recpos).Item(3)
Catch ex As Exception
End Try
[Link] = True
[Link] = False
[Link] = True
[Link] = True
4
[Link] Technical Campus Faculty Of Engineering & Faculty Of ManagementTalsande
(Polytechnic)
Stock Inventory Management System

[Link] = True
End Sub
Private Sub clearText()
[Link]()
[Link]()
[Link]()
[Link]()
End Sub
Private Sub EnableText()
[Link] = True
[Link] = True
[Link] = True
[Link] = True
End Sub
Private Sub disableText()
[Link] = False
[Link] = False
[Link] = False
[Link] = False
End Sub

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


[Link]) Handles [Link]
If (Asc([Link]) >= 48 And Asc([Link]) <= 57) Or (Asc([Link]) = 8) Or
(Asc([Link]) = 32) Then
ElseIf Asc([Link]) = 13 And [Link] = "" Then
[Link]()
Else
MsgBox("Enter only Numbers")
[Link] = True
End If
End Sub

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


[Link]) Handles [Link]
If ((Asc([Link]) >= 65 And Asc([Link]) <= 90) Or (Asc([Link]) >= 97 And
Asc([Link]) <= 122)) Or (Asc([Link]) = 8) Or (Asc([Link]) = 32) Then
ElseIf Asc([Link]) = 13 And [Link] = "" Then
[Link]()
Else
MsgBox("Enter only Character")
[Link] = True
End If
End Sub

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


[Link]) Handles [Link]
If (Asc([Link]) >= 48 And Asc([Link]) <= 57) Or (Asc([Link]) = 8) Then
5
[Link] Technical Campus Faculty Of Engineering & Faculty Of ManagementTalsande
(Polytechnic)
Stock Inventory Management System

ElseIf Asc([Link]) = 13 And [Link] = "" Then


[Link]()
Else
MsgBox("Enter only Numbers")
[Link] = True
End If
End Sub

Private Sub frmstock_Load(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]
disableText()
[Link] = True
[Link] = False
[Link] = True
[Link] = True
[Link] = True
refreshdata()
End Sub

Private Sub btnadd_Click(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]
Dim qry As String
If [Link] = "" Then
MsgBox("Enter Product Name")
[Link]()
Exit Sub
End If
If [Link] = "" Then
MsgBox("Enter Quantity")
[Link]()
Exit Sub
End If
If [Link] = "" Then
MsgBox("Enter Rate")
[Link]()
Exit Sub
End If

If Flag = 1 Then
qry = "insert into Stock values(" & [Link] & ",'" & [Link] & "','" &
[Link] & "','" & [Link] & "')"
SaveRecord(qry)
MsgBox("Record saved!!!!!")

6
[Link] Technical Campus Faculty Of Engineering & Faculty Of ManagementTalsande
(Polytechnic)
Stock Inventory Management System

ElseIf Flag = 2 Then


qry = "Update Stock set PNm='" & [Link] & "',Quantity='" & [Link] &
"',Rate='" & [Link] & "' where Id=" & [Link]
EditRecord(qry)
MsgBox("Record Modified !!!!")
End If
refreshdata()

disableText()
[Link] = True
[Link] = False
[Link] = True
[Link] = True
[Link] = True
End Sub

Private Sub btnnew_Click(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]
EnableText()
clearText()
Flag = 1

[Link] = AutoNumber("Select Max(Id) from Stock")


[Link] = True
[Link] = False
[Link] = False
[Link] = False
[Link] = False
[Link]()
End Sub

Private Sub btnedit_Click(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]
Flag = 2

EnableText()
[Link] = True
[Link] = False
[Link] = False
[Link] = False
[Link] = False
End Sub

7
[Link] Technical Campus Faculty Of Engineering & Faculty Of ManagementTalsande
(Polytechnic)
Stock Inventory Management System

Private Sub btndelete_Click(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]
Dim qry As String
qry = "delete from Stock where Id=" & [Link] & ""
DeleteRecord(qry)
MsgBox("Record deleted!!!")
refreshdata()
clearText()
End Sub

Private Sub btnsearch_Click(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]
Dim da As New OleDbDataAdapter
Dim ds As New DataSet
Dim id As Integer
id = Val(InputBox("Enter ID to be searched"))
If id = 0 Then
MsgBox("Enter Proper ID")
Exit Sub
End If
da = New OleDbDataAdapter("select * from Stock where Id=" & id, Cn)
[Link](ds, "Stock ")
Try
If [Link](0).[Link] > 0 Then
[Link] = id
[Link] = [Link](0).Rows(0).Item("PName")
[Link] = [Link](0).Rows(0).Item("Quantity")
[Link] = [Link](0).Rows(0).Item("Rate")
MsgBox("Record found!!!")
Else
MsgBox("Record not found!!!")
clearText()
End If
Catch ex As Exception
MsgBox("Record not found!!!")
End Try
End Sub

Private Sub btnexit_Click(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]
[Link]()
End Sub

End Class

8
[Link] Technical Campus Faculty Of Engineering & Faculty Of ManagementTalsande
(Polytechnic)
Stock Inventory Management System

9
[Link] Technical Campus Faculty Of Engineering & Faculty Of ManagementTalsande
(Polytechnic)
Stock Inventory Management System

Conclusion

In conclusion, a Stock Inventory Management System developed in [Link] is a powerful tool for
organizations seeking to optimize their inventory management processes. By leveraging advanced
technology and user-friendly interfaces, businesses can streamline operations, reduce costs, and
enhance customer satisfaction. Embracing such a system is not just a strategic decision but a competitive
necessity in today’s fast-paced business landscape.

10
[Link] Technical Campus Faculty Of Engineering & Faculty Of ManagementTalsande
(Polytechnic)
Stock Inventory Management System

REFERENCES
 [Link]
documentation-187627736

 [Link]
[Link]

 [Link]
management-System

 [Link]

 [Link]

11
[Link] Technical Campus Faculty Of Engineering & Faculty Of ManagementTalsande
(Polytechnic)

You might also like