Professional Documents
Culture Documents
CONTENTS
1. INTRODUCTION
2. SYSTEM ANALYSIS
2.1 Introduction
2.2 Existing System
2.3 Proposed System
2.4 Data Flow Diagram
3. SYSTEM DESIGN
3.1
3.2
3.3
3.4
Input design
Output design
Form design
Database design
4. SYSTEM IMPLEMENTATION
5.1
Source Code
1.
INTRODUCTION
Crime File System is a system used to report crimes. This project will be
done using VB 6.0 as front end, and MS Access as back end. It can used to report
crime. This project is mainly useful for police stations. This system will help to
manage all the activities in a police station using computers. Currently all the
works are done manually, by computerizing all the activities inside a police station
can be managed easily and effectively.
1. LOGIN
This includes Administrator and User login. There will be a username and
password to login into the system to use all the facilities.
2. COMPLAINT REGISTRATION
This module helps to register the details about the crime. This is done by
entering some details, such as incident details, Victim details, crime details etc
3. VIEW COMPLAINT STATUS
This module allows us to view the status of the complaint that you have
registered earlier.
4. CRIMINAL REGISTER MANAGEMENT
Here we can have the facility to view the details of the criminals. The
administrator can add new criminals details and save it in a database. This can be
done by entering details such as criminal number, age, occupation, type of crime
etc.
5. FIR MANGEMENT
This module allows viewing the First Information Report of all the crimes
that took place at recent years. The administrator can enter FIR information and
save it in a database.
Here we can view the details of the case, date of occurrence, the type of
crime and place of occurrence etc
This module helps to view the postmortem details of a person. The details
such as date of death cause of death, name of the doctor etc.
8. PRISONER REGISTER MANGEMENT
This module helps the administrator as well as the user to store, view and manage
the details of the past and present prisoners.
9.
quick search about the most wanted criminals. This helps to always keep track of and
identify a person quickly, who is a most wanted criminal.
2.
SYSTEM ANALYSIS
2.1
Time consuming.
2.3
Proposed System
Security of data.
Greater efficiency.
Better service.
The system must be evaluated from the technical point of view first.
The assessment of this feasibility must be based on an outline design of
the system requirement in the terms of input, output, programs and
procedures. Having identified an outline system, the investigation must go
on to suggest the type of equipment, required method developing the
system, of running the system once it has been designed.
suggested one?
The project should be developed such that the necessary functions and
performance are achieved within the constraints. The project is developed
within latest technology. Through the technology may become obsolete
after some period of time, due to the fact that never version of same
B. ECONOMIC FEASIBILITY
errors.
10
C. BEHAVIORAL FEASIBILITY
11
LEVEL 0 DFD
12
LEVEL 1 DFD
13
LEVEL 2 DFD
14
LEVEL 3 DFD
15
LEVEL 4 DFD
16
3. SYSTEM DESIGN
17
3.1
Input design
The design of input focuses on controlling the amount of input
required, controlling the errors, avoiding delay, avoiding extra steps and
keeping the process simple. The input is designed in such a way so that it
provides security and ease of use with retaining the privacy. Input Design
considered the following things:
o What data should be given as input?
o How the data should be arranged or coded?
o The dialog to guide the operating personnel in providing input.
o Methods for preparing input validations and steps to follow when error
occur.
18
3.3
Form design
Progress
19
Login
20
21
22
Criminal Register
23
Delete User
24
Post mortem
25
26
27
28
RELATIONSHIPS:
Table relationships are established using Key. The two main keys of prime
importance are Primary Key & Foreign Key. Entity Integrity and Referential
Integrity Relationships can be established with these keys. Entity Integrity
enforces that no Primary Key can have null values. Referential Integrity enforces
that no Primary Key can have null values.
Referential Integrity for each distinct Foreign Key value, there must exist
a matching Primary Key value in the same domain. Other key are Super
Key and Candidate Keys.
Relationships have been set between every table in the database. This
ensures both Referential and Entity Relationship Integrity.
NORMALIZATION:
As the name implies, it denoted putting things in the normal form. The
application developer via normalization tries to achieve a sensible
organization of data into proper tables and columns and where names can
be easily correlated to the data by the user. Normalization eliminates
repeating groups at data and thereby avoids data redundancy which proves
to be a great burden on the computer resources. These includes:
29
30
31
Table Design
32
33
Table: Complaint
34
Table: History
35
36
Table: FIR
37
38
4 SYSTEM IMPLEMENTATION
4.1 About Language
The Control Properties
Before writing an event procedure for the control to response to a user's input, you have
to set certain properties for the control to determine its appearance and how it will work
with the event procedure. You can set the properties of the controls in the properties
window or at runtime.
Handling some of the common controls
39
The text box is the standard control for accepting input from the user as well as to display
the output. It can handle string (text) and numeric data but not images or pictures. String
in a text box can be converted to a numeric data by using the function Val(text). The
following example illustrates a simple program that processes the input from the user.
Example
In this program, two text boxes are inserted into the form together with a few labels. The
two text boxes are used to accept inputs from the user and one of the labels will be used
to display the sum of two numbers that are entered into the two text boxes. Besides, a
command button is also programmed to calculate the sum of the two numbers using the
plus operator. The program use creates a variable sum to accept the summation of values
from text box 1 and text box 2.The procedure to calculate and to display the output on the
label is shown below. The output is shown in Figure 3.2
Private Sub Command1_Click ()
To add the values in text box 1 and text box 2
Sum = Val (Text1.Text) + Val (Text2.Text)
To display the answer on label 1
Label1.Caption = Sum
End Sub
Figure
40
The Label
The label is a very useful control for Visual Basic, as it is not only used to provide
instructions and guides to the users, it can also be used to display outputs. One of its most
important properties is Caption. Using the syntax label.Caption, it can display text and
numeric data . You can change its caption in the properties window and also at runtime.
Please refer to Example 3.1 and Figure 3.1 for the usage of label.
41
42
The function of the List Box is to present a list of items where the user can click and
select the items from the list. In order to add items to the list, we can use the AddItem
method. For example, if you wish to add a number of items to list box 1, you can key in
the following statements
Example
43
Example
Private Sub Form_Load ( )
Combo1.AddItem Item1
Combo1.AddItem Item2
Combo1.AddItem Item3
Combo1.AddItem Item4
End Sub
The Check Box control lets the user selects or unselects an option. When the Check Box
is checked, its value is set to 1 and when it is unchecked, the value is set to 0. You can
include the statements Check1.Value=1 to mark the Check Box and Check1.Value=0 to
unmark the Check Box, as well as use them to initiate certain actions. For example, the
program will change the background color of the form to red when the check box is
unchecked and it will change to blue when the check box is checked. You will learn
about the conditional statement If.Then.Elesif in later lesson. VbRed and vbBlue are
color constants and BackColor is the background color property of the form.
The Option Box control also lets the user selects one of the choices. However, two or
more Option Boxes must work together because as one of the Option Boxes is selected,
44
the other Option Boxes will be unselected. In fact, only one Option Box can be selected
at one time. When an option box is selected, its value is set to True and when it is
unselected; its value is set to False. In the following example, the shape control is
placed in the form together with six Option Boxes. When the user clicks on different
option boxes, different shapes will appear. The values of the shape control are 0, 1, and
2,3,4,5 which will make it appear as a rectangle, a square, an oval shape, a rounded
rectangle and a rounded square respectively.
Example
Private Sub Option1_Click ( )
Shape1.Shape = 0
End Sub
Private Sub Option2_Click()
Shape1.Shape = 1
End Sub
Private Sub Option3_Click()
Shape1.Shape = 2
End Sub
Private Sub Option4_Click()
Shape1.Shape = 3
End Sub
Private Sub Option5_Click()
Shape1.Shape = 4
End Sub
45
The Drive ListBox is for displaying a list of drives available in your computer. When you
place this control into the form and run the program, you will be able to select different
drives from your computer as shown in Figure 3.3
46
MS ACCESS 2003
Microsoft Access is a powerful program to create and manage your databases. It has
many built in features to assist you in constructing and viewing your information. Access
is much more involved and is a more genuine database application than other programs
such as Microsoft Works.
The keywords involved in the process are: Database File, Table, Record, Field, Datatype. Here is the Hierarchy that Microsoft Access uses in breaking down a database.
47
Database File: This is your main file that encompasses the entire database and that is
saved to your hard-drive or floppy disk.
Example: StudentDatabase.mdb
Table:A table is a collection of data about a specific topic. There can be multiple tables in
a database.
Field: Fields are the different categories within a Table. Tables usually contain multiple
fields.
Datatypes: Datatypes are the properties of each field. A field only has 1 datatype.
FieldName) Student LastName
Datatype) Text
Two Ways
48
2. Click
on
Start
-->
Programs
-->
Microsoft
Access
49
50
The white box gives you the most recent databases you have used. If you
do not see the one you had created, choose the More Files option and hit
OK. Otherwise choose the database you had previously used and click
OK.
4.2
System Configuration
HARDWARE REQUIREMENTS
Processor
RAM
: 512 MB or more
Hard disk
Monitor
: VGA/SVGA
Keyboard
104 Keys
Mouse
2 buttons/ 3 buttons
SOFTWARE
Operating System
Front end
Back end
20 GB or more
REQUIREMENTS
: Windows 2000/XP
: Visual Basic 6.0
: MS ACCESS
5 APPENDIX
5.1
Source Code
Add Complaint
Private Sub cmdAdd_Click()
If (cmbComplntNo.Text = "" Or txtStatus.Text = "") Then
MsgBox "Missing Fields", vbInformation, "CFS"
Else
con.Execute ("insert into ComplntStatus values(" + cmbComplntNo.Text + ",'" +
txtStatus.Text + "')")
MsgBox "Status Added Successfully", vbInformation, "Crime File System"
txtDetails.Text = ""
txtStatus.Text = ""
cmbComplntNo.SetFocus
End If
End Sub
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdDetails_Click()
Set rs = con.Execute("select Details from ComplaintReg where ComplntNo=" +
cmbComplntNo.Text + "")
If (Not rs.EOF) Then
txtDetails.Text = rs(0)
txtStatus.SetFocus
End If
End Sub
Private Sub Form_Load()
connectdb
Set rs = con.Execute("select ComplntNo from ComplaintReg")
While (Not rs.EOF)
cmbComplntNo.AddItem rs(0)
rs.MoveNext
Wend
51
52
rs.Close
End Sub
Add user
Private Sub Form_Load()
connectdb
End Sub
Private Sub cmdAdd_Click()
Set rs = con.Execute("select * from UserLogin where Username='" + txtUsername.Text +
"' and Password='" + txtPassword.Text + "'")
If (Not rs.EOF) Then
MsgBox "Sorry!! User already exists. Try another username", vbCritical, "Crime File
System"
txtPassword.Text = ""
txtUsername.Text = ""
txtUsername.SetFocus
Else
con.Execute ("insert into UserLogin values('" + txtUsername.Text + "','" +
txtPassword.Text + "')")
MsgBox "User added sucessfully", vbInformation, "Crime File System"
txtPassword.Text = ""
txtUsername.Text = ""
txtUsername.SetFocus
End If
End Sub
Private Sub cmdCancel_Click()
Unload Me
FIR Report
Dim x As Integer
Private Sub cmdShRpt_Click()
x = cmbMno.Text
If (DataEnvironment1.rsCommand4.State = 1) Then
DataEnvironment1.rsCommand4.Close
Else
DataEnvironment1.Command4 (x)
Load DataReportFIR
DataReportFIR.Show
End If
53
End Sub
Private Sub Form_Load()
connectdb
Set rs = con.Execute("select Firno from FIR")
While (Not rs.EOF)
cmbMno.AddItem rs(0)
rs.MoveNext
Wend
End Sub
Login
Private Sub cmdAdminLog_Click()
Set rs = con.Execute("Select * from AdminLogin where Username='" + txtUname.Text +
"' and Password='" + txtPass.Text + "'")
If (Not rs.EOF) Then
MsgBox "Login Success", vbInformation, "Crime File System"
frmMDI.mnuLogoff.Enabled = True
frmMDI.mnuAdminAddU.Enabled = True
frmMDI.mnuAdminDelU.Enabled = True
frmMDI.mnuActiv.Enabled = True
frmMDI.mnuLogin.Enabled = False
frmMDI.mnuAdminAddComSt.Enabled = True
frmMDI.mnuActivReg.Enabled = True
frmMDI.mnuActivComp.Enabled = True
frmMDI.mnuActivRpt.Enabled = True
Unload Me
Else
MsgBox "Failure", vbCritical, "Crime File System"
End If
'rs.Close
Unload Me
End Sub
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdUserLog_Click()
Set rs = con.Execute("Select * from UserLogin where Username='" + txtUname.Text + "'
and Password='" + txtPass.Text + "'")
54
55
Splash
Dim i As Integer
Dim x As Integer
Option Explicit
Private Sub Form_Load()
File1.FileName = App.Path
x = File1.ListCount
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As
Single)
Unload Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
Load frmMDI
frmMDI.Show
End Sub
Private Sub Frame1_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As
Single)
Unload Me
End Sub
Private Sub Timer1_Timer()
If (Image1.Left <= 6480) Then
Image1.Left = Image1.Left + 100
Else
Image1.Left = 0
End If
If (i <= x) Then
Label2.Caption = File1.List(i)
i=i+1
Else
Load frmMDI
10.
2.
56
The system was done the integration testing. All the modules were
tested for their compatibility with other modules .They test was almost
successful. All the modules coexisted very well, with almost no bugs. All
the modules were encapsulated very well so as to not hamper the
execution of other modules.
3. Validation Testing
After validation testing, software is completely assembled as a
package, interfacing errors that have been uncovered and corrected and the
final series of software test; the validation test begins. Steps taken during
57
2.
Interface errors.
3.
4.
Performance error.
5.
Termination error.
58
59
7. FUTURE ENHANCEMENT
By the future technology user can view the case details and
progress of the complaints on their mobile phones
60
8. CONCLUSION
61
9. BIBLIOGRAPHY
Books
Site Address
www.associatedcontent.com
www.members.tripod.com
62