You are on page 1of 48

Project Title Inventory management System

Submitted By 1. Amol Kapsikar 2. Ganesh Khakal Guided By Prof.Miss.Minal Shingare Dr. Babasaheb Ambedkar Marathwada University Aurangabad (M.S.) 60 66

Department of Computer Science and Engineering Marathwada Institute of Technology, Aurangabad (2010)

CERTIFICATE
This is to certify that the Project Report entitled Inventory management System, submitted by Amol Kapsikar, Ganesh Khakal is the bonafied work completed in the partial fulfillment for the award of Bachelor of Engineering (Computer Science & Engineering.) Place: Aurangabad Date: 17-4-2010

Prof. Miss.Minal Shingare Guide

Prof. K. V.Bhosale Head of Department (CSE)

Dr. P. A. Deshmukh Principal Marathawada Institute of Technology, Aurangabad (M.S.)-431 005

CONTENTS

1. Title 2. Objective 3. Abstract 3.1 Keywords 4. Functional Components 4.1 Assumptions 5. Requirements 6. Requirements Specification (RS)

4. 4.

4.

4. 5. 6. 7. 9. 9.

7. Mile stones & Timelines 8. High Level/Detailed Design (HLD/DD) 8.1 Overview of the website

9. Design Components 9.1 User-verification 9.2 Customer Registration 9.3 Stock Information 9.4 Supplier Information 9.5 Shop Information 10. Design & Coding 11. Test-Plan (TP) 12. Acknowledgement 13. 14. Conclusion Reference 45. 46. 47. 12. 44. 10. 11. 11. 11.

Title of the project Inventory Management System Abstract of the project This project is regarding to managing the inventory on website which is useful for stock Management. Inventory Management is nothing but record management of stock where the shop owner can maintain the stock details, supplier details, shop details, bill details etc . it fulfills the need of inventory management. For using the Inventory management system one have to fill the supplier details shop details and then item details for carrying his transaction. While generating the bills for the items purchased the availability of the stock is checked and generates the necessary message as required. This website finally gives the many of the details in tabular form. This is very easy to handle the interface provided is user friendly. One can easily use it. This website runs on multiple terminals, offers a GUI interface to its users and connects to a common database (MS SQL SERVER). It provides strong database for efficient and faster data storage. Keywords Generic Technology keywords Databases, GUI, Online. Specific Technology keywords SQL SERVER 2005, Visual Studio 2005 Project type keywords Analysis, Design, Implementation, Testing, User Interface

Functional components of the project 1. Shop owner can access Access to the database through login form separately provided on the website through link. see the status of the Stock , i.e., whether a particular item is available or not etc Can make search for the customer details to keep track Can easily cancel the transaction . Can delete the unwanted transaction.

Steps to start-off the project The following steps will be helpful to start off the project. 1. Study and be comfortable with technologies such as Visual Studio 2005, Sql server 2005 etc. Some links to these technologies are given in the Guidelines and References section of this document 2. Make a database of information of Customer, supplier, stock of the shop. 3. Make a list of Customer who fill up registration form. 4. Create the front-page of the system giving a brief description about the website and a login box Requirements Hardware requirements Number Description Alternatives (If available) 1 PC with 80 GB hard-disk Not-Applicable and 1GB RAM Software requirements Number Description Alternatives (If available) 1 Windows XP with MS- Not Applicable office 2 SQL SERVER 2005 Not Applicable Manpower requirements 2 students can complete this in 50 days if they work fulltime on it.

Requirements Specification (RS) No. Requirement Essential or Desirable Essential Desirable Description of the Requirement A login box should appear when the website is invoked. Help about the various features of the system should be provided in sufficient detail in a Q&A format. This feature will improve the robustness of the website. Remarks The logins are assigned by the DBA. In addition to the features of the system, Tabular data is also provided Since the website is going to be used only by the customers If he has account This is a basic requirement which is needed for searching, selling etc.

RS1 The website should have a login RS2 The website should have help screens

RS3 The website should not allow further processing the password donot matched.

Desirable

RS4 The site should be able to produce a unique id For each Transaction.

Essential

The customer should get unique id for a property

Milestones and Timelines Number Milestone Name Milestone Description Timeline Remarks

Week no. from the start of the project Requirements Complete specification 1-2 Attempt should be made to Specification of the system (with add some more relevant appropriate functionalities other than assumptions) including those that are listed in this the database design document. (for storing the items details). A document And, attempt should be made detailing the same to present an overall view of should be written and a the system which makes presentation on that be sense for the users of the made. system. Technology Understanding of the 3-4 The presentation should be familiarization technology needed to from the point of view of implement the project. being able to apply it to the project, rather than from a theoretical perspective. High-level and Listing down all 5-7 The scenarios should map to Detailed possible scenarios (like the requirement specification Design searching for an item, (ie, for each requirement that producing a bill, is specified, a corresponding cancelling a bill, scenario should be there). notifying about items that are out of stock, adding a new user, adding a new item etc) and then coming up with flow-charts or pseudocode to handle the scenario. Implementation Implementation of the 7-9 During this milestone period, of the front-end main screen giving the it would be a good idea for of the system login, screen that the team (or one person from follows the login the team) to start working on giving various options, a test-plan for the entire screens for customer system. This test-plan can be and the administrator updated as and when new for the various scenarios come to mind. functions etc. The test scenarios can be grouped under the respective user who would be associated 7

with it (producing a bill, for example, can be grouped under sales persons test cases) 5 Integrating the The front-end 10-12 front-end with developed in the the database earlier milestone will now be able to update the website database. Other features like report generation etc should be functional at this stage. In short, the system should be ready for integration testing. Integration The system should be 13-14 Testing thoroughly tested by running all the test cases written for the system (from milestone 5). Final Review Issues found during 15-16 the previous milestone are fixed and the system is ready for the final review.

Another 2 weeks should be there to handle any issues found during testing of the system. After that, the final demo can be arranged. During the final review of the project, it should be checked that all the requirements specified during milestone number 1 are fulfilled (or appropriate reasons given for not fulfilling the same)

High Level/Detailed Design (HLD/DD) Overview of the system 8

Database Used: MS-SQL SERVER-2005 SQL server provides various tools that are used for different purposes, such as storing information in tables, updating & deleting &also retrieving information from table. SQL server provides the following features: Variety of user interfaces Physical data independence Logical data independence Query optimization Data integrity Concurrency control Backup and recovery Database security

Databases Fields Specification A database to store the details about the Inventory should be designed. A unique code should be given for each transaction . This will be the key of the database. A database to store the customers user name should be there. The key for this database is the user name. This database will have the user details like his encrypted password. Some example fields and the range of valid values for those fields for the placement consultancy database are given below. These need not be taken as such. They can be modified by the team

No.

Field Name

Range of valid values for 9

Remarks

1 2 3 4 5 6 7

the field property Id Any valid number (say, 00001 to 99999) Name of the Up to 25 characters in Property length. Phone number Any numeric code with a of customer maximum of 12digit number Gender Customer Up to 25 characters in name length. Address Any alphanumeric code with a maximum of 150 characters E-mail id Up to 25 characters in length.Standard e-mail format.

This is the key field of the database. If a name exceeds 25 characters, the first 25 characters are taken It should be with proper STD code. Select any 1 radio button. Name should not be having more characters. If a name exceeds 150 characters, the first 150 characters are taken If a name exceeds 25 characters, the first 25 characters are taken

Design Components Component one User-verification Purpose This component will verify if the user who is trying to access the website is a valid user. Flowchart

Component two 10

Customer registration. Purpose This component is used to get information of Customer. Component three Stock Information Purpose This component is used to select information of Stock. Component four Supplier Information Purpose This component is used to see Supplier details. Component five Shop Information Purpose This component is used to see shop details

Flowchart

Placed it

Yes

Item

Entry

Id assigned

Exit
No

Design and coding


11

Splash Screen Coding


Partial Class inv Inherits System.Web.UI.Page Protected Sub cmdnext_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdnext.Click Response.Redirect("login.aspx") End Sub End Class

Splash Screen GUI

Login Form Coding


12

Imports System.Data.SqlClient Partial Class login Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim con As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True") con.Open() Dim cmb As New SqlCommand("select * from login where username='" & txtusernm.Text & "' and password='" & txtpass.Text & "'", con) Dim dr As SqlDataReader dr = cmb.ExecuteReader If dr.Read Then Response.Redirect("menu.aspx", False) End If If dr.Read Then Label4.Visible = True Label4.Text = "Invalid user name or pasword" End If txtusernm.Text = "" dr.Close() con.Close() txtpass.Text = "" End Sub End Class

Login Form GUI


13

Menu Form Coding


14

Partial Class Menu Inherits System.Web.UI.Page Protected Sub cmdcust_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdcust.Click Response.Redirect("customerdetail.aspx") End Sub Protected Sub cmditem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmditem.Click Response.Redirect("itemdetail.aspx") End Sub Protected Sub cmdsupplier_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdsupplier.Click Response.Redirect("supplier.aspx") End Sub Protected Sub cmdshop_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdshop.Click Response.Redirect("shop.aspx") End Sub Protected Sub cmdbill_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdbill.Click Response.Redirect("bill.aspx") End Sub Protected Sub cmdexit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdexit.Click Response.Close() End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub End Class

Menu Form Gui


15

Item Entry Form Coding


16

Partial Class _Default Inherits System.Web.UI.Page Dim con As New Data.SqlClient.SqlConnection Dim cmd As New Data.SqlClient.SqlCommand 'Dim count As Integer Dim sql As String

Protected Sub cmdnew_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdnew.Click Dim con As New Data.SqlClient.SqlConnection Dim cmd As New Data.SqlClient.SqlCommand txtitemcode.Visible = True cmbitemcode.Visible = False cmdadd.Visible = True cmdnext.Visible = False txtitemcode.Text = " " txtitemnm.Text = " " txtpurrate.Text = "" txtsaleprice.Text = " " txtstock.Text = " " End Sub Protected Sub cmdadd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdadd.Click txtitemcode.Visible = True cmbitemcode.Visible = False Dim con As New Data.SqlClient.SqlConnection Dim cmd As New Data.SqlClient.SqlCommand Dim sql As String sql = "insert into invitem(itemcode,itemname,purrate,saleprice,stock)values(" + txtitemcode.Text + ",'" + txtitemnm.Text + "'," + txtpurrate.Text + "," + txtsaleprice.Text + "," + txtstock.Text + ")" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql cmd.ExecuteNonQuery() MsgBox("data added sucessfully", MsgBoxStyle.Information) End Sub Protected Sub cmdupdate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdupdate.Click Dim con As New Data.SqlClient.SqlConnection Dim cmd As New Data.SqlClient.SqlCommand Dim sql As String

17

sql = "update invitem set itemname='" + txtitemnm.Text + "',purrate=" + txtpurrate.Text + ",saleprice=" + txtsaleprice.Text + ",stock=" + txtstock.Text + " where itemcode=" + cmbitemcode.SelectedValue + "" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql cmd.ExecuteNonQuery() End Sub Protected Sub cmddel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmddel.Click " sql = "delete from invitem where itemcode=" + cmbitemcode.SelectedValue + "

con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql cmd.ExecuteNonQuery() con.Close() End Sub Protected Sub cmdmenu_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdmenu.Click Response.Redirect("menu.aspx") End Sub Protected Sub cmdview_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdview.Click Response.Redirect("item1.aspx") End Sub Protected Sub cmdnext_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdnext.Click Dim Dim Dim Dim sql con As New Data.SqlClient.SqlConnection cmd As New Data.SqlClient.SqlCommand sql As String r3 As Data.SqlClient.SqlDataReader = "select * from invitem where itemcode=" + cmbitemcode.SelectedValue +

""

con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open()

18

cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql r3 = cmd.ExecuteReader If r3.Read() Then txtitemnm.Text = r3(1).ToString txtpurrate.Text = r3(2).ToString txtsaleprice.Text = r3(3).ToString txtstock.Text = r3(4).ToString r3.Close() End If End Sub Protected Sub cmdsearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdsearch.Click Dim con As New Data.SqlClient.SqlConnection Dim cmd As New Data.SqlClient.SqlCommand Dim sql As String Dim r1 As Data.SqlClient.SqlDataReader txtitemcode.Visible = False cmbitemcode.Visible = True cmdnext.Visible = True sql = "select itemcode from invitem" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql r1 = cmd.ExecuteReader cmbitemcode.DataSource = r1 cmbitemcode.DataValueField = "itemcode" cmbitemcode.DataBind() r1.Close() End Sub End Class

19

Item Entry Form GUI

20

Item List Coding


Partial Class item1 Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim con As New Data.SqlClient.SqlConnection Dim cmd As New Data.SqlClient.SqlCommand Dim sql As String Dim r As Data.SqlClient.SqlDataReader sql = "select * from invitem" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql r = cmd.ExecuteReader dg1.DataSource = r dg1.DataBind() r.Close() con.Close() End Sub Protected Sub cmdback_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdback.Click Response.Redirect("itemdetail.aspx") End Sub End Class

21

Item List Form GUI

22

Customer detils Entry Form


Partial Class customerdetail Inherits System.Web.UI.Page Dim con As New Data.SqlClient.SqlConnection Dim cmd As New Data.SqlClient.SqlCommand 'Dim count As Integer Dim sql As String Protected Sub cmdadd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdadd.Click txtcustid.Visible = True cmbcustid.Visible = False sql = "insert into invcust(custid,custname,phno,address)values(" + txtcustid.Text + ",'" + txtcustnm.Text + "'," + txtphno.Text + ",'" + txtaddr.Text + "')" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql cmd.ExecuteNonQuery() MsgBox("data added sucessfully", MsgBoxStyle.Information) End Sub Protected Sub cmdnew_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdnew.Click txtcustid.Visible = True cmbcustid.Visible = False cmdadd.Visible = True cmdnext.Visible = False txtcustid.Text txtcustnm.Text txtphno.Text = txtaddr.Text = End Sub Protected Sub cmdupdate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdupdate.Click sql = "update invcust set custname='" + txtcustnm.Text + "',phno=" + txtphno.Text + ",address='" + txtaddr.Text + "' where custid=" + cmbcustid.SelectedValue + "" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql = " " = " " "" " "

23

cmd.ExecuteNonQuery() End Sub Protected Sub cmddelete_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmddelete.Click sql = "delete from invcust where custid=" + cmbcustid.SelectedValue + " " con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql cmd.ExecuteNonQuery() con.Close() End Sub Protected Sub cmdview_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdview.Click Response.Redirect("cust1.aspx") End Sub Protected Sub cmdmenu_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdmenu.Click Response.Redirect("menu.aspx") End Sub Protected Sub cmdsearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdsearch.Click Dim r1 As Data.SqlClient.SqlDataReader txtcustid.Visible = False cmbcustid.Visible = True sql = "select custid from invcust" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql r1 = cmd.ExecuteReader cmbcustid.DataSource = r1 cmbcustid.DataValueField = "custid" cmbcustid.DataBind() r1.Close() End Sub Protected Sub cmdnext_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdnext.Click

24

Dim r3 As Data.SqlClient.SqlDataReader sql = "select * from invcust where custid=" + cmbcustid.SelectedValue + "" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql r3 = cmd.ExecuteReader If r3.Read() Then txtcustnm.Text = r3(1).ToString txtphno.Text = r3(2).ToString txtaddr.Text = r3(3).ToString r3.Close() End If End Sub End Class

Customer detils Entry Form GUI

25

Customer List Form Coding


Partial Class cust1 Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 'Put user code to initialize the page here Dim con As New Data.SqlClient.SqlConnection Dim cmd As New Data.SqlClient.SqlCommand Dim sql As String Dim r As Data.SqlClient.SqlDataReader sql = "select * from invcust" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql r = cmd.ExecuteReader dg1.DataSource = r dg1.DataBind() r.Close() End Sub Protected Sub cmdback_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdback.Click Response.Redirect("customerdetail.aspx") End Sub End Class

26

Customer List Form GUI

27

Supplier Details Form Coding


Partial Class Supplier Inherits System.Web.UI.Page Dim con As New Data.SqlClient.SqlConnection Dim cmd As New Data.SqlClient.SqlCommand 'Dim count As Integer Dim sql As String Protected Sub cmdadd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdadd.Click txtsuppid.Visible = True cmbsuppid.Visible = False con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" sql = "insert into invsupp(suppid,suppname,address,phno,itemname,itemcode)values(" + txtsuppid.Text + ",'" + txtsuppnm.Text + "','" + txtaddr.Text + "'," + txtphno.Text + ",'" + cmbitemnm.SelectedValue + "'," + txtitemcode.Text + ")" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql cmd.ExecuteNonQuery() MsgBox("data added sucessfully", MsgBoxStyle.Information) End Sub Protected Sub cmdnew_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdnew.Click txtsuppid.Visible = True cmbsuppid.Visible = False cmdadd.Visible = True cmdnext.Visible = False txtsuppid.Text = " " txtsuppnm.Text = " " txtaddr.Text = "" txtphno.Text = " " txtitemcode.Text = " " End Sub Protected Sub Update_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Update.Click sql = "update invsupp set suppname='" + txtsuppnm.Text + "',address='" + txtaddr.Text + "',phno=" + txtphno.Text + ",itemname='" + cmbitemnm.SelectedValue + "',itemcode=" + txtitemcode.Text + " where suppid=" + cmbsuppid.SelectedValue + "" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text

28

cmd.CommandText = sql cmd.ExecuteNonQuery() End Sub Protected Sub cmddel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmddel.Click sql = "delete from invsupp where suppid=" + cmbsuppid.SelectedValue + " " con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql cmd.ExecuteNonQuery() con.Close() End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim r1 As Data.SqlClient.SqlDataReader If Not IsPostBack Then sql = "select itemname from invitem" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql r1 = cmd.ExecuteReader cmbitemnm.DataSource = r1 cmbitemnm.DataValueField = "itemname" cmbitemnm.DataBind() r1.Close() End If End Sub Protected Sub cmdmenu_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdmenu.Click Response.Redirect("menu.aspx") End Sub Protected Sub cmdview_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdview.Click Response.Redirect("supplier1.aspx") End Sub Protected Sub cmdnext_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdnext.Click

29

Dim r3 As Data.SqlClient.SqlDataReader sql = "select * from invsupp where suppid=" + cmbsuppid.SelectedValue + "" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql r3 = cmd.ExecuteReader If r3.Read() Then txtsuppnm.Text = r3(1).ToString txtaddr.Text = r3(2).ToString txtphno.Text = r3(3).ToString txtitemcode.Text = r3(4).ToString r3.Close() End If End Sub Protected Sub cmdsearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdsearch.Click Dim r1 As Data.SqlClient.SqlDataReader txtsuppid.Visible = False cmbsuppid.Visible = True cmdnext.Visible = True sql = "select suppid from invsupp" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql r1 = cmd.ExecuteReader cmbsuppid.DataSource = r1 cmbsuppid.DataValueField = "suppid" cmbsuppid.DataBind() r1.Close() End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim r2 As Data.SqlClient.SqlDataReader sql = "select itemcode from invitem where itemname='" + cmbitemnm.SelectedValue + "'" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql r2 = cmd.ExecuteReader

30

If r2.Read() Then txtitemcode.Text = r2(0).ToString r2.Close() End If End Sub End Class

Supplier Details Form GUI

31

Supplier List Form Coding


Partial Class Supplier1 Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim con As New Data.SqlClient.SqlConnection Dim cmd As New Data.SqlClient.SqlCommand Dim sql As String Dim r As Data.SqlClient.SqlDataReader sql = "select * from invsupp" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql r = cmd.ExecuteReader dg1.DataSource = r dg1.DataBind() r.Close() con.Close() End Sub Protected Sub cmdback_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdback.Click Response.Redirect("supplier.aspx") End Sub End Class

32

Supplier List Form GUI

33

Shop Details Entry Form Coding


Partial Class shop Inherits System.Web.UI.Page Dim con As New Data.SqlClient.SqlConnection Dim cmd As New Data.SqlClient.SqlCommand 'Dim count As Integer Dim sql As String Protected Sub cmdadd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdadd.Click TextBox1.Visible = True cmbshopid.Visible = False sql = "insert into invshop(shopname,address,phno,website,shopid)values('" + txtshopnm.Text + "','" + txtaddr.Text + "'," + txtphno.Text + ",'" + txtweb.Text + "'," + TextBox1.Text + ")" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql cmd.ExecuteNonQuery() MsgBox("data added sucessfully", MsgBoxStyle.Information) End Sub Protected Sub cmdnew_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdnew.Click TextBox1.Visible = True cmbshopid.Visible = False cmdadd.Visible = True cmdnext.Visible = False TextBox1.Text = "" txtshopnm.Text = " " txtaddr.Text = " " txtphno.Text = "" txtweb.Text = " " End Sub Protected Sub cmdupdate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdupdate.Click sql = "update invshop set shopname='" + txtshopnm.Text + "',address='" + txtaddr.Text + "',phno=" + txtphno.Text + ",website='" + txtweb.Text + "' where shopid='" + cmbshopid.SelectedValue + "'" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql cmd.ExecuteNonQuery() End Sub

34

Protected Sub cmddel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmddel.Click sql = "delete from invshop where shopid='" + cmbshopid.SelectedValue + "'" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql cmd.ExecuteNonQuery() con.Close() End Sub Protected Sub txtmenu_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtmenu.Click Response.Redirect("menu.aspx") End Sub Protected Sub cmdview_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdview.Click Response.Redirect("shop1.aspx") End Sub Protected Sub cmdsearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdsearch.Click Dim r1 As Data.SqlClient.SqlDataReader TextBox1.Visible = False cmbshopid.Visible = True cmdnext.Visible = True sql = "select shopid from invshop" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql r1 = cmd.ExecuteReader cmbshopid.DataSource = r1 cmbshopid.DataValueField = "shopid" cmbshopid.DataBind() r1.Close() End Sub Protected Sub cmdnext_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdnext.Click Dim r3 As Data.SqlClient.SqlDataReader sql = "select * from invshop where shopid='" + cmbshopid.SelectedValue +

"'"

con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql r3 = cmd.ExecuteReader

35

If r3.Read() Then txtshopnm.Text = r3(0).ToString txtaddr.Text = r3(1).ToString txtphno.Text = r3(2).ToString txtweb.Text = r3(3).ToString r3.Close() End If End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub End Class

Shop Details Entry Form GUI

36

Shop Details List Form Coding


Partial Class shop1 Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim con As New Data.SqlClient.SqlConnection Dim cmd As New Data.SqlClient.SqlCommand Dim sql As String Dim r As Data.SqlClient.SqlDataReader 'Put user code to initialize the page here sql = "select * from invshop" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql r = cmd.ExecuteReader dg1.DataSource = r dg1.DataBind() r.Close() con.Close() End Sub Protected Sub cmsback_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmsback.Click Response.Redirect("shop.aspx") End Sub End Class

37

Shop Details List Form GUI

Bill Details Entry Form Coding


Partial Class bill Inherits System.Web.UI.Page Dim con As New Data.SqlClient.SqlConnection Dim cmd As New Data.SqlClient.SqlCommand Dim cmd2 As New Data.SqlClient.SqlCommand Dim con2 As New Data.SqlClient.SqlConnection 'Dim count As Integer Dim sql, sql2, qty As String Protected Sub cmdadd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdadd.Click txtbillcode.Visible = True cmbbillcode.Visible = False con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My

38

Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" sql = "insert into invbill(billcode,itemname,purrate,itemcode,qnty,billamt,billdate)values(" + txtbillcode.Text + ",'" + cmbitemnm.SelectedValue + "'," + txtpurrate.Text + "," + txtitemcode.Text + "," + txtqnty.Text + "," + txtbillamt.Text + ",'" + txtbilldate.Text + "')" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql cmd.ExecuteNonQuery() sql2 = "Update invitem set stock= " + TextBox1.Text + " where itemcode=" + txtitemcode.Text + "" con2.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con2.Open() cmd2.Connection = con cmd2.CommandType = Data.CommandType.Text cmd2.CommandText = sql2 cmd2.ExecuteNonQuery() MsgBox("data added sucessfully", MsgBoxStyle.Information) End Sub Protected Sub cmdnew_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdnew.Click txtbillcode.Visible = True cmbbillcode.Visible = False cmdadd.Visible = True cmdnext.Visible = False txtbillcode.Text = " " txtitemcode.Text = " " txtpurrate.Text = "" txtqnty.Text = " " txtbillamt.Text = " " txtbilldate.Text = " " End Sub Protected Sub cmdupdate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdupdate.Click sql = "update invbill set purrate=" + txtpurrate.Text + ",itemcode=" + txtitemcode.Text + ",qnty=" + txtqnty.Text + ",billamt=" + txtbillamt.Text + ",billdate='" + txtbilldate.Text + "' where billcode=" + cmbbillcode.SelectedValue + "" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql cmd.ExecuteNonQuery() End Sub Protected Sub cmddel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmddel.Click

39

"

sql = "delete from invbill where billcode=" + cmbbillcode.SelectedValue + "

con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql cmd.ExecuteNonQuery() con.Close() End Sub Protected Sub cmdmenu_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdmenu.Click Response.Redirect("menu.aspx") End Sub Protected Sub cmdview_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdview.Click Response.Redirect("bill1.aspx") End Sub Protected Sub cmdsearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdsearch.Click Dim r1 As Data.SqlClient.SqlDataReader txtbillcode.Visible = False cmbbillcode.Visible = True cmdnext.Visible = True sql = "select billcode from invbill" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql r1 = cmd.ExecuteReader cmbbillcode.DataSource = r1 cmbbillcode.DataValueField = "billcode" cmbbillcode.DataBind() r1.Close() End Sub Protected Sub cmdnext_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdnext.Click Dim r3 As Data.SqlClient.SqlDataReader sql = "select * from invbill where billcode=" + cmbbillcode.SelectedValue + "" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql r3 = cmd.ExecuteReader If r3.Read() Then

40

txtpurrate.Text = r3(2).ToString txtitemcode.Text = r3(3).ToString txtqnty.Text = r3(4).ToString txtbillamt.Text = r3(5).ToString txtbilldate.Text = r3(6).ToString r3.Close() End If End Sub Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click Dim r2 As Data.SqlClient.SqlDataReader sql = "select * from invitem where itemname='" + cmbitemnm.SelectedValue +

"'"

con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql r2 = cmd.ExecuteReader If r2.Read() Then txtitemcode.Text = r2(0).ToString txtpurrate.Text = r2(3).ToString r2.Close() End If End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim r2 As Data.SqlClient.SqlDataReader sql = ("select stock from invitem where itemcode='" + txtitemcode.Text + "'") con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql r2 = cmd.ExecuteReader If r2.Read() Then TextBox1.Text = r2(0).ToString r2.Close() End If If (Val(TextBox1.Text) >= Val(txtqnty.Text)) Then txtbillamt.Text = (txtqnty.Text) * (txtpurrate.Text) TextBox1.Text = Val(TextBox1.Text) - Val(txtqnty.Text) ElseIf (Val(TextBox1.Text) <= Val(txtqnty.Text)) Then MsgBox("Stock is not Available check the stock to insert proper quantity", MsgBoxStyle.Information) End If End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

41

Dim r1 As Data.SqlClient.SqlDataReader If Not IsPostBack Then sql = "select itemname from invitem" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql r1 = cmd.ExecuteReader cmbitemnm.DataSource = r1 cmbitemnm.DataValueField = "itemname" cmbitemnm.DataBind() r1.Close() End If End Sub End Class

Bill Details Entry Form GUI

42

Bill Details List Form Coding


Partial Class bill1 Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim con As New Data.SqlClient.SqlConnection Dim cmd As New Data.SqlClient.SqlCommand Dim sql As String Dim r As Data.SqlClient.SqlDataReader sql = "select * from invbill" con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Balaji\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\inventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql r = cmd.ExecuteReader dg1.DataSource = r dg1.DataBind() r.Close() con.Close() End Sub Protected Sub cmdback_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdback.Click Response.Redirect("bill.aspx") End Sub End Class

43

Bill Details List Form GUI

44

Test-Plan (TP)

No.

Test case Title Description

Expected Outcome

Successful User Verification

The login to the website should be tried with the login assigned by the website and the correct password

Unsuccessful User Verification due to wrong password Customer get an unique id after the registration

Login should be successful and the user should enter in to the system Login to the system Login with a wrong should fail password with an error Invalid Password User can get User get unique-id. unique id after the registration.

The requirement in RS that is being tested RS1

Result

Passed

RS1

Passed

RS1

Passed

45

ACKNOWLEGEMENT
It gives a great pleasure to present our project report on Inventory System website with perform gratitude. We thanks our guide Prof. Ms. Minal Shingare Madam for her valuable & Cooperation during the entire project work. We are also thankful to our HOD Prof. K. V. Bhosale & other faculty members of CSE department. Lastly we are thankful those who are directly contributed their help in completion our project work within time.

Amol R. Kapsikar Ganesh Khakal (TE CSE)

46

CONCLUSION
`Our website gives Easier way to manage their inventory. Stock availability, Supplier details. This website includes searching of records, addition of new records.

FUTURE SCOPE
This website is designed only for owners who desire to manage their inventory records electronically. It can be re modified in future for peoples requirements.

47

References
http://www.functionx.com/sqlserver/(sql-ServerTutorial) http://www.vbtutor.net/vbtutor.html(Visual Basic Tutorial)

48

You might also like