EX.NO: DATE: PASSPORT AUTOMATION SYSTEM AIM:
To analyze, design and develop code for Passport Automation system using Rational Rose software. HARDWARE REQUIREMENTS:
Intel Pentium Processor 3
SOFTWARE REQUIREMENTS:
Rational rose / Visual Basic
PROJECT DESCRIPTION:
This software is designed for the verification of the passport details of the applicant by the central computer. The details regarding the passport will be provided to the central computer and the computer will verify the details of applicant and provide approval to the office. Then the passport will issue from the office office to the applicant. USE CASE DIAGRAM:
This diagram will contain the actors, use cases which are given below Actors: Applicant, Administrator, Police Use case: RegisterDetails, ProcessApplication, VerifyDetails, CheckStatus, DispatchPassport ACTIVITY DIAGRAM :
This diagram will have the activities as Start point, End point, Decision boxes as given below: Activities: Fill Application Form, Get Applicant Id, View Application Form, Forward To Police,
Allow To Apply Passport, Not Allow To Apply Passport, Create Schedule, Choose Verification Verification Date, Dispatch Passport, Cancel Passport CLASS DIAGRAM:
This diagram consists of the following classes, attributes and their operations. CLASSES
ATTRIBUTES
Passport
passportNo
Administrator
verificationDates
Application
name, fatherName, motherName, age, dob,
pob, religion, address, qualification, occupation, bcNo, rcNo, viNo, msNo, regDate Payment
amount
Applicant
applicantId
Police
stationName, stationNo
SEQUENCE DIAGRAM:
This diagram consists of the objects, messages and return messages. Object: Applicant, Passport, Administrator, Application, Payment, Police COLLABORATION DIAGRAM:
This diagram contains the objects and actors. This will be obtained by the completion of the sequence diagram and pressing the F5 key. MERITS:
Provides convenience
Easy usage
User friendliness
DEMERITS:
Need computer knowledge
USECASE DIAGRAM:
RegisterDetails
Police ProcessApplication
Applicant VerifyDetails
CheckStatus
DispatchPassport
Admi nistrator.
CLASS DIAGRAM:
INTERACTION DIAGRAM: SEQUENCE DIAGRAM: RegisterDetails :Applicant
:Application :Application fillDetails() applicantId
ProcessApplication
:Administrator :Administrator
:Applicant
:Payment :Paym ent
login()
viewDetails()
createSchedule()
chooseVerificationDate() payAmount()
:Application
VerifyDetails
:Police
:Applicant
:Administrator :Administrator
verify verify original document
updateStatus()
CheckStatus
:Applicant
:Administartor :Administartor applicantId
checkStatus()
DispatchPassport
:Adm inis trator :Administrator
:Pas :Passport sport
updateDetails()
dispatchPassport()
COLLABORATION DIAGRAM RegisterDetails
:Applicant
1: fillDetails()
:Application
2: applicantId
ProcessApplication
1: login() 3: createSchedule()
:Administrator
:Applicant 4: chooseVerificationDate()
2: viewDetails()
5: payAmount() :Payment
:Application
VerifyDetails 1: verify
:Police
:Applicant
2: verify original document 3: updateStatus()
:Administrator
CheckStatus
:Applicant
1: applicantId 2: checkStatus()
:Administartor
DispatchPassport 1: updateDetails()
:Passport
2: dispatchPassport()
:Administrator
ACTIVITY DIAGRAM:
Applicant
Administrator
Police
Fill Application Form
Get Applicant Id
View Application Form
Forward To Police
verify details
correct Choose Verification Date
Allow To Apply Passport
Create Schedule
verify
correct
incorrect
Dispatch Passport cancel Passport
incorrect Not Allow To Apply Passport
PACKAGE DIAGRAM:
UI
Domain
Registration
Verification
Approval
Technical Service
Persistance
Security
Logging
FORMS: Home form:
Application form:
Admin login form
Admin home form:
View Details form:
Police form:
View verified details form:
Update status:
Enter verification date form:
Check status form:
Choose verification date form:
SOURCE CODE: Connect to Database:
using System.Data.OleDb; OleDbConnection con; con = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Documents and Settings\user\My Documents\pas.accdb"); con.Open(); Insert into Database:
using System.Data.OleDb; OleDbCommand cmd; try { Random ran = new Random(); id = ran.Next(100000); cmd = new OleDbCommand("insert into pas values('" + id + "','" + textBox1.Text + "','" + comboBox1.Text + "','" + comboBox2.Text + "','" + comboBox3.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "','" + comboBox4.Text + "','" + comboBox5.Text + "','" + textBox5.Text + "','" + textBox6.Text + "','" + richTextBox1.Text + "','" + textBox7.Text + "','" + textBox8.Text + "','" + textBox9.Text + "','" + textBox10.Text + "','" + textBox11.Text + "','" + textBox12.Text + "','" + textBox13.Text + "','" + textBox14.Text + "','" + textBox15.Text + "','" + textBox16.Text + "','" + comboBox6.Text + "','" + dateTimePicker1.Text + "','" + textBox17.Text + "','"+status+"')", con); cmd.ExecuteNonQuery(); cmd.Dispose(); }catch (System.Exception ex){MessageBox.Show("exception");} finally { con.Close(); } MessageBox.Show("your details are inserted successfully"); MessageBox.Show("your id is:" + id.ToString()); Verify Username and Password:
if (textBox1.Text.Equals("pas") && textBox2.Text.Equals("pas")) { Form5 f = new Form5(); f.Show(); this.Hide(); } else { textBox1.Text = "";
textBox2.Text = ""; MessageBox.Show("invalid");} Retrive from Database:
using System.Data.OleDb; OleDbDataReader dr; try { cmd = new OleDbCommand("select status from status where ID='" + textBox1.Text + "'", con); dr = cmd.ExecuteReader(); while (dr.Read()) label3.Text = dr.GetValue(0).ToString(); }catch (System.Exception ex){MessageBox.Show("exception");} finally { con.Close(); }
RESULT:
Thus the passport automation system was developed successfully.