Professional Documents
Culture Documents
Mobile Store Management System
Mobile Store Management System
Mobile Store Management System
OF
BY
Debarun Sen
(Roll No: 15612061076)
(Reg No: 156101211069)
2009
2|Page
ACKNOWLEDGEMENT
3|Page
Contents
Table Structure……………………………………………………………………………………………………………………………………..47
Coding…………………………………………………………………………………………………………………………………………………..50
4|Page
ABSTRACT
5|Page
Mobile Store Management also has a well defined Infrastructure of
Staff Management which is included in the software itself which
includes from the gate keeper to the employees working in the
store. With the required level of Authorization, there is an option
of enabling required options that can be used by the user
depending on the mode She/he chooses.
6|Page
Synopsis
Team Members
7|Page
Project Description
Once the product has been taken by the user. It needs a Random
update of the Servicing by the Engineer, which gets inserted in to
the Update Servicing. the update status of the product is seen by
the user through the Show update.
9|Page
Employee. A picture is also required by the manager which
determines the Identification of the Employee.
10 | P a g e
OBJECTIVE OF PROJECT
The main objective of the project is to help the ongoing user help
to attain an easy way to navigate the customer’s details and solve
the Customers problems. The Disadvantages of the cellular phone
is that same of that with the other electronic gadgets. If damaged
or gets faulty by any means then the entire system gets Hung up.
The main objective is to provide an easy, manageable way to
provide help to the customer. It is basically a very swift complaint
processing System by which customer can again get the device
back in the right condition. It’s basically build in the platform of
C#.NET windows application which makes the application quite
flexible and easy to be operated. The manager of the Mobile store
also finds it sufficient enough to view the details of the sales,
servicing and well organized way to employ the staff that are
included in the mobile store itself.
11 | P a g e
Feasibility Study
12 | P a g e
system. Then what the actual need of the feasibility analysis it is
described as below.
The objective of the feasibility study is not to solve the problem but
to acquire a sense of its scope. During the study the problem
definition is crystallized and aspects of the problem to be included
in the system are determined. The “Problem Statement” a carefully
worded statement of the problem that led to analysis summarize of
13 | P a g e
finding and recommendation. A list of the major findings a quick
access to the results of the analysis of the problem.
Economic feasibility
Technical feasibility
14 | P a g e
Behavioral feasibility
15 | P a g e
Software Requirement Specification
(S.R.S)
Requirement Specification
17 | P a g e
Features of C#.NET
20 | P a g e
Features of SQL Server 2005
Database Mirroring
Online Restore
Fast Recovery
21 | P a g e
Standards-based Information Access
Snapshot Isolation
22 | P a g e
Data Partitioning
23 | P a g e
His definition states:-
Demacro & Jane (1978) and Sarcon (1979) introduced Data Flow
Diagram (DFD) and it is important to system analysis. DFD’s are
very useful understanding a system and it can effectively used for
partitions during analysis. A DFD shows the flow of data through a
system. The system may be an organization, a manual procedure, a
software system, mechanical systems, a hardware system, or any
condition of these.
A DFD shows the movement of data through the different
transactions or process in the systems. As the first step, an entire
system can be depicted by one DFD, which gives a system overview
it is called Context Diagram.
Data Flow Diagram (DFD) is a way of expressing system
requirements in a graphical form. A DFD also known as bubble
chart has the purpose of clarifying system requirements and
identifying major transformations that will become programs in
system design.
24 | P a g e
Square represents source or destination of
System data also called an external entity
25 | P a g e
Data Flow Diagram (DFD)
26 | P a g e
LEVEL -0 DFD (CONTEXT LEVEL DIAGRAM)
27 | P a g e
LEVEL-1 DFD
28 | P a g e
LEVEL 2 DFD
29 | P a g e
LEVEL2 DFD
30 | P a g e
Entity-Relationship Diagram:
32 | P a g e
AN ENTITY RELATIONSHIP DIAGRAM METHODOLOGY:
(One way of doing it)
Identify the roles, events, locations, tangible things or
1. Identify Entities concepts about which the end-users want to store
data.
5. Define Primary Identify the data attribute(s) that uniquely identify one
Keys and only one occurrence of each entity.
9. Draw fully Adjust the ERD from step 6 to account for entities or
attributed ERD relationships discovered in step 8.
33 | P a g e
Does the final Entity Relationship Diagram accurately
10. Check Results
depict the system data?
34 | P a g e
35 | P a g e
36 | P a g e
Project Snapshots
Login Page
37 | P a g e
Main Page
38 | P a g e
Servicing Page:
39 | P a g e
Cost Estimate Page:
40 | P a g e
Sales page:
41 | P a g e
Manager Page
42 | P a g e
Manager Page Showing Employee:
43 | P a g e
Update Servicing:
44 | P a g e
Show Update:
45 | P a g e
Employee Page
46 | P a g e
About Us:
47 | P a g e
Table Snapshots
48 | P a g e
Customer Sales Table:
Sales Details
49 | P a g e
Employee Table:
50 | P a g e
Coding
Program.cs
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace mobileservicecentre
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new login_Page());
}
}
}
51 | P a g e
Login page.cs
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;
using System.Threading;
namespace mobileservicecentre
{
public partial class login_Page : Form
{
SqlConnection sconn;
SqlCommand scomm, scomm1;
SqlParameter spUserName, spUserName1;
char cDesig;
public login_Page()
{
InitializeComponent();
sconn = new SqlConnection();
scomm = new SqlCommand();
scomm1 = new SqlCommand();
sconn.ConnectionString = "Data
Source=DEWDROP;Initial Catalog=mobileservicing;User
ID=sa;Password=sqlserver2005";
scomm.CommandText = "";
scomm.CommandType = CommandType.Text;
scomm.CommandText = "select password from
login_page where username=@pUserName";
52 | P a g e
scomm.Connection = sconn;
scomm1.CommandText = "";
scomm1.CommandType = CommandType.Text;
scomm1.CommandText = "select designation
from login_page where username=@pUserName1";
scomm1.Connection = sconn;
scomm.Parameters.Add(spUserName);
scomm1.Parameters.Add(spUserName1);
{
spUserName.SqlValue = textBox1.Text;
spUserName1.SqlValue = textBox1.Text;
sconn.Open();
object objPassWord;
53 | P a g e
if ((objPassWord = scomm.ExecuteScalar())
!= null)
{
if (textBox2.Text.Trim() ==
objPassWord.ToString().Trim())
{
ThreadStart ts = new
ThreadStart(runner);
Thread tt = new Thread(ts);
object objDesignation =
scomm1.ExecuteScalar();
if
(objDesignation.ToString().Trim() == "manager")
{
cDesig = 'M';
}
else if
(objDesignation.ToString().Trim() == "servicing")
{
cDesig = 'S';
}
else
{
cDesig = 'O';
}
tt.Start();
this.Close();
this.Dispose();
}
else
{
MessageBox.Show("Invalid
password");
}
}
else
{
MessageBox.Show("Invalid username");
}
54 | P a g e
sconn.Close();
}
void runner()
{
Central cc = new Central(cDesig);
cc.ShowDialog();
}
Application.Exit();
}
55 | P a g e
Central Page:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace mobileservicecentre
{
public partial class Central : Form
{
public Central(char m)
{
InitializeComponent();
}
private void
servicingToolStripMenuItem_Click(object sender,
EventArgs e)
{
Sevicing_Page achildform = new
Sevicing_Page();
achildform.MdiParent = this;
achildform.Show();
}
56 | P a g e
private void
updateDetailsToolStripMenuItem_Click(object sender,
EventArgs e)
{
private void
salesToolStripMenuItem_Click(object sender, EventArgs
e)
{
sales achildform = new sales();
achildform.MdiParent = this;
achildform.Show();
}
private void
registerToolStripMenuItem_Click(object sender,
EventArgs e)
{
Employee achildform = new Employee();
achildform.MdiParent = this;
achildform.Show();
}
private void
updateDataToolStripMenuItem_Click(object sender,
EventArgs e)
{
Update_servicing achildform = new
Update_servicing();
57 | P a g e
achildform.MdiParent = this;
achildform.Show();
}
private void
showUpdateToolStripMenuItem_Click(object sender,
EventArgs e)
{
Show_Update achildform = new Show_Update();
achildform.MdiParent = this;
achildform.Show();
}
private void
exitApplicationToolStripMenuItem_Click(object sender,
EventArgs e)
{
Application.Exit();
}
private void
gotoManagerPageToolStripMenuItem_Click(object sender,
EventArgs e)
{
Manager achildform = new Manager();
58 | P a g e
achildform.MdiParent = this;
achildform.Show();
}
private void
exitToolStripMenuItem1_Click(object sender, EventArgs
e)
{
AboutBox1 cc = new AboutBox1();
cc.ShowDialog();
}
}
}
59 | P a g e
Servicing Page
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Data.SqlClient;
namespace mobileservicecentre
{
public partial class Sevicing_Page : Form
{
SqlConnection scon;
SqlCommand scomm;
SqlParameter sptoken, spdate, spCust_name,
spCust_add, spCust_pin, spCust_landline, spCust_mobile,
spCust_Email, spProd_Model, spProd_IMEI,
spProd_problem, spProd_DOP, spWarranty, spRec_Phone,
spRec_battery, spRec_Charger, spRec_MMC;
public Sevicing_Page()
{
InitializeComponent();
scon = new SqlConnection();
scon.ConnectionString = "Data
Source=DEWDROP;Initial Catalog=mobileservicing;User
ID=sa;Password=sqlserver2005";
60 | P a g e
n,Cust_landline,Cust_mobile,Cust_Email,Prod_Model,Prod_
IMEI,Prod_problem,Prod_DOP,Warranty,Rec_Phone,Rec_batte
ry,Rec_Charger,Rec_MMC)
values(@token,@date,@Custname,@custadd,@custpin,@custla
ndline,@custmobile,@custemail,@prodmodel,@prodIMEI,@pro
dproblem,@prodDOP,@prodWarranty,@recphone,@recbattery,@
reccharger,@recMMC)";
scomm.Connection = scon;
61 | P a g e
spCust_landline = new SqlParameter();
spCust_landline.SqlDbType =
SqlDbType.VarChar;
spCust_landline.Direction =
ParameterDirection.Input;
spCust_landline.ParameterName =
"custlandline";
62 | P a g e
spProd_DOP.Direction =
ParameterDirection.Input;
spProd_DOP.ParameterName = "prodDOP";
63 | P a g e
spWarranty = new SqlParameter();
spWarranty.SqlDbType = SqlDbType.Bit;
spWarranty.Direction =
ParameterDirection.Input;
spWarranty.ParameterName = "prodWarranty";
scomm.Parameters.Add(spCust_add);
scomm.Parameters.Add(spCust_Email);
scomm.Parameters.Add(spCust_landline);
scomm.Parameters.Add(spCust_mobile);
scomm.Parameters.Add(spCust_name);
scomm.Parameters.Add(spCust_pin);
scomm.Parameters.Add(spdate);
scomm.Parameters.Add(spProd_DOP);
scomm.Parameters.Add(spProd_IMEI);
scomm.Parameters.Add(spProd_Model);
scomm.Parameters.Add(spProd_problem);
scomm.Parameters.Add(spRec_battery);
scomm.Parameters.Add(spRec_Charger);
scomm.Parameters.Add(spRec_MMC);
scomm.Parameters.Add(spRec_Phone);
scomm.Parameters.Add(sptoken);
scomm.Parameters.Add(spWarranty);
64 | P a g e
spCust_pin.SqlValue = textBox2.Text.Trim();
spdate.SqlValue = dateTimePicker1.Value;
spProd_DOP.SqlValue =
dateTimePicker2.Value;
spProd_IMEI.SqlValue =
textBox9.Text.Trim();
spProd_Model.SqlValue =
textBox8.Text.Trim();
spProd_problem.SqlValue =
textBox10.Text.Trim();
sptoken.SqlValue = label16.Text;
if (radioButton1.Checked)
{
spWarranty.SqlValue = true;
}
else
spWarranty.SqlValue = false;
if (radioButton3.Checked)
{
spRec_Phone.SqlValue = true;
}
else
spRec_Phone.SqlValue = false;
if (radioButton4.Checked)
{
spRec_battery.SqlValue = true;
}
else
spRec_battery.SqlValue = false;
if (radioButton6.Checked)
{
spRec_Charger.SqlValue = true;
65 | P a g e
}
else
spRec_Charger.SqlValue = false;
if (radioButton8.Checked)
{
spRec_MMC.SqlValue = true;
}
else
spRec_MMC.SqlValue = false;
if (scon.State == ConnectionState.Closed)
scon.Open();
try
{
scomm.ExecuteNonQuery();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
if (scon.State == ConnectionState.Open)
scon.Close();
}
66 | P a g e
toolTip8.SetToolTip(textBox8, "Enter the
Mobile model number ");
toolTip9.SetToolTip(textBox9, "Enter the
Mobile IMEI number");
toolTip10.SetToolTip(textBox10, "Enter the
Mobile problem details");
Random rr=new Random();
label16.Text = rr.Next(0,
10000).ToString();
textBox4.Focus();
67 | P a g e
}
}
68 | P a g e
catch (Exception)
{
errorProvider1.SetError(textBox1, "The
value must be numeric");
errorProvider1.BlinkRate = 1000;
errorProvider1.BlinkStyle =
ErrorBlinkStyle.AlwaysBlink;
}
private void
dateTimePicker1_ValueChanged(object sender, EventArgs
e)
{
69 | P a g e
errorProvider2.SetError(textBox4, "Only
Letters Alowwed");
}
}
70 | P a g e
notValid = true;
}
int tot = 0;
if (textBox2.Text.Trim() != "")
{
string mm = textBox2.Text.Trim();
if (mm.Substring(0, 1) == "0")
{
notValid = true;
}
71 | P a g e
if (!isEmail)
{
MessageBox.Show("not a valid e-mail");
return;
}
}
errorProvider3.SetError(textBox5,"Landline no not
valid");
textBox5.Focus();
return;
}
72 | P a g e
}
}
}
73 | P a g e
Manager.cs
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;
using System.IO;
using System.Threading;
namespace mobileservicecentre
{
public partial class Manager : Form
{
SqlConnection sconn;
SqlCommand scomm,scommPhoto;
DataSet ds;
SqlDataAdapter sda;
SqlCommandBuilder scb;
SqlParameter spphoto;
public Manager()
{
InitializeComponent();
74 | P a g e
scommPhoto = new SqlCommand();
scommPhoto.CommandType = CommandType.Text;
scommPhoto.CommandText = "select Emp_Photo
from Employee where Emp_ID=@pEmpno";
scommPhoto.Connection = sconn;
ds = new DataSet();
private void
viewEditToolStripMenuItem_Click(object sender,
EventArgs e)
{
comboBox1.Enabled = true;
}
75 | P a g e
}
private void
viewEditToolStripMenuItem1_Click(object sender,
EventArgs e)
{
comboBox2.Enabled = true;
}
76 | P a g e
{
comboBox1.Items.Add(sdr["Token_No"].ToString());
}
if (sconn.State == ConnectionState.Open)
sconn.Close();
}
comboBox2.Items.Add(sdr1["Emp_ID"].ToString());
}
if (sconn.State == ConnectionState.Open)
sconn.Close();
}
77 | P a g e
private void button2_Click(object sender,
EventArgs e)
{
scomm.CommandText = "select * from
Employee";
ds.Clear();
sda.Fill(ds, "Employee");
dataGridView1.DataSource = ds;
dataGridView1.DataMember = "Employee";
MessageBox.Show("Grid loaded
successfully");
}
private void
comboBox1_SelectedIndexChanged(object sender, EventArgs
e)
{
button1_Click(sender, e);
private void
comboBox2_SelectedIndexChanged(object sender, EventArgs
e)
{
button2_Click(sender, e);
MessageBox.Show("You Have selected " +
comboBox2.SelectedItem.ToString());
DataView dv = new DataView();
dv.Table = ds.Tables["Employee"];
78 | P a g e
dv.RowFilter = "Emp_ID='" +
comboBox2.SelectedItem.ToString() + "'";
dataGridView1.DataSource = dv;
MessageBox.Show("Requested Employee data is
Shown successfully");
spphoto.SqlValue =
comboBox2.SelectedItem.ToString();
sconn.Open();
object oo = scommPhoto.ExecuteScalar();
if (oo != System.DBNull.Value)
{
MemoryStream ms = new
MemoryStream((byte[])oo);
pictureBox1.Image =
Image.FromStream(ms);
}
sconn.Close();
79 | P a g e
sda.Update(ds, "servicing_page");
MessageBox.Show("Data updated
successfully");
}
else if (dr == DialogResult.No)
{
MessageBox.Show("Exiting without
saving??");
Application.Exit();
}
else
{
}
}
80 | P a g e
private void dataGridView1_CellClick(object
sender, DataGridViewCellEventArgs e)
{
//number =
dataGridView1.CurrentRow.Cells[0].Value;
// MessageBox.Show(number.ToString());
// EditServicing ees = new EditServicing();
//ees.Show();
private void
dataGridView1_CellContentClick(object sender,
DataGridViewCellEventArgs e)
{
81 | P a g e
Employee.cs:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Data.SqlClient;
using System.Drawing.Imaging;
namespace mobileservicecentre
{
public partial class Employee : Form
{
SqlConnection scon;
SqlCommand scomm;
SqlParameter spEmpID,spFName, splName, spAdd,
spDOB, spGender, spCntcNo, spPstExp, spJD, spSal,
spPhoto;
public Employee()
{
InitializeComponent();
scon = new SqlConnection();
scon.ConnectionString = "Data
Source=DEWDROP;Initial Catalog=mobileservicing;User
ID=sa;Password=sqlserver2005";
82 | P a g e
spEmpID.ParameterName = "EmpID";
83 | P a g e
spPstExp.ParameterName = "EmpPstExp";
scomm.Parameters.Add(spEmpID);
scomm.Parameters.Add(splName);
scomm.Parameters.Add(spAdd);
scomm.Parameters.Add(spCntcNo);
scomm.Parameters.Add(spDOB);
scomm.Parameters.Add(spGender);
scomm.Parameters.Add(spJD);
scomm.Parameters.Add(spPhoto);
scomm.Parameters.Add(spSal);
scomm.Parameters.Add(spPstExp);
scomm.Parameters.Add(spFName);
84 | P a g e
spAdd.SqlValue = textBox2.Text.Trim();
spCntcNo.SqlValue = textBox6.Text.Trim();
spDOB.SqlValue = dateTimePicker2.Value;
spJD.SqlValue = dateTimePicker1.Value;
spSal.SqlValue = label7.Text.Trim();
spPstExp.SqlValue = true;
if (rbmale.Checked)
{
spGender.SqlValue = false;
}
else
{
spGender.SqlValue = true;
}
if (rbyes.Checked)
{
spGender.SqlValue = false;
}
else
{
spGender.SqlValue = true;
}
if (scon.State == ConnectionState.Closed)
scon.Open();
try
{
scomm.ExecuteNonQuery();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
85 | P a g e
}
86 | P a g e
{
pictureBox1.ImageLocation =
openFileDialog1.FileName;
}
87 | P a g e
if
(System.Text.RegularExpressions.Regex.IsMatch(s.ToStrin
g(), "\\d+"))
{
isString = false;
}
}
if (!isString)
{
errorProvider2.SetError(textBox4, "Only
Letters Alowwed");
textBox4.Text = "";
88 | P a g e
if (isString)
{
errorProvider3.SetError(textBox6,
"Letters are there");
}
}
}
}
89 | P a g e
Sales.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Data.SqlClient;
namespace mobileservicecentre
{
public partial class sales : Form
{
SqlConnection scon;
SqlCommand scomm;
SqlParameter spcustname, spcustphone,
spcustadd, spsalesID, spdate, spchequeno;
public sales()
{
InitializeComponent();
scon = new SqlConnection();
scon.ConnectionString = "Data
Source=DEWDROP;Initial Catalog=mobileservicing;User
ID=sa;Password=sqlserver2005";
90 | P a g e
spcustname.Direction =
ParameterDirection.Input;
spcustname.ParameterName = "custname";
scomm.Parameters.Add(spcustname);
scomm.Parameters.Add(spcustphone);
scomm.Parameters.Add(spcustadd);
scomm.Parameters.Add(spdate);
scomm.Parameters.Add(spsalesID);
scomm.Parameters.Add(spchequeno);
91 | P a g e
}
this.salesTableAdapter3.Fill(this.mobileservicingDataSe
t5.Sales);
// TODO: This line of code loads data into
the 'mobileservicingDataSet4.Sales' table. You can
move, or remove it, as needed.
this.salesTableAdapter2.Fill(this.mobileservicingDataSe
t4.Sales);
// TODO: This line of code loads data into
the 'mobileservicingDataSet3.Sales' table. You can
move, or remove it, as needed.
this.salesTableAdapter1.Fill(this.mobileservicingDataSe
t3.Sales);
// TODO: This line of code loads data into
the 'mobileservicingDataSet2.Sales' table. You can
move, or remove it, as needed.
this.salesTableAdapter.Fill(this.mobileservicingDataSet
2.Sales);
92 | P a g e
private void textBox3_TextChanged(object
sender, EventArgs e)
{
private void
splitContainer1_Panel1_Paint(object sender,
PaintEventArgs e)
{
private void
comboBox2_SelectedIndexChanged(object sender, EventArgs
e)
{
try
{
label14.Text =
comboBox2.SelectedValue.ToString();
}
catch (Exception) { }
}
93 | P a g e
private void exitToolStripMenuItem_Click(object
sender, EventArgs e)
{
Application.Exit();
}
94 | P a g e
comboBox9.Visible = true;
comboBox8.Visible = true;
textBox8.Visible = true;
label28.Visible = true;
label29.Visible = true;
}
private void
saveDataToolStripMenuItem_Click(object sender,
EventArgs e)
{
spcustname.SqlValue = textBox1.Text;
spcustadd.SqlValue = textBox2.Text;
spcustphone.SqlValue =
textBox3.Text.Trim();
spsalesID.SqlValue = label31.Text.Trim();
spdate.SqlValue = dateTimePicker1.Value;
spchequeno.SqlValue = textBox5.Text.Trim();
if (scon.State == ConnectionState.Closed)
scon.Open();
try
{
scomm.ExecuteNonQuery();
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
}
if (scon.State==ConnectionState.Open)
scon.Close();
95 | P a g e
}
96 | P a g e
Show Update.cs
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;
using System.IO;
namespace mobileservicecentre
{
public partial class Show_Update : Form
{
SqlConnection sconn;
SqlCommand scomm;
SqlDataAdapter sda;
SqlCommandBuilder scb;
DataSet ds;
public Show_Update()
{
InitializeComponent();
ds = new DataSet();
98 | P a g e
SqlDataReader sdr = scomm.ExecuteReader();
while (sdr.Read())
{
comboBox1.Items.Add(sdr["Token_No"].ToString());
}
if (sconn.State == ConnectionState.Open)
sconn.Close();
}
private void
comboBox1_SelectedIndexChanged(object sender, EventArgs
e)
{
//MessageBox.Show(comboBox1.SelectedItem.ToString());
sconn.Open();
scomm.CommandText = "select * from
servicing_page where Token_No='" +
comboBox1.SelectedItem.ToString().Trim() + "'";
SqlDataReader sda = scomm.ExecuteReader();
sda.Read();
textBox4.Text =
sda["Cust_name"].ToString().Trim();
textBox3.Text =
sda["Cust_add"].ToString().Trim();
textBox2.Text =
sda["Cust_pin"].ToString().Trim();
textBox5.Text =
sda["Cust_landline"].ToString().Trim();
textBox1.Text =
sda["Cust_mobile"].ToString().Trim();
textBox6.Text =
sda["cust_Email"].ToString().Trim();
textBox8.Text =
sda["Prod_Model"].ToString().Trim();
textBox9.Text =
sda["Prod_IMEI"].ToString().Trim();
99 | P a g e
sda.Close();
sconn.Close();
}
}
}
100 | P a g e
Update Servicing.cs
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;
using System.IO;
namespace mobileservicecentre
{
public partial class Update_servicing : Form
{
SqlConnection sconn;
SqlCommand scomm;
SqlDataAdapter sda;
SqlCommandBuilder scb;
DataSet ds;
SqlParameter spupdate;
public Update_servicing()
{
InitializeComponent();
sconn = new SqlConnection("Data
Source=DEWDROP;Initial Catalog=mobileservicing;User
ID=sa;Password=sqlserver2005");
scomm = new SqlCommand();
scomm.CommandType = CommandType.Text;
scomm.Connection = sconn;
ds = new DataSet();
private void
Update_servicing_FormClosing(object sender,
FormClosingEventArgs e)
{
DialogResult dr = MessageBox.Show("Do You
really want to exit??", "Close",
MessageBoxButtons.OKCancel);
if (dr == DialogResult.OK)
{
}
else
{
e.Cancel = true;
}
}
while (sdr.Read())
{
102 | P a g e
comboBox1.Items.Add(sdr["Token_No"].ToString());
}
if (sconn.State == ConnectionState.Open)
sconn.Close();
}
private void
comboBox1_SelectedIndexChanged(object sender, EventArgs
e)
{
sconn.Open();
scomm.CommandText = "select * from
servicing_page where Token_No='" +
comboBox1.SelectedItem.ToString().Trim() + "'";
SqlDataReader sda = scomm.ExecuteReader();
sda.Read();
textBox4.Text =
sda["Cust_Name"].ToString().Trim();
textBox3.Text =
sda["Cust_add"].ToString().Trim();
textBox2.Text =
sda["Cust_pin"].ToString().Trim();
textBox5.Text =
sda["Cust_landline"].ToString().Trim();
textBox1.Text =
sda["Cust_mobile"].ToString().Trim();
textBox8.Text =
sda["Prod_Model"].ToString().Trim();
textBox9.Text =
sda["Prod_IMEI"].ToString().Trim();
textBox6.Text =
sda["Cust_Email"].ToString().Trim();
sda.Close();
sconn.Close();
103 | P a g e
{
scomm = new SqlCommand();
scomm.CommandType = CommandType.Text;
scomm.CommandText = "insert into
servicing_page where update_status=@pUpdate";
scomm.Connection = sconn;
scomm.Parameters.Add(spupdate);
spupdate.SqlValue = textBox7.Text;
if (sconn.State == ConnectionState.Closed)
sconn.Open();
try
{
scomm.ExecuteNonQuery();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
if (sconn.State == ConnectionState.Open)
sconn.Close();
}
}
}
104 | P a g e
Cost Estimate.cs
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;
using System.IO;
namespace mobileservicecentre
{
public partial class costestimate : Form
{
SqlConnection scon;
SqlCommand scomm;
SqlParameter sptoken,spmotherboard, spkeyboard,
spspeaker, spwaterdamage, splcd, sptotal_amount;
int xx = 0;
public costestimate()
{
InitializeComponent();
105 | P a g e
values(@Token,@motherboard,@lcd,@speaker,@water_damage,
@keyboard,@total)";
scomm.Connection = scon;
106 | P a g e
sptotal_amount = new SqlParameter();
sptotal_amount.SqlDbType =
SqlDbType.VarChar;
sptotal_amount.Direction =
ParameterDirection.Input;
sptotal_amount.ParameterName = "total";
scomm.Parameters.Add(sptoken);
scomm.Parameters.Add(spmotherboard);
scomm.Parameters.Add(spspeaker);
scomm.Parameters.Add(spkeyboard);
scomm.Parameters.Add(splcd);
scomm.Parameters.Add(spwaterdamage);
scomm.Parameters.Add(sptotal_amount);
}
else
{
xx = xx - 600;
label5.Visible = false;
107 | P a g e
}
if (checkBox2.Checked)
{
xx = xx + 1000;
label6.Visible = true;
}
else
{
xx = xx - 1000;
label6.Visible = false;
108 | P a g e
}
}
else
{
xx = xx - 300;
label8.Visible = false;
}
}
}
else
{
xx = xx - 500;
label9.Visible = false;
}
109 | P a g e
private void checkBox1_Leave(object sender,
EventArgs e)
{
this.servicing_pageTableAdapter1.Fill(this.mobileservic
ingDataSet14.servicing_page);
// TODO: This line of code loads data into
the 'mobileservicingDataSet13.servicing_page' table.
You can move, or remove it, as needed.
//
this.servicing_pageTableAdapter.Fill(this.mobileservici
ngDataSet13.servicing_page);
if (checkBox1.Checked)
{
spkeyboard.SqlValue = true;
}
else
{
spkeyboard.SqlValue = false;
}
110 | P a g e
if (checkBox2.Checked)
{
spmotherboard.SqlValue = true;
}
else
{
spmotherboard.SqlValue = false;
}
if (checkBox3.Checked)
{
splcd.SqlValue = true;
}
else
{
splcd.SqlValue = false;
}
if (checkBox4.Checked)
{
spwaterdamage.SqlValue = true;
}
else
{
spwaterdamage.SqlValue = false;
}
if (checkBox5.Checked)
{
spspeaker.SqlValue = true;
}
else
{
spspeaker.SqlValue = false;
}
sptotal_amount.SqlValue =
label2.Text.Trim();
if (scon.State == ConnectionState.Closed)
scon.Open();
111 | P a g e
try
{
scomm.ExecuteNonQuery();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
MessageBox.Show("Data is successfully
Saved");
if (scon.State == ConnectionState.Open)
scon.Close();
112 | P a g e
About Box.cs:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using System.Reflection;
namespace mobileservicecentre
{
partial class AboutBox1 : Form
{
public AboutBox1()
{
InitializeComponent();
113 | P a g e
{
get
{
// Get all Title attributes on this
assembly
object[] attributes =
Assembly.GetExecutingAssembly().GetCustomAttributes(typ
eof(AssemblyTitleAttribute), false);
// If there is at least one Title
attribute
if (attributes.Length > 0)
{
// Select the first one
AssemblyTitleAttribute
titleAttribute = (AssemblyTitleAttribute)attributes[0];
// If it is not an empty string,
return it
if (titleAttribute.Title != "")
return titleAttribute.Title;
}
// If there was no Title attribute, or
if the Title attribute was the empty string, return the
.exe name
return
System.IO.Path.GetFileNameWithoutExtension(Assembly.Get
ExecutingAssembly().CodeBase);
}
}
114 | P a g e
{
get
{
// Get all Description attributes on
this assembly
object[] attributes =
Assembly.GetExecutingAssembly().GetCustomAttributes(typ
eof(AssemblyDescriptionAttribute), false);
// If there aren't any Description
attributes, return an empty string
if (attributes.Length == 0)
return "";
// If there is a Description attribute,
return its value
return
((AssemblyDescriptionAttribute)attributes[0]).Descripti
on;
}
}
115 | P a g e
public string AssemblyCopyright
{
get
{
// Get all Copyright attributes on this
assembly
object[] attributes =
Assembly.GetExecutingAssembly().GetCustomAttributes(typ
eof(AssemblyCopyrightAttribute), false);
// If there aren't any Copyright
attributes, return an empty string
if (attributes.Length == 0)
return "";
// If there is a Copyright attribute,
return its value
return
((AssemblyCopyrightAttribute)attributes[0]).Copyright;
}
}
116 | P a g e
private void tableLayoutPanel_Paint(object
sender, PaintEventArgs e)
{
}
}
}
117 | P a g e
Testing
Testing Principals -
Types of Testing -
118 | P a g e
In “MOBILE STORE MANAGEMENT SYSTEM” white box testing
has been implemented which is concerned with the
implementation of the program .The purpose is to exercise or try
out different programming and database used in the program. The
test concentrates on the examination of the code rather than the
specification (which is left for black box testing).
119 | P a g e
References
120 | P a g e
Conclusion
121 | P a g e