sreedbms
TRANSCRIPT
-
8/3/2019 sreedbms
1/56
COURIER MANAGEMENT
SYSTEM
1
-
8/3/2019 sreedbms
2/56
A Report
On
COURIER MANAGEMENT SYSTEM
For
DHL COURIER
Submitted to the
Department of Computer Applications
In partial fulfilment of the Course
Master of Computer Applications
Under the guidance of
ANITHA G KRISHNAN
BY
Sreejith P R(CA-194 )
DEPARTMENT OF COMPUTER APPLICATIONS
SCMS SCHOOL OF TECHNOLOGY AND MANAGEMENT
MUTTOM, ALWAYE,COCHIN - 683106
November 2010
2
-
8/3/2019 sreedbms
3/56
SCMS SCHOOL OF TECHNOLOGY AND MANAGEMENT
MUTTOM, ALWAYE,COCHIN - 683106
CERTIFICATE
This is to certify that the project entitled Courier Management System
has been successfully carried out by Sreejith P R (CA-194) in partial
fulfillment of the Course Master of Computer Applications.
Date: DIRECTOR
3
-
8/3/2019 sreedbms
4/56
SCMS SCHOOL OF TECHNOLOGY AND MANAGEMENT
MUTTOM, ALWAYE,COCHIN - 683106
CERTIFICATE
This is to certify that the project entitled Courier Management System
has been successfully carried out by Sreejith P R (CA-196) in partial
fulfillment of the course Master of Computer Applications under my
guidance .
Date: ANITHA G KRISHNAN
(Internal Guide)
4
-
8/3/2019 sreedbms
5/56
SCMS SCHOOL OF TECHNOLOGY AND MANAGEMENTMUTTOM, ALWAYE, COCHIN - 683106
DECLARATION
I, Sreejith P R, hereby declare that the project work entitled Courier Management
System is an authenticated work carried out by me,under the guidance ofANITHA G
KRISHNAN for the partial fulfillment of the course MASTER OF COMPUTER
APPLICATIONS and this work has not been submitted for similar purpose anywhere
else except to SCMS SCHOOL OF TECHNOLOGY AND MANAGEMENT,
COCHIN, affiliated to M.G.UNIVERSITY, KOTTAYAM.
I understand that detection of any such copying is liable to be punished in any way the
school deems fit.
Date:
Place: SREEJITH P R
5
-
8/3/2019 sreedbms
6/56
ACKNOWLEDGEMENT
My endeavour stands incomplete without expressing my gratitude to a few peoplewho have contributed a lot towards the successful completion of my project work.
First and foremost, I would like to express my sincere gratitude to God Almighty
for guiding me through my work.
I would like to express sincere thanks to our Director Mrs.Indu Nair for her kind
consideration and valuable guidence throughout the course of my project work.
I express my heartfelt gratitude to Anitha G Krishnan, my internal guide, for her
valuable guidance, co-operation and constant encouragements throughout the project
work. I extend my sincere thanks to all the faculty members of MCA department.
Last but not the least, I am very thankful to my parents and all my friends for
their constant encouragement and their valuable help during this project.
6
-
8/3/2019 sreedbms
7/56
CONTENTS
1. Executive summary---------------------------------------------------------9
2. Background
2.1 Existing system------------------------------------------------10
2.2 Definition of problem- Proposed system-------------------10
3. Project overview
3.1. Objective of the project-----------------------------------------------11
3.2. Scope of the project----------------------------------------------------11
3.3. Feasibility analysis-----------------------------------------------------12
3.3.1. Technical feasibility ----------------------------------------12
3.3.2. Operational feasibility---------------------------------------12
3.3.3. Economic feasibility-----------------------------------------12
4. System analysis and design4.1. System Planning-----------------------------------------------------13
4.2. Methodology-----------------------------------------------------13
4.3. Operational requirements-------------------------------------------------13
4.4. Front End and Back End-----------------------------------------------13
4.5.Class Diagram----------------------------------------------14
5. Detailed Life Cycle of the project
5.1. Inputs and Outputs------------------------------------------------15
5.2. Process Involved-------------------------------------------------------------21
5.3. Sample Tables-------------------------------------------------------22
5.4.Sample Code--------------------------------------------------------25
7
-
8/3/2019 sreedbms
8/56
5.5 Test Cases-------------------------------------------------------------55
6.Conclusion and Future Enhancement------------------------------------------56
7.References-----------------------------------------------------------------------56
8
-
8/3/2019 sreedbms
9/56
1. EXECUTIVE SUMMARY
The Project entitled Courier Management System is being done for an Courier
company named DHL Courier Service.The objective of this software is to fully computerize all the
activities and tasks performed by an agent in the company.The system is very user
friendly.The proposed system manages packet distribution and support excellent
reporting, billing and control over Courier Company and thus provide clear report to
management.
9
-
8/3/2019 sreedbms
10/56
2. BACK GROUND
2.1 Existing System
In the existing System,the whole process is done manually,that is
records and paper works are being used.The drawback of the existing system is the
impossibility of time management.
In the existing System,details of the customers are given in the
records.It takes long time to view the packet details,destination customer details etc.
2.2Proposed System
The proposed system will give solution to the problems mentioned
in earlier system.The proposed system will be very easy,efficient,simple and fault free.It also reduces the loss of data and there will be faster access to data.The system will be
very user friendly and another major factor is the time management.
The proposed system can overcome the limitations of the existing system
to an extent.The proposed system is easy to use,its interface is designed in such a way
that even a new user who does not have any knowledge of computers can manage it
easily.Proposed system provides easy access to customer details,packet details,whetherpacket is delivered, pending or returned back to the client,printing of the bills etc.
10
-
8/3/2019 sreedbms
11/56
3. PROJECT OVERVIEW
3.1 Objective of the project
Courier Management System is the system which assist in automation of the
packet entry at the time of receiving the packet from the clients so as to ease the primary
activity of the company
The objectives can be listed as follows:
To manage the customer data efficiently.
To help agent work easily and efficiently.
Generating a unique tracking no.
Entering the information about the address where the packet is to
be delivered.
Calculating the charge of the packet delivery
To provide security through the authentication of users.
3.2 Scope of the project
Courier Management System provides information for managing the
business processes, monitor, analyze and improve all the related activities. The most
advantageous feature is that all the activities and their respective summary reports are
designed in such a way that it helps for quicker decision-making, calculating the charges
of the packet delivery,and less effort is required.
Courier Management System is used to maintain the customer data efficiently,
generating a unique tracking no etc .The authentication and security for the data is
maintained.
3.3 Feasibility AnalysisThe feasibility of a proposed system can be evaluated in terms of following
categories:-
11
-
8/3/2019 sreedbms
12/56
3.3.1 Technical Feasibility
Technical feasibility was done to analyze whether the organization have
requirements that is needed for the system implementation. The system is a desktop
application with Visual studio C# as front-end and oracle as back-end. The system works
well in the organization, since it satisfies the minimal requirements for the working of
the system.
3.3.2 Operational Feasibility
The success of any project depends on how well it can be utilized by the end
users. The user of this software is the administrator. The interface is designed in such a
way that even a person with a little knowledge in computer can efficiently handle it and
only a basic training is needed. It reduces the manual labor of the user.We have been
given training for the administrator about how to use the system.so the system is feasible
for the user.
3.3.3 Economic Feasibility: Cost-Benefit Analysis
This project after implementation will result in minimum cost. It was seen that
the cost of proposed system could be handled by the organization. And when comparedwith the cost saving on the implementation of the system, it is very much feasible.
12
-
8/3/2019 sreedbms
13/56
4. SYSTEM ANALYSIS & DESIGN
4.1.System Planning
The requirement analysis was completed in a week. The designing of the
system had taken only 1 week and coding within 2 weeks. Finally the system has
undergone testing 2 days.
4.2.Methodology
The development process follows waterfall methodology. All the
requirements are known before and the system is designed. After every phase, it gets
freeze.
4.3. Operational requirements
A Pentium II, 256 MB RAM with a processor speed greater than o
r equal to 400 MHz
Video card, resolution 1024 x 768
At least 1 GB hard disk space
Keyboard,104 keys
Monitor, color monitor
Mouse, standard
4.4.Front End and Back End
The system is a desktop application with Visual studio C# as front-end and
oracle as back-end.
13
-
8/3/2019 sreedbms
14/56
4.5.Class Diagram
Login
Username
Password
+login()
Login
Username
Password
+login()
Customer
CL_IDCUS_NAMEGENDER
ADDRESSPH_NOEMAIL
D_O_P
+Add(),+Update()
+Delete(),
+Search()
Customer
CL_IDCUS_NAMEGENDER
ADDRESSPH_NOEMAIL
D_O_P
+Add(),+Update()
+Delete(),
+Search()
Parcel
CL_ID
PAR_IDTOT_PAR_ITM
PAR_DESCDEL_DAT
+Add(),+Search()
Parcel
CL_ID
PAR_IDTOT_PAR_ITM
PAR_DESCDEL_DAT
+Add(),+Search()
Destination
CL_ID
D_CUS_NAD_ADDRCITY
STATECOUNTRYPIN
PHONE
EMAIL
+Add(),+Search()
Destination
CL_ID
D_CUS_NAD_ADDRCITY
STATECOUNTRYPIN
PHONE
EMAIL
+Add(),+Search()
Bill
BNODAT
CL_IDCUS_NAMECUS_ADDR
PAR_IDCATEGORYSERV_C
WEIGHTWEG_COSTTOTAL
+Total()
+Add()+List()
Bill
BNODAT
CL_IDCUS_NAMECUS_ADDR
PAR_IDCATEGORYSERV_C
WEIGHTWEG_COSTTOTAL
+Total()
+Add()+List()
Status
CL_ID
PAR_IDCUS_NAME
DEST_ADDR
STATUS
+Add(),+Status()
Status
CL_ID
PAR_IDCUS_NAME
DEST_ADDR
STATUS
+Add(),+Status()
14
-
8/3/2019 sreedbms
15/56
5. Detailed Life Cycle of the project
5.1. Inputs and Outputs
Screen shots
Login Form
15
-
8/3/2019 sreedbms
16/56
Home Form
Customer Form
16
-
8/3/2019 sreedbms
17/56
Parcel Form
Destination Form
17
-
8/3/2019 sreedbms
18/56
Bill Form
Status Form
Report Form
18
-
8/3/2019 sreedbms
19/56
Update Parcel
Update Destination
19
-
8/3/2019 sreedbms
20/56
5.2. Process Involved
20
-
8/3/2019 sreedbms
21/56
The processes invoved in the system is customer registration,parcel
management,destination customer management,billing.Insertion deletion,updation and
searching are the operations performed by the system. Report generation for every
operations are available.
A functional requirement is a requirement that, when satisfied, will allow
the user to perform some kind of function.
They include the following:
1. Login
2. Customer registration.
3. Parcel Management
4. Destination Customer Management.
5. Bill
5.3. Sample Tables
21
-
8/3/2019 sreedbms
22/56
login
Field name Type Size DescriptionUSERNAME VARCHAR2 15 username
PASSWORD VARCHAR2 15 PASSWORD
customer
Field name Type Size Description
C_id Varchar2 10 Customer id
Cus_name Varchar2 15 Customer name
Gender Varchar2 10 Gender
Address Varchar2 15 Adress
Ph_no Varchar2 10 Phone no
Email Varchar2 15 Email
D_o_p Date Date of packing
parcel
Field name Type Size Description
C_id Varchar2 15 Customer id
Par_id Varchar2 10 Parcel id
Tot_Par_Itm Varchar2 20 Total Parcel Items
Par_Desc Varchar2 20 Parcel Description
Del_Dat Date Delivery Date
22
-
8/3/2019 sreedbms
23/56
Destination
Field name Type Size Description
C_id Varchar2 15 Customer id
D_Cus_Name Varchar2 10 Destination
Customer Name
D_Addr Varchar2 20 Destination
Customer Address
City Varchar2 20 City
State Varchar2 15 State
Country Varchar2 15 Country
Pin Varchar2 15 Pin
Phone Varchar2 15 Phone no
Email Varchar2 15 Email
Bill
23
-
8/3/2019 sreedbms
24/56
Field name Type Size Description
Bno Varchar2 15 Bill no
Dat Date Date
Cl_id Varchar2 15 Customer id
Cus_Adrr Varchar2 20 Customer Address
Par_id Varchar2 15 Parcel id
Categoery Varchar2 15 Category
Serv_c Varchar2 15 Service Charge
Weight Varchar2 15 Weight
Weg_Cost Varchar2 15 Weight cost
Total Varchar2 30 Total
Status
Field name Type Size Description
Cl_id Varchar2 15 Customer id
Par_id Varchar2 15 Parcel id
Cus_name Varchar2 15 Customer name
D_Addr Varchar2 20 Destination
Customer Address
Status Varchar2 20 status
5.4.Sample Code
Login form
24
-
8/3/2019 sreedbms
25/56
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Data.OracleClient;using System.Text;using System.Windows.Forms;
namespace username{ publicpartialclassForm1 : Form
{ privateFHome x;
int c=0;
OracleCommand com; OracleConnection con; OracleDataReader dar;
String s1; int temp=0; public Form1()
{
InitializeComponent();}
privatevoid Form1_Load(object sender, EventArgs e){
s1= "Data Source=sstmmca;UserId=ca194;password=sreejith007;Unicode=True";
con = newOracleConnection(s1);}
privatevoid button1_Click(object sender, EventArgs e){
try{
string select = "select * from Login where username='" +textBox1.Text + "' and password='" + textBox2.Text + "' ";
con.Open();
com = newOracleCommand(select, con);dar = com.ExecuteReader();
while (dar.Read())
{
if (dar["username"].ToString() == textBox1.Text &&dar["password"].ToString() == textBox2.Text)
{temp = 1;
this.Hide();x = newFHome();x.Show();
25
-
8/3/2019 sreedbms
26/56
}
} if (temp != 0)
{label3.Visible = false;
MessageBox.Show("!!!!!Welcome!!!!!! ");
} else
{label3.Visible = true;
c = c + 1;
if (c == 3){
MessageBox.Show("OOops.....u seems to be aninvalid user"); Application.Exit();
}
}
textBox1.Clear();textBox2.Clear();temp = 0;
} catch (Exception e1)
{ MessageBox.Show(e1.Message);
} finally
{con.Close();
}}
privatevoid button2_Click(object sender, EventArgs e){
this.Hide();x = newFHome();x.Show();
}
}
}
Home Page
26
-
8/3/2019 sreedbms
27/56
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;
namespace username{ publicpartialclassFHome : Form
{ public FHome()
{InitializeComponent();
}
privatevoid linkLabel1_LinkClicked(object sender,LinkLabelLinkClickedEventArgs e)
{
this.Hide(); home h = newhome();
h.Show();
}
privatevoid groupBox1_Enter(object sender, EventArgs e){
}
privatevoid linkLabel2_LinkClicked(object sender,LinkLabelLinkClickedEventArgs e)
{ this.Hide(); Delete h = newDelete();
h.Show();}
privatevoid linkLabel3_LinkClicked(object sender,LinkLabelLinkClickedEventArgs e)
{linkLabel4.Show();linkLabel5.Show();
}
privatevoid linkLabel4_LinkClicked(object sender,LinkLabelLinkClickedEventArgs e)
{ this.Hide(); uparceln up = newuparceln();
up.Show();}
privatevoid FHome_Load(object sender, EventArgs e)
27
-
8/3/2019 sreedbms
28/56
{linkLabel4.Hide();linkLabel5.Hide();
}
privatevoid linkLabel5_LinkClicked(object sender,LinkLabelLinkClickedEventArgs e)
{ this.Hide(); udest ud = newudest();
ud.Show();}
privatevoid linkLabel6_LinkClicked(object sender,LinkLabelLinkClickedEventArgs e)
{
check c = newcheck();c.Show();
}
privatevoid linkLabel7_LinkClicked(object sender,LinkLabelLinkClickedEventArgs e)
{ Report r = newReport();
r.Show();
}
privatevoid label1_Click(object sender, EventArgs e){
}}
}
Customer form
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Data.OracleClient;using System.Windows.Forms;
namespace username{ publicpartialclasshome : Form
{ OracleCommand com; OracleConnection con; OracleDataReader dar; String s; public home()
28
-
8/3/2019 sreedbms
29/56
{InitializeComponent();
}
privatevoid button1_Click(object sender, EventArgs e){
String s1 = string.Format("insert into Customer
values('{0}','{1}','{2}','{3}','{4}','{5}','{6}')", textBox1.Text,textBox2.Text,comboBox1.Text,textBox4.Text,textBox5.Text,textBox6.Text,textBox3.Text); //String s2 = string.Format("insert into novalues('{0}')", textBox1.Text);
com = newOracleCommand(s1, con);con.Open();
int i = com.ExecuteNonQuery(); if (i == 1)
{ // MessageBox.Show("inserted");
} else
{ MessageBox.Show("not un");
}
con.Close();
String s2 = string.Format("insert into novalues('{0}')", textBox1.Text);
com = newOracleCommand(s2, con);con.Open();
int i1 = com.ExecuteNonQuery(); if (i1 == 1)
{ MessageBox.Show("Details Saved");
} else
{ MessageBox.Show("not un");
}
con.Close();
}
privatevoid home_Load(object sender, EventArgs e){
s = "Data Source=sstmmca;UserId=ca194;password=sreejith007;Unicode=True";
con = newOracleConnection(s);textBox3.Text = DateTime.Now.ToString("dd-MMM-yyyy");listBox1.Hide();
29
-
8/3/2019 sreedbms
30/56
try{
con.Open(); int c = 1;
com = newOracleCommand("Select * from no", con);dar = com.ExecuteReader();
while (dar.Read()){
c++;}c = c + 100;c = c + 2;
textBox1.Text = "c"+c.ToString();}
catch (Exception e1){
MessageBox.Show(e1.Message);}
finally
{con.Close();
}
}
privatevoid textBox3_TextChanged(object sender, EventArgs e){
}
privatevoid label4_Click(object sender, EventArgs e){
}
privatevoid textBox4_TextChanged(object sender, EventArgs e){
}
privatevoid textBox7_TextChanged(object sender, EventArgs e){
}
privatevoid comboBox1_SelectedIndexChanged(object sender,
EventArgs e){
}
privatevoid button2_Click(object sender, EventArgs e){
listBox1.Items.Clear();listBox1.Show();
30
-
8/3/2019 sreedbms
31/56
try{
con.Open();com = newOracleCommand("Select * from customer", con);dar = com.ExecuteReader();
while (dar.Read()){
listBox1.Items.Add(dar["Cl_id"]);}
} catch (Exception e1)
{ MessageBox.Show(e1.Message);
} finally
{con.Close();
}
}
privatevoid listBox1_SelectedIndexChanged(object sender,EventArgs e)
{
try{
con.Open(); string s1 = string.Format("select * from customer whereCl_id='{0}'", listBox1.Text);
com = newOracleCommand(s1, con);dar = com.ExecuteReader();dar.Read();textBox1.Text = dar["cl_id"].ToString();textBox2.Text = dar["CUS_NAME"].ToString();comboBox1.Text = dar["GENDER"].ToString();textBox4.Text = dar["ADDRESS"].ToString();textBox5.Text = dar["PH_NO"].ToString();textBox6.Text = dar["EMAIL"].ToString();textBox3.Text = dar["D_O_P"].ToString();
} catch (Exception e1)
{ MessageBox.Show(e1.Message);
} finally
{con.Close();
}}
privatevoid button3_Click(object sender, EventArgs e){
listBox1.Items.Clear();textBox1.Clear();
31
-
8/3/2019 sreedbms
32/56
textBox2.Clear();textBox3.Clear();textBox4.Clear();textBox5.Clear();textBox6.Clear();comboBox1.Items.Clear();
}
privatevoid textBox1_TextChanged(object sender, EventArgs e){
}
privatevoid button4_Click(object sender, EventArgs e){
try{
String s1 = string.Format("Delete from customer wherecl_id ='{0}'", textBox1.Text);
com = newOracleCommand(s1, con);con.Open();
int i = com.ExecuteNonQuery(); if (i == 1)
{listBox1.Items.Clear();textBox1.Clear();textBox2.Clear();textBox3.Clear();textBox4.Clear();textBox5.Clear();textBox6.Clear();comboBox1.Items.Clear();
MessageBox.Show("Successfully Removed");
}}
catch (Exception e1){
MessageBox.Show(e1.Message);}
finally{
con.Close();}
}
privatevoid button5_Click(object sender, EventArgs e){
try{
String s1 = string.Format("update customer setcus_name='{0}', GENDER='{1}',ADDRESS='{2}',PH_NO='{3}',EMAIL='{4}',D_O_P='{5}'where cl_id='{6}'",
32
-
8/3/2019 sreedbms
33/56
textBox2.Text,comboBox1.Text,textBox4.Text,textBox5.Text,textBox6.Text,textBox3.Text,textBox1.Text);
com = newOracleCommand(s1, con);con.Open();
int i = com.ExecuteNonQuery(); if (i == 1)
{ MessageBox.Show("Details updated");
}}
catch (Exception e1){
MessageBox.Show(e1.Message);}
finally{
con.Close();}
}
privatevoid button6_Click(object sender, EventArgs e){
if (textBox2.Text == String.Empty){
MessageBox.Show("pls make sure that all fields areentered");
} elseif (textBox3.Text == String.Empty)
{ MessageBox.Show("pls make sure that all fields areentered");
}
elseif (textBox4.Text == String.Empty){
MessageBox.Show("pls make sure that all fields areentered");
} elseif (textBox5.Text == String.Empty)
{ MessageBox.Show("pls make sure that all fields are
entered");}
elseif (textBox6.Text == String.Empty){
MessageBox.Show("pls make sure that all fields areentered");
} elseif(comboBox1.Text==String.Empty)
{
33
-
8/3/2019 sreedbms
34/56
MessageBox.Show("pls make sure that all fields areentered");
} else
{ this.Hide(); Parcel p = newParcel();
p.Show();}
}
privatevoid button7_Click(object sender, EventArgs e){}
privatevoid button8_Click(object sender, EventArgs e){
this.Hide(); FHome h = newFHome();
h.Show();}
privatevoid textBox2_TextChanged(object sender, EventArgs e){
}}
}
Parcel form
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Data.OracleClient;using System.Drawing;using System.Text;using System.Windows.Forms;
namespace username{ publicpartialclassParcel : Form
{ OracleCommand com; OracleConnection con; OracleDataReader dar; String s; public Parcel()
34
-
8/3/2019 sreedbms
35/56
{InitializeComponent();
} privatevoid Parcel_Load(object sender, EventArgs e)
{comboBox1.Items.Clear();comboBox1.Hide();listBox1.Hide();s = "Data Source=sstmmca;User
Id=ca194;password=sreejith007;Unicode=True";con = newOracleConnection(s);button5.Hide();
try{
con.Open(); int k = 1;
com = newOracleCommand("Select * from parcel", con);dar = com.ExecuteReader();
while (dar.Read()){
k = k + 20;}
textBox2.Text = "P" + k.ToString();}
catch (Exception e1){
MessageBox.Show(e1.Message);}
finally{
con.Close();}
try{
con.Open(); int c = 1;
com = newOracleCommand("Select * from customer", con);dar = com.ExecuteReader();
while (dar.Read()){
c++;}c = c + 50;c = c - 1;
label6.Text = "c" + c.ToString();}
catch (Exception e1){
MessageBox.Show(e1.Message);}
finally{
con.Close();
35
-
8/3/2019 sreedbms
36/56
} try
{con.Open();
int c = 1;com = newOracleCommand("Select * from no", con);dar = com.ExecuteReader();
while (dar.Read()){
c++;}c = c + 100;c = c + 2;c = c - 1;
textBox1.Text = "c" + c.ToString();}
catch (Exception e1){
MessageBox.Show(e1.Message);
} finally
{con.Close();
}
}
privatevoid button1_Click(object sender, EventArgs e){
try{
String s1 = string.Format("insert into parcelvalues('{0}','{1}','{2}','{3}','{4}')", textBox1.Text, textBox2.Text,textBox3.Text, textBox4.Text, textBox5.Text);
com = newOracleCommand(s1, con);con.Open();
int i = com.ExecuteNonQuery(); if (i == 1)
{ MessageBox.Show("Successfully Added");
}
} catch (Exception e1)
{ MessageBox.Show(e1.Message);
} finally
{con.Close();
}
36
-
8/3/2019 sreedbms
37/56
}
privatevoid comboBox1_TextChanged(object sender, EventArgs e){
con.Open(); String s1 = "Select * from customer where cl_id like'" +comboBox1.Text + "%'";
com = newOracleCommand(s1, con);dar = com.ExecuteReader();
while (dar.Read()){
comboBox1.Items.Add(dar[0]);}
con.Close();}
privatevoid button2_Click(object sender, EventArgs e){
textBox2.Clear();textBox3.Clear();textBox4.Clear();textBox5.Clear();
}
privatevoid button3_Click(object sender, EventArgs e){
this.Hide(); dest d = newdest();
d.Show();
}
privatevoid button4_Click(object sender, EventArgs e){
try{
listBox1.Show();
con.Open();com = newOracleCommand("Select * from customer", con);
dar = com.ExecuteReader(); while (dar.Read())
{listBox1.Items.Add(dar["Cl_id"]);
}
} catch (Exception e1)
{
37
-
8/3/2019 sreedbms
38/56
MessageBox.Show(e1.Message);}
finally{
con.Close();}
}
privatevoid comboBox1_SelectedIndexChanged_1(object sender,EventArgs e)
{
}
privatevoid button5_Click(object sender, EventArgs e){
try
{ String s1 = string.Format("update parcel setPAR_ID='{0}',TOT_PAR_ITM='{1}',PAR_DESC='{2}',DEL_DAT='{3}'wherecl_id='{4}'", textBox2.Text, textBox3.Text, textBox4.Text,textBox5.Text, comboBox1.Text);
com = newOracleCommand(s1, con);con.Open();
int i = com.ExecuteNonQuery(); if (i == 1)
{ MessageBox.Show("Details updated");
}}
catch (Exception e1){
MessageBox.Show(e1.Message);}
finally{
con.Close();}
}
privatevoid textBox2_TextChanged(object sender, EventArgs e){
}
privatevoid button8_Click(object sender, EventArgs e){
this.Hide(); FHome h = newFHome();
h.Show();}
38
-
8/3/2019 sreedbms
39/56
privatevoid comboBox1_SelectedIndexChanged_2(object sender,EventArgs e)
{
}
privatevoid comboBox1_TextChanged_1(object sender, EventArgse)
{con.Open();
String s1 = "Select * from customer where cl_id like'" +comboBox1.Text + "%'";
com = newOracleCommand(s1, con);dar = com.ExecuteReader();
while (dar.Read()){
comboBox1.Items.Add(dar[0]);}
con.Close();}
privatevoid textBox3_TextChanged(object sender, EventArgs e){
}
privatevoid textBox1_TextChanged(object sender, EventArgs e){
}
privatevoid listBox1_SelectedIndexChanged(object sender,EventArgs e)
{ try
{con.Open();
string s1 = string.Format("select * from parcel whereCl_id='{0}'", listBox1.Text);
com = newOracleCommand(s1, con);dar = com.ExecuteReader();
dar.Read();textBox1.Text = dar["cl_id"].ToString();textBox2.Text = dar["PAR_ID"].ToString();textBox3.Text = dar["TOT_PAR_ITM"].ToString();textBox4.Text = dar["PAR_DESC"].ToString();textBox5.Text = dar["DEL_DAT"].ToString();
} catch (Exception e1)
{
39
-
8/3/2019 sreedbms
40/56
MessageBox.Show(e1.Message);}
finally{
con.Close();}
}
privatevoid textBox4_TextChanged(object sender, EventArgs e){
}
}}
Destiantion form
using System;
using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Data.OracleClient;using System.Drawing;using System.Text;using System.Windows.Forms;
namespace username{ publicpartialclassdest : Form
{
OracleCommand com; OracleConnection con; OracleDataReader dar; String s; public dest()
{InitializeComponent();
}
privatevoid button1_Click(object sender, EventArgs e){
try{
String s1 = string.Format("insert into destinationvalues('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}')",textBox1.Text, textBox2.Text,textBox3.Text,comboBox2.Text,comboBox3.Text,comboBox4.Text,textBox7.Text,textBox8.Text,textBox9.Text);
com = newOracleCommand(s1, con);con.Open();
int i = com.ExecuteNonQuery();
40
-
8/3/2019 sreedbms
41/56
if (i == 1){
MessageBox.Show("Details Added successfully");
}}
catch (Exception e1){
MessageBox.Show(e1.Message);}
finally{
con.Close();}
}
privatevoid comboBox1_SelectedIndexChanged(object sender,EventArgs e)
{
}
privatevoid dest_Load(object sender, EventArgs e){
button3.Hide();s = "Data Source=sstmmca;User
Id=ca194;password=sreejith007;Unicode=True";con = newOracleConnection(s);comboBox1.Hide();
try{
con.Open(); int c = 1;
com = newOracleCommand("Select * from no", con);dar = com.ExecuteReader();
while (dar.Read()){
c++;}c = c + 100;c = c + 2;c = c - 1;
textBox1.Text = "c" + c.ToString();}
catch (Exception e1)
{ MessageBox.Show(e1.Message);
} finally
{con.Close();
}}
41
-
8/3/2019 sreedbms
42/56
privatevoid comboBox1_TextChanged(object sender, EventArgs e){
try{
con.Open(); String s1 = "Select * from customer where cl_id like'"+ comboBox1.Text + "%'";
com = newOracleCommand(s1, con);dar = com.ExecuteReader();
while (dar.Read()){
comboBox1.Items.Add(dar[0]);}
} catch (Exception e1)
{ MessageBox.Show(e1.Message);
} finally
{
con.Close();}
}
privatevoid comboBox2_SelectedIndexChanged(object sender,EventArgs e)
{
}
privatevoid button2_Click(object sender, EventArgs e){
try{
listBox1.Show();
con.Open();com = newOracleCommand("Select * from customer", con);dar = com.ExecuteReader();
while (dar.Read()){
listBox1.Items.Add(dar["Cl_id"]);}
} catch (Exception e1)
{ MessageBox.Show(e1.Message);
} finally
{con.Close();
42
-
8/3/2019 sreedbms
43/56
}
}
privatevoid button3_Click(object sender, EventArgs e){
try{
String s1 = string.Format("update destination setD_CUS_NAME='{0}',D_ADDR='{1}',CITY='{2}',STATE='{3}',COUNTRY='{4}',PIN='{5}',PHONE='{6}',EMAIL='{7}'where cl_id='{8}'",textBox2.Text,textBox3.Text,comboBox2.Text,comboBox3.Text,comboBox4.Text,textBox7.Text,textBox8.Text,textBox9.Text,comboBox1.Text);
com = newOracleCommand(s1, con);
con.Open(); int i = com.ExecuteNonQuery(); if (i == 1)
{ MessageBox.Show("Details updated");
}}
catch (Exception e1){
MessageBox.Show(e1.Message);}
finally{
con.Close();}
}
privatevoid button4_Click(object sender, EventArgs e){
textBox2.Clear();textBox3.Clear();textBox7.Clear();textBox8.Clear();textBox9.Clear();comboBox2.Items.Clear();comboBox3.Items.Clear();
comboBox4.Items.Clear();button1.Show();
}
privatevoid button5_Click(object sender, EventArgs e){
this.Hide(); Bill b = newBill();
b.Show();
43
-
8/3/2019 sreedbms
44/56
}
privatevoid button8_Click(object sender, EventArgs e){
this.Hide(); FHome h = newFHome();
h.Show();}
privatevoid comboBox1_SelectedIndexChanged_1(object sender,EventArgs e)
{
}
privatevoid comboBox1_TextChanged_1(object sender, EventArgse)
{con.Open();
String s1 = "Select * from customer where cl_id like'" +
comboBox1.Text + "%'";com = newOracleCommand(s1, con);dar = com.ExecuteReader();
while (dar.Read()){
comboBox1.Items.Add(dar[0]);}
con.Close();}
privatevoid listBox1_SelectedIndexChanged(object sender,EventArgs e)
{ try
{button1.Hide();con.Open();
string s1 = string.Format("select * from destinationwhere Cl_id='{0}'", listBox1.Text);
com = newOracleCommand(s1, con);dar = com.ExecuteReader();dar.Read();textBox1.Text = dar["cl_id"].ToString();
textBox2.Text = dar["D_CUS_NAME"].ToString();textBox3.Text = dar["D_ADDR"].ToString();comboBox2.Text = dar["CITY"].ToString();comboBox3.Text = dar["STATE"].ToString();comboBox4.Text = dar["COUNTRY"].ToString();textBox7.Text = dar["PIN"].ToString();textBox8.Text = dar["PHONE"].ToString();textBox9.Text = dar["EMAIL"].ToString();
44
-
8/3/2019 sreedbms
45/56
} catch (Exception e1)
{ MessageBox.Show(e1.Message);
} finally
{con.Close();
}}
}}
Status Form
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Data.OracleClient;using System.Drawing;
using System.Text;using System.Windows.Forms;
namespace username{ publicpartialclassDelete : Form
{ OracleCommand com; OracleConnection con; OracleDataReader dar; String s1; public Delete()
{
InitializeComponent();}
privatevoid comboBox1_TextChanged(object sender, EventArgs e){
con.Open(); String s1 = "Select * from customer where cl_id like'" +comboBox1.Text + "%'";
com = newOracleCommand(s1, con);dar = com.ExecuteReader();
while (dar.Read()){
comboBox1.Items.Add(dar[0]);}
con.Close();
}
privatevoid Delete_Load(object sender, EventArgs e){
listBox1.Items.Clear();
45
-
8/3/2019 sreedbms
46/56
s1 = "Data Source=sstmmca;UserId=ca194;password=sreejith007;Unicode=True";
con = newOracleConnection(s1);
}
privatevoid button1_Click(object sender, EventArgs e){
}
privatevoid listBox1_SelectedIndexChanged(object sender,EventArgs e)
{
}
privatevoid comboBox1_SelectedIndexChanged(object sender,EventArgs e)
{
try{
String s1 = string.Format("selectc.CUS_NAME,p.par_id,d.D_CUS_NAME,d.D_ADDR,d.CITY,d.STATE,d.COUNTRY,d.PIN,d.email from customer c,parcel p,destination d where c.CL_ID=p.CL_IDand d.cl_id=c.cl_id and c.CL_ID ='{0}'", comboBox1.Text);
com = newOracleCommand(s1, con);con.Open();dar = com.ExecuteReader();dar.Read();textBox2.Text = dar["cus_name"].ToString();textBox1.Text = dar["par_id"].ToString();listBox1.Items.Add(dar["d_cus_name"].ToString());listBox1.Items.Add(dar["d_addr"].ToString());listBox1.Items.Add(dar["city"].ToString());listBox1.Items.Add(dar["state"].ToString());listBox1.Items.Add(dar["pin"].ToString());listBox1.Items.Add(dar["email"].ToString());
} catch (Exception e1)
{ MessageBox.Show(e1.Message);
} finally
{con.Close();
}}
privatevoid button1_Click_1(object sender, EventArgs e){
try{
46
-
8/3/2019 sreedbms
47/56
String s1 = string.Format("insert into status
values('{0}','{1}','{2}','{3}','{4}')", comboBox1.Text,textBox1.Text,textBox2.Text,listBox1.Text,textBox4.Text);
com = newOracleCommand(s1, con);con.Open();
int i = com.ExecuteNonQuery(); if (i == 1)
{ MessageBox.Show("Added Successfully");
}}
catch (Exception e1){
MessageBox.Show(e1.Message);}
finally{
con.Close();
}
}
privatevoid button2_Click(object sender, EventArgs e){
textBox1.Clear();textBox2.Clear();textBox4.Clear();listBox1.Items.Clear();
}
privatevoid button3_Click(object sender, EventArgs e){
try{
con.Open(); string s1 = string.Format("select * from status whereCl_id='{0}'", comboBox1.Text.ToString());
com = newOracleCommand(s1, con);dar = com.ExecuteReader();dar.Read();textBox4.Text = dar["status"].ToString();
} catch (Exception e1)
{ MessageBox.Show(e1.Message);
} finally
{con.Close();
}}
privatevoid button8_Click(object sender, EventArgs e){
47
-
8/3/2019 sreedbms
48/56
this.Hide(); FHome h = newFHome();
h.Show();}
}}
Bill
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Data.OracleClient;using System.Drawing;using System.Text;using System.Windows.Forms;
namespace username{ publicpartialclassBill : Form
{ OracleCommand com; OracleConnection con; OracleDataReader dar;
String s; public Bill()
{InitializeComponent();
}
privatevoid textBox2_TextChanged(object sender, EventArgs e){
}
privatevoid comboBox1_TextChanged(object sender, EventArgs e){
try{
con.Open(); String s1 = "Select * from customer where cl_id like'"+ comboBox1.Text + "%'";
com = newOracleCommand(s1, con);dar = com.ExecuteReader();
while (dar.Read()){
48
-
8/3/2019 sreedbms
49/56
comboBox1.Items.Add(dar[0]);}
} catch (Exception e1)
{ MessageBox.Show(e1.Message);
} finally
{con.Close();
}
}
privatevoid comboBox1_SelectedIndexChanged(object sender,EventArgs e)
{ try
{con.Open();
String s1 = string.Format("Selectc.cus_name,c.ADDRESS,p.par_id from customer c,parcel p where c.cl_id=p.cl_id and c.CL_ID ='{0}'", comboBox1.Text);
com = newOracleCommand(s1, con);dar = com.ExecuteReader();dar.Read();textBox2.Text = dar["par_id"].ToString();textBox5.Text = dar["cus_name"].ToString();textBox6.Text = dar["address"].ToString();
} catch (Exception e1)
{ MessageBox.Show(e1.Message);
} finally
{con.Close();
}
}
privatevoid Bill_Load(object sender, EventArgs e){
s = "Data Source=sstmmca;UserId=ca194;password=sreejith007;Unicode=True";
con = newOracleConnection(s);
textBox9.Text = DateTime.Now.ToString("dd-MMM-yyyy");textBox10.Hide();
try{
con.Open(); int k = 1;
com = newOracleCommand("Select * from bill", con);dar = com.ExecuteReader();
49
-
8/3/2019 sreedbms
50/56
while (dar.Read()){
k= k + 20;}
textBox1.Text = k.ToString();
} catch (Exception e1)
{ MessageBox.Show(e1.Message);
} finally
{con.Close();
}}
privatevoid textBox3_TextChanged(object sender, EventArgs e){
}
privatevoid comboBox2_SelectedIndexChanged(object sender,EventArgs e)
{
if (comboBox2.Text == "Local"){
textBox3.Text = "1000";}
else{
textBox3.Text = "2000";}
}
privatevoid textBox7_TextChanged(object sender, EventArgs e){
}
privatevoid textBox4_TextChanged(object sender, EventArgs e){
}
privatevoid button1_Click(object sender, EventArgs e){
float x = float.Parse(textBox4.Text); float y = x * 50;
50
-
8/3/2019 sreedbms
51/56
textBox7.Text = y.ToString();
float w = float .Parse(textBox3.Text); float g = float.Parse(textBox7.Text); float z = w + g;
textBox8.Text = z.ToString();}
privatevoid button2_Click(object sender, EventArgs e){
listBox1.Items.Clear(); try
{con.Open();com = newOracleCommand("Select * from bill", con);dar = com.ExecuteReader();
while (dar.Read()){
listBox1.Items.Add(dar["Cl_id"]);}
} catch (Exception e1)
{ MessageBox.Show(e1.Message);
} finally
{con.Close();
}
}
privatevoid listBox1_SelectedIndexChanged(object sender,EventArgs e)
{ try
{comboBox1.Hide();textBox10.Show();con.Open();
string s1 = string.Format("select * from bill whereCl_id='{0}'", listBox1.Text);
com = newOracleCommand(s1, con);dar = com.ExecuteReader();dar.Read();textBox1.Text = dar["bno"].ToString();
textBox9.Text = dar["DAT"].ToString();textBox10.Text = dar["CL_ID"].ToString();
// comboBox1.Text = dar["CL_ID"].ToString();textBox5.Text = dar["CUS_NAME"].ToString();textBox6.Text = dar["CUS_ADDR"].ToString();textBox2.Text = dar["PAR_ID"].ToString();comboBox2.Text = dar["CATEGORY"].ToString();textBox3.Text = dar["SERV_C"].ToString();textBox4.Text = dar["WEIGHT"].ToString();
51
-
8/3/2019 sreedbms
52/56
textBox7.Text = dar["WEG_COST"].ToString();textBox8.Text = dar["TOTAL"].ToString();
} catch (Exception e1)
{ MessageBox.Show(e1.Message);
} finally
{con.Close();
}}
privatevoid button3_Click(object sender, EventArgs e){
try{
con.Open(); String s1 = string.Format("insert into billvalues('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10
}')", textBox1.Text,textBox9.Text,comboBox1.Text,textBox5.Text,textBox6.Text,textBox2.Text,comboBox2.Text,textBox3.Text,textBox4.Text,textBox7.Text,textBox8.Text);
com = newOracleCommand(s1, con); int i = com.ExecuteNonQuery(); if (i == 1)
{ MessageBox.Show("inserted");
}
} catch (Exception e1)
{ MessageBox.Show(e1.Message);
} finally
{con.Close();
}}
privatevoid button4_Click(object sender, EventArgs e){
comboBox1.Show();textBox10.Hide();
textBox1.Clear();textBox9.Clear();textBox10.Clear();comboBox1.Items.Clear();textBox5.Clear();textBox6.Clear();textBox2.Clear();comboBox2.Items.Clear();textBox3.Clear();
52
-
8/3/2019 sreedbms
53/56
textBox4.Clear();textBox7.Clear();textBox8.Clear();
}
privatevoid comboBox2_TextChanged(object sender, EventArgs e){
}
privatevoid button5_Click(object sender, EventArgs e){
this.Hide(); FHome f=newFHome();
f.Show();}
privatevoid textBox10_TextChanged(object sender, EventArgs e){
}}
}
Bill Report
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Data.OracleClient;using System.Drawing;using System.Text;
using System.Windows.Forms;
namespace username{ publicpartialclassReport : Form
{ OracleCommand com; OracleConnection con;
OracleDataAdapter dap; DataSet dst; String s; public Report()
{ InitializeComponent();}
privatevoid Report_Load(object sender, EventArgs e){
s = "Data Source=sstmmca;UserId=ca194;password=sreejith007;Unicode=True";
con = newOracleConnection(s);}
53
-
8/3/2019 sreedbms
54/56
privatevoid button1_Click(object sender, EventArgs e){
try{
con.Open();com = newOracleCommand("Select * from bill", con);dap = newOracleDataAdapter(com);dst = newDataSet();dap.Fill(dst,"bill");dataGridView1.DataSource = dst.Tables["bill"];
} catch (Exception e1)
{ MessageBox.Show(e1.Message);
} finally
{
con.Close();}
}
privatevoid button2_Click(object sender, EventArgs e){
this.Hide(); FHome f = newFHome();
f.Show();
}}
}
54
-
8/3/2019 sreedbms
55/56
5.5.Test Cases
6.1 Test Strategy
The system was tested under the unit testing strategy. The data is provided locally for
the page to give the output so that there is no time delay in getting the output. .For each
module different input are provided and checked for errors. The inputs are provided in
such a way that the pages give some erroneous output and the page is corrected for the
correct output. The testing is being done multiple times with wrong inputs that get the
module un-erroneous.
6.2 Test cases
Test case
IDDescription Expected Result Result
1
Enter the wrong
username/password
.
Display message
Invalid
username/password
P
2
Enter the correctusername/password Displays the home
pageP
55
-
8/3/2019 sreedbms
56/56
3
Enter the username
and password more
than 3 times
Application exits
showing invalid
user
P
4.
Press next button
without giving any
values in the
customer details
Display
messageGive a
valid entry
P
6.Conclusion and future enhancement
The system Courier Management is developed as per the user requirements. We
have done our best to fulfill their needs through our work.
The future enhancement to the system includes new features like better user
interface,graphics,better validation and new techniques for implementing the tour
functions.
7. References:
Books:
Robert J. Oberg, Dana L. Wyatt , Introduction to Visual Basic Using .NET
Ron Petrusha ,Visual Basic 2005: The Complete Reference
Websites:
http://www.devarticles.com/c/b/VB.Net/
http://vb.net-informations.com/
http://www.amazon.com/exec/obidos/ASIN/0072260335/az395da1ee33o101a-20http://vb.net-informations.com/http://www.amazon.com/exec/obidos/ASIN/0072260335/az395da1ee33o101a-20http://vb.net-informations.com/