Você está na página 1de 89

A PROJECT REPORT

ON

Crime Reporting

(HCL INFO SYSTEM LTD)

Developed By:

Name: Amit Kumar Gupta Reg. No. HCL1H1H20091H6240

Name: Manu Saraf Reg. No. HCL1H1H20091H6248

Name: Kapil Tyagi Reg. No. HCL1H1H20091H62

Name: Rohit Kumar Reg. No. HCL1H1H20091H6217

Name: Sadhana Sisodia Reg. No. HCL1H1H20091H6636

Name: Vaibhav Agarwal Reg. No. HCL1H1H20091H6226


CERTIFICATE

This is to certify that this report titled Crime Reporting embodies the
original work done by Amit Kumar Gupta, Manu Saraf, Kapil Tyagi, Rohit
Kumar, Sadhana Sishodia, and Vaibhav Agarwal in partial fulfillment of
their course requirement at HCL.

Coordinator:
Rajinder Kr. Chitoria

Place: Noida Date: 11/May/2009


ACKNOWLEDGEMENT

In the course of present work it has been our privilege to receive help and
assistance from many quarters. We take great pleasure in acknowledging
here, our debt to them.

We have benefited a lot from the feedback and suggestions given to us by


Mr. Rajinder Kr. Chitoria, other faculty members, and the machine room
coordinator.
Contents
Page no.

1. Introduction……………………………………..

2. Profile of Organization…………………………

3. System Analysis

3.1 Current Study……………

3.2 Proposed System…………

4. System Design……………………………………

5. Coding and Forms…………………………………

6. Testing and Implementation………………………

7. Conclusion…………………………………………

8. References…………………………………………

9. Appendices…………………………………………
Introduction

What is Crime Reporting

Crime reporting is the first of the nine basic Youth Crime Watch
components. Most simply, it's giving the proper authorities
information you have about:
1. A crime that might be committed
2. A crime that has been committed
3. Someone who was involved in committing a crime
4. Young people understand the importance of reporting crime.
They want safer schools and neighborhoods, and if they
know how to report effectively, they'll do it. Young people
can help encourage peers to report crime in the making as
well as information on crimes under investigation

Purpose of Crime Reporting

We have developed the portal of “WEBSITE ON CRIME


REPORTING”, the portal can handle data of criminals who are
under the judicial surveillance or are under trial. This portal will be
most useful for DEFENCE for searching of details of criminals,
any one can report a FIR online, missing citizen search, secure
registration and profile management facilities for detectives and
security agencies, Facilitate communication between all stack
holders.
.
Need of Crime Reporting:

1. It was a progress to make India free from crime.


2. In this user can easily make fir against the person from whom
he/she is being suffered.
3. In this user can not only make fir but can get his updated
report of his FIR
4. By this Police can easily catch the criminal or in other words
a criminal can be easily catches doesn’t matter how far
he/she is

Functionality Of Crime Reporting

1. Crime reporting forms, progress tracking, proof attachments.


2. On form submission an e mail goes to regional police officer
in case
3. if it’s serious category crime where quick attention is
required.
4. Facilitate crime and criminals search – region, crime-type,
gender,
5. Age group wise etc.
6. Missing citizen or valuables reporting and search
7. Secure registration and profile management facilities for
detectives
8. and security agencies
9. Facilitate communication between all stakeholders -
Discussion

Scope of Crime Reporting

This Website provides an architectural overview of the CRIME


MANAGEMENT. This Website is a generic, web-based tool that
enables users to manage the Crime on tasks completed as part of
projects with tasks and sub-tasks. The tool includes interactivity
Functionality. Information will be stored in a database.
Administrative and managerial functions will be provided
including configuring projects/tasks/subtasks, an

Benefits of Crime Reporting:

In order to quantify the benefits of your crime reporting portal, you


first have to know what to look for. CRIME REPORTING can
help you in different ways. Here are some of the areas to look for
benefits in implementing a portal:

Paper Reduction

“CRIME REPORTING” can reduce the cost associated with


creating and distributing paper requirements and resumes. Cost
savings result from:
Direct savings from reduced paper, printing, and distribution costs
Indirect savings from time spent handling paper documents
Paperwork Transfer
A big expense with a manually maintaining records and
requirement system is that of transferring of records from one
person to another. For example, the file works is no not been done
by hands but is done online. Reducing the communication
expenses

Improved Data Quality

Manual records must be then entered into a computer in order to be


processed for further process or may be maintained into database
for future requirement. Whenever data is keyed into a computer
from a hand-written document, errors will be made. These errors
can cost you in many direct and indirect ways:
Incorrect selection may take place. When wrong justification is
done due to manual errors and adjustment is costly for system.
Without accurate information, you lose the ability to perform
useful decision support. You should have accurate information
about the background of the case as well as the crime, departments
worked in, areas the organization is working in etc. for your
decision support.
Profile of Organization

HCL Info Systems is India's premier information enabling


company. Leveraging its 27 years of expertise in total technology
solutions, HCL InfoSystems offers value-added services in key
areas such as system integration, networking consultancy and a
wide range of support services.

HCL Info Systems is among the leading players in all the segments
comprising the domestic IT products, solutions and related services
business, which includes PCs, servers, networking products,
imaging & communication products.

Continuously meeting the ever increasing customer expectations


and applications, its focus on integrated enterprise solutions has
strengthened the HCL Info systems SSO's (System Support
Organization) capabilities in supporting installation types ranging
from single to large, multi-location, multi-vendor & multi-platform
spread across India. The SSO, comprising a direct support force of
over 1600+ members, is operational at 170+ locations across the
country and is the largest such human resource of its kind in the IT
business. A majority of the SSO members have been special
trained in a variety of supporting solutions, the company's key
focus area.

HCL InfoSystems ' manufacturing facilities are ISO 9001 - 2000 &
ISO 14001 certified and adhere to stringent quality standards and
global processes. With the largest installed PC base in the country,
four indigenously developed and manufactured PC brands -
'Infiniti', 'Busybee' 'Beanstalk' and the 'Ezeebee' - and its robust
manufacturing facilities; HCL InfoSystems aims to further
leverage its dominance in the PC market. It has been consistently
rated as Top player in PC industry by IDC .The 'Infiniti' line of
business computing products is incorporated with leading edge
products from world leaders such as Intel. A fully integrated and
business-ready family of servers and workstations, the 'Infiniti
Global Line' is targeted at medium and large companies to help
them to manage their enterprise-related applications. It has
considerable dominance in verticals like finance, government, and
education & research.

The Frontline Division of HCL InfoSystems has an extensive


network of over 1000 resellers across 300 cities. Frontline Division
has actively promoted the penetration of PCs in the home and the
small office/home office (SOHO) segments, through Beanstalk
PCs, Toshiba Laptops & Dragon Speech Recognition Systems.

Constant evolution with changing times has helped HCL


InfoSystems retain its leadership and profitability for all
stakeholders. In 1992, HCL formed a joint venture company, HCL
HP, with the international computer giant, Hewlett-Packard (HP),
and precipitated a technological leap by achieving world class
manufacturing expertise in the country for HP's RISC/UNIX based
business servers and workstations. In 1997, HCL and its joint
venture partner, HP, re-organized their joint business activities in
India through the buying back of HP's 26 per cent of equity in
HCL HP by the HCL promoters.

Last year, HCL entered into an alliance with SUN Microsystems to


be their Enterprise Distributor for entire range of SUN products.
Combing the latest technology & best-practices from SUN, with 27
years of customer relationship and pan Indian sales & service
expertise of HCL, it aims to leverage the relationship to offer
complete spectrum of IT to the end user.

HCL has closely seen the IT industry rise from scratch, and has
actively participated in its progress. During the twenty-seven year
journey, it has picked up valuable lessons in serving the IT needs
of the Indian customer and gathered domain expertise to
successfully service various businesses.

HCL InfiNet, our 100% subsidiary focuses on the ever-growing


segment in Imaging, Telecom and Communication products,
solutions and services. HCL InfiNet's product portfolio covers a
range of other office automation and communication products
through alliances with world leaders - including mobile
communication products from Nokia, Duprinters from Duplo,
LCD projectors from InFocus, Mass Mailing solutions from Pitney
Bowes and voice and telecommunication solutions from Ericsson.
It has an exclusive sale and support partnership with Toshiba
Corporation, Japan, for sales and servicing of its imaging and
photocopier products.

The Managed Network Service offerings for corporates include


VPNs, ASP offerings, Co Location/ hosting, CDNs, security,
corporate internet telephony solutions, technical and consumer
help desks, 24/7 Network Operations Centre monitoring and a host
of value added networking services. Consumer services include
dialup PSTN/ISDN Internet access, Valufon calling cards and
VoIP telephony devices.

As a leading information enabler, HCL Infosystems has long


standing relationships with world technology leaders such as SUN
for enterprise computing solutions, Intel and AMD for PCs and PC
Servers; Microsoft, Novell and SCO for operating systems and
software solutions; Toshiba Corp. for business automation
equipment; and Oracle, Sybase and Informix for RDBMS
platform, EMC, Veritas for storage solutions. The aim is to
straddle the entire landscape of information enabling technology
far more comprehensively, effectively and competitively.

Indeed, a vision to create enterprises of tomorrow.


System Analysis

System/Requirement analysis phase is considered to be one of the


most important phases in the system development life cycle. It is
immensely important that the software developer make thorough
study of the existing system. It refers into the process of examining
a situation with the intent of improving it through better procedures
and methods.

System Analysis is the process of planning a new System to either


replace or complement an existing system. But before any planning
is done, the old system must be thoroughly understood and the
requirements must be determined. System Analysis, is therefore,
the process of gathering and interpreting facts, diagnosing
problems and using the information to make improvements in the
System. It is basically detailed explanation or description.

Before automating a system under consideration, it has to be


analyzed. We need to study how it functions currently, what are
the problems, and what are the requirements that the proposed
system should meet. The study will enable the developer to know
the intricacies of the existing system.

System Analysis is conducted with the following objectives in


mind:

o Identify the public need.


o Evaluate the system concept for feasibility.
o Perform economic and technical analysis.
o Allocate functions to hardware, software people, database
and other system elements.
Requirement analysis is done in order to understand the problem,
which the software system is to solve e.g., the problem, could be
automating the existing manual system or developing a completely
new automated system or a combination of the two. For every
system understanding the requirement of the system is a major
task. The emphasis in requirement analysis is on identifying what
is needed from the system, and not how the system achieves its
goal.

The main objective behind any business organization is to


maximize its profit besides maintaining quality and strategic
norms. This can be achieved by improving the efficiency of the
system by providing more facilities using automation, by adopting
faster data access, and proper communication.
FEASIBILTY STUDY

A feasibility study is carried out to select the best system that


meets performance requirements. Feasibility is the determination
of whether or not a project is worth doing. The process followed in
making this determination is called a feasibility study. This type of
study determines if a project can and should be taken.

Since the feasibility study may lead to the commitment of large


resources, it becomes necessary that it should be conducted
competently and that no fundamental errors of judgment are made.

Depending on the results of the initial investigation, the


survey is expanded to a more detailed feasibility study.
Feasibility study is a test of system proposal according to its
workability, impact on the organization, ability to meet user
needs, and effective use of resources.

The objective of the feasibility study is not to solve the problem


but to acquire a sense of its scope. During the study, the problem
definition is crystallized and aspects of the problem to be
included in the system are determined.

All projects are feasible given unlimited resources and infinite


time. Unfortunately the development of computer-based system in
many cases is more likely to be plagued by scarcity of resources
and delivery date. Hence, we have made use the concept of
reusability that is what Object Oriented Programming (OOPS) is
all about.

Consequently, costs and benefits are described with greater


accuracy at this stage.
FOUR KEY CONSIDERATIONS ARE INVOLVED IN THE
FEASIBILITY ANALYSIS. THESE ARE:

• TECHNICAL FEASIBILITY
• ECONOMIC FEASIBILITY
• BEHAVIOURAL FEASIBILITY
• OPERATIONAL FEASIBILITY

TECHNICAL FEASIBILITY:-
Technical Feasibility centers on the existing computer system
(hardware/ software) and also it can support the modification. In
manual processing there are more chances of errors, creating lot of
complications, less technical or logical. Through proposed system
we can set this process in a very systematic pattern, which is more
technical, full proof, authentic, safe and reliable.

For example, if the current computer is operating at 80 percent


capacity - an arbitrary ceiling - then running another application
could overload the system or require additional Hardware. This
involves financial considerations to accommodate technical
enhancements. If the budget is a serious constraint, then the project
judged is not feasible. In this project, all the necessary cautions
have been taken care to make it technically feasible. Using a key
the display of text/object is very fast. Also, the tools, operating
system and programming language used in this localization process
is compatible with the existing one.

ECONOMIC FEASIBILITY: -
Economic analysis is the most frequently used method for
evaluating the effectiveness of the candidate system. More
commonly known as cost/benefit analysis, the procedure is to be
determining the benefits and savings that are expected from a
candidate and compare them with costs. If benefits outweigh costs,
then the decision is made to design and implement the system.

A systems financial benefit must exceed the cost of developing that


system. i.e. a new system being developed should be a good
investment for the organization. Economic feasibility considers the
following:

o The cost to conduct a full system investigation.


o The cost of hardware and software for the class of
application.
o The benefits in the form of reduced cost or fewer costly
errors.
o The cost if nothing changes (i.e. the proposed system is not
developed).

BEHAVIOURAL FEASIBILITY:-
People are inherently resistant to change, and computers have been
known to facilitate change. An estimate should be made of how
strong a reaction the user staff is likely to have toward the
development of a computerized system. Therefore it is
understandable that the introduction of a candidate system requires
special efforts to educate and train the staff. The software that is
being developed is user friendly and easy to learn. In this way, the
developed software is truly efficient and can work on any
circumstances, tradition, locales.

Behavioral study strives on ensuring that the equilibrium of the


organization and status quo in the organization neither are nor
disturbed and changes are readily accepted by the users.
Our proposed system works to minimize the human errors, take
less time, easy interaction with user, bug free. This
project/software is further expanded by connecting various
interrelated departments and by installing an extension part of this
software.

o System level goals and requirements.


o Cost estimation for development process and work
product.
o Solution strategy development.
o Outlines of the several solutions strategies.
o Recommendation of solutions strategy.
o Feasibility and study of each strategy.
o List of priorities for management.

OPERATIONAL FEASIBILITY:-
Operational feasibility is mainly related to the human
organizational & political aspects. This feasibility study answers
questions like: Will the system be used if it is developed and
implemented? Will there be resistance from users that will
undermine the possible application benefits?

To get the answer of these questions, many methods are used like
interviews, questionnaire, records checking and observation. One
or two persons who are familiar with information system
techniques, who understands the business and who are skilled in
system analysis and design, generally carry out this feasibility
study.

The essential questions that help in testing the operational


feasibility of a system as follows:

o What changes will be made in the system?


o What organizational structures are?
o What new skills will be required? Do the existing staff
members have these skills? If not, can they be trained
in due course of time?
o Operational feasibility study is carried out by a small group
of people who are familiar with information system
technique who understand the parts of the business that are
relevant to the project and are skilled in system analysis and
design process?

The feasibility study is carried out by a small group of people who


are familiar with information system techniques, understand the
part of business or organization that will be involved or affected by
a project, and are skilled in the system analysis & design process.
GANTT CHART

Gantt Chart is a project scheduling technique. Progress can be


represented easily in a Gantt chart, by coloring each milestone
when completed. The project will start in the month of January and
end after 4 months at the end of April.

A Gantt chart is a graphical representation of the duration of tasks


against the progression of time. It is a useful tool for planning and
scheduling projects. A Gantt chart is helpful when monitoring a
project's progress. A Gantt chart lays out the order in which the
tasks need to be carried out.

A Gantt chart is a type of bar chart that illustrates a project


schedule. Gantt charts illustrate the start and finish dates of the
terminal elements and summary elements of a project. Terminal
elements and summary elements comprise the work breakdown
structure of the project. Gantt charts also show the dependency
relationships between activities. Gantt charts can be used to show
current schedule status.

The Gantt chart is constructed with a horizontal axis representing


the total time span of the project, broken down into increments
(days, weeks, or months).

The Gantt chart is constructed with a vertical axis representing the


tasks that make up the project.
System Design

Detailed Design

Coding

Unit Testing

Test Plan

Testing

Working months January February March


April
DATA FLOW DIAGRAM:

A data flow diagram (DFD) is a graphical representation of the


flow of data through an information system. A data flow diagram
can also be used for the visualization of data processing (structured
design). A data flow diagram could be a context level diagram
(LEVEL 0), LEVEL 1, LEVEL 2.

CONTEXT LEVEL DIAGRAM (LEVEL 0)

This level shows the overall context of the system and its operating
environment and shows the whole system as just one process.

LEVEL 1

This level (level 1) shows all processes at the first level of


numbering, data stores, external entities and the data flows
between them. The purpose of this level is to show the major high
level processes of the system and their interrelation

LEVEL 2

This level is a decomposition of a process shown in a level 1


diagram, as such there should be a level 2 diagram for each and
every process shown in a level 1 diagram.
0 LEVEL DFD FOR CRIME REPORTING
1 LEVEL DFD FOR CRIME REPORTING
2 LEVEL DFD FOR CRIME REPORTING

crimnal database search/ Crimnal


Mising citizen search Database

Field By System
us em

victim/Accused/witness

Admin
st
er

Database
sy

system
user
general
GIS Admin
report

investigation
others

user Fake
Fir
charge
mising sheet FIR
citizen report
mising citizen FAKE DB
DataBase
By E
-Ma
il case
status

By E-Mail
Database Diagrams
DATA DICTIONARY

The data dictionary is the repository of all the meta-data relevant to

the objects stored in the database—and also of information

concerning the DBMS itself.

DICTIONARY CONTENT

DEFINING METADETA

The term metadata is often defined as data about data. That is, data

that provides information about the tables, views, constraints,

stored procedures, etc. stored within the database. If we take a

table as an example, the dictionary will store information such as:

• its name

• when it was created and when it was last accessed

• the names and data types of its attributes (i.e. structural

information)
• its owner, who may read and write to it (i.e. security

information)

• where the data is stored (i.e. physical information)


• CURRENT STUDY

Project:
Project normally has many project activities associated with it, many
employees involved and the employee can play several roles within a project
(employee role in project).
Name:
Crime Reporting

Employee:
Amit Kumar Gupta

Role:
Working on Administrator module

Module Activity:
I have assigned 3 types of authorized users.
Administrator
Authorized Users
General User (Others)

Administrator-: Administrator have all authority of inserting,


deleting, updating from database on the bases of proofing by the
users. After 2 days admin will send user-id & password on the
prescribed e-mail id. Admin can get any feedback from the user
end by the contact form.

Authorized User: Authorized users are of 4 types.


Press Reporter
Detective
Lawyer
Police
Everyone can register by the proof id & will get the registered no
& the user-id will be send by the Admin to the e-mail id.

General User: This type of user performs can following task.


Firing FIR
Missing FIR
& see the list of following links:
Laws
Awards winner’s people
Lost Vehicles
About Indian Police
Tips for safety
Internet Crime Prevention Tips
Help Line
FAQ’s
Declaimer
Normal user can see the information magazine also and the whole
information about the website…
/estimate
The estimated time required for Employee to accomplish the task. (15-20
days)
PROPOSED SYSTEM

This section describes the proposed crime reporting system for the
Region. This system was developed based on previous planning
efforts
And direct input from the public and interested agencies and
groups. The
Proposed system does include all TRPA Environmental
Improvement
Program (EIP) projects. However, not all of the
proposed projects are EIP projects. Key criteria used in developing
and
Prioritizing the proposed system is listed below.
Public Input - Consider and respond to public information in the
Crime Reporting planning process.
Use - Crime reporting facilities contained in the proposed
System should reflect use levels that are commensurate with the
Level of investment required for construction and maintenance.
Coverage - The system should provide balanced access from all
portions of the region’s population centers for both commuting
and recreation routes.
Safety - The system should provide the highest level of safety
Possible while eliminating major safety concerns such as narrow
Roadways.
Connectivity - The system should provide connections to major
Activity centers, multi-modal transfer locations, and to routes that
Provide access to neighboring counties. Activity centers include
Residential neighborhoods, schools, regional parks, shopping
Centers, employment centers, government centers, transit centers,
And other recreational opportunities. Major gaps and barriers,
Including narrow bridges and roadways, should be targeted as
High priority items.
System Design
The design phase decides how the system will operate, in terms of
the hardware, software, and network infrastructure; the user
interface, forms, and reports that will be used; and the specific
programs, databases, and files that will be needed. Although most
of the strategic decisions about the system were made in the
development of the system concept during the analysis phase, the
steps in the design phase determine exactly how the system will
operate. The design phase has four steps:

1. The design strategy must be developed. This clarifies whether


the system will be developed by the company’s own programmers,
whether it will be outsourced to another firm (usually a consulting
firm), or whether the company will buy an existing software
package.

2. This leads to the development of the basic architecture design


for the system that describes the hardware, software, and network
infrastructure that will be used. In most cases, the system will add
or change the infrastructure that already exists in the organization.
The interface design specifies how the users will move through the
system (e.g., navigation methods such as menus and on-screen
buttons) and the forms and reports that the system will use.

3. The database and file specifications are developed. These define


exactly what data will be stored and where they will be stored.
4. The analyst team develops the program design, which defines
the programs that need to be written and exactly what each
program will do. This collection of deliverables (architecture
design, interface design, database and file specifications, and
program design) is the system specification that is handed to the
programming team for implementation. At the end of the design
phase, the feasibility analysis and project plan are reexamined and
revised, and another decision is made by the project sponsor and
approval committee about whether to terminate the project.
Coding and Forms
Home page
Admin Page
Authorized Person Login Page
General FIR
FIR Detail Form
Missing FIR Form
Criminal Form
Contact By E-mail Form:
Contact By Personally Form
Coding
Home page coding

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.Windows.Forms;

public partial class Default4 : System.Web.UI.Page


{
string s =
ConfigurationManager.ConnectionStrings["Crime_ProjectCo
nnectionString"].ToString();
protected void Page_Load(object sender, EventArgse)
{

}
protected void Button2_Click(object sender,
EventArgs e)
{
TextBox1.Text = "";
TextBox2.Text = "";
}
protected void
Button1_Click(objectsenderEventArgse)
{
SqlConnection con = new
SqlConnection(s);
con.Open();
SqlCommand cmd = new
SqlCommand("admin_check", con);
cmd.CommandType =
CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@userid",
TextBox1.Text);
cmd.Parameters.AddWithValue("@password"
, TextBox2.Text);

SqlDataReader dr= cmd.ExecuteReader();

if (dr.HasRows )
{
// //MessageBox.Show("your userid
and passwordis valid");
dr.Read();

Session["type"] =
dr["designation"].ToString();
Session.Add("name",
TextBox1.Text);
string des =
Session["type"].ToString();
Session.Add("designation", des);
Response.Redirect(@"~\Admin_Home.aspx
");

}
else
{
MessageBox.Show("your userid and
passwordis is not valid");
TextBox1.Text = "";
TextBox2.Text = "";
}
//con.close();

}
}
Admin page coding

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System .Data .SqlClient;

public partial class Admin_Home : System.Web.UI.Page


{

string s =
ConfigurationManager.ConnectionStrings["Crime_ProjectCo
nnectionString"].ToString();
protected void Page_Load(object sender, EventArgs
e)
{
string str;
if (Session["name"]==null )
{
Response.Redirect(@"~\Home.aspx");
}

str = Session["name"].ToString();
string ctr;
ctr = Session["designation"].ToString();
Label3.Text = str;
Label7.Text = ctr;

SqlConnection con = new SqlConnection(s);

con.Open();
string date1=DateTime .Now .ToShortDateString
();
SqlCommand cmd = new SqlCommand("select
count(*) from manu_gen_crime_fir_table where
date_time_of_report='" + date1 +"'", con);

SqlDataReader rd = cmd.ExecuteReader();
if (rd.HasRows)
{
rd.Read();

LinkButton1.Text = rd[0].ToString();
}
else
{
}

con.Close();
con.Open();
SqlCommand cmd1 = new SqlCommand("select
count(*) from Authorized_Person_Login where
dateofrequest='" + date1 + "'", con);
SqlDataReader rd1 = cmd1.ExecuteReader();
if (rd1.HasRows)
{
rd1.Read();

LinkButton4.Text = rd1[0].ToString();
}
con.Close();
if (Label7.Text .Equals("Layers")||
Label7.Text .Equals("Police")||Label7.Text
.Equals("Detective")||Label7.Text .Equals("Press
Reporter"))
{
HyperLink1.Enabled = false;
HyperLink3.Enabled = false;
HyperLink4.Enabled = false;
HyperLink5.Enabled = false;

}
protected void LinkButton3_Click(object sender,
EventArgs e)
{
Session["name"] =null ;
//Session.Abandon();
}
protected void LinkButton2_Click(object sender,
EventArgs e)
{
// Session.Abandon();
}
}
Authorized Person Login page coding

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient ;

public partial class Authorized_Person_Login :


System.Web.UI.Page
{
string s =
ConfigurationManager.ConnectionStrings["Crime_ProjectCo
nnectionString"].ToString();
int j = DateTime.Now.Year - 18;
protected void Page_Load(object sender, EventArgs
e)
{
TextBox9.Text =
DateTime.Now.ToShortDateString();
TextBox9.Enabled = false;
if (!IsPostBack)
{
ddlistyear.Items.Add("--Select--");
ddlistday.Items.Add("--Select--");
for (int i = 1930; i <j ; i++)
{

ddlistyear.Items.Add(i.ToString ());
}
for (int i = 1; i <= 31; i++)
{

ddlistday.Items.Add(i.ToString());
}
}
}
protected void Button1_Click(object sender,
EventArgs e)
{
string yr = ddlistyear.SelectedItem.Text;
string mnth = ddlistmonth.SelectedItem.Text;
string day = ddlistday.SelectedItem.Text;
//string str=day+mnth+yr;
string gender;
SqlConnection con =new SqlConnection (s);
con.Open();
SqlCommand cmd = new
SqlCommand("authorisedperson_insert", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@userid",
TextBox1.Text);
cmd.Parameters.AddWithValue("@password ",
TextBox2.Text);
cmd.Parameters.AddWithValue("@name1",
TextBox3.Text);
cmd.Parameters.AddWithValue("@father_name ",
TextBox4.Text);
cmd.Parameters.AddWithValue("@address ",
TextBox5.Text);
cmd.Parameters.AddWithValue("@city ",
TextBox6.Text);
cmd.Parameters.AddWithValue("@designation",
ddlistdesignation .SelectedItem .Text );
cmd.Parameters.AddWithValue("@dateofbirth",
day + mnth + yr);
if(RadioButton1 .Checked )
{
gender="Male";
}

else
{
gender ="female";

}
cmd.Parameters.AddWithValue("@sex", gender);
FileUpload1.SaveAs(Server.MapPath("~//DOCATTACH
ED//") + FileUpload1.FileName);
cmd.Parameters.AddWithValue("@idproof",
FileUpload1.FileName );
cmd.Parameters.AddWithValue("@mobno",TextBox7 .
Text );
cmd.Parameters.AddWithValue("@email",
TextBox8.Text);
cmd.Parameters.AddWithValue("@dateofrequest",
TextBox9.Text);
cmd.ExecuteNonQuery();
con.Close();
}
}
General FIR Page Coding

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.Windows.Forms;
using System.IO.IsolatedStorage;
using System.IO ;
using System.Windows.Forms;
using System.Net;

public partial class generalfirreport :


System.Web.UI.Page
{

string s =
ConfigurationManager.ConnectionStrings["Crime_ProjectCo
nnectionString"].ToString();

protected void Page_Load(object sender, EventArgs


e)
{

TextBox2.Text =
DateTime.Now.ToShortDateString();

TextBox2.Enabled = false;
//int count = 0;
int chv = 0;
string hv;
string temp;
SqlConnection con = new SqlConnection(s);

con.Open();
string str = "select fir_no from
manu_gen_crime_fir_table";
SqlCommand comm = new SqlCommand(str, con);
SqlDataReader dr;
dr = comm.ExecuteReader();
if (dr.HasRows == false)
{
temp = "0001";
}
else
{
while (dr.Read())
{

hv = dr.GetString(0).Substring(3);

if (chv < Convert.ToInt32(hv))


{
chv = Convert.ToInt32(hv);
}

}
chv += 1;
if (chv < 10)
{
temp = "000" + chv.ToString();
}
else if (chv < 100)
{
temp = "00" + chv.ToString();
}
else if (chv < 1000)
{
temp = "0" + chv.ToString();
}
else
{
temp = chv.ToString();
}

dr.Close();
TextBox11.Text = "FIR" + temp;

protected void Button4_Click1(object sender,


EventArgs e)
{
string rstr =
Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (rstr == null)
{
rstr =
Request.ServerVariables["REMOTE_ADDR"];
}
Response.Write(rstr);
string strhostname = Dns.GetHostName();
IPHostEntry ip =
Dns.GetHostByName(strhostname);
IPAddress[] arr = ip.AddressList;
foreach (IPAddress i in arr)
{
MessageBox.Show("Your IP Address has been
tracked and if the information is wrong then an action
will be taken agenst u", "Warning Message",
MessageBoxButtons.OKCancel);
//Response.Write(i.ToString());
TextBox4 .Text=i.ToString ();
}
if (MessageBox.Show("Your Request is in
Progress Just Click Ok ") == DialogResult.OK)
{
SqlConnection con = new SqlConnection(s);
con.Open();
SqlCommand cmd = new
SqlCommand("gen_insert_fir", con);
cmd.CommandType =
CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@fir_no",
TextBox11.Text);
cmd.Parameters.AddWithValue("@complaner_nam
e", TextBox6.Text);
cmd.Parameters.AddWithValue("@complaner_fna
me", TextBox7.Text);
cmd.Parameters.AddWithValue("@complaner_add
ress", TextBox8.Text);
cmd.Parameters.AddWithValue("@complaner_ema
il", TextBox9.Text);
cmd.Parameters.AddWithValue("@complaner_mob
", TextBox10.Text);
cmd.Parameters.AddWithValue("@victim_name",
txtvictimname.Text);
cmd.Parameters.AddWithValue("@victim_fname"
, txtvictimfathername.Text);
cmd.Parameters.AddWithValue("@victim_email"
, txtvictimemail.Text);
cmd.Parameters.AddWithValue("@victim_addres
s", txtvictimaddress.Text);
cmd.Parameters.AddWithValue("@victim_mob",
txtvictimcontect.Text);
cmd.Parameters.AddWithValue("@accused_name"
, txtname.Text);
cmd.Parameters.AddWithValue("@accused_fname
", txtfname.Text);
cmd.Parameters.AddWithValue("@accused_addre
ss", txtaddress.Text);
cmd.Parameters.AddWithValue("@accused_email
", txtemail.Text);
cmd.Parameters.AddWithValue("@accused_mob",
txtphone.Text);
cmd.Parameters.AddWithValue("@date_time_of_
insident", TextBox1.Text);
cmd.Parameters.AddWithValue("@date_time_of_
report", TextBox2.Text);
cmd.Parameters.AddWithValue("@place",
TextBox3.Text);
//string ST =Server.MapPath
("~//DOCATTACHED//") + FileUpload1.FileName);
FileUpload1.SaveAs(Server.MapPath("~//DOCAT
TACHED//") + FileUpload1.FileName);
cmd.Parameters.AddWithValue("@crime_profing
", FileUpload1.FileName);
cmd.Parameters.AddWithValue("@crime_descrip
tion", TextBox5.Text);
cmd.Parameters.AddWithValue("@user_ip",Text
Box4 .Text);
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("Your Report has been
succesfully received now the Police will take proper
Action and Your FIR no is : " + TextBox11.Text);
TextBox1.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
TextBox4.Text = "";
TextBox5.Text = "";
TextBox6.Text = "";
TextBox7.Text = "";
TextBox8.Text = "";
TextBox9.Text = "";
TextBox10.Text = "";
txtvictimname.Text = "";
txtvictimfathername.Text = "";
txtvictimemail.Text = "";
txtvictimcontect.Text = "";
txtvictimaddress.Text = "";
txtfname.Text = "";
txtname.Text = "";
txtphone.Text = "";
txtemail.Text = "";
txtaddress.Text = "";
RadioButton1.Checked = false;
//catch (Exception ex)
//{
// MessageBox.Show("Just Check the
Informations and Try again");
//}
}
}

protected void RadioButton1_CheckedChanged(object


sender, EventArgs e)
{
if (RadioButton1.Checked == true)
{
txtvictimname.Text = TextBox6.Text;
txtvictimfathername.Text = TextBox7.Text;
txtvictimaddress.Text = TextBox8.Text;
txtvictimemail.Text = TextBox9.Text;
txtvictimcontect.Text = TextBox10.Text;

}
}
protected void TextBox5_TextChanged(object sender,
EventArgs e)
{

}
protected void Button1_Click(object sender,
EventArgs e)
{
TextBox1.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
TextBox4.Text = "";
TextBox5.Text = "";
TextBox6.Text = "";
TextBox7.Text = "";
TextBox8.Text = "";
TextBox9.Text = "";
TextBox10.Text = "";
txtvictimname.Text = "";
txtvictimfathername.Text = "";
txtvictimemail.Text = "";
txtvictimcontect.Text = "";
txtvictimaddress.Text = "";
txtfname.Text = "";
txtname.Text = "";
txtphone.Text = "";
txtemail.Text = "";
txtaddress.Text = "";
MessageBox.Show("All entry will be canceled
","Cancel Record");

FIR Detail Page Coding

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class FIR_DETAIL_FORM :


System.Web.UI.Page
{
string s =
ConfigurationManager.ConnectionStrings["Crime_ProjectCo
nnectionString"].ToString();

protected void Button2_Click(object sender,


EventArgs e)
{
RegularExpressionValidator1.Enabled = false;
RegularExpressionValidator2.Enabled = false;
RegularExpressionValidator3.Enabled = false;
RegularExpressionValidator4.Enabled = false;
RegularExpressionValidator5.Enabled = false;
RegularExpressionValidator6.Enabled = false;
//RequiredFieldValidator1.Enabled = true;
//RequiredFieldValidator2.Enabled = true ;
SqlDataAdapter ad;
SqlConnection con = new SqlConnection(s);
DataSet ds = new DataSet();
String sql;
sql = "select * from firdetail where fir_no='"
+ TextBox11.Text + "'";
ad = new SqlDataAdapter(sql, con);
ad.Fill(ds, "fir");

foreach (DataRow r in ds.Tables["fir"].Rows)


{
//TextBox1.Text = r["fir_no"].ToString();
TextBox2.Text =
r["victim_name"].ToString();
TextBox3.Text =
r["victim_father_name"].ToString();
TextBox4.Text =
r["victin_address"].ToString();
TextBox5.Text =
r["accused_name"].ToString();
TextBox6.Text =
r["accused_father_name"].ToString();
TextBox7.Text =
r["accused_address"].ToString();
TextBox8.Text =
r["witness_name"].ToString();
TextBox9.Text =
r["witness_father_name"].ToString();
TextBox10.Text =
r["witness_address"].ToString();

}
}

protected void update_Click(object sender,


EventArgs e)
{
SqlConnection con = new SqlConnection(s);

con.Open();
SqlCommand cmd = new
SqlCommand("firdetail_Update", con);
cmd.CommandType = CommandType.StoredProcedure;
//cmd.Parameters.AddWithValue("@fir_no",
TextBox1.Text);

cmd.Parameters.AddWithValue("@victim_name",
TextBox2.Text);

cmd.Parameters.AddWithValue("@victim_father_nam
e", TextBox3.Text);

cmd.Parameters.AddWithValue("@victin_address",
TextBox4.Text);

cmd.Parameters.AddWithValue("@accused_name",
TextBox5.Text);

cmd.Parameters.AddWithValue("@accused_father_na
me", TextBox6.Text);
cmd.Parameters.AddWithValue("@accused_address",
TextBox7.Text);

cmd.Parameters.AddWithValue("@witness_name",
TextBox8.Text);

cmd.Parameters.AddWithValue("@witness_father_na
me", TextBox9.Text);

cmd.Parameters.AddWithValue("@witness_address",
TextBox10.Text);

cmd.ExecuteNonQuery();
con.Close();

protected void Button1_Click1(object sender,


EventArgs e)
{
SqlConnection con = new SqlConnection(s);
con.Open();
SqlCommand cmd = new
SqlCommand("firdetail_Insert", con);
cmd.CommandType = CommandType.StoredProcedure;
//cmd.Parameters.AddWithValue("@fir_no",
TextBox1.Text);

cmd.Parameters.AddWithValue("@victim_name",
TextBox2.Text);

cmd.Parameters.AddWithValue("@victim_father_nam
e", TextBox3.Text);

cmd.Parameters.AddWithValue("@victin_address",
TextBox4.Text);

cmd.Parameters.AddWithValue("@accused_name",
TextBox5.Text);
cmd.Parameters.AddWithValue("@accused_father_na
me", TextBox6.Text);

cmd.Parameters.AddWithValue("@accused_address",
TextBox7.Text);

cmd.Parameters.AddWithValue("@witness_name",
TextBox8.Text);

cmd.Parameters.AddWithValue("@witness_father_na
me", TextBox9.Text);

cmd.Parameters.AddWithValue("@witness_address",
TextBox10.Text);

cmd.ExecuteNonQuery();
con.Close();
}

protected void
DropDownList1_SelectedIndexChanged(object sender,
EventArgs e)
{
SqlConnection con = new SqlConnection(s);
con.Open();
SqlCommand cmd = new
SqlCommand("fir_detail_list_select", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@Firno",DropDownLis
t1.SelectedItem.Text.Trim() );
SqlDataReader dr = cmd.ExecuteReader();
if (dr.HasRows)

{
dr.Read();
TextBox2.Text = dr["victim_name"].ToString();
TextBox3.Text = dr["victim_fname"].ToString();
;
TextBox4.Text =
dr["victim_address"].ToString();
TextBox5.Text = dr["accused_name"].ToString();
TextBox6.Text =
dr["accused_fname"].ToString();
TextBox7.Text =
dr["accused_address"].ToString();
TextBox8.Text =
dr["complaner_name"].ToString();
TextBox9.Text =
dr["complaner_fname"].ToString();
TextBox10.Text =
dr["complaner_address"].ToString();
}
con.Close();

}
}

Missing FIR Page Coding

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data .SqlClient ;

public partial class Default2 : System.Web.UI.Page


{
string s =
ConfigurationManager.ConnectionStrings["Crime_ProjectCo
nnectionString"].ToString();

int int_yrs, int_months, int_lastdate;


protected void Page_Load(object sender, EventArgs
e)
{

//auto generate code of missing id


//int count = 0;
int chv = 0;
string hv;
string temp;
SqlConnection con = new SqlConnection(s);

con.Open();
string str = "select missing_id from missing";
SqlCommand comm = new SqlCommand(str, con);
SqlDataReader dr;
dr = comm.ExecuteReader();
if (dr.HasRows == false)
{
temp = "0001";
}
else
{
while (dr.Read())
{

hv = dr.GetString(0).Substring(3);

if (chv < Convert.ToInt32(hv))


{
chv = Convert.ToInt32(hv);
}
}
chv += 1;
if (chv < 10)
{
temp = "000" + chv.ToString();
}
else if (chv < 100)
{
temp = "00" + chv.ToString();
}
else if (chv < 1000)
{
temp = "0" + chv.ToString();
}
else
{
temp = chv.ToString();
}

dr.Close();
TextBox1.Text = "MIS" + temp;
//end auto generate code of missing id

ddlistyear.Items.Add("--Select--");
DropDownList1.Items.Add("--Select--");
DropDownList2.Items.Add("--Select--");

if (!IsPostBack)
{
for (int i = 2000; i <= DateTime.Now.Year;
i++)
{
ddlistyear.Items.Add(i.ToString());
}
if (!IsPostBack)
{
for (int i = 0; i < 100; i++)
{
DropDownList1.Items.Add(i.ToString(
));
}
}
if (!IsPostBack)
{
for (int i = 1; i < 12; i++)
{
DropDownList2.Items.Add(i.ToString(
));
}

}
ddlistmonth.Items.Clear();
ddlistmonth.Items.Add("--Select--");

ddlistday.Items.Add("--Select--");
ListItem l = new ListItem("Jan", "1");
ddlistmonth.Items.Add(l);
l = new ListItem("Feb", "2");
ddlistmonth.Items.Add(l);
l = new ListItem("Mar", "3");
ddlistmonth.Items.Add(l);
l = new ListItem("Apr", "4");
ddlistmonth.Items.Add(l);
l = new ListItem("May", "5");
ddlistmonth.Items.Add(l);
l = new ListItem("Jun", "6");
ddlistmonth.Items.Add(l);
l = new ListItem("Jul", "7");
ddlistmonth.Items.Add(l);
l = new ListItem("Aug", "8");
ddlistmonth.Items.Add(l);
l = new ListItem("Sep", "9");
ddlistmonth.Items.Add(l);
l = new ListItem("Oct", "10");
ddlistmonth.Items.Add(l);
l = new ListItem("Nov", "11");
ddlistmonth.Items.Add(l);
l = new ListItem("Dec", "12");
ddlistmonth.Items.Add(l);
}
this.DataBind();
}
protected void
CustomValidator1_ServerValidate(object source,
ServerValidateEventArgs args)
{

}
protected void
ddlistyear_SelectedIndexChanged(object sender,
EventArgs e)
{
Session["int_yrs"] =
ddlistyear.SelectedItem.Value;
}

protected void
ddlistmonth_SelectedIndexChanged1(object sender,
EventArgs e)
{

int_months =
Convert.ToInt32(ddlistmonth.SelectedItem.Value);
ddlistday.Items.Clear();
int_yrs = Convert.ToInt32(Session["int_yrs"]);
if (int_months == 2)
{
if (int_yrs % 4 == 0)
{
int_lastdate = 29;
}
else
{
int_lastdate = 28;
}
}
else if (int_months == 1 || int_months == 3 ||
int_months == 5 || int_months == 7 || int_months == 9
|| int_months == 10 || int_months == 12)
{
int_lastdate = 31;
}
else
{
int_lastdate = 30;
}

for (int i = 1; i <= int_lastdate; i++)


{
ddlistday.Items.Add(i.ToString());
}

}
protected void
ddlistday_SelectedIndexChanged(object sender, EventArgs
e)
{

protected void Button2_Click(object sender,


EventArgs e)
{
string dtr = ddlistyear.SelectedItem .Value +
ddlistmonth.SelectedItem .Text +
ddlistday.SelectedItem .Text ;
SqlConnection con = new SqlConnection(s);
con.Open();
SqlCommand cmd = new
SqlCommand("missing_insert", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@missing_id",
TextBox1.Text);

cmd.Parameters.AddWithValue("@date_of_missing",
dtr);

cmd.Parameters.AddWithValue("@name_of_missing_p
erson", TextBox2.Text);

cmd.Parameters.AddWithValue("@father_name",
TextBox3.Text);
cmd.Parameters.AddWithValue("@age",
DropDownList1.SelectedItem.Text +
DropDownList2.SelectedItem.Text);

if (Male.Checked )
{
cmd.Parameters.AddWithValue("@sex",
"Male");
}
else
{
cmd.Parameters.AddWithValue("@sex",
"Female");
}

cmd.Parameters.AddWithValue("@height", TextBox4
.Text );

cmd.Parameters.AddWithValue("@hair_colour",
TextBox5.Text);

cmd.Parameters.AddWithValue("@address",
TextBox6.Text);

cmd.Parameters.AddWithValue("@complextion",
TextBox7.Text);

cmd.Parameters.AddWithValue("@police_station",
TextBox8.Text);

cmd.Parameters.AddWithValue("@police_action",
TextBox9.Text);

cmd.Parameters.AddWithValue("@general_appereanc
e", TextBox10.Text);
cmd.ExecuteNonQuery();
con.Close();
}
protected void btnupdate_Click(object sender,
EventArgs e)
{
string dtr = ddlistyear.SelectedItem.Value +
ddlistmonth.SelectedItem.Text +
ddlistday.SelectedItem.Text;
SqlConnection con = new SqlConnection(s);
con.Open();
SqlCommand cmd = new
SqlCommand("missing_Update", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@missing_id",
TextBox1.Text);

cmd.Parameters.AddWithValue("@date_of_missing",
dtr);

cmd.Parameters.AddWithValue("@name_of_missing_p
erson", TextBox2.Text);

cmd.Parameters.AddWithValue("@father_name",
TextBox3.Text);

cmd.Parameters.AddWithValue("@age",
DropDownList1.SelectedItem.Text +
DropDownList2.SelectedItem.Text);

if (Male.Checked)
{
cmd.Parameters.AddWithValue("@sex",
"Male");
}
else
{
cmd.Parameters.AddWithValue("@sex",
"Female");
}

cmd.Parameters.AddWithValue("@height",
TextBox4.Text);

cmd.Parameters.AddWithValue("@hair_colour",
TextBox5.Text);
cmd.Parameters.AddWithValue("@address",
TextBox6.Text);

cmd.Parameters.AddWithValue("@complextion",
TextBox7.Text);

cmd.Parameters.AddWithValue("@police_station",
TextBox8.Text);

cmd.Parameters.AddWithValue("@police_action",
TextBox9.Text);

cmd.Parameters.AddWithValue("@general_appereanc
e", TextBox10.Text);
cmd.ExecuteNonQuery();
con.Close();
}
protected void btndelete_Click(object sender,
EventArgs e)
{
string dtr = ddlistyear.SelectedItem.Value +
ddlistmonth.SelectedItem.Text +
ddlistday.SelectedItem.Text;
SqlConnection con = new SqlConnection(s);
con.Open();
SqlCommand cmd = new
SqlCommand("missing_delete", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@id",
TextBox1.Text);
cmd.ExecuteNonQuery();
con.Close();

}
protected void btnreset_Click(object sender,
EventArgs e)
{
TextBox1.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
TextBox4.Text = "";
TextBox5.Text = "";
TextBox6.Text = "";
TextBox7.Text = "";
TextBox8.Text = "";
TextBox9.Text = "";
TextBox10.Text = "";
ddlistyear.ClearSelection();
ddlistmonth.ClearSelection();
ddlistday.ClearSelection();
DropDownList1.ClearSelection ();
DropDownList2.ClearSelection ();
}

protected void Button1_Click(object sender,


EventArgs e)
{
SqlConnection con = new SqlConnection(s);
con.Open();
SqlCommand cmd = new
SqlCommand("missing_showrecord", con);
cmd.CommandType = CommandType.StoredProcedure;
//cmd.Parameters.AddWithValue("@missingid",
TextBox1.Text);
cmd.ExecuteNonQuery();
con.Close();
}

Criminal Page Coding

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.Windows.Forms;
using System.IO.IsolatedStorage;
using System.IO;

public partial class Criminal_Frm : System.Web.UI.Page


{
string s =
ConfigurationManager.ConnectionStrings["Crime_ProjectCo
nnectionString"].ToString();
protected void Page_Load(object sender, EventArgs
e)
{

Txtcrmid.Visible = false;
Txtcrmstatus.Visible = false;
Txtdate.Visible = false;
Txtcrmcat.Visible = false;
FileUpload2.Visible = false;
int chv = 0;
string hv;
string temp;
SqlConnection con = new SqlConnection(s);

con.Open();
string str = ("select criminal_idfrocriminal");
SqlCommand comm = new SqlCommand(str, con);
SqlDataReader dr;
dr = comm.ExecuteReader();
if (dr.HasRows == false)
{
temp = "0001";
}
else
{
while (dr.Read())
{

hv = dr.GetString(0).Substring(3);

if (chv < Convert.ToInt32(hv))


{
chv = Convert.ToInt32(hv);
}

}
chv += 1;
if (chv < 10)
{
temp = "000" + chv.ToString();
}
else if (chv < 100)
{
temp = "00" + chv.ToString();
}
else if (chv < 1000)
{
temp = "0" + chv.ToString();
}
else
{
temp = chv.ToString();
}

dr.Close();
TextBox1.Text = "CRM" + temp;
//end code auto generate of criminal id

DropDownList3.Items.Add("--Select--");
DropDownList4.Items.Add("--Select--");
DropDownList5.Items.Add("--Select--");
if (!IsPostBack)
{
for (int i = 1930; i <= DateTime.Now.Year;
i++)
{
DropDownList3.Items.Add(i.ToString());
}

if (!IsPostBack)
{
for (int i = 1; i < 32; i++)
{
DropDownList5.Items.Add(i.ToString(
));
}

}
this.DataBind();
}

protected void
ddlistyear_SelectedIndexChanged(object sender,
EventArgs e)
{

}
protected void Button2_Click(object sender,
EventArgs e)
{
string year = DropDownList3.SelectedItem.Text;
string mnth = DropDownList4.Text;
string day = DropDownList5.Text;

string str;
SqlConnection con = new SqlConnection(s);
con.Open();
SqlCommand cmd = new
SqlCommand("criminalInsert", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@criminal_id",
TextBox1.Text);
cmd.Parameters.AddWithValue("@criminal_name",
TextBox2.Text);
cmd.Parameters.AddWithValue("@criminal_address"
, TextBox3.Text);
cmd.Parameters.AddWithValue("@criminal_father_n
ame", TextBox4.Text);
if (Male.Checked)
{
str = "Male";

cmd.Parameters.AddWithValue("@criminal_sex"
, str);
}
else
{
str = "Female";
cmd.Parameters.AddWithValue("@criminal_sex"
, str);
}
if (Married.Checked)
{
cmd.Parameters.AddWithValue("@criminal_mari
tial_status", "Married");
}
else
{
cmd.Parameters.AddWithValue("@criminal_mari
tial_status", "UnMarried");
}
cmd.Parameters.AddWithValue("@criminal_dob",
year + mnth + day);
cmd.Parameters.AddWithValue("@criminal_country"
, DropDownList2.Text);

cmd.Parameters.AddWithValue("@criminal_dna",
TextBox5.Text);

cmd.Parameters.AddWithValue("@criminal_period_o
f_punishment", TextBox11.Text);
cmd.Parameters.AddWithValue("@criminal_no_of_cr
ime", TextBox7.Text);
cmd.Parameters.AddWithValue("@criminal_age",
TextBox8.Text);
cmd.Parameters.AddWithValue("@criminal_crime_ca
tegory", DropDownList6.Text);
cmd.Parameters.AddWithValue("@criminal_crime_de
scription", TextBox9.Text);
cmd.Parameters.AddWithValue("@criminal_type_of_
punishment", TextBox10.Text);
FileUpload2.SaveAs(Server.MapPath("~//DOCATTACH
ED//") + FileUpload2.FileName);
cmd.Parameters.AddWithValue("@criminal_image",
FileUpload2.FileName);
cmd.Parameters.AddWithValue("@present_status",
TextBox6.Text);
cmd.ExecuteNonQuery();
con.Close();

}
protected void Button3_Click(object sender,
EventArgs e)
{

}
protected void Btnsearch_Click(object sender,
EventArgs e)
{
SqlDataAdapter ad;
SqlConnection con = new SqlConnection(s);
DataSet ds = new DataSet();
String sql;
String sex,mstatus;
DropDownList5.Visible = false;
DropDownList3.Visible = false;
DropDownList4.Visible = false;
DropDownList2.Visible = false;

Txtcrmid.Visible = true;
Txtcrmstatus.Visible = true;
Txtdate.Visible = true;
Txtcrmcat.Visible = true;

sql = "select * from criminal where


criminal_id='" + Txtsearch.Text + "'";

ad = new SqlDataAdapter(sql, con);


ad.Fill(ds, "cr");
foreach (DataRow r in ds.Tables["cr"].Rows)
{
Txtcrmid.Text =
r["criminal_id"].ToString();
TextBox2.Text =
r["criminal_name"].ToString();

TextBox3.Text =
r["criminal_address"].ToString();
TextBox4.Text =
r["criminal_father_name"].ToString();
TextBox5.Text =
r["criminal_dna"].ToString();
Txtcrmstatus.Text =
r["criminal_status"].ToString();
TextBox11.Text =
r["criminal_period_of_punishment"].ToString();
TextBox7.Text =
r["criminal_no_of_crime"].ToString();
TextBox8.Text =
r["criminal_age"].ToString();
TextBox9.Text =
r["criminal_crime_description"].ToString();
TextBox10.Text =
r["criminal_type_of_punishment"].ToString();
TextBox6.Text =
r["present_status"].ToString();

sex = r["criminal_sex"].ToString();
mstatus =
r["criminal_maritial_status"].ToString();
if (sex == "Male")
Male.Checked = true;
else if (sex == "Female")
Female.Checked = true;

if (mstatus == "Married")
Married.Checked = true;
else
UnMarried.Checked = true;
Txtdate.Text =
r["criminal_dob"].ToString();
Txtcrmcat.Text =
r["criminal_crime_category"].ToString();
Image1.ImageUrl = "~\\DOCATTACHED\\" +
r["criminal_image"].ToString();

}
}

Testing and Implementation


There are many different definitions of testing introduced in texts
covering software testing. This chapter introduces some ways
which can be used to realize these definitions. Some of these
definitions are:

“The aim of software testing is to guarantee, as far as possible, that


the software is correct.”
“Testing involves operation of a system or application under
controlled conditions and evaluating the results”

Software development models

Software development models are used for describing the work


flow associated with software development process. Two of the
most commonly used development models are the modified
waterfall model.

Modified waterfall model

The waterfall model is one of the oldest ways to model the


software development process and life cycle. The development is
divided into a number of steps that are gone through in a
descending order starting from the top. At the end of each step it is
evaluated if all the requirements for the current step are met and if
the next step can be started. If the requirements are not met the
development should continue on the current step. In some cases it
may be necessary to go back one or more steps and start
descending all over again if changes are necessary to accommodate
late requests by the customer or to correct a fundamental error
introduced in the design of the software. The original waterfall
model did not have any feedback mechanism built into it and this
Mechanism has been added in the modified waterfall model.

The starting point in the waterfall model for the software


development cycle is the idea of the software that will be
developed. After it is established that there is a demand for this
product the requirements that this software must fulfill have to be
specified. When all the requirements are defined the design phase
can be started. The design phase is focused on the data
requirements, the software construction and the interface design
and coding. When the design phase is completed the
implementation phase starts and the actual application will be
programmed. After all these steps have been gone through the
software still needs to be tested to verify that it meets all the
requirements set for it. After the software has passed all the tests
performed the product is delivered to the customer and it will be
maintained by fixing any defects that have gone unnoticed and
possibly by introducing minor improvements.

Testing phases:

The testing process is often divided into different levels or phases


to make the whole process more manageable. These levels are
designed to build upon each other, making the discovery of errors
easier by first testing the application in smaller and less complex
pieces. It is quite common to partition the testing process into the
following phases:

• Unit testing
• Integration testing
• System testing
• Acceptance testing
• Regression testing etc.

UNIT TESTING

Unit testing focuses verification effort on the smallest unit of


Software design that is the module. Unit testing exercises specific
paths in a module’s control structure to ensure complete coverage
and maximum error detection. This test focuses on each module
individually, ensuring that it functions properly as a unit. Hence,
the naming is Unit Testing.

During this testing, each module is tested individually and the


module interfaces are verified for the consistency with design
specification. All important processing path are tested for the
expected results. All error handling paths are also tested.

INTEGRATION TESTING:

Integration testing addresses the issues associated with the dual


problems of verification and program construction. After the
software has been integrated a set of high order tests are
conducted. The main objective in this testing process is to take unit
tested modules and builds a program structure that has been
dictated by design.

SYSTEM TESTING:
System testing of software or hardware is testing conducted on a
complete, integrated system to evaluate the system's compliance
with its specified requirements. System testing falls within the
scope of black box testing, and as such, should require no
knowledge of the inner design of the code or logic.

As a rule, system testing takes, as its input, all of the "integrated"


software components that have successfully passed integration
testing and also the software system itself integrated with any
applicable hardware system(s). The purpose of integration testing
is to detect any inconsistencies between the software units that are
integrated together (called assemblages) or between any of the
assemblages and the hardware. System testing is a more limiting
type of testing; it seeks to detect defects both within the "inter-
assemblages" and also within the system as a whole.

ACCEPTANCE TESTING
User Acceptance of a system is the key factor for the success of
any system. The system under consideration is tested for user
acceptance by constantly keeping in touch with the prospective
system users at the time of developing and making changes
wherever required. The system developed provides a friendly user
interface that can easily be understood even by a person who is
new to the system.

REGRESSION TESTING: -
Regression testing is the process of testing changes to computer
programs to make sure that the older programming still works with
the new changes. Regression testing is a normal part of the
program development process and, in larger companies, is done by
code testing specialists. Test department coders develop code test
scenarios and exercises that will test new units of code after they
have been written. These test cases form what becomes the test
bucket. Before a new version of a software product is released, the
old test cases are run against the new version to make sure that all
the old capabilities still work. The reason they might not work is
because changing or adding new code to a program can easily
introduce errors into code that is not intended to be changed.

PREPARATION OF TEST DATA:

Taking various kinds of test data does the above testing.


Preparation of test data plays a vital role in the system testing.
After preparing the test data the system under study is tested using
that test data. While testing the system by using test data errors are
again uncovered and corrected by using above testing steps and
corrections are also noted for future use.

USING LIVE TEST DATA:

Live test data are those that are actually extracted from
organization files. After a system is partially constructed,
programmers or analysts often ask users to key in a set of data
from their normal activities. Then, the systems person uses this
data as a way to partially test the system. In other instances,
programmers or analysts extract a set of live data from the files and
have them entered themselves.
It is difficult to obtain live data in sufficient amounts to conduct
extensive testing. And, although it is realistic data that will show
how the system will perform for the typical processing
requirement, assuming that the live data entered are in fact typical,
such data generally will not test all combinations or formats that
can enter the system. This bias toward typical values then does not
provide a true systems test and in fact ignores the cases most likely
to cause system failure.

Implementation

After having the user acceptance of the new system developed, the
implementation phase begins. Implementation is the stage of a project
during which theory is turned into practice. During this phase, all the
programs of the system are loaded onto the user's computer. After loading
the system, training of the users starts. Main topics of such type of training
are:

How to execute the package


How to enter the data
How to process the data (processing details)
How to take out the reports

After the users are trained about the computerized system, manual working
has to shift from manual to computerized working. The following two
strategies are followed for running the system:

Parallel run: In such run for a certain defined period, both the systems i.e.
computerized and manual are executed in parallel. This strategy is helpful
because of the following:
Manual results can be compared with the results of the computerized system.
Failure of the computerized system at the early stage, does not affect the
working of the organization, because the manual system continues to work,
as it used to do.

Pilot run: In this type of run, the new system is installed in parts. Some part
of the new system is installed first and executed successfully for
considerable time period. When the results are found satisfactory then only
other parts are implemented. This strategy builds the confidence and the
errors are traced easily.

Changes are made in response to change requirement but the fundamental


software structure is stable. No new functionality is added to the system but
it is restructured and reorganized to facilitate future changes. These
strategies may be applied separately or together. Following maintenance
techniques are used:

Corrective maintenance

This acts to correct errors that are uncovered after the software is in use.

Adaptive Maintenance

This is applied when changes is the external environment precipitate


modifications to software.

Perfective Maintenance

This improves future maintainability and reliability and provides basis for
future enhancements.
Conclusions

1. In this website a general (unknown) user can Apply online


General fir Report while sitting anywhere in the world and also get
the progress report of his/her FIR.

2. in this website Authorized user can Apply general FIR and after
investigation general FIR became registered FIR.

3. This is a fast working online system where crime can be


stopped.

4. By this Police can easily catch the criminal or in other words a


criminal can be easily catches doesn’t matter how far he/she is.
References

www.ic3.gov
www.fbi.gov
www.nw3c.org
www.homeoffice.gov.uk/crime
www.met.police.uk
www.crimereports.com
www.crimereportslive.com
www.meldpuntcybercrime.nl
www.mshp.dps.missouri.gov
www.hamsaweb.org/crime
www.dailycrimereport.com
www.usdoj.gov/criminal/cybercrime

Você também pode gostar