Contents
Chapter# 1 Requirements Analysis & Specification ..................................................................................... 7
1.1 Introduction .............................................................................................................................. 8
1.2 Existing system and Fesibility Report ...................................................................................... 8
1.2.1
Final Project
Final Project
Final Project
Final Project
List of Figures:
Fig 1.1: Itrative Waterfall Model20
Fig 2.1 Relational Class Diagram of server side.24
Fig 2.2 Relational Class Diagram of client side..25
Fig 2.3 Inheritance and Generalized Class Diagram of server side26
Fig 2.4 Inheritance and Generalized Class Diagram of server side27
Fig 2.5 Use Case Diagaram.28
Fig 2.6 Add Record Use case modules For Administrator..29
Fig 2.7 Delete Record Use case modules For Administrator 30
Fig 2.8 Update Record Use case modules For Administrator.31
Fig 2.9 View Record Use case modules For Administrator32
Fig 2.10 Add Record Use case modules For Operator33
Fig 2.11 Delete Record Use case modules For Operator34
Fig 2.12 Update Record Use case modules For Operator..35
Fig 2.13 View Record Use case modules For Operator.36
Fig 2.14 Sequence Diagram.37
Fig 2.15 Activity Diagram.. 40
Fig 3.1 Login Module..42
Fig 3.2 Menu Module..45
Fig 3.3 Category Module57
Fig 3.4 Item Details Module57
Fig 3.5 Customer Module...58
Fig 3.6 Employee Module..58
Fig 3.7 Sale Module59
Fig 3.8 Supplier Module.59
Fig 3.9 Feedback Module60
Fig 3.10 Send Promotion Module60
5
Final Project
List of Tables :
Table 1.1: Economical feasibility...09
Table 1.2: Schedule feasibility...11
Final Project
Chapter# 1
Requirements Analysis & Specification
Final Project
1.1 Introduction
In our modern society everyone is attach to new technology and want friendly environment
in their organization. Khawaja Autos is located in Kotli Azad Kashmir. I purposed a system that
manages their records related to Lubricant, employees, salaries and companies record. We
propose level of logins for admin and operator. Operators have limited access area but admin can
access everything in this softwar.
1.2.1
Feasibility Report
Our proposed system is distributed sale point system for Khawaja autos. The system will
only be effectively implemented when it is feasible for the users. An estimate is of whether the
identified user needs may be satisfied using current system and hardware technologies. This
study besides developed under given budgetary constraints.
This report will make the comparison between the old system and new system. A system
request must need several tests to see whether it is worthwhile to proceed further. This series of
test called feasibility study and it is the virtual part of every system. This feasibility report
include following:
O Technical Feasibility
O Economical Feasibility
O Legal Feasibility
O Schedule Feasibility
O Specification Feasibility
O Information Feasibility
O Motivational Feasibility
O Is project feasible or not?
8
Final Project
Cost(PKR)
1000
Sqlserver
Free
Microsoft office
Free
PC cost
40,000
Webserver Domain
Total
42,000
Table 1.1: Economical feasibility
Final Project
The existing system is manual so the proposed application solves the problem of time
consumption.
10
Final Project
10
11
A:Rizwan Tabassum
B:Rizwan Amjad
C:Sajjad Amhed
D:Rizwan Tabassum
E:Naveed Saeed
F:NaveedSaeed/Sajjad Amhed
G:Naveed Saeed
H:NaveedSaeed/Sajjad Ahmed
Table 1.2: Schedule feasibility
Activity key:
A: Specifying Module1
F: Coding Module2
B: Specifying Module2
G: Integration Testing
C: Design Module1
H: System Testing
D: Design Module2
E: Coding Module1
Final Project
In Traditional file base system there are lot of problem to maintain records and stabile the
records
Traditional file system is not secure. The sale man can easily change the sale records.
12
Final Project
All these type of problems, we discus in our project. In manual system it takes lots of effort and
is time consuming
13
Final Project
Final Project
The software must be able to identify all the devices that will be connected against the
software.
The product must have a user friendly interface for the checking purpose that is simple
enough to understand.
Response time for loading the software and for processing a transaction should be no
longer than five seconds.
15
Final Project
Presentation in PPT.
When the main source of power is off, there will be alternative source.
If one sale point is failed, they cannot be effect by other shop sale point records.
If the system is corrupted, there is a backup and the proctor can easily restore it.
1.12.2 Universality:
Everyone has a log feature and it is thus universal to staff members.
16
Final Project
Secure Login.
Maintaining Employees.
Manage Salaries.
Manage Sales.
Manage Companies.
Salary slips.
Bills.
Stock Information.
Employee Information.
The software is designed for Distributed Lubricant Sale Point Management System to
reduce the old traditional file base system.
The software will install on different locations but whole record can be maintaining one
server.
For normal conditions, 95% of the transactions should be processed in less than 5
seconds.
17
Final Project
Final Project
include the cost of project and the discount offers provided. The user should avoid the illegal
rules and protocols. Neither admin nor member should cross the rules and regulations.
Requirement Analysis.
Design.
Coding.
Testing.
Implementation.
Maintenance.
19
Final Project
20
Final Project
Chapter#2
21
Final Project
Class Diagram
Use Case
System sequence
Activity
Physical design produces the working system by defining the design specifications,
which tell the programmers exactly what the candidate system must do. The
programmers write the necessary programs that accept input from the user, perform
necessary processing on accepted data through call and produce the required report on a
hard copy or display it on the screen.
22
Final Project
23
Final Project
24
Final Project
25
Final Project
26
Final Project
27
Final Project
28
Final Project
2.2.2
29
Final Project
30
Final Project
31
Final Project
32
Final Project
33
Final Project
34
Final Project
35
Final Project
36
Final Project
37
Final Project
2.3.1 Log in
38
Final Project
39
Final Project
40
Final Project
Chapter#3
41
Final Project
3.1
Login Module
3.1.1 Coding
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace AutoLub
{
42
Final Project
publicpartialclassLogin : AutoLub.Form1
{
public Login()
{
InitializeComponent();
}
publicstaticint log;
Connection cc = newConnection();
privatevoid Login_Load(object sender, EventArgs e)
{
Text = cc.Title() + "(Login Form)";
}
publicvoid login()
{
try
{
SqlConnection con = newSqlConnection(cc.ConnectDB());
con.Open();
string q="select * from login where username = '" + textBox1.Text + "' and password = '" +
textBox2.Text + "' and role = '"+comboBox1 .Text+"'";
SqlCommand cmd = newSqlCommand(q, con);
SqlDataReader c = cmd.ExecuteReader();
if (c.Read()==true)
{
if (comboBox1.Text == "Admin")
{
log = 1;
}
43
Final Project
else
if (comboBox1.Text == "Operator")
{
log = 2;
}
Menu shw = newMenu();
shw.Show();
this.Hide();
}
else
{
MessageBox.Show("Login Failed");
}
}
catch (Exception ee)
{
MessageBox.Show(ee.Message);
}
}
privatevoid button1_Click(object sender, EventArgs e)
{
login();
}
privatevoid textBox2_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
login();
44
Final Project
}
}
}
}
3.2.1 Coding
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
45
Final Project
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Net;
using System.Net.Sockets;
namespace AutoLub
{
publicpartialclassMenu : AutoLub.Form1
{
public Menu()
{
InitializeComponent();
}
Socket client_sock;
Socket sock;
byte[] buffer = newbyte[1024];
Connection cc = newConnection();
publicvoid display1()
{
DataTable table = newDataTable();
SqlConnection con = newSqlConnection(cc.ConnectDB());
con.Open();
SqlCommand cmd = newSqlCommand("select * from server1", con);
SqlDataReader c = cmd.ExecuteReader();
table.Columns.Add("Sid", typeof(string));
table.Columns.Add("date", typeof(string));
table.Columns.Add("Cname", typeof(string));
table.Columns.Add("cnic", typeof(string));
table.Columns.Add("contact", typeof(string));
46
Final Project
table.Columns.Add("address", typeof(string));
table.Columns.Add("vehicle", typeof(string));
table.Columns.Add("Lid", typeof(string));
table.Columns.Add("ServiceType", typeof(string));
table.Columns.Add("Scharge", typeof(string));
table.Columns.Add("Amount", typeof(string));
table.Columns.Add("oldreading", typeof(string));
table.Columns.Add("newreading", typeof(string));
table.Columns.Add("shop", typeof(string));
while (c.Read() == true)
{
//string date = Convert.ToDateTime(dob.Text).ToShortDateString();
table.Rows.Add(c.GetValue(0).ToString(), c.GetValue(1).ToString(),
c.GetValue(2).ToString(), c.GetValue(3).ToString(), c.GetValue(4).ToString(),
c.GetValue(5).ToString(), c.GetValue(6).ToString(), c.GetValue(7).ToString(),
c.GetValue(8).ToString(), c.GetValue(9).ToString(), c.GetValue(10).ToString(),
c.GetValue(11).ToString(), c.GetValue(12).ToString(), c.GetValue(13).ToString());
}
dataGridView1.DataSource = table;
}
publicvoid display()
{
DataTable table = newDataTable();
SqlConnection con = newSqlConnection(cc.ConnectDB());
con.Open();
SqlCommand cmd = newSqlCommand("select * from sales1", con);
SqlDataReader c = cmd.ExecuteReader();
table.Columns.Add("Sid", typeof(string));
table.Columns.Add("date", typeof(string));
table.Columns.Add("Cname", typeof(string));
47
Final Project
table.Columns.Add("cnic", typeof(string));
table.Columns.Add("contact", typeof(string));
table.Columns.Add("address", typeof(string));
table.Columns.Add("vehicle", typeof(string));
table.Columns.Add("Lid", typeof(string));
table.Columns.Add("ServiceType", typeof(string));
table.Columns.Add("Scharge", typeof(string));
table.Columns.Add("Amount", typeof(string));
table.Columns.Add("oldreading", typeof(string));
table.Columns.Add("newreading", typeof(string));
table.Columns.Add("shop", typeof(string));
while(c.Read()==true)
{
table.Rows.Add(c.GetValue(0).ToString(), c.GetValue(1).ToString(),
c.GetValue(2).ToString(), c.GetValue(3).ToString(), c.GetValue(4).ToString(),
c.GetValue(5).ToString(), c.GetValue(6).ToString(), c.GetValue(7).ToString(),
c.GetValue(8).ToString(), c.GetValue(9).ToString(), c.GetValue(10).ToString(),
c.GetValue(11).ToString(), c.GetValue(12).ToString(), c.GetValue(13).ToString());
}
dataGridView1.DataSource = table;
}
Final Project
Category k = newCategory();
k.Show();
}
structitems
{
publicstring Lname;
publicstring category;
publicstring LubType;
publicstring Rate;
publicstring ratepliter;
publicstring qty;
publicstring description;
}
structsales_update
{
publicstring date;
publicstring cname;
publicstring cnic;
publicstring contact;
publicstring address;
publicstring vehicle;
publicint itemcode;
publicstring itemname;
publicstring price;
publicstring ServiceType;
publicstring Scharges;
publicstring Amount;
publicstring oldreading;
49
Final Project
publicstring newreading;
}
void end_rec(IAsyncResult ir)
{
char[] seps = { ',' };
sock.EndReceive(ir);
string rec_msg = System.Text.UnicodeEncoding.Unicode.GetString(buffer);
// Split the string into parts.
string[] parts = rec_msg.Split(seps);
switch (parts[0])
{
case"sales":
int a1 = Convert.ToInt16(parts[8]);
SqlConnection con = newSqlConnection(cc.ConnectDB());
string queryuser = "INSERT INTO server1 VALUES ('" + parts[1] + "' ,'" + parts[2] + "' ,'" +
parts[3] + "' ,'" + parts[4] + "' ,'" + parts[5] + "' ,'" + parts[6] + "' ,'" + parts[7] + "' ,'" + a1 + "' ,'"
+ parts[9] + "' ,'" + parts[10] + "' ,'" + parts[11] + "' ,'" + parts[12] + "' ,'" + parts[13] + "','" +
parts[14] + "' )";
con.Open();
SqlCommand cmd = newSqlCommand(queryuser, con);
int a = cmd.ExecuteNonQuery();
if(a == 1)
{
string signal = "sucess" + "," + "no" + ",";
client_sock = newSocket(AddressFamily.InterNetwork,
SocketType.Dgram, ProtocolType.Udp);
50
Final Project
client_sock.BeginSendTo(send_buffer23, 0,
send_buffer23.Length, SocketFlags.None, newIPEndPoint(IPAddress.Parse("127.0.0.1"), 6001),
newAsyncCallback(end_send), client_sock);
break;
}
if (a == 0)
{
string signal = "no" + "," + "no" + ",";
client_sock = newSocket(AddressFamily.InterNetwork,
SocketType.Dgram, ProtocolType.Udp);
byte[] send_buffer23 = System.Text.UnicodeEncoding.Unicode.GetBytes(signal);
client_sock.BeginSendTo(send_buffer23, 0,
send_buffer23.Length, SocketFlags.None, newIPEndPoint(IPAddress.Parse("127.0.0.1"), 6001),
newAsyncCallback(end_send), client_sock);
break;
}
break;
case"sales1":
SqlConnection con1 = newSqlConnection(cc.ConnectDB());
string queryuser1 = "INSERT INTO server1 VALUES ('" + parts[1] + "' ,'" + parts[2] + "' ,'" +
parts[3] + "' ,'" + parts[4] + "' ,'" + parts[5] + "' ,'" + parts[6] + "' ,'" + parts[7] + "' ,'" + parts[8] +
"' ,'" + parts[9] + "' ,'" + parts[10] + "' ,'" + parts[11] + "' ,'" + parts[12] + "' ,'" + parts[13] + "','" +
parts[14] + "' )";
con1.Open();
SqlCommand cmd1 = newSqlCommand(queryuser1, con1);
cmd1.ExecuteNonQuery();
break;
}
Final Project
}
void end_send(IAsyncResult ir)
{
try
{
client_sock.EndSend(ir);
}
catch
{
}
}
privatevoid Menu_Load(object sender, EventArgs e)
{
sock = newSocket(AddressFamily.InterNetwork, SocketType.Dgram,
ProtocolType.Udp);
sock.Bind(newIPEndPoint(IPAddress.Any, 6000));
sock.BeginReceive(buffer, 0, 1024, SocketFlags.None, newAsyncCallback(end_rec),
sock);
if (Login.log == 1)
{
display1();
}
else
if (Login.log == 2)
{
reportsToolStripMenuItem1.Visible = false;
52
Final Project
categoryToolStripMenuItem.Visible = false;
manageItemsToolStripMenuItem.Visible = false;
sendPromotionsToolStripMenuItem1.Visible = false;
toolsToolStripMenuItem.Visible = false;
supplierToolStripMenuItem.Visible = false;
sendPromotionsToolStripMenuItem1.Visible = false;
toolsToolStripMenuItem1.Visible = false;
supplierToolStripMenuItem1.Visible = false;
display();
}
Text = cc.Title() + "(Main Menu)";
}
Final Project
table.Columns.Add("ServiceType", typeof(string));
table.Columns.Add("Scharge", typeof(string));
table.Columns.Add("Amount", typeof(string));
table.Columns.Add("oldreading", typeof(string));
table.Columns.Add("newreading", typeof(string));
table.Columns.Add("shop", typeof(string));
while (c.Read() == true)
{
//string date = Convert.ToDateTime(dob.Text).ToShortDateString();
table.Rows.Add(c.GetValue(0).ToString(), c.GetValue(1).ToString(),
c.GetValue(2).ToString(), c.GetValue(3).ToString(), c.GetValue(4).ToString(),
c.GetValue(5).ToString(), c.GetValue(6).ToString(), c.GetValue(7).ToString(),
c.GetValue(8).ToString(), c.GetValue(9).ToString(), c.GetValue(10).ToString(),
c.GetValue(11).ToString(), c.GetValue(12).ToString(), c.GetValue(13).ToString());
}
dataGridView1.DataSource = table;
}
54
Final Project
55
Final Project
56
Final Project
3.4
57
Final Project
58
Final Project
59
Final Project
60
Final Project
61
Final Project
Chapter#4
Testing
62
Final Project
4.1 Introduction
In the Computer Sciences context, testing is regarded as a quality assurance activity. Its aim
is to verify/ ensure compliance of the software component under test with stated requirements.
There are two main categories of testing: static and dynamic. Static testing techniques include
desk checking, walkthroughs, inspections, and compiling. Dynamic testing comprises both white
and black box techniques.
63
Final Project
Performance Testing
Performance Testing was performed to check the non-functional requirements. All the
non-functional requirements of the system were checked and all the errors and problems
were recorded.
64
Final Project
65
Final Project
66
Final Project
67
Final Project
Final Project
Final Project
Environmental needs
Integrated development environment of visual studio.Net 2012
70
Final Project
Bibliography
71