Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
A PROJECT REPORT
ON
STUDENT MANAGEMENT SYSTEM
Submitted By
ABHILASH PREMKANT JHA
Seat No-
23rd April -2018
1|Page
INVENTORY MANAGEMENT SYSTEM
Signature of charge
2|Page
INVENTORY MANAGEMENT SYSTEM
ACKNOWLEDGEMENT
Yours Thankfully,
Ab
hilash Premkant Jha
3|Page
INVENTORY MANAGEMENT SYSTEM
PREFACE
As it is a website we have tried the level best to provide each and every
item configurable, so that the user can change according to his/her
needs.
4|Page
INVENTORY MANAGEMENT SYSTEM
TOPIC PAGE NO
1. Preliminary Investigation
1.1 System Development Lifecycle
1.2 Description and Limitation
1.3 Proposed system
1.4 Objective Of Proposed System
1.5 Scope Of Proposed System
2. System Analysis
2.1 Research Methodology
2.2 Software Requirement Specification
2.3 Requirements Of The Project
2.4 Modules In The Project
3. System Design
3.1 DFD (Data Flow Diagram)
3.1.1 DFD level 0
3.2.2 DFD level 1
3.2 Entity Relationship
3.3 Database Model Diagram
3.4 Use Case Diagram
3.5 Class Diagram
4. Database design
5. System Testing
5|Page
INVENTORY MANAGEMENT SYSTEM
5.1 Testing Of Data
5.2 Screenshot
5.3 Coding
6. Future Enhancement
7. Conclusion
8. Reference and Bibliography
INDEX
6|Page
INVENTORY MANAGEMENT SYSTEM
1. PRELIMNARY INVESTIGATION
Phases:-
Planning Phase :-
The Project Planning Phase is the second phase in the project
life cycle. It involves creating of a set of plans to help guide your
team through the execution and closure phases of the project.
The plans created during this phase will help you to manage time,
cost, quality, change, risk and issues. They will also help you
manage staff and external suppliers, to ensure that you deliver the
project on time and within budget.
Analysis Phase :-
The analysis phase defines the requirements of the system,
independent of how these requirements will be accomplished. This
phase defines the problem that the customer is trying to solve. The
deliverable result at the end of this phase is a requirement
document. Ideally, this document states in a clear and precise
fashion what is to be built. This analysis represents the ``what''
phase. The requirement document tries to capture the
requirements from the customer's perspective by defining goals
and interactions at a level removed from the implementation
details.
Design Phase :-
In the design phase the architecture is established. This phase
starts with the requirement document delivered by the requirement
phase and maps the requirements into an architecture.
The architecture defines the components, their interfaces and
8|Page
INVENTORY MANAGEMENT SYSTEM
behaviors. The design document describes a plan to implement the
requirements. This phase represents the ``how'' phase. Details on
computer programming languages and application architecture,
distributed architecture layering, memory size, platform,
algorithms, data structures, global type definitions, interfaces, and
many other engineering details are established.
Testing Phase :-
Once code has been generated program testing begins. The testing
process focuses on the logical internals of the software, insuring
that all the statements have been tested and on the functional
externals i.e. conducting tests to uncover errors and insures that
input will produce actual results that will agree with required result.
manually.
Every year they have to make different registers for maintaining
the records.
9|Page
INVENTORY MANAGEMENT SYSTEM
System has to make a separate storage place for keeping these
registers.
Every time buying new registers may lead to wastage of money.
This technique searching records from the files is inconvenient.
Each or process to maintain records in registers is very time
consuming.
11 | P a g e
INVENTORY MANAGEMENT SYSTEM
consuming process.
Paperwork is avoided.
Complex task can be easily understood.
Proper system
Security is provided due to the presence of login and
password.
Also many validations at many places to prevent invalid data
entries
We can change and update the input data easily.
Time will be served.
12 | P a g e
INVENTORY MANAGEMENT SYSTEM
2. SYSTEM ANALYSIS
13 | P a g e
INVENTORY MANAGEMENT SYSTEM
2.1 METHODOLOGY
SPIRAL MODEL :
14 | P a g e
INVENTORY MANAGEMENT SYSTEM
Planning Phase :-
Risk Analysis :-
Engineering Phase :-
In this phase software is developed, along with testing at the end of the
phase. Hence in this phase the development and testing is done.
Evaluation phase :-
This phase allows the customer to evaluate the output of the project to
date before the project continues to the next spiral.
15 | P a g e
INVENTORY MANAGEMENT SYSTEM
When to use Spiral Model :-
in economic priorities
16 | P a g e
INVENTORY MANAGEMENT SYSTEM
Purpose :-
The main purpose of this project is to keep all the information regardinfg
the corporation.
Goals of implementation :-
The proposed system should be built in such a way that it should fulfil
the following goals
17 | P a g e
INVENTORY MANAGEMENT SYSTEM
Hardware Configuration:
RAM : 4 GB RAM
Software Configuration:
18 | P a g e
INVENTORY MANAGEMENT SYSTEM
*Login:-
This module has a drop down list box from where we have to select
*ADMIN or USER:-
The ADMIN has all the rights in the software the status of his site. The
other fields in login are username
and password. If the username and password are correct then it is direct
ed tonext page.
*New user:-
This module is for the users who do not have their account. Here user is
allowed to create an account to login. The account creation is done by
filling the registration form with user details such as name, phone, email
etc.
*Product:-
This module has information regarding the products such as
its ID, name, Description, price, image of product etc. The ADMIN has
the authority to Add, Delete, Update etc. The USER can only view the
product information.
19 | P a g e
INVENTORY MANAGEMENT SYSTEM
*Accessories:-
This module consists of various available accessories of
the product with its name and picture, price information etc.
*Search:-
This module helps the user to ease his search based on the
required product in the stock. The search can be done on different
categories like Product id, Product Name, Product Description and
Product price etc.
*Stock:-
*Report:-
The Report may contain two option that is the product list and stock
list. The product list contain the list of the various different product. And the stock
list contain the list of the various product stock list in the record. It may able to get
information easily to the user about the product and stock list
*Customer:-
20 | P a g e
INVENTORY MANAGEMENT SYSTEM
3. SYSTEM DESIGN
21 | P a g e
INVENTORY MANAGEMENT SYSTEM
Abstraction
Modularity
Verification
Reliability:
Extensibility:
23 | P a g e
INVENTORY MANAGEMENT SYSTEM
Reusability:
The second section namely Logical Design describes the Data Flow
Diagrams, which show clearly the data movements, the processes and
the data sources, and sinks, E-R diagrams which represent the overall
logical design of the database, and high-level process structure of the
system.
The process of design involves “conceiving and planning out in the
mind” and making a drawing pattern, or sketch of the system. In
software design there are two types of major activities, Conceptual
Design and Detailed Design.
Conceptual or logical or external design of software involves
conceiving, planning out, and specifying the externally observable
characteristics of a software product. These characteristics include user
displays, external data sources, functional characteristics and high-level
process structure for the product.
Preliminary Design:
Preliminary design is basically concerned with deriving an overall
picture of the system. Deriving entire system into modules and sub-
modules while keeping Cohesion and Coupling factors in mind. Tools,
which assist in preliminary design process, are Data Flow Diagrams.
Code design:
The codes for this system are designed with two features in mind.
Optimum human oriented use and machine efficiency. Length of the
code range from length of one to length of five characteristics:
The code structure is unique; ensuring that only one value of
the code with a single meaning may be correctly applied to a
given entity or attributes.
The code structure is expansible allowing for growth of its set
of entities and attributes.
25 | P a g e
INVENTORY MANAGEMENT SYSTEM
The code is concise and brief for recording, communication,
transmission and storage efficiencies.
They have a uniform size and format.
The codes are simple so that the user can easily understand
it.
The codes are also versatile i.e., it is easy to modify to reflect
necessary changers in condition, chart eristic and
relationships of the encode entities.
The codes are also easily storable for producing reports in a
predetermined order of format.
The codes are also stable and do not require being frequently
updated thereby promoting user efficiency.
The codes are also meaningful.
Input Design:
Output Design:
26 | P a g e
INVENTORY MANAGEMENT SYSTEM
The various types of outputs are required by this system are
given below: External outputs, whose destination is outside the concern
and which require special attention because they, project the image of
the concern.
27 | P a g e
INVENTORY MANAGEMENT SYSTEM
28 | P a g e
INVENTORY MANAGEMENT SYSTEM
Level 0 :
29 | P a g e
INVENTORY MANAGEMENT SYSTEM
Level 1 :
30 | P a g e
INVENTORY MANAGEMENT SYSTEM
*Entity-relationship model:-
a)Entity:-
Attribute:
Relationship:
31 | P a g e
INVENTORY MANAGEMENT SYSTEM
Relationship will be several implicit relationships among various entity types
whenever an attribute of one entity refers to another entity type some
relationship exits. Relationship symbol is:
Key attributes:
An entity type usually has an attribute whose values are distinct for each
individual entity in the collection. Such an attribute is called key attribute. Key
attribute symbol is as follows
32 | P a g e
INVENTORY MANAGEMENT SYSTEM
ER DIAGRAM
33 | P a g e
INVENTORY MANAGEMENT SYSTEM
3.3.Database Model:-
34 | P a g e
INVENTORY MANAGEMENT SYSTEM
as actors) achieve
35 | P a g e
INVENTORY MANAGEMENT SYSTEM
UML is the modeling toolkit that you can use to build your diagrams. Use
cases are represented with a labeled oval shape. Stick figures represent
actors in the process, and the actor's participation in the system is
modeled with a line between the actor and use case. To depict the
system boundary, draw a box around the use case itself.
36 | P a g e
INVENTORY MANAGEMENT SYSTEM
37 | P a g e
INVENTORY MANAGEMENT SYSTEM
38 | P a g e
INVENTORY MANAGEMENT SYSTEM
40 | P a g e
INVENTORY MANAGEMENT SYSTEM
Class Diagram
41 | P a g e
INVENTORY MANAGEMENT SYSTEM
4. DATABASE DESIGN
42 | P a g e
INVENTORY MANAGEMENT SYSTEM
DATABASE DESIGN
Data Dictionary:
The database tables used in this system are created keeping the
above points in mind. The tables used are given below.
43 | P a g e
INVENTORY MANAGEMENT SYSTEM
Login Table :
Employee table :
44 | P a g e
INVENTORY MANAGEMENT SYSTEM
Customer Table :
45 | P a g e
INVENTORY MANAGEMENT SYSTEM
Supplier Table :
Company Table :
Product table :
46 | P a g e
INVENTORY MANAGEMENT SYSTEM
Transaction In Table :
47 | P a g e
INVENTORY MANAGEMENT SYSTEM
48 | P a g e
INVENTORY MANAGEMENT SYSTEM
5. SYSTEM TESTING
49 | P a g e
INVENTORY MANAGEMENT SYSTEM
System testing is the stage before system implementation where
the system is made error free and all the needed modifications are
made. The system was tested with test data and necessary corrections to
the system were carried out. All the reports were checked by the user
and approved. The system was very user friendly with online help to
assist the user wherever necessary.
Test Plan:
A test plan is a general document for the entire project, which
defines the scope, approach to be taken, and schedule of testing, as well
as identifying the test item for the entire testing process, and the
personal responsible for the different activities of testing. This document
describes the plan for testing, the knowledge management tool.
Major testing activities are:
Test units
Features to be tested
Test deliverables
Schedule
Personal allocation
50 | P a g e
INVENTORY MANAGEMENT SYSTEM
Test units:
System testing
Exception handling
Alpha Testing:
51 | P a g e
INVENTORY MANAGEMENT SYSTEM
Beta Testing:
Test deliverables:
Error report
The test case specification for system testing has to be submitted for
review before the system testing commences.
5.2 SCREENSHOTS
52 | P a g e
INVENTORY MANAGEMENT SYSTEM
LOGIN PAGE
ADMIN MASTERPAGE
Customer Page :
53 | P a g e
INVENTORY MANAGEMENT SYSTEM
Supplier Page :
Product Page :
54 | P a g e
INVENTORY MANAGEMENT SYSTEM
Transaction IN Page :
55 | P a g e
INVENTORY MANAGEMENT SYSTEM
Transaction IN Report :
56 | P a g e
INVENTORY MANAGEMENT SYSTEM
Stock Report :
57 | P a g e
INVENTORY MANAGEMENT SYSTEM
5.3 Coding
58 | P a g e
INVENTORY MANAGEMENT SYSTEM
Clientmaster.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Inventory.ClientForms;
using Inventory.MasterForms;
namespace Inventory.Forms
{
public partial class Clientmaster : Form
{
public Clientmaster()
{
InitializeComponent();
}
60 | P a g e
INVENTORY MANAGEMENT SYSTEM
}
}
}
Customeracc.cs :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.IO;
namespace Inventory.ClientForms
{
public partial class Customeraccount : Form
{
SqlCommand com = new SqlCommand();
SqlConnection con = new SqlConnection();
SqlDataAdapter sda = new SqlDataAdapter();
DataSet ds = new DataSet();
string pids;
public Customeraccount()
{
con.ConnectionString = "Data Source=.\\SQLEXPRESS;Initial
Catalog=inventorylogin;Integrated Security=True;";
InitializeComponent();
}
61 | P a g e
INVENTORY MANAGEMENT SYSTEM
cstate.Text + "','" + ccity.Text + "','" + cpincode.Text + "','" + cemail.Text +
"')", con);
con.Open();
SqlCommand cmda = new SqlCommand(che, con);
int count = (int)cmda.ExecuteScalar();
if (count > 0)
{
MessageBox.Show("PRODUCT ALREADY EXIST");
}
else
{
cmd.ExecuteNonQuery();
MessageBox.Show("Record Saved In DataBase");
}
con.Close();
}
catch (Exception ex)
{
MessageBox.Show(" Please Enter The Required Field ", ex.Message);
}
finally
{
if (con.State == ConnectionState.Open)
con.Close();
}
cfname.Clear();
clname.Clear();
caddress.Clear();
ccountry.Clear();
cstate.Clear();
ccity.Clear();
cpincode.Clear();
ccontact1.Clear();
ccontact2.Clear();
cemail.Clear();
cfname.Focus();
RetriveID();
62 | P a g e
INVENTORY MANAGEMENT SYSTEM
com.ExecuteNonQuery();
con.Close();
MessageBox.Show("Data Updted Successfully");
}
RetriveID();
}
63 | P a g e
INVENTORY MANAGEMENT SYSTEM
throw;
}
finally
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
}
}
64 | P a g e
INVENTORY MANAGEMENT SYSTEM
}
Intrans.cs :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Data.SqlClient;
using Inventory.Models;
using Inventory.Properties;
namespace Inventory.ClientForms
{
public partial class Intrans : Form
{
SqlCommand com = new SqlCommand();
SqlConnection con = new SqlConnection();
SqlDataAdapter sda = new SqlDataAdapter();
DataSet ds = new DataSet();
DataTable dt = new DataTable();
public Intrans()
{
con.ConnectionString = "Data Source=.\\SQLEXPRESS;Initial
Catalog=inventorylogin;Integrated
Security=True;MultipleActiveResultSets=true;";
InitializeComponent();
}
//VARIABLE DECLARATION
decimal totsalestax;
decimal taxtotalamount;
decimal totamount;
//LIST OBJECT CREATED HEAR TO USE FOR BINDING DATA WITH GRIDVIEW
private List<pgriditem> pgit = new List<pgriditem>();
//FOR PRINTING VARIABLES
private int numberOfItemsPerPage = 0;
private int numberOfItemsPrintedSoFar = 0;
65 | P a g e
INVENTORY MANAGEMENT SYSTEM
protax.SelectedIndex = -1;
propaid.Clear();
prototalamt.Clear();
pgridview.DataSource = null;
pgit.Clear();
probalance.Clear();
pname.SelectedIndex = -1;
pstock.Clear();
punit.Clear();
pamount.Clear();
if (pname.SelectedIndex == -1)
{
66 | P a g e
INVENTORY MANAGEMENT SYSTEM
MessageBox.Show("SELECT REQUIRED FIELD", "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
pname.Focus();
}
else
{
//CLEAR OPERATION FOR TEXTBOX IN PGROUPBOX
pname.SelectedIndex = -1;
pstock.Clear();
punit.Clear();
pamount.Clear();
if (pname.SelectedIndex == -1)
{
MessageBox.Show("SELECT REQUIRED FIELD", "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
pname.Focus();
}
else
{
con.Open();
int newstcok = Convert.ToInt32(pstock.Text) + Convert.ToInt32(punit.Text);
com = new SqlCommand("update Product set PQuantity = '" + newstcok + "'
where PName = '" + pname.SelectedValue + "'", con);
int n = com.ExecuteNonQuery();
if (n == 1)
{
67 | P a g e
INVENTORY MANAGEMENT SYSTEM
pgriditem item = new pgriditem()
{
ProductName = pname.Text,
Stock = Convert.ToInt16(pstock.Text.Trim()),
Unit = Convert.ToInt16(punit.Text.Trim()),
Amount = Convert.ToDecimal(pamount.Text.Trim()),
Totalamount = Convert.ToInt16(punit.Text.Trim()) *
Convert.ToDecimal(pamount.Text.Trim()),
Date = Convert.ToDateTime(pdate.Value)
};
//USING LIST TO BIND DATA WITH GRIDVIEW
pgit.Add(item);
pgridview.DataSource = null;
pgridview.DataSource = pgit;
pstock.Clear();
punit.Clear();
pamount.Clear();
pname.Focus();
}
con.Close();
}
}
if (prototalamt.Text.Trim() == String.Empty)
{
MessageBox.Show("Enter The Paid Amount", "Error", MessageBoxButtons.OK,
MessageBoxIcon.Error);
prototalamt.Focus();
}
else
{
con.ConnectionString = "Data Source=.\\SQLEXPRESS;Initial
Catalog=inventorylogin;Integrated Security=True;";
68 | P a g e
INVENTORY MANAGEMENT SYSTEM
SqlCommand cmd = new SqlCommand("insert into TransIN" +
"(Productname,Stock,Unit,Amount,Totalamount,Date)Values('" +
pgridview.Rows[i].Cells[0].Value + "','" + pgridview.Rows[i].Cells[1].Value +
"','" + pgridview.Rows[i].Cells[2].Value + "','" +
pgridview.Rows[i].Cells[3].Value + "','" + pgridview.Rows[i].Cells[4].Value +
"',@Date)",con);
con.Open();
cmd.Parameters.AddWithValue("@Date", pdate.Value);
cmd.ExecuteNonQuery();
con.Close();
}
//pgridview.Rows.Clear();
Intrans ins = new Intrans();
//ins.MdiParent = this;
this.Hide();
ins.Show();
//this.Hide();
if (protax.SelectedIndex == 1)
{
totsalestax = (8 * totamount) / 100;
69 | P a g e
INVENTORY MANAGEMENT SYSTEM
taxtotalamount = totamount + totsalestax;
prototalamt.Text = taxtotalamount.ToString();
}
if (protax.SelectedIndex == 2)
{
totsalestax = (10 * totamount) / 100;
taxtotalamount = totamount + totsalestax;
prototalamt.Text = taxtotalamount.ToString();
if (protax.SelectedIndex == 3)
{
totsalestax = (12 * totamount) / 100;
taxtotalamount = totamount + totsalestax;
prototalamt.Text = taxtotalamount.ToString();
if (protax.SelectedIndex == 4)
{
totsalestax = (16 * totamount) / 100;
taxtotalamount = totamount + totsalestax;
prototalamt.Text = taxtotalamount.ToString();
}
else
{
70 | P a g e
INVENTORY MANAGEMENT SYSTEM
com = new SqlCommand("select PQuantity from Product where PName = '" +
itemname + "'", con);
using (SqlDataReader rd = com.ExecuteReader())
{
if (rd.Read())
{
int oldQ = Convert.ToInt32(rd["PQuantity"].ToString());
int changequan = oldQ - Convert.ToInt32(unitchange);
com = new SqlCommand("update Product set PQuantity = '" + changequan + "'
where PName = '" + itemname + "'", con);
com.ExecuteNonQuery();
}
}
con.Close();
int index = pgridview.CurrentCell.RowIndex;
pgit.RemoveAt(index);
pgridview.DataSource = null;
pgridview.DataSource = pgit;
{
if (protax.SelectedIndex == 0)
{
totsalestax = totamount;
prototalamt.Text = totsalestax.ToString();
}
if (protax.SelectedIndex == 1)
{
totsalestax = (8 * totamount) / 100;
taxtotalamount = totamount + totsalestax;
prototalamt.Text = taxtotalamount.ToString();
}
if (protax.SelectedIndex == 2)
{
totsalestax = (10 * totamount) / 100;
taxtotalamount = totamount + totsalestax;
prototalamt.Text = taxtotalamount.ToString();
if (protax.SelectedIndex == 3)
{
totsalestax = (12 * totamount) / 100;
taxtotalamount = totamount + totsalestax;
prototalamt.Text = taxtotalamount.ToString();
71 | P a g e
INVENTORY MANAGEMENT SYSTEM
if (protax.SelectedIndex == 4)
{
totsalestax = (16 * totamount) / 100;
taxtotalamount = totamount + totsalestax;
prototalamt.Text = taxtotalamount.ToString();
}
else
{
}
}
}
72 | P a g e
INVENTORY MANAGEMENT SYSTEM
// Brushes.Black, new Point(25, 215));
e.Graphics.DrawString
("---------------------------------------------------------------------------------------
-------------------------",
new Font("Arial", 15, FontStyle.Regular), Brushes.Blue, new Point(22, 230));
e.Graphics.DrawString("Product Name", new Font("Arial", 15,
FontStyle.Regular), Brushes.Black, new Point(30, 248));
e.Graphics.DrawString("Quantity", new Font("Arial", 15, FontStyle.Regular),
Brushes.Black, new Point(378, 245));
e.Graphics.DrawString("Unit Price", new Font("Arial", 15, FontStyle.Regular),
Brushes.Black, new Point(548, 245));
e.Graphics.DrawString("Total Price", new Font("Arial", 15, FontStyle.Regular),
Brushes.Black, new Point(696, 245));
e.Graphics.DrawString
("---------------------------------------------------------------------------------------
-------------------------",
new Font("Arial", 15, FontStyle.Regular), Brushes.Blue, new Point(22, 259));
ypos += 30;
}
else
{
//TO STOP PRINTING
e.HasMorePages = false;
}
}
else
{
73 | P a g e
INVENTORY MANAGEMENT SYSTEM
//Reset page so not to print unlimited pages
numberOfItemsPerPage = 0;
//It adds more page
e.HasMorePages = true;
//STOP HEAR ONLY AND GO UP AND NOT GO DOWN
return;
}
e.Graphics.DrawString
("---------------------------------------------------------------------------------------
-------------------------",
new Font("Arial", 15, FontStyle.Regular), Brushes.Blue, new Point(22, ypos));
e.Graphics.DrawString("Total Amount : Rs. " + proamount.Text.Trim(),
new Font("Arial", 15, FontStyle.Regular),
Brushes.Black, new Point(500, ypos + 30));
74 | P a g e
INVENTORY MANAGEMENT SYSTEM
new Font("Arial", 15, FontStyle.Regular), Brushes.Blue, new Point(22, ypos +
230));
cmd.ExecuteNonQuery();
SqlDataReader rd = cmd.ExecuteReader();
while(rd.Read())
{
String unit =(string) rd["PQuantity"].ToString();
pstock.Text = unit;
String amt = rd["PSaleprice"].ToString();
pamount.Text = amt;
punit.Text = "1";
}
con.Close();
}
75 | P a g e
INVENTORY MANAGEMENT SYSTEM
// TODO: This line of code loads data into the 'inventoryloginDataSet.Product'
table. You can move, or remove it, as needed.
this.productTableAdapter.Fill(this.inventoryloginDataSet.Product);
// IT DISPLAY EMPTY COMBOBOX
pname.SelectedIndex = -1;
tcomboBox.SelectedIndex = -1;
}
Outtrans.cs :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Inventory.Models;
using System.Data.SqlClient;
using Inventory.Properties;
namespace Inventory.ClientForms
{
public partial class Outtrans : Form
76 | P a g e
INVENTORY MANAGEMENT SYSTEM
{
SqlCommand com = new SqlCommand();
SqlConnection con = new SqlConnection();
SqlDataAdapter sda = new SqlDataAdapter();
DataSet ds = new DataSet();
DataTable dt = new DataTable();
public Outtrans()
{
con.ConnectionString = "Data Source=.\\SQLEXPRESS;Initial
Catalog=inventorylogin;Integrated
Security=True;MultipleActiveResultSets=true;";
InitializeComponent();
}
//VARIABLE DECLARATION
decimal totsalestax;
decimal taxtotalamount;
decimal totamount;
//LIST OBJECT CREATED HEAR TO USE FOR BINDING DATA WITH GRIDVIEW
private List<ogriditem> ogit = new List<ogriditem>();
//FOR PRINTING VARIABLES
private int numberOfItemsPerPage = 0;
private int numberOfItemsPrintedSoFar = 0;
if (opname.SelectedIndex == -1)
{
MessageBox.Show("SELECT REQUIRED FIELD", "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
opname.Focus();
}
else
{
con.Open();
int newstcok = Convert.ToInt32(opstock.Text) - Convert.ToInt32(opunit.Text);
com = new SqlCommand("update Product set PQuantity = '" + newstcok + "'
where PName = '" + opname.SelectedValue + "'", con);
77 | P a g e
INVENTORY MANAGEMENT SYSTEM
int n = com.ExecuteNonQuery();
if (n == 1)
{
opstock.Clear();
opunit.Clear();
opamount.Clear();
opname.Focus();
}
else
{
MessageBox.Show("Enter Valid Unit");
}
con.Close();
}
}
catch (Exception ex)
{
MessageBox.Show("Please Enter Required Field", ex.Message);
}
78 | P a g e
INVENTORY MANAGEMENT SYSTEM
}
if (opname.SelectedIndex == -1)
{
MessageBox.Show("SELECT REQUIRED FIELD", "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
opname.Focus();
}
else
{
//CLEAR OPERATION FOR TEXTBOX IN PGROUPBOX
opname.SelectedIndex = -1;
opstock.Clear();
opunit.Clear();
opamount.Clear();
}
}
79 | P a g e
INVENTORY MANAGEMENT SYSTEM
obalance.Clear();
opname.SelectedIndex = -1;
opstock.Clear();
opunit.Clear();
opamount.Clear();
if (ototalamt.Text.Trim() == String.Empty)
{
MessageBox.Show("Enter The Paid Amount", "Error", MessageBoxButtons.OK,
MessageBoxIcon.Error);
ototalamt.Focus();
}
else
{
con.ConnectionString = "Data Source=.\\SQLEXPRESS;Initial
Catalog=inventorylogin;Integrated Security=True;";
80 | P a g e
INVENTORY MANAGEMENT SYSTEM
con.Close();
}
//pgridview.Rows.Clear();
Intrans ins = new Intrans();
//ins.MdiParent = this;
this.Hide();
ins.Show();
//this.Hide();
if (otax.SelectedIndex == 1)
{
totsalestax = (8 * totamount) / 100;
taxtotalamount = totamount + totsalestax;
ototalamt.Text = taxtotalamount.ToString();
}
if (otax.SelectedIndex == 2)
{
totsalestax = (10 * totamount) / 100;
taxtotalamount = totamount + totsalestax;
ototalamt.Text = taxtotalamount.ToString();
81 | P a g e
INVENTORY MANAGEMENT SYSTEM
}
if (otax.SelectedIndex == 3)
{
totsalestax = (12 * totamount) / 100;
taxtotalamount = totamount + totsalestax;
ototalamt.Text = taxtotalamount.ToString();
if (otax.SelectedIndex == 4)
{
totsalestax = (16 * totamount) / 100;
taxtotalamount = totamount + totsalestax;
ototalamt.Text = taxtotalamount.ToString();
}
else
{
82 | P a g e
INVENTORY MANAGEMENT SYSTEM
Brushes.Black, new Point(25, 205));
//e.Graphics.DrawString("" + nam, new Font("Arial", 15, FontStyle.Regular),
// Brushes.Black, new Point(25, 215));
e.Graphics.DrawString
("---------------------------------------------------------------------------------------
-------------------------",
new Font("Arial", 15, FontStyle.Regular), Brushes.Blue, new Point(22, 230));
e.Graphics.DrawString("Product Name", new Font("Arial", 15,
FontStyle.Regular), Brushes.Black, new Point(30, 248));
e.Graphics.DrawString("Quantity", new Font("Arial", 15, FontStyle.Regular),
Brushes.Black, new Point(378, 245));
e.Graphics.DrawString("Unit Price", new Font("Arial", 15, FontStyle.Regular),
Brushes.Black, new Point(548, 245));
e.Graphics.DrawString("Total Price", new Font("Arial", 15, FontStyle.Regular),
Brushes.Black, new Point(696, 245));
e.Graphics.DrawString
("---------------------------------------------------------------------------------------
-------------------------",
new Font("Arial", 15, FontStyle.Regular), Brushes.Blue, new Point(22, 259));
ypos += 30;
}
else
{
//TO STOP PRINTING
e.HasMorePages = false;
}
}
83 | P a g e
INVENTORY MANAGEMENT SYSTEM
else
{
//Reset page so not to print unlimited pages
numberOfItemsPerPage = 0;
//It adds more page
e.HasMorePages = true;
//STOP HEAR ONLY AND GO UP AND NOT GO DOWN
return;
}
e.Graphics.DrawString
("---------------------------------------------------------------------------------------
-------------------------",
new Font("Arial", 15, FontStyle.Regular), Brushes.Blue, new Point(22, ypos));
e.Graphics.DrawString("Total Amount : Rs. " + oamount.Text.Trim(), new
Font("Arial", 15, FontStyle.Regular),
Brushes.Black, new Point(500, ypos + 30));
84 | P a g e
INVENTORY MANAGEMENT SYSTEM
("---------------------------------------------------------------------------------------
-------------------------",
new Font("Arial", 15, FontStyle.Regular), Brushes.Blue, new Point(22, ypos +
230));
cmd.ExecuteNonQuery();
SqlDataReader rd = cmd.ExecuteReader();
while (rd.Read())
{
String unit = (string)rd["PQuantity"].ToString();
opstock.Text = unit;
String amt = rd["PSaleprice"].ToString();
opamount.Text = amt;
opunit.Text = "1";
}
con.Close();
}
85 | P a g e
INVENTORY MANAGEMENT SYSTEM
// TODO: This line of code loads data into the 'inventoryloginDataSet1.Product'
table. You can move, or remove it, as needed.
this.productTableAdapter.Fill(this.inventoryloginDataSet1.Product);
opname.SelectedIndex = -1;
ocustomer.SelectedIndex = -1;
}
86 | P a g e
INVENTORY MANAGEMENT SYSTEM
oamount.Text = totamount.ToString();
{
if (otax.SelectedIndex == 0)
{
totsalestax = totamount;
ototalamt.Text = totsalestax.ToString();
}
if (otax.SelectedIndex == 1)
{
totsalestax = (8 * totamount) / 100;
taxtotalamount = totamount + totsalestax;
ototalamt.Text = taxtotalamount.ToString();
}
if (otax.SelectedIndex == 2)
{
totsalestax = (10 * totamount) / 100;
taxtotalamount = totamount + totsalestax;
ototalamt.Text = taxtotalamount.ToString();
if (otax.SelectedIndex == 3)
{
totsalestax = (12 * totamount) / 100;
taxtotalamount = totamount + totsalestax;
ototalamt.Text = taxtotalamount.ToString();
if (otax.SelectedIndex == 4)
{
totsalestax = (16 * totamount) / 100;
taxtotalamount = totamount + totsalestax;
ototalamt.Text = taxtotalamount.ToString();
}
else
{
}
}
}
}
}
Product.cs :
87 | P a g e
INVENTORY MANAGEMENT SYSTEM
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.IO;
namespace Inventory.Forms
{
public partial class Product : Form
{
SqlCommand com = new SqlCommand();
SqlConnection con = new SqlConnection();
SqlDataAdapter sda = new SqlDataAdapter();
DataSet ds = new DataSet();
string pids;
public Product()
{
con.ConnectionString = "Data Source=.\\SQLEXPRESS;Initial
Catalog=inventorylogin;Integrated Security=True;";
InitializeComponent();
}
else
{
cmd.ExecuteNonQuery();
MessageBox.Show("Record Saved In DataBase");
}
88 | P a g e
INVENTORY MANAGEMENT SYSTEM
con.Close();
}
catch (Exception ex)
{
MessageBox.Show(" Please Enter The Required Field ", ex.Message);
}
finally
{
if (con.State == ConnectionState.Open)
con.Close();
}
pname.Clear();
pdescription.Clear();
psellprice.Clear();
ppurchaseprice.Clear();
pquantity.Clear();
preorderlevel.Clear();
// Ptax.Clear();
pname.Focus();
RetriveID();
}
89 | P a g e
INVENTORY MANAGEMENT SYSTEM
private void pshow_Click(object sender, EventArgs e)
{
String query = "Select * from Product";
SqlDataAdapter sda = new SqlDataAdapter(query, con);
DataTable dt = new DataTable();
sda.Fill(dt);
pdatagridview.DataSource = dt;
con.Close();
}
//AUTOINCREMENT TEXTBOX
private void Product_Load(object sender, EventArgs e)
{
RetriveID();
}
90 | P a g e
INVENTORY MANAGEMENT SYSTEM
{
con.Close();
}
}
}
Stock.cs :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.IO;
namespace Inventory.Forms
{
public partial class Stock : Form
{
SqlCommand cmd = new SqlCommand();
SqlConnection con = new SqlConnection();
SqlDataAdapter sda = new SqlDataAdapter();
DataSet ds = new DataSet();
91 | P a g e
INVENTORY MANAGEMENT SYSTEM
SqlDataReader mdr;
public Stock()
{
con.ConnectionString = "Data Source=.\\SQLEXPRESS;Initial
Catalog=inventorylogin;Integrated
Security=True;MultipleActiveResultSets=true";
InitializeComponent();
}
92 | P a g e
INVENTORY MANAGEMENT SYSTEM
sda = new SqlDataAdapter("select * from Product where PQuantity <
PReorderlevel", con);
DataTable dt = new DataTable();
sda.Fill(dt);
dataGridView1.DataSource = dt;
dataGridView1.Columns["PReorderlevel"].DefaultCellStyle.BackColor =
Color.Green;
dataGridView1.Columns["PQuantity"].DefaultCellStyle.BackColor = Color.Red;
}
else if (comboBox2.SelectedIndex == 1)
{
sda = new SqlDataAdapter("select * from Product where PQuantity > 500",
con);
DataTable dt = new DataTable();
sda.Fill(dt);
dataGridView1.DataSource = dt;
dataGridView1.Columns["PReorderlevel"].DefaultCellStyle.BackColor =
Color.Green;
dataGridView1.Columns["PQuantity"].DefaultCellStyle.BackColor = Color.Red;
}
else
{
comboBox2.SelectedIndex=-1;
}
comboBox2.SelectedIndex = -1;
}
catch (Exception ex)
{
MessageBox.Show("", ex.Message);
}
}
}
}
Supplieracc.cs :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.IO;
namespace Inventory.Forms
{
93 | P a g e
INVENTORY MANAGEMENT SYSTEM
public partial class Supplieraccount : Form
{
SqlCommand com = new SqlCommand();
SqlConnection con = new SqlConnection();
SqlDataAdapter sda = new SqlDataAdapter();
DataSet ds = new DataSet();
string pids;
public Supplieraccount()
{
con.ConnectionString = "Data Source=.\\SQLEXPRESS;Initial
Catalog=inventorylogin;Integrated Security=True;";
InitializeComponent();
}
else
{
cmd.ExecuteNonQuery();
MessageBox.Show("Record Saved In DataBase");
}
con.Close();
}
catch (Exception ex)
{
MessageBox.Show(" Please Enter The Required Field ", ex.Message);
}
finally
{
if (con.State == ConnectionState.Open)
con.Close();
}
94 | P a g e
INVENTORY MANAGEMENT SYSTEM
sfname.Clear();
slname.Clear();
saddress.Clear();
scountry.Clear();
sstate.Clear();
scity.Clear();
spincode.Clear();
scontact1.Clear();
scontact2.Clear();
semail.Clear();
sfname.Focus();
RetriveID();
}
RetriveID();
}
95 | P a g e
INVENTORY MANAGEMENT SYSTEM
sda.Fill(dt);
sgridview.DataSource = dt;
con.Close();
}
96 | P a g e
INVENTORY MANAGEMENT SYSTEM
private void contextMenuStrip1_Click(object sender, EventArgs e)
{
con.Open();
com = new SqlCommand("delete from Supplier where SId = '" + pids + "'",
con);
com.ExecuteNonQuery();
con.Close();
}
Company.cs :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.IO;
namespace Inventory.MasterForms
{
public partial class Company : Form
{
SqlCommand com = new SqlCommand();
SqlConnection con = new SqlConnection();
SqlDataAdapter sda = new SqlDataAdapter();
DataSet ds = new DataSet();
string pids;
public Company()
97 | P a g e
INVENTORY MANAGEMENT SYSTEM
{
con.ConnectionString = "Data Source=.\\SQLEXPRESS;Initial
Catalog=inventorylogin;Integrated Security=True;";
InitializeComponent();
}
else
{
cmd.ExecuteNonQuery();
MessageBox.Show("Record Saved In DataBase");
//new Emailsend(comemail.Text, password.Text);
}
con.Close();
}
catch (Exception ex)
{
MessageBox.Show(" Please Enter The Required Field ", ex.Message);
}
finally
{
if (con.State == ConnectionState.Open)
con.Close();
}
comname.Clear();
comcontactper.Clear();
comaddress.Clear();
comcountry.Clear();
comcontact1.Clear();
comcontact2.Clear();
comstate.Clear();
98 | P a g e
INVENTORY MANAGEMENT SYSTEM
comcity.Clear();
compincode.Clear();
comemail.Clear();
comwebsite.Clear();
comname.Focus();
RetriveID();
99 | P a g e
INVENTORY MANAGEMENT SYSTEM
contextMenuStrip1.Show(comgridview, e.X, e.Y);
pids = comgridview.SelectedRows[0].Cells[0].Value.ToString();
}
}
100 | P a g e
INVENTORY MANAGEMENT SYSTEM
{
con.Open();
com = new SqlCommand("delete from Company where ComId = '" + pids + "'",
con);
com.ExecuteNonQuery();
con.Close();
}
Employee.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.IO;
namespace Inventory.MasterForms
{
public partial class Employee : Form
{
SqlCommand com = new SqlCommand();
SqlConnection con = new SqlConnection();
SqlDataAdapter sda = new SqlDataAdapter();
DataSet ds = new DataSet();
String pids;
101 | P a g e
INVENTORY MANAGEMENT SYSTEM
public Employee()
{
con.ConnectionString = "Data Source=.\\SQLEXPRESS;Initial
Catalog=inventorylogin;Integrated Security=True;";
InitializeComponent();
}
else
{
cmd.ExecuteNonQuery();
MessageBox.Show("Record Saved In DataBase");
}
Emailsend es = new Emailsend(eemail.Text, "Employee Registration
successfull", "<html> <head><title>Employee Registration</title><body>" +
"<h4> Your UserName is </h4> <h3>" + efname.Text + "</h3> <h5> " +
"Your Password Is </h5> <h3>" + epassword.Text +
"</h3></body></html>", Password.Text, true);
con.Close();
}
catch (Exception ex)
{
MessageBox.Show(" Please Enter The Required Field ", ex.Message);
}
finally
{
if (con.State == ConnectionState.Open)
con.Close();
}
efname.Clear();
elname.Clear();
epassword.Clear();
102 | P a g e
INVENTORY MANAGEMENT SYSTEM
eaddress.Clear();
ecountry.Clear();
econtact1.Clear();
econtact2.Clear();
estate.Clear();
ecity.Clear();
epincode.Clear();
eemail.Clear();
efname.Focus();
RetriveID();
}
103 | P a g e
INVENTORY MANAGEMENT SYSTEM
}
104 | P a g e
INVENTORY MANAGEMENT SYSTEM
epincode.Text + "',Eemail='" + eemail.Text + "' where EId='" + eid.Text + "'",
con);
com.ExecuteNonQuery();
con.Close();
MessageBox.Show("Data Updated Successfull");
}
return password;
}
}
}
}
105 | P a g e
INVENTORY MANAGEMENT SYSTEM
Login.cs :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Inventory.Forms;
using System.Threading;
using System.Data.SqlClient;
namespace Inventory
{
public partial class Form1 : Form
{
SqlConnection con = new SqlConnection("Data Source=.\\SQLEXPRESS;Initial
Catalog=inventorylogin;Integrated Security=True;Pooling=False");
public Form1()
{
Thread t = new Thread(new ThreadStart(SplashStart));
t.Start();
Thread.Sleep(5000);
InitializeComponent();
t.Abort();
}
if (dt.Rows.Count > 0)
{
Masterpage master = new Masterpage();
106 | P a g e
INVENTORY MANAGEMENT SYSTEM
this.Hide();
master.Show();
}
else
{
MessageBox.Show("Invalid username or password", "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
else if (radioButton2.Checked)
{
SqlCommand cmd = new SqlCommand("SELECT Efname,Epassword FROM
Employee WHERE Efname='" + textBox1.Text + "' and Epassword='" +
textBox2.Text + "'", con);
SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
con.Open();
sda.Fill(dt);
con.Close();
if (dt.Rows.Count > 0)
{
Clientmaster cmast = new Clientmaster();
this.Hide();
cmast.Show();
}
else
{
MessageBox.Show("Invalid username or password", "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
else
{
MessageBox.Show("Select Required User", "Error", MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
}
107 | P a g e
INVENTORY MANAGEMENT SYSTEM
private void button3_Click(object sender, EventArgs e)
{
Application.Exit();
this.Close();
}
}
}
Masterpage.cs :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Inventory.ClientForms;
using Inventory.MasterForms;
namespace Inventory.Forms
{
public partial class Masterpage : Form
{
// private int childFormNumber = 0;
public Masterpage()
{
InitializeComponent();
}
108 | P a g e
INVENTORY MANAGEMENT SYSTEM
pro.MdiParent = this;
pro.Show();
}
109 | P a g e
INVENTORY MANAGEMENT SYSTEM
st.MdiParent = this;
st.Show();
}
Progressbar.cs :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Inventory.Forms
{
public partial class Progressbar : Form
{
public Progressbar()
{
InitializeComponent();
}
110 | P a g e
INVENTORY MANAGEMENT SYSTEM
Transreport.cs :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.IO;
namespace Inventory.MasterForms
{
public partial class TransINreport : Form
{
SqlCommand cmd = new SqlCommand();
SqlConnection con = new SqlConnection();
SqlDataAdapter sda = new SqlDataAdapter();
DataSet ds = new DataSet();
SqlDataReader mdr;
public TransINreport()
{
con.ConnectionString = "Data Source=.\\SQLEXPRESS;Initial
Catalog=inventorylogin;Integrated Security=True;";
InitializeComponent();
}
111 | P a g e
INVENTORY MANAGEMENT SYSTEM
dataGridView1.DataSource = dt;
}
else if (comboBox1.SelectedIndex == 1)
{
sda = new SqlDataAdapter("select * from TransOUT where Date between'" +
dateTimePicker1.Text + "' AND '" + dateTimePicker2.Text + "'", con);
DataTable dt = new DataTable();
sda.Fill(dt);
dataGridView1.DataSource = dt;
}
}
catch (Exception ex)
{
MessageBox.Show("",ex.Message);
}
}
112 | P a g e
INVENTORY MANAGEMENT SYSTEM
6. FUTURE ENHANCEMENT
FUTURE ENHANCEMENT:
113 | P a g e
INVENTORY MANAGEMENT SYSTEM
The future scope of the project includes:
114 | P a g e
INVENTORY MANAGEMENT SYSTEM
7. CONCLUSION
CONCLUSION:
116 | P a g e
INVENTORY MANAGEMENT SYSTEM
117 | P a g e
INVENTORY MANAGEMENT SYSTEM
The following books were referred during the analysis and execution
phase of the project.
WEBSITES:
www.google.com
www.youtube.com
www.wikipedia.com
www.microsoft.com
www.slideshare.com
118 | P a g e