Anda di halaman 1dari 56

COURIER MANAGEMENT SYSTEM

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

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

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)

SCMS SCHOOL OF TECHNOLOGY AND MANAGEMENT MUTTOM, 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 of ANITHA 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

ACKNOWLEDGEMENT My endeavour stands incomplete without expressing my gratitude to a few people who 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.

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 design 4.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

5.5 Test Cases-------------------------------------------------------------55 6.Conclusion and Future Enhancement------------------------------------------56 7.References-----------------------------------------------------------------------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.

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, whether packet is delivered, pending or returned back to the client, printing of the bills etc.

10

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 Analysis The feasibility of a proposed system can be evaluated in terms of following categories:-

11

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 compared with the cost saving on the implementation of the system, it is very much feasible.

12

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

4.5.Class Diagram
Customer Login
Username Password CL_ID CUS_NAME GENDER ADDRESS PH_NO EMAIL D_O_P

Parcel
CL_ID PAR_ID TOT_PAR_ITM PAR_DESC DEL_DAT

+login()

+Add(),+Search()

Destination
CL_ID D_CUS_NA D_ADDR CITY STATE COUNTRY PIN PHONE EMAIL

+Add(),+Update() +Delete(), +Search()

Bill Status
BNO DAT CL_ID CUS_NAME CUS_ADDR PAR_ID CATEGORY SERV_C WEIGHT WEG_COST TOTAL CL_ID PAR_ID CUS_NAME DEST_ADDR STATUS

+Add(),+Search()

+Add(),+Status()

+Total() +Add() +List()

14

5. Detailed Life Cycle of the project 5.1. Inputs and Outputs Screen shots Login Form

15

Home Form

Customer Form

16

Parcel Form

Destination Form

17

Bill Form

Status Form

Report Form

18

Update Parcel

Update Destination

19

5.2. Process Involved 20

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

login Field name


USERNAME PASSWORD

Type
VARCHAR2 VARCHAR2

Size
15 15

Description username
PASSWORD

customer Field name C_id Cus_name Gender Address Ph_no Email D_o_p Type Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Date Size 10 15 10 15 10 15 Description Customer id Customer name Gender Adress Phone no Email Date of packing

parcel Field name C_id Par_id Tot_Par_Itm Par_Desc Del_Dat Type Varchar2 Varchar2 Varchar2 Varchar2 Date Size 15 10 20 20 Description Customer id Parcel id Total Parcel Items Parcel Description Delivery Date

22

Destination Field name C_id D_Cus_Name D_Addr City State Country Pin Phone Email Type Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Size 15 10 20 20 15 15 15 15 15 Description Customer id Destination Customer Name Destination Customer Address City State Country Pin Phone no Email

Bill

23

Field name Bno Dat Cl_id Cus_Adrr Par_id Categoery Serv_c Weight Weg_Cost Total

Type Varchar2 Date Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Varchar2

Size 15

Description Bill no Date

15 20 15 15 15 15 15 30

Customer id Customer Address Parcel id Category Service Charge Weight Weight cost Total

Status Field name Cl_id Par_id Cus_name D_Addr Status Type Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Size 15 15 15 20 20 Description Customer id Parcel id Customer name Destination Customer Address status

5.4.Sample Code Login form 24

using using using using using using using using

System; System.Collections.Generic; System.ComponentModel; System.Data; System.Drawing; System.Data.OracleClient; System.Text; System.Windows.Forms;

namespace username { public partial class Form1 : Form { private FHome x; int c=0; OracleCommand com; OracleConnection con; OracleDataReader dar; String s1; int temp=0; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { s1= "Data Source=sstmmca;User Id=ca194;password=sreejith007;Unicode=True"; con = new OracleConnection(s1); } private void button1_Click(object sender, EventArgs e) { try { string select = "select * from Login where username='" + textBox1.Text + "' and password='" + textBox2.Text + "' "; con.Open(); com = new OracleCommand(select, con); dar = com.ExecuteReader(); while (dar.Read()) { if (dar["username"].ToString() == textBox1.Text && dar["password"].ToString() == textBox2.Text) { temp = 1; this.Hide(); x = new FHome(); x.Show();

25

} 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 an invalid user"); } } textBox1.Clear(); textBox2.Clear(); temp = 0; } catch (Exception e1) { MessageBox.Show(e1.Message); } finally { con.Close(); } Application.Exit();

private void button2_Click(object sender, EventArgs e) { this.Hide(); x = new FHome(); x.Show(); } }

Home Page 26

using using using using using using using

System; System.Collections.Generic; System.ComponentModel; System.Data; System.Drawing; System.Text; System.Windows.Forms;

namespace username { public partial class FHome : Form { public FHome() { InitializeComponent(); } private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { this.Hide(); home h = new home(); h.Show(); } private void groupBox1_Enter(object sender, EventArgs e) { } private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { this.Hide(); Delete h = new Delete(); h.Show(); } private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { linkLabel4.Show(); linkLabel5.Show(); } private void linkLabel4_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { this.Hide(); uparceln up = new uparceln(); up.Show(); } private void FHome_Load(object sender, EventArgs e)

27

{ linkLabel4.Hide(); linkLabel5.Hide(); } private void linkLabel5_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { this.Hide(); udest ud = new udest(); ud.Show(); } private void linkLabel6_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { check c = new check(); c.Show();

private void linkLabel7_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { Report r = new Report(); r.Show(); } private void label1_Click(object sender, EventArgs e) { } } }

Customer form
using using using using using using using using System; System.Collections.Generic; System.ComponentModel; System.Data; System.Drawing; System.Text; System.Data.OracleClient; System.Windows.Forms;

namespace username { public partial class home : Form { OracleCommand com; OracleConnection con; OracleDataReader dar; String s; public home()

28

{ } InitializeComponent();

private void 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 no values('{0}')", textBox1.Text); com = new OracleCommand(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 no values('{0}')", textBox1.Text); com = new OracleCommand(s2, con); con.Open(); int i1 = com.ExecuteNonQuery(); if (i1 == 1) { MessageBox.Show("Details Saved"); } else { } MessageBox.Show("not un");

con.Close(); } private void home_Load(object sender, EventArgs e) { s = "Data Source=sstmmca;User Id=ca194;password=sreejith007;Unicode=True"; con = new OracleConnection(s); textBox3.Text = DateTime.Now.ToString("dd-MMM-yyyy"); listBox1.Hide();

29

try {

con.Open(); int c = 1; com = new OracleCommand("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(); } } private void textBox3_TextChanged(object sender, EventArgs e) { } private void label4_Click(object sender, EventArgs e) { } private void textBox4_TextChanged(object sender, EventArgs e) { } private void textBox7_TextChanged(object sender, EventArgs e) { } private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { } private void button2_Click(object sender, EventArgs e) { listBox1.Items.Clear(); listBox1.Show();

30

try {

con.Open(); com = new OracleCommand("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(); } } private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { try {

con.Open(); string s1 = string.Format("select * from customer where Cl_id='{0}'", listBox1.Text); com = new OracleCommand(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(); } } private void button3_Click(object sender, EventArgs e) { listBox1.Items.Clear(); textBox1.Clear();

31

textBox2.Clear(); textBox3.Clear(); textBox4.Clear(); textBox5.Clear(); textBox6.Clear(); comboBox1.Items.Clear(); } private void textBox1_TextChanged(object sender, EventArgs e) { } private void button4_Click(object sender, EventArgs e) { try { String s1 = string.Format("Delete from customer where cl_id ='{0}'", textBox1.Text); com = new OracleCommand(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(); }

private void button5_Click(object sender, EventArgs e) { try { String s1 = string.Format("update customer set cus_name='{0}', GENDER='{1}',ADDRESS='{2}',PH_NO='{3}',EMAIL='{4}', D_O_P='{5}'where cl_id='{6}'",

32

textBox2.Text,comboBox1.Text,textBox4.Text,textBox5.Text,textBox6.Text, textBox3.Text,textBox1.Text); com = new OracleCommand(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(); }

private void button6_Click(object sender, EventArgs e) { if (textBox2.Text == String.Empty) { entered"); MessageBox.Show("pls make sure that all fields are } else if (textBox3.Text == String.Empty) { MessageBox.Show("pls make sure that all fields are } else if (textBox4.Text == String.Empty) { MessageBox.Show("pls make sure that all fields are entered"); } else if (textBox5.Text == String.Empty) { MessageBox.Show("pls make sure that all fields are entered"); } else if (textBox6.Text == String.Empty) { MessageBox.Show("pls make sure that all fields are entered"); } else if(comboBox1.Text==String.Empty) {

entered");

33

MessageBox.Show("pls make sure that all fields are entered"); } else { this.Hide(); Parcel p = new Parcel(); p.Show();

} }

private void button7_Click(object sender, EventArgs e) { } private void button8_Click(object sender, EventArgs e) { this.Hide(); FHome h = new FHome(); h.Show(); } private void textBox2_TextChanged(object sender, EventArgs e) { } } }

Parcel form
using using using using using using using using System; System.Collections.Generic; System.ComponentModel; System.Data; System.Data.OracleClient; System.Drawing; System.Text; System.Windows.Forms;

namespace username { public partial class Parcel : Form { OracleCommand com; OracleConnection con; OracleDataReader dar; String s; public Parcel()

34

{ InitializeComponent(); } private void 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 = new OracleConnection(s); button5.Hide(); try { con.Open(); int k = 1; com = new OracleCommand("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 = new OracleCommand("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

} try { con.Open(); int c = 1; com = new OracleCommand("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(); } } private void button1_Click(object sender, EventArgs e) { try { String s1 = string.Format("insert into parcel values('{0}','{1}','{2}','{3}','{4}')", textBox1.Text, textBox2.Text, textBox3.Text, textBox4.Text, textBox5.Text); com = new OracleCommand(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

} private void comboBox1_TextChanged(object sender, EventArgs e) { con.Open(); String s1 = "Select * from customer where cl_id like'" + comboBox1.Text + "%'"; com = new OracleCommand(s1, con); dar = com.ExecuteReader(); while (dar.Read()) { comboBox1.Items.Add(dar[0]); }

con.Close(); } private void button2_Click(object sender, EventArgs e) { textBox2.Clear(); textBox3.Clear(); textBox4.Clear(); textBox5.Clear();

private void button3_Click(object sender, EventArgs e) { this.Hide(); dest d = new dest(); d.Show(); } private void button4_Click(object sender, EventArgs e) { try { listBox1.Show(); con.Open(); com = new OracleCommand("Select * from customer", con); dar = com.ExecuteReader(); while (dar.Read()) { listBox1.Items.Add(dar["Cl_id"]); } } catch (Exception e1) {

37

MessageBox.Show(e1.Message); } finally { con.Close(); } } private void comboBox1_SelectedIndexChanged_1(object sender, EventArgs e) { } private void button5_Click(object sender, EventArgs e) { try { String s1 = string.Format("update parcel set PAR_ID='{0}',TOT_PAR_ITM='{1}',PAR_DESC='{2}',DEL_DAT='{3}'where cl_id='{4}'", textBox2.Text, textBox3.Text, textBox4.Text, textBox5.Text, comboBox1.Text); com = new OracleCommand(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(); } } private void textBox2_TextChanged(object sender, EventArgs e) { } private void button8_Click(object sender, EventArgs e) { this.Hide(); FHome h = new FHome(); h.Show(); }

38

private void comboBox1_SelectedIndexChanged_2(object sender, EventArgs e) { } e) private void comboBox1_TextChanged_1(object sender, EventArgs {

con.Open(); String s1 = "Select * from customer where cl_id like'" + comboBox1.Text + "%'"; com = new OracleCommand(s1, con); dar = com.ExecuteReader(); while (dar.Read()) { comboBox1.Items.Add(dar[0]); }

con.Close();

private void textBox3_TextChanged(object sender, EventArgs e) { } private void textBox1_TextChanged(object sender, EventArgs e) { } private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { try { con.Open(); string s1 = string.Format("select * from parcel where Cl_id='{0}'", listBox1.Text); com = new OracleCommand(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

MessageBox.Show(e1.Message); } finally { con.Close(); }

private void textBox4_TextChanged(object sender, EventArgs e) { } } }

Destiantion form
using using using using using using using using System; System.Collections.Generic; System.ComponentModel; System.Data; System.Data.OracleClient; System.Drawing; System.Text; System.Windows.Forms;

namespace username { public partial class dest : Form { OracleCommand com; OracleConnection con; OracleDataReader dar; String s; public dest() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { try { String s1 = string.Format("insert into destination values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}')", textBox1.Text, textBox2.Text,textBox3.Text, comboBox2.Text,comboBox3.Text,comboBox4.Text,textBox7.Text,textBox8.Tex t,textBox9.Text); com = new OracleCommand(s1, con); con.Open(); int i = com.ExecuteNonQuery();

40

if (i == 1) { MessageBox.Show("Details Added successfully"); } } catch (Exception e1) { MessageBox.Show(e1.Message); } finally { con.Close(); }

private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { } private void dest_Load(object sender, EventArgs e) { button3.Hide(); s = "Data Source=sstmmca;User Id=ca194;password=sreejith007;Unicode=True"; con = new OracleConnection(s); comboBox1.Hide(); try { con.Open(); int c = 1; com = new OracleCommand("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

private void comboBox1_TextChanged(object sender, EventArgs e) { try { con.Open(); String s1 = "Select * from customer where cl_id like'" + comboBox1.Text + "%'"; com = new OracleCommand(s1, con); dar = com.ExecuteReader(); while (dar.Read()) { comboBox1.Items.Add(dar[0]); } } catch (Exception e1) { MessageBox.Show(e1.Message); } finally { con.Close(); }

} private void comboBox2_SelectedIndexChanged(object sender, EventArgs e) { } private void button2_Click(object sender, EventArgs e) { try {

listBox1.Show(); con.Open(); com = new OracleCommand("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

} private void button3_Click(object sender, EventArgs e) { try { String s1 = string.Format("update destination set D_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 = new OracleCommand(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(); }

private void 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(); } private void button5_Click(object sender, EventArgs e) { this.Hide(); Bill b = new Bill(); b.Show();

43

} private void button8_Click(object sender, EventArgs e) { this.Hide(); FHome h = new FHome(); h.Show(); } private void comboBox1_SelectedIndexChanged_1(object sender, EventArgs e) { } e) private void comboBox1_TextChanged_1(object sender, EventArgs {

con.Open(); String s1 = "Select * from customer where cl_id like'" + comboBox1.Text + "%'"; com = new OracleCommand(s1, con); dar = com.ExecuteReader(); while (dar.Read()) { comboBox1.Items.Add(dar[0]); }

con.Close();

private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { try { button1.Hide(); con.Open(); string s1 = string.Format("select * from destination where Cl_id='{0}'", listBox1.Text); com = new OracleCommand(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

} catch (Exception e1) { MessageBox.Show(e1.Message); } finally { con.Close(); } } } }

Status Form
using using using using using using using using System; System.Collections.Generic; System.ComponentModel; System.Data; System.Data.OracleClient; System.Drawing; System.Text; System.Windows.Forms;

namespace username { public partial class Delete : Form { OracleCommand com; OracleConnection con; OracleDataReader dar; String s1; public Delete() { InitializeComponent(); } private void comboBox1_TextChanged(object sender, EventArgs e) { con.Open(); String s1 = "Select * from customer where cl_id like'" + comboBox1.Text + "%'"; com = new OracleCommand(s1, con); dar = com.ExecuteReader(); while (dar.Read()) { comboBox1.Items.Add(dar[0]); } con.Close(); } private void Delete_Load(object sender, EventArgs e) { listBox1.Items.Clear();

45

s1 = "Data Source=sstmmca;User Id=ca194;password=sreejith007;Unicode=True"; con = new OracleConnection(s1); } private void button1_Click(object sender, EventArgs e) { } private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { } private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { try { String s1 = string.Format("select c.CUS_NAME,p.par_id,d.D_CUS_NAME,d.D_ADDR,d.CITY,d.STATE,d.COUNTRY,d.PI N,d.email from customer c,parcel p,destination d where c.CL_ID=p.CL_ID and d.cl_id=c.cl_id and c.CL_ID ='{0}'", comboBox1.Text); com = new OracleCommand(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(); }

private void button1_Click_1(object sender, EventArgs e) { try {

46

String s1 = string.Format("insert into status values('{0}','{1}','{2}','{3}','{4}')", comboBox1.Text, textBox1.Text,textBox2.Text,listBox1.Text,textBox4.Text); com = new OracleCommand(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(); } } private void button2_Click(object sender, EventArgs e) { textBox1.Clear(); textBox2.Clear(); textBox4.Clear(); listBox1.Items.Clear(); } private void button3_Click(object sender, EventArgs e) { try { con.Open(); string s1 = string.Format("select * from status where Cl_id='{0}'", comboBox1.Text.ToString()); com = new OracleCommand(s1, con); dar = com.ExecuteReader(); dar.Read(); textBox4.Text = dar["status"].ToString(); } catch (Exception e1) { MessageBox.Show(e1.Message); } finally { con.Close(); } } private void button8_Click(object sender, EventArgs e) {

47

this.Hide(); FHome h = new FHome(); h.Show(); } } }

Bill
using using using using using using using using System; System.Collections.Generic; System.ComponentModel; System.Data; System.Data.OracleClient; System.Drawing; System.Text; System.Windows.Forms;

namespace username { public partial class Bill : Form { OracleCommand com; OracleConnection con; OracleDataReader dar; String s; public Bill() { InitializeComponent(); } private void textBox2_TextChanged(object sender, EventArgs e) { } private void comboBox1_TextChanged(object sender, EventArgs e) { try { con.Open(); String s1 = "Select * from customer where cl_id like'" + comboBox1.Text + "%'"; com = new OracleCommand(s1, con); dar = com.ExecuteReader(); while (dar.Read()) {

48

comboBox1.Items.Add(dar[0]); } catch (Exception e1) { MessageBox.Show(e1.Message); } finally { con.Close(); } } private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { try { con.Open(); String s1 = string.Format("Select c.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 = new OracleCommand(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(); } } private void Bill_Load(object sender, EventArgs e) { s = "Data Source=sstmmca;User Id=ca194;password=sreejith007;Unicode=True"; con = new OracleConnection(s); textBox9.Text = DateTime.Now.ToString("dd-MMM-yyyy"); textBox10.Hide(); try { }

con.Open(); int k = 1; com = new OracleCommand("Select * from bill", con); dar = com.ExecuteReader();

49

while (dar.Read()) { k= k + 20; } textBox1.Text = k.ToString(); } catch (Exception e1) { MessageBox.Show(e1.Message); } finally { con.Close(); } } private void textBox3_TextChanged(object sender, EventArgs e) { } private void comboBox2_SelectedIndexChanged(object sender, EventArgs e) {

if (comboBox2.Text == "Local") { textBox3.Text = "1000"; } else { textBox3.Text = "2000"; } } private void textBox7_TextChanged(object sender, EventArgs e) { } private void textBox4_TextChanged(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { float x = float.Parse(textBox4.Text); float y = x * 50;

50

textBox7.Text = y.ToString(); float w = float .Parse(textBox3.Text); float g = float.Parse(textBox7.Text); float z = w + g; textBox8.Text = z.ToString();

private void button2_Click(object sender, EventArgs e) { listBox1.Items.Clear(); try { con.Open(); com = new OracleCommand("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(); } } private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { try { comboBox1.Hide(); textBox10.Show(); con.Open(); string s1 = string.Format("select * from bill where Cl_id='{0}'", listBox1.Text); com = new OracleCommand(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

} catch (Exception e1) { MessageBox.Show(e1.Message); } finally { con.Close(); } }

textBox7.Text = dar["WEG_COST"].ToString(); textBox8.Text = dar["TOTAL"].ToString();

private void button3_Click(object sender, EventArgs e) { try { con.Open(); String s1 = string.Format("insert into bill values('{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 = new OracleCommand(s1, con); int i = com.ExecuteNonQuery(); if (i == 1) { MessageBox.Show("inserted"); } } catch (Exception e1) { MessageBox.Show(e1.Message); } finally { con.Close(); } } private void 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

textBox4.Clear(); textBox7.Clear(); textBox8.Clear(); } private void comboBox2_TextChanged(object sender, EventArgs e) { } private void button5_Click(object sender, EventArgs e) { this.Hide(); FHome f=new FHome(); f.Show(); } private void textBox10_TextChanged(object sender, EventArgs e) { } }

Bill Report
using using using using using using using using System; System.Collections.Generic; System.ComponentModel; System.Data; System.Data.OracleClient; System.Drawing; System.Text; System.Windows.Forms;

namespace username { public partial class Report : Form { OracleCommand com; OracleConnection con; OracleDataAdapter dap; DataSet dst; String s; public Report() { InitializeComponent(); } private void Report_Load(object sender, EventArgs e) { s = "Data Source=sstmmca;User Id=ca194;password=sreejith007;Unicode=True"; con = new OracleConnection(s); }

53

private void button1_Click(object sender, EventArgs e) { try {

con.Open(); com = new OracleCommand("Select * from bill", con); dap = new OracleDataAdapter(com); dst = new DataSet(); dap.Fill(dst,"bill"); dataGridView1.DataSource = dst.Tables["bill"];

} catch (Exception e1) { MessageBox.Show(e1.Message); } finally { con.Close(); } } private void button2_Click(object sender, EventArgs e) { this.Hide(); FHome f = new FHome(); f.Show(); } } }

54

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 ID

Description Enter the wrong

Expected Result Display message Invalid username/password

Result

username/password . Enter the correct username/password

Displays the home page

55

Enter the username and password more 3 than 3 times Application exits showing invalid user Press next button without giving any 4. values in the customer details Display messageGive a valid entry P 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/

56

Anda mungkin juga menyukai