0% found this document useful (0 votes)
24 views

Crime Record Management System

The Crime Record Management System aims to centralize and improve the management of crime records across police stations in the country, enhancing crime prevention, detection, and conviction through efficient information sharing. The proposed system will utilize a web-based application with a distributed architecture and centralized database, prioritizing security and data protection. Additionally, it incorporates blockchain technology to ensure the integrity and confidentiality of sensitive criminal records, addressing the inefficiencies of the existing manual data management system.

Uploaded by

oftechtrichy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Crime Record Management System

The Crime Record Management System aims to centralize and improve the management of crime records across police stations in the country, enhancing crime prevention, detection, and conviction through efficient information sharing. The proposed system will utilize a web-based application with a distributed architecture and centralized database, prioritizing security and data protection. Additionally, it incorporates blockchain technology to ensure the integrity and confidentiality of sensitive criminal records, addressing the inefficiencies of the existing manual data management system.

Uploaded by

oftechtrichy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 69

Crime Record Management System

Abstract

The proposed system applies to all Police stations across the country and specifically looks
into the subject of Crime Records Management. It is well understood that Crime
Prevention, Detection and Conviction of criminals depend on a highly responsive backbone
of Information Management. The efficiency of the police function and the effectiveness
with which it tackles crime depend on what quality of information it can derive from its
existing records and how fast it can have access to it. It is proposed to centralize
Information Management in Crime for the purposes of fast and efficient sharing of critical
information across all Police Stations across the territory. Initially, the system will be
implemented across Cities and Towns and later on, be interlinked so that a Police detective
can access information across all records in the state thus helping speedy and successful
completion to cases. The System would also be used to generate information for pro-active
and preventive measures for fighting crime. The project has been planned to be having the
view of distributed architecture, with centralized storage of the database. The application
for the storage of the data has been planned. Using the constructs of SQL server and all the
user interfaces have been designed using the DOT Net technologies. The standards of
security and data protective mechanism have been given a big choice for proper usage. The
application takes care of different modules and their associated reports, which are produced
as per the applicable strategies and standards that are put forwarded by the administrative
staff.
Introduction

The entire project has been developed keeping in view of the distributed
client server computing technology, in mind. The specifications have been
normalized up to 3NF to eliminate all the anomalies that may arise due to
the database transaction that are executed by the general users and the
organizational administration. The user interfaces are browser specific to
give distributed accessibility for the overall system. At all proper levels
high care was taken to check that the system manages the data
consistency with proper business rules or validations. The authentication
and authorization was crosschecked at all the relevant stages. The user
level accessibility has been restricted into two zones namely. The
administrative zone and the normal user zone. We see that when a gathering or
society is framed at that point a few guidelines and laws are made by individuals, for
individuals and to individuals. The motivation behind these guidelines and laws are to give
an agreeable everyday routine to all who are experiencing in that society. At whatever point
any law is disregarded by anyone then we say that wrongdoing is perpetrated and who
violate that law is called Criminal and to understand that individual his/her slip-up, there is
additionally a rules of discipline. A few times these violations are submitted by same/various
individuals in same/diverse way over and over. So we need to deal with a record of such kind
of individuals so when any extraordinary sort of wrongdoing is perpetrated then that
criminal can undoubtedly followed out and rebuff them so they don't do that wrongdoing in
future. The fundamental substance of this Framework is FIR. Any casualty can hold up a
solicitation for FIR through Web from any spot. It isn't essential that it ought to be held up at
same spot where the wrongdoing happened. As solicitation stopped, it will consequently
came to the worker of the closest Police headquarters from the spot of wrongdoing
happened with the assistance of data given in the Solicitation Structure. At the worker side
this solicitation will be changed over into a FIR and the case will surrender to the
Examination Official of that Police headquarters. The IO will examine the case based on data
given in FIR, capture the suspect or criminal, gather the confirmations, ask individuals on the
spot and look after his/her case journal, give his/her report on that case to Officer and case
will be move to COURT where a ultimate choice will taken out on that case and if suspect is
demonstrated Crook, the court will rebuff him/her. Based on court choice the data records,
for example, wrongdoing record, criminal record are kept up.

In addition to other technologies, other systems have made use of blockchain to maintain
criminal data records. The concept of the research is based on the confidentiality of criminal
data and maintenance from the local Police Officers' perspective. The aim of the study is to
use blockchain technology to improve the security protocol for criminal record data. The
work focuses on both the security protocols and the system architecture from both the user
and implementers’ sides. Criminal records are highly sensitive public records. The
authenticity and rigidity of records can be upheld by including criminal records in a
blockchain, which also helps to protect the data from enemies. Each nation's ability to
develop is directly hampered by rising crime rates, so it is and has always been a top priority
for all countries to prevent or at least curtail current and potential criminal activity. The
decentralization of data is made possible through a peer-to-peer cloud network. It assists in
preventing unauthorized data alterations. In order to achieve integrity and security, this
article offers a system for storing criminal records that uses blockchain technology. While
high-level criminals seek to avoid attention, low-level criminals who carry out the grunt labor
in a criminal organization are more likely to be apprehended.

The graph of crime rates is gradually rising due to rapid urbanization and urban and rural
development. Blockchain can replace such piled-up criminal records with a network where
papers are freely available and could not be tampered with, keeping them safe and Secure.
Blockchain is a P2P (peer-to-peer network) that helps decentralize data. This system will be
based upon the immutability characteristic of the blockchain to ensure the integrity and
security of data. This blockchain-based approach can reduce corruption risk factors by
making it easier for third parties to monitor tamper-evident transactions and provide
improved impartiality and consistency, consequently boosting criminal record openness and
accountability. Also, timely access to legitimate criminal records by different administrative
bodies will make law enforcement effective. Nowadays crime rates are increasing and the
public is facing many security problems in society. When this happens, individuals feel
vulnerable and require assistance to be protected. Even though many technologies have
been introduced for Crime control systems. This application will overcome these concerns
and provide a database for storing data. Criminal records are now maintained via manual
procedures, which is a less-than-efficient data system. There are chances of losing data. This
application will resolve these issues and also offers a database for data storage. The current
system utilized by the police department for prisoner information stores the name of the
prisoners, information about the crime, the date of the FIR, the criminal's background, and
the duration of the prison.

Existing System

The existing system contains the about all the police stations that are
registered as per the jurisdiction of the system. It also gets integrated with
the employees who are working in these stations along with their
designation. Crime Record Management System is a system used for statistical purposes
to categorize different types of criminal activity. It provides a standardized framework for
collecting and analyzing data related to crime. The purpose of categorizing crimes is to
facilitate the comparison and analysis of crime statistics across different countries and
jurisdictions. Various authorities such as police, prosecution, courts, and prisons collect data
on crimes for their own purposes. These authorities use their own methods and techniques
for recording and reporting crime data, which may vary depending on their operational
requirements and legal systems. For example, police may collect data on reported crimes,
prosecutions may track convictions, and prisons may record data on inmate populations. The
Crime Record Management System categorizes crimes into different types or categories
based on their nature and characteristics. Common categories include violent crimes (such
as homicide, assault, and sexual offenses), property crimes (such as theft, burglary, and
arson), drug offenses, fraud, and other types of crimes (such as traffic offenses, public order
offenses, and cybercrimes). By grouping crimes into categories, the system enables the
collection of data on crime trends, patterns, and prevalence at a macro level. This data can
be used for policy-making, resource allocation, and evaluation of crime prevention
strategies. However, it's important to note that the Crime Record Management System is a
statistical framework and does not necessarily align with legal definitions of crimes in
different jurisdictions, as legal definitions and classifications may vary across countries and
legal systems.
Disadvantages

The existing system doesn’t have system security. That means, the user
can login in to system any where in the world. But the data in this system
is not for public. To avoid this problem, the proposed system is developed
as MAC enabled website. That means, the user can access the website in
that system only, so that we can avoid the information leakage problem.

Proposed System

The Crime Record Management System is a web-based application designed to improve the
management of crime records across all police stations in the country. Effective crime
prevention, detection, and conviction rely heavily on a responsive information management
system. Therefore, centralizing information management in crime is proposed for the efficient
sharing of crucial information among police stations. Initially, the system will be
implemented in cities and towns and later interconnected to enable police staff to access
information from all records in the state, ultimately helping to close cases faster. The system
will also generate information for proactive and preventive measures to fight crime. The
project will adopt a distributed architecture with a centralized database storage system, with
high priority given to security and data protection mechanisms. The application is designed to
handle various modules and their associated reports, produced in line with the administrative
staff's applicable strategies and standards. In summary, the Crime Record Management
System is a web-based application that aims to improve the management of crime records
across police stations in the country. The system is designed to centralize information
management, generate crucial information for crime prevention, and provide efficient and fast
access to records. The project adopts a distributed architecture with centralized database
storage, prioritizing data protection and security mechanisms while producing reports that
align with applicable administrative strategies and standards. This is a police dashboard
where the police can accept the absolute information using a login password. To access the
online criminal management system, we need to Add on users (police office bearers along
with the background screening agencies) and allocate their various levels of entitlements.
Verify user login particulars and also make sure user level prerogatives to data. Stock as well
as recover all the data about crime and criminals. Execute search tasks on the grounds of
some defined standards. Execute crime inspection and analysis along with the statistics to
generate adequate reports.

Advantages

 Diminish manual and excess records keeping


 Encourage cooperation and sharing of data among police offices, locale, state/base
camp and other police organizations
 Building security and checking control to guarantee just approved individual approach
the criminal data

System Requirements
Hardware Requirements:
System : Pentium IV 2.4 GHz.
Hard Disk : 240 GB.
Monitor : 14’ Colour Monitor.
Mouse : Optical Mouse.
Ram : 2 GB.

Software Requirements:
Operating system : Windows 7 Ultimate.
Coding Language : ASP.Net with C#
Front-End : Visual Studio 2010 Professional.
Data Base : SQL Server 2008.
Software Description:
.NET Frame Work
The .NET Framework is a new computing platform that simplifies application
development in the highly distributed environment of the Internet. The .NET
Framework is designed to fulfil the following objectives:
 To provide a consistent object-oriented programming environment whether object
code is stored and executed locally, but Internet-distributed, or executed remotely.
 To provide a code-execution environment that guarantees safe execution of code,
including code created by an unknown or semi-trusted third party.
 To provide a code-execution environment that eliminates the performance problems
of scripted or interpreted environments.
 To make the developer experience consistent across widely varying types of
applications, such as Windows-based applications and Web-based applications.
 To build all communication on industry standards to ensure that code based on
the .NET Framework can integrate with any other code.
The .NET Framework has two main components: the common language
runtime and the .NET Framework class library. The common language runtime is the
foundation of the .NET Framework. One can think of the runtime as an agent that
manages code at execution time, providing core services such as memory
management, thread management, and remoting, while also enforcing strict type
safely and other forms of code accuracy that ensure security and robustness.
In fact, the concept of code management is a fundamental principle of the
runtime. Code that targets the runtime is known as managed code, while code that
does not target the runtime is known as unmanaged code.
The class library, the other main component of the .NET Framework, is a
comprehensive, object-oriented collection of reusable types that you can use to
develop applications ranging from traditional command-line or graphical Voter
interface (GUI) applications to applications based on the latest innovations provided
by ASP.NET, such as Web Forms and XML Web services.
The .NET Framework can be hosted by unmanaged components that load the
common language runtime into their processes and initiate the execution of managed
code, thereby creating a software environment that can exploit both managed and
unmanaged features.
The .NET Framework not only provides several runtime hosts, but also
supports the development of third-party runtime hosts.
The .NET Framework is a multi-language environment for building,
deploying, and running XML Web services and applications. It consists of three main
parts:

ASP.NET
ASP.NET is more than the next version of Active Server Pages (ASP); it is a
unified web development platform that provides the services necessary for developers
to build enterprise-class Web applications. While ASP.NET is largely syntax
compatible with ASP, it also provides a new programming model and infrastructure
for more secure, scalable and stable applications. You can feel free to augment your
existing ASP application by incremental adding ASP.NET functionality to them.
ASP.NET is a compiled, .NET-based environment; you can author
applications in any .NET compatible language, including Visual Basic .NET, and
Jscript .NET. Additionally, the entire .NET Framework is available to any ASP.NET
application. Developers can easily access the benefits of these technologies, which
include the managed common language runtime environment, type safely, inheritance,
and so on.
ASP.NET has been designed to work seamlessly with WYSIWYG HTML
editors and other programming tools, including Microsoft Visual Studio .NET. Not
only does this make Web development easier, but it is also provides all the benefits
that these tools have to offer, including a GUI that developers can use to drop server
controls onto a Web page and fully integrated debugging support.
Developers can use Web Forms or XML Web services when creating an
ASP.NET application, or combine these in any way they see fit. Each is supported by
the same infrastructure that allows you to use authentication schemes; caches
frequently used data, or customize your application’s configuration, to name only a
few possibilities.
Web Forms allow you to build powerful forms-based Web pages. When
building these pages, you can use ASP.NET server controls to create common UI
elements, and program them for common tasks. These controls allow you to rapidly
build a Web Form out of reusable built-in or custom components, simplifying the
code of a page.
An XML Web service provides the means to access server functionality
remotely. Using XML Web services, businesses can expose programmatic interfaces
to their data or business logic, which in turn can be obtained and manipulated by
client and server applications.
An XML Web services enable the exchange of data in client-server or server-
server scenarios, using standards like HTTP and XML messaging to move data across
firewalls. XML Web services are not tied to a particular component technology or
object-calling convention. As a result, programs written in any language, using any
component model, and running on any operating system can access XML Web
services. Each of these models can take full advantage of all ASP.NET features, as
well as the power of the .NET Framework and .NET Framework common language
runtime. These features and how you can use them are outlined as follows.
If you have ASP development skills, the new ASP.NET programming model
will seem very familiar to you. However, the ASP.NET Object model has changed
significantly from ASP, making it more structured and object-oriented. Unfortunately
this means that ASP.NET is not fully backward compatible; almost all existing ASP
pages will have to be modified to some extent in order to run under ASP.NET.
In addition, major changes to Visual Basic .NET means that existing ASP
pages written with Visual Basic Scripting Edition typically will not port directly to
ASP.NET. In most cases, though, the necessary changes will involve only a few lines
of code. Accessing databases from ASP.NET Applications is an often-used technique
for displaying data to Web site visitors. ASP.NET makes it easier than ever to access
databases for this purpose it also allows you to manage the database from your code.
ASP.NET provides a simple model that enables Web developers to write logic
that runs at the application level. Developers can write this code in the Global .asax
text file or in a compiled class deployed as an assembly. This logic can include
application-level events, but developers can easily extend this model to suit the needs
of their Web application.
ASP.NET takes advantage of performance enhancements found in the .NET
Frame work and common language run time. Additionally, it has been designed to
offer significant performance improvements over ASP and other Web development
platforms. All ASP.NET code is compiled ,rather than interpreted, which allows early
binding, strong typing, and just-in-time (JIT) compilation to native code, to name only
a few of its benefits. ASP.NET is also easily factorable, meaning that developers can
remove modules (a session model, for instant) that are not relevant to the application
they are developing.
ASP.NET offers the Trace context class, which allows you to write custom
debug statements to your pages as you develop them. They appear only when you
have enabled tracing for a page or entire application. Enabling tracing also appends
details about a request to the page, or, if you so specify, to a custom trace viewer that
is stored in the root directory of your application.
The .NET Framework and ASP.NET provide default authorization and
authentication schemes for Web applications. You can easily remove, add to, or
replace these schemes, depending upon the needs of your application.
ASP.NET configuration settings are stored in XML-based files, which are
human readable and writable. Each of your applications can have a distinct
configuration file and you can extend the configuration scheme to suit your
requirements.
Applications are said to be running side by side when they are installed on the
same computer but use different versions of the .NET Framework. IS 6.0 uses a new
process model called worker process isolation mode, which is different from the
process model used in previous versions of IIS. ASP.NET uses this process model
default when running on windows server 2003.
ADO.NET:
ADO.NET provides consistent access to data sources such as Microsoft SQL
server, as well as data sources exposed through OLE DB and XML. Data-sharing
consumer applications can use ADO.NET to connect to these data source and retrieve,
manipulate update data.
ADO.NET cleanly factors data access from data manipulation into discrete
components that can be used separately or in tandem. ADO.NET includes .NET
Framework data providers for connecting to a database, executing commands and
retrieving results. Those results are either processed directly, or placed in an
ADO.NET Data Set object in order to be exposed to the used in an ad-hoc manner,
combined with data from multiple sources, or remote between tiers.
The ADO.NET classes are found in System. Data.dll, and are integrated with
the XML classes found in System.Xml.dll. When compiling code that uses the
system. Data namespace, reference both System.Data.dll and System.Xml.dll.
Data processing has traditionally relied primarily on a connection-based, two-
tier model. As data processing increasingly uses multi-tier architecture, programmers
are switching to a disconnected approach to provide better scalability for their
application.

Microsoft SQL 2008


Microsoft SQL is very fast reliable and flexible Database Management
System. It provides a very high performance and it is multi threaded and multi Voter
Relational Database Management System.
Microsoft SQL is one of the most popular Relational Database Management
System on the web. The Microsoft SQL Database has become the world's most
popular open source Database, because it is free and available on almost all the
platforms. The Microsoft SQL can run on UNIX, Window, and Mac OS. Microsoft
SQL is used for the internet applications as it provides good speed and is very secure.
Microsoft SQL was developed to manage large volumes of data at very high speed to
overcome the problems of existing solutions. Microsoft SQL a be used for verity of
applications but it is mostly used for the web applications on the internet.

Microsoft SQL Features:


 Microsoft SQL is very fast and much reliable for any type of application.
 Microsoft SQL is very Lightweight application.
 Microsoft SQL command line tool is very powerful and can be used to run SQL
queries against database.
 Microsoft SQ
 L supports indexing and binary objects.
 It is allow changes to structure of table while server is running.
 Microsoft SQL has a wide Voter base.
 It is a very fast thread-based memory allocation system.
 Microsoft SQL Written in C and C++ language.
 Microsoft SQL code is tested with different compilers.
 Microsoft SQL is available as a separate program for use in a client/server network
environment.

SQL Server

 Microsoft and Sybase released version 1.0 in 1989.


 However, the partnership between these two ended in the early 1990s.
 Microsoft maintained ownership rights to the name SQL Server.
 Since the 1990s, subsequent versions of SQL Server have been released including SQL Server
2000, 2005, 2008, 2012, 2014, 2016, 2017, and 2019

SQL Server Editions Following editions are available

SQL Server Enterprise: It is used in the high end, large scale and mission Critical busi-
ness. It provides High-end security, Advanced Analytics, Machine Learning, etc.

SQL Server Standard: It is suitable for Mid-Tier Application and Data marts. It includes basic
reporting and analytics.

SQL Server WEB: It is designed for a low total-cost-of-ownership option for Web hosters. It
provides scalability, affordability, and manageability capabilities for small to large scale Web
properties.
SQL Server Developer: It is similar to an enterprise edition for the non-production environ-
ment. It is mainly used for build, test, and demo.SQL Server Express: It is for small scale ap-
plications and free to use.MS SQL Server as Client-Server Architecture

Let's have a look at the below early morning conversation between Mom and her Son, Tom.

Key Components and Services of SQL Server

Database Engine: This component handle storage, Rapid transaction Processing, and Securing
Data.

SQL Server: This service starts, stops, pauses, and continues an instance of Microsoft SQL
Server. Executable name is sqlservr.exe.

SQL Server Agent: It performs the role of Task Scheduler. It can be triggered by any event or
as per demand. Executable name is sqlagent.exe.

SQL Server Browser: This listens to the incoming request and connects to the desired SQL
server instance. Executable name is sqlbrowser.exe.

SQL Server Full-Text Search: This lets user running full-text queries against Character data in
SQL Tables. Executable name is fdlauncher.exe.

SQL Server VSS Writer: This allows backup and restoration of data files when the SQL server
is not running. Executable name is sqlwriter.exe.

SQL Server Analysis Services (SSAS): Provide Data analysis, Data mining and Machine
Learning capabilities. SQL server is integrated with R and Python language for advanced analyt-
ics. Executable name is msmdsrv.exe.

SQL Server Reporting Services (SSRS): Provides reporting features and decision-making ca-
pabilities. It includes integration with Hadoop. Executable name is ReportingServicesSer-
vice.exe

SQL Server Integration Services (SSIS): Provided Extract-Transform and Load capabilities of
the different type of data from one source to another. It can be view as converting raw informa-
tion into useful information. Executable name is MsDtsSrvr.exe
SQL Server Instances

SQL Server allows you to run multiple services at a go, with each service having separate lo-
gins, ports, databases, etc. These are divided into two:

 Primary instances
 Named instances.

There are two ways through which we may access the primary instance. First, we can use the
server name. Secondly, we can use its IP address. Named instances are accessed by appending a
backslash and instance name.

For example, to connect to an instance named xyx on the local server, you should use 127.0.0.1\
xyz. From SQL Server 2005 and above, you are allowed to run up to 50 instances simultane-
ously on a server.

Note that even though you can have multiple instances on the same server, only one of them
must be the default instance while the rest must be named instances. One can run all the in -
stances concurrently, and each instance runs independent of the other instances.

Importance of SQL Server Instances

The following are the advantages of SQL Server instances:

1. For installation of different versions on one machine

You can have different versions of SQL Server on a single machine. Each installation works in-
dependently from the other installations.

2. For cost reduction

Instances can help us reduce the costs of operating SQL Server, especially in purchasing the
SQL Server license. You can get different services from different instances, hence no need for
purchasing one license for all services.

3. For maintenance of development, production and test environments separately


This is the main benefit of having many SQL Server instances on a single machine. You can use
different instances for development, production and test purposes.

4. For reducing temporary database problems

When you have all services running on a single SQL Server instance, there are high chances of
having problems with the problems, especially problems that keep on recurring. When such ser-
vices are run on different instances, you can avoid having such problems.

5. For separating security privileges

When different services are running on different SQL Server instances, you can focus on secur-
ing the instance running the most sensitive service.

6. For maintaining a standby server

A SQL Server instance can fail, leading to an outage of services. This explains the importance
of having a standby server to be brought in if the current server fails. This can easily be
achieved using SQL Server instances.

Summary:

 SQL Server is defined as a relational database management system (RDBMS) developed by


Microsoft
 T-SQL means Transact-SQL, a propriety Language by Microsoft
 Microsoft and Sybase released version 1.0 in 1989
 Various Editions of SQL Server are Enterprise, Standard, Web, Developer, and Express
 Critical components of SQL Server are Database Engine, SQL Server, SQL Server Agent, SQL
Server Browser, SQL Server Full-Text Search, etc.
 You can run multiple instances of SQL Server the same on the same machine.

C# History

History of C# language is interesting to know. Here we are going to discuss brief history of
C# language.
C# is pronounced as "C-Sharp". It is an object-oriented programming language provided by
Microsoft that runs on .Net Framework.

Anders Hejlsberg is known as the founder of C# language.

It is based on C++ and Java, but it has many additional extensions used to perform
component oriented programming approach.

C# has evolved much since their first release in the year 2002. It was introduced with .NET
Framework 1.0 and the current version of C# is 5.0.

C# Features

C# is object oriented programming language. It provides a lot of features that are given be-
low.

1. Simple
2. Modern programming language
3. Object oriented
4. Type safe
5. Interoperability
6. Scalable and Updateable
7. Component oriented
8. Structured programming language
9. Rich Library
10. Fast speed

1) Simple

C# is a simple language in the sense that it provides structured approach (to break the prob-
lem into parts), rich set of library functions, data types etc.
2) Modern Programming Language

C# programming is based upon the current trend and it is very powerful and simple for build-
ing scalable, interoperable and robust applications.

3) Object Oriented

C# is object oriented programming language. OOPs makes development and maintenance


easier where as in Procedure-oriented programming language it is not easy to manage if code
grows as project size grow.

4) Type Safe

C# type safe code can only access the memory location that it has permission to execute.
Therefore it improves a security of the program.

5) Interoperability

Interoperability process enables the C# programs to do almost anything that a native C++ ap-
plication can do.

6) Scalable and Updateable

C# is automatic scalable and updateable programming language. For updating our application
we delete the old files and update them with new ones.

7) Component Oriented

C# is component oriented programming language. It is the predominant software develop-


ment methodology used to develop more robust and highly scalable applications.

8) Structured Programming Language

C# is a structured programming language in the sense that we can break the program into
parts using functions. So, it is easy to understand and modify.
9) Rich Library

C# provides a lot of inbuilt functions that makes the development fast.

10) Fast Speed

The compilation and execution time of C# language is fast.

C# Example: Hello World

In C# programming language, a simple "hello world" program can be written by multiple


ways. Let's see the top 4 ways to create a simple C# example:

o Simple Example

o Using System

o Using public modifier

o Using namespace

C# Simple Example
1. class Program
2. {
3. static void Main(string[] args)
4. {
5. System.Console.WriteLine("Hello World!");
6. }
7. }

Output:

Hello World!
Description

class: is a keyword which is used to define class.


Program: is the class name. A class is a blueprint or template from which objects are cre-
ated. It can have data members and methods. Here, it has only Main method.

static: is a keyword which means object is not required to access static members. So it saves
memory.

void: is the return type of the method. It does't return any value. In such case, return state-
ment is not required.

Main: is the method name. It is the entry point for any C# program. Whenever we run the C#
program, Main() method is invoked first before any other method. It represents start up of the
program.

string[] args: is used for command line arguments in C#. While running the C# program, we
can pass values. These values are known as arguments which we can use in the program.

System.Console.WriteLine("Hello World!"): Here, System is the namespace. Console is


the class defined in System namespace. The WriteLine() is the static method of Console class
which is used to write the text on the console.

C# Example: Using System

If we write using System before the class, it means we don't need to specify System names-
pace for accessing any class of this namespace. Here, we are using Console class without
specifying System.Console.

C# operators

An operator is simply a symbol that is used to perform operations. There can be many types
of operations like arithmetic, logical, bitwise etc.

There are following types of operators to perform different types of operations in C# lan-
guage.

o Arithmetic Operators

o Relational Operators

o Logical Operators
o Bitwise Operators

o Assignment Operators

o Unary Operators

o Ternary Operators

o Misc Operators

Precedence of Operators in C#

The precedence of operator specifies that which operator will be evaluated first and next. The
associativity specifies the operators direction to be evaluated, it may be left to right or right to
left.

Let's understand the precedence by the example given below:

int data= 10+ 5*5

The "data" variable will contain 35 because * (multiplicative operator) is evaluated before +
(additive operator).
C# Keywords

A keyword is a reserved word. You cannot use it as a variable name, constant name etc.

In C# keywords cannot be used as identifiers. However, if we want to use the keywords as


identifiers, we may prefix the keyword with @ character.

A list of Reserved Keywords available in C# programming language is given below:

<td< td="" style="color: rgb(0, 0, 0); font-family: verdana, helvetica, arial, sans-serif; font-
size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-
weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-
transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-
width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-
decoration-color: initial;"></td>

Modules

 Police stations registration module


 Victims FIR registration module
 Investigating evidence registration module

Module Description

Police stations registration module:

This module maintains the information about all the police stations that are registered as per
the jurisdiction of the system. It also gets integrated with the employees who are working in
these stations along with their designation. Police department as a whole is an independent
system, which was created to maintain peace and order within the country and citizens. In
this project, we aim to enhance the functioning of the respective department of the country
with the help of technology. By grouping crimes into categories, the system enables the col-
lection of data on crime trends, patterns, and prevalence at a macro level. This data can be
used for policy-making, resource allocation, and evaluation of crime prevention strategies.
However, it's important to note that the Crime Record Management System is a statistical
framework and does not necessarily align with legal definitions of crimes in different juris-
dictions, as legal definitions and classifications may vary across countries and legal systems.

Victims FIR registration module:

This module maintains the information related to the first investigation report of the crime se-
quences that have taken place. The Fir registers all that a data that is necessary for the investi-
gation to take place in proper length. It identifies the crime category and the crime nature.
Now-a-days everything is getting computerized. Manual work usually consumes a lot of time
and is error prone. To make complaining easy and manage crime records this application is
very helpful. Thus, Crime Management System overcomes most of the limitations of the ex-
isting system along with being very user friendly application. The Crime Records Managing
System is an electronic application for basically giving preparing to the workers who give al -
tered answers for address hierarchical issues. This application programming has been regis-
tered effectively and was additionally tried effectively by taking "experiments". It is easy to
use, and has required choices, which can be used by the client to play out the ideal tasks.

Investigating evidence registration module:

This module makes a collection of information related to all the evidences that become cate-
gorically important under the normal sequence of the investigation, this module dynamically
concentrates upon the changes that take place while the system of investigation is under
process. It is a system which contains three modules Administrator module, Registered user
module and visitors module. All the modules have their respected functionalitites like in ad-
ministrator module there is everything what admin can do in the system for eg. Admin can
view and reply to user’s complaint can add and delete most wanted persons etc. Same like ad-
min module , in registered users module every functionality of registered user is being shown
for eg. Registered user can file new complaint , can watch most wanted person etc. In the
case of visitors module there are not much functions which can be performed , visitor can
only view the recent news related to crime and most wanted criminals in the particular area.
Data Flow Diagram

Flow diagram is a collective term for a diagram representing a flow or set of dynamic
relationships in a system. The term flow diagram is also used as a synonym for flowchart, and
sometimes as a counterpart of the flowchart. Example of a flow diagram of a nuclear
submarine propulsion system. A data flow diagram shows the way information flows through
a process or system. It includes data inputs and outputs, data stores, and the various sub
processes the data moves through.

Implementation
Default
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" Auto-
EventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">


<script type="text/javascript">
function fun1(msg) {
alert(msg);
}

</script>
<link href="StyleSheet1.css" rel="stylesheet" />
<style type="text/css">
.auto-style7
{
width: 100%;

font-family:'Roboto', Arial, Helvetica, sans-serif;


font-size: 16px;
}
.auto-style8
{
width: 279px;
}
</style>

</asp:Content>
<asp:Content ID="Content2" runat="server" contentplaceholderid="Content-
PlaceHolder1">
<div style="height: 550px">

<table class="auto-style7">
<tr>
<td class="auto-style8">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;&nbsp;&nbsp;&nbsp; Enter
Your Email ID</td>
<td>
<asp:TextBox ID="TxtEmailId" runat="server" Css-
Class="form-control" Width="200px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;&nbsp;&nbsp;&nbsp; Enter
Your Password</td>
<td>
<asp:TextBox ID="TxtPassword" runat="server" Css-
Class="form-control" TextMode="Password" Width="200px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td>
<asp:Button ID="Button1" runat="server" OnClick="But-
ton1_Click" Text="Login" Width="101px" CssClass="btn-success" Height="40px"
/>
</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td>
&nbsp;</td>
</tr>
</table>

</div>
</asp:Content>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection();
con.ConnectionString = System.Configuration.ConfigurationManager.-
ConnectionStrings["ConnectionString"].ConnectionString;
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "select * from UserRegistration where EmailId='"
+ TxtEmailId.Text + "'";
cmd.Connection = con;
con.Open();

SqlDataReader r = cmd.ExecuteReader();

if (r.Read())
{
if (TxtPassword.Text==r["UserPassword"].ToString())
{
Session["RegId"] = r["RegId"].ToString();
Session["EmailId"] = r["EmailId"].ToString();
Session["UserName"] = r["UserName"].ToString();
Session["LoginStatus"] = r["LoginStatus"].ToString();
Session["PoliceStationId"] = r["PoliceStationId"].To-
String();
Session["UserAddress"] = r["Address"].ToString();
con.Close();
Response.Redirect("user/UserHome.aspx");
}
else
{
ScriptManager.RegisterStartupScript(Page, GetType(), "",
"fun1('Invalid Password');", true);

}
else
{
ScriptManager.RegisterStartupScript(Page, GetType(), "",
"fun1('No Such email id / password');", true);

}
}

Registration
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" Auto-
EventWireup="true" CodeFile="UserRegistration.aspx.cs" Inherits="UserRegis-
tration" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit"


tagprefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">


<script type="text/javascript">
function fun1(msg) {
alert(msg);
}

</script>
<link href="StyleSheet1.css" rel="stylesheet" />
<style type="text/css">

.newStyle1
{
font-family:'Roboto', Arial, Helvetica, sans-serif;
font-size: 16px;
}
.auto-style7
{
width: 100%;
font-family: 'Roboto', Arial, Helvetica, sans-serif;
font-size: 16px;
height: 776px;
}
.auto-style8
{
font-family: 'Roboto', Arial, Helvetica, sans-serif;
font-size: 16px;
}
.auto-style9
{font-family: 'Roboto', Arial, Helvetica, sans-serif;
font-size: 16px;
width: 139px;
height: 18px;
}
.auto-style10
{font-family: 'Roboto', Arial, Helvetica, sans-serif;
font-size: 16px;
height: 18px;
}
.auto-style11
{font-family: 'Roboto', Arial, Helvetica, sans-serif;
font-size: 16px;
width: 245px;
}
.auto-style12
{font-family: 'Roboto', Arial, Helvetica, sans-serif;
font-size: 16px;
height: 18px;
width: 245px;
}
.auto-style13
{
width: 285px;
}
.auto-style14
{
font-family: 'Roboto', Arial, Helvetica, sans-serif;
font-size: 16px;
height: 18px;
width: 285px;
}
.auto-style15
{
width: 139px;
font-family: 'Roboto', Arial, Helvetica, sans-serif;
font-size: 16px;
height: 22px;
}
.auto-style16
{
font-family: 'Roboto', Arial, Helvetica, sans-serif;
font-size: 16px;
width: 245px;
height: 22px;
}
.auto-style17
{
width: 285px;
height: 22px;
}
.auto-style18
{
height: 22px;
}
.auto-style19
{
width: 139px;
font-family: 'Roboto', Arial, Helvetica, sans-serif;
font-size: 16px;
height: 38px;
}
.auto-style20
{
font-family: 'Roboto', Arial, Helvetica, sans-serif;
font-size: 16px;
width: 245px;
height: 38px;
}
.auto-style21
{
width: 285px;
height: 38px;
}
.auto-style22
{
height: 38px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<div style="height: 908px">

<br />
<table class="auto-style7">
<tr>
<td class="auto-style8" colspan="4" style="font-family:
Arial, Helvetica, sans-serif;
font-size: large;
background-color:#3366FF;
color:white;

">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp; User Registration&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style13">&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style19"></td>
<td class="auto-style20">Enter your Email Id</td>
<td class="auto-style21">
<asp:TextBox ID="TxtEmail" runat="server" Width="250px"
CssClass="form-control"></asp:TextBox>
</td>
<td class="auto-style22">
<asp:RegularExpressionValidator ID="RegularExpression-
Validator1" runat="server" ControlToValidate="TxtEmail" ErrorMes-
sage="*(Please enter valid email id)" ForeColor="Red" ValidationGroup="v"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></
asp:RegularExpressionValidator>
<br />
<asp:RequiredFieldValidator ID="RequiredFieldValid-
ator7" runat="server" ControlToValidate="TxtEmail" ErrorMessage="*(Please
enter email id)" ForeColor="Red" ValidationGroup="v"></asp:RequiredField-
Validator>
</td>
</tr>
<tr>
<td class="auto-style9"></td>
<td class="auto-style12">Enter your Name</td>
<td class="auto-style14">
<asp:TextBox ID="TxtName" runat="server" Width="250px"
CssClass="form-control"></asp:TextBox>
</td>
<td class="auto-style10">
<asp:RequiredFieldValidator ID="RequiredFieldValid-
ator1" runat="server" ControlToValidate="TxtName" ErrorMessage="*(Please
enter your name)" ForeColor="Red" ValidationGroup="v"></asp:RequiredField-
Validator>
</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style11">Enter Password</td>
<td class="auto-style13">
<asp:TextBox ID="TxtPassword" runat="server"
Width="250px" CssClass="form-control" TextMode="Password"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValid-
ator2" runat="server" ErrorMessage="*(Please enter your password)" Fore-
Color="Red" ValidationGroup="v" ControlToValidate="TxtPassword"></asp:Re-
quiredFieldValidator>
</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style11">ReEnter Password</td>
<td class="auto-style13">
<asp:TextBox ID="TxtrePassword" runat="server"
Width="250px" CssClass="form-control" TextMode="Password"></asp:TextBox>
</td>
<td>
<asp:CompareValidator ID="CompareValidator1"
runat="server" ControlToCompare="TxtPassword" ControlToValidate="TxtrePass-
word" ErrorMessage="*(Please type same password)" ForeColor="Red" Valida-
tionGroup="v"></asp:CompareValidator>
</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style11">Select Gender</td>
<td class="auto-style13">
<asp:RadioButtonList ID="RadioButtonList1"
runat="server" RepeatDirection="Horizontal">
<asp:ListItem Selected="True" Value="Male">Male</
asp:ListItem>
<asp:ListItem>Female</asp:ListItem>
<asp:ListItem>Other</asp:ListItem>
</asp:RadioButtonList>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style11">Enter Address</td>
<td class="auto-style13">
<asp:TextBox ID="TxtAddress" runat="server"
Width="250px" CssClass="form-control"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValid-
ator3" runat="server" ErrorMessage="*(Please enter Adress)" ForeColor="Red"
ValidationGroup="v" ControlToValidate="TxtAddress"></asp:RequiredFieldVal-
idator>
</td>
</tr>

<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style11">Select District</td>
<td class="auto-style13">
<asp:DropDownList ID="DdlDistrict" runat="server"
Height="32px" Width="275px">
<asp:ListItem>---Select---</asp:ListItem>
<asp:ListItem>Kanpur</asp:ListItem>
<asp:ListItem>Lucknow</asp:ListItem>
<asp:ListItem>Barabanki</asp:ListItem>
<asp:ListItem>Allahabad</asp:ListItem>
<asp:ListItem>Agra</asp:ListItem>
</asp:DropDownList>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style11">Enter Pincode</td>
<td class="auto-style13">
<asp:TextBox ID="TxtPincode" runat="server"
Width="250px" CssClass="form-control" MaxLength="6"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValid-
ator4" runat="server" ErrorMessage="*(Please enter your pincode)" Fore-
Color="Red" ValidationGroup="v" ControlToValidate="TxtPincode"></asp:Re-
quiredFieldValidator>
</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style11">Enter Contact No</td>
<td class="auto-style13">
<asp:TextBox ID="TxtContact" runat="server"
Width="250px" CssClass="form-control" MaxLength="13"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValid-
ator5" runat="server" ErrorMessage="*(Please enter your contactno)" Fore-
Color="Red" ValidationGroup="v" ControlToValidate="TxtContact"></asp:Re-
quiredFieldValidator>
</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style11">Select Educational Qualifica-
tion</td>
<td class="auto-style13">
<asp:DropDownList ID="DdlEducational" runat="server"
Height="32px" Width="275px">
<asp:ListItem>---Select---</asp:ListItem>
<asp:ListItem>Below 10th</asp:ListItem>
<asp:ListItem>Highschool</asp:ListItem>
<asp:ListItem>Intermediate</asp:ListItem>
<asp:ListItem>Graduation</asp:ListItem>
<asp:ListItem>Post Graduation</asp:ListItem>
<asp:ListItem>Others</asp:ListItem>
</asp:DropDownList>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style11">Enter AADHAR No (optional)</td>
<td class="auto-style13">
<asp:TextBox ID="TxtAadhar" runat="server"
Width="250px" CssClass="form-control"></asp:TextBox>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style11">Select ID Proof</td>
<td class="auto-style13">
<asp:DropDownList ID="DdlIdproof" runat="server"
Height="32px" Width="275px">
<asp:ListItem>---Select---</asp:ListItem>
<asp:ListItem>PAN Card</asp:ListItem>
<asp:ListItem>AADHAR</asp:ListItem>
<asp:ListItem>Voter ID Card</asp:ListItem>
<asp:ListItem>Driving Lisence</asp:ListItem>
<asp:ListItem>Passport</asp:ListItem>
<asp:ListItem>Other</asp:ListItem>
</asp:DropDownList>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style11">Enter ID Proof Document No</td>
<td class="auto-style13">
<asp:TextBox ID="TxtDocumentNo" runat="server"
Width="250px" CssClass="form-control"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValid-
ator6" runat="server" ErrorMessage="*(Please enter your selected document
no)" ForeColor="Red" ControlToValidate="TxtDocumentNo" Validation-
Group="v"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style11">Select Nearest Police Station</td>
<td class="auto-style13">
<asp:DropDownList ID="DdlNearestPoliceStation"
runat="server" Height="32px" Width="275px" AppendDataBoundItems="True"
DataSourceID="SqlDataSource1" DataTextField="PoliceStationName" DataValue-
Field="PoliceStationId">
<asp:ListItem>----Select----</asp:ListItem>
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCom-
mand="SELECT [PoliceStationId], [PoliceStationName] FROM
[PoliceStation]"></asp:SqlDataSource>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style13">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style13" align="center">
<asp:Image ID="Image1" runat="server" ImageUrl="~/
captcha.aspx" />
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style15"></td>
<td class="auto-style16">Enter Captcha</td>
<td class="auto-style17">
<asp:TextBox ID="TxtCaptcha" runat="server"
Width="250px" CssClass="form-control" MaxLength="6"></asp:TextBox>
</td>
<td class="auto-style18"></td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style13">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-
style13">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Button ID="BtnSubmit" runat="server" Text="Submit"
CssClass="btn-primary" Height="32px" Width="73px" ValidationGroup="v" On-
Click="BtnSubmit_Click" />
&nbsp;&nbsp;&nbsp;<input id="Reset1" class="btn-danger" type="reset"
value="Reset" />&nbsp;&nbsp;
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style13">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style11"><asp:Label ID="LblOtp"
runat="server" Text="Enter OTP recieved in Mail" Visible="False" Fore-
Color="Black"></asp:Label>
</td>
<td class="auto-style13">
<asp:TextBox ID="TxtOTP" runat="server" Width="250px"
CssClass="form-control" MaxLength="6" Visible="False"></asp:TextBox>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style15"></td>
<td class="auto-style16"></td>
<td class="auto-style17"></td>
<td class="auto-style18"></td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-
style13">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Button ID="BtnRegister" runat="server" Css-
Class="btn-success" Height="32px" Text="Register" Width="73px" Vis-
ible="False" OnClick="BtnRegister_Click" />
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style8">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style13">&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>

</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2"
Runat="Server">
</asp:Content>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net.Mail;
using System.Net;
using System.Data.SqlClient;
public partial class UserRegistration : System.Web.UI.Page
{
static string password="";
protected void Page_Load(object sender, EventArgs e)
{

}
protected void BtnSubmit_Click(object sender, EventArgs e)
{
if (Session["randomStr"].ToString() != TxtCaptcha.Text)
{
ScriptManager.RegisterStartupScript(Page, GetType(), "",
"fun1('Please enter valid captcha code');", true);
TxtCaptcha.Focus();
return;
}

if (!CheckDropDown())
{
DdlDistrict.Focus();
ScriptManager.RegisterStartupScript(Page, GetType(), "",
"fun1('Please select district/educational qualification/ID Proof/Nearest
Police Station');", true);
return;
}
if (!CheckEmail())
{
TxtEmail.Focus();
ScriptManager.RegisterStartupScript(Page, GetType(), "",
"fun1('This Email Id is already registered');", true);
return;
}

password = TxtPassword.Text;
Random r=new Random();

string Otp="";
for(int i=1;i<=6;i++)
{
Otp=Otp+r.Next(0,9).ToString();
}
Session["Otp"] = Otp;
MailMessage msg = new MailMessage();
msg.To.Add(TxtEmail.Text);
msg.Subject = "OTP for Registration in Online Crime Reporting Sys-
tem";
msg.Body = "Dear " + TxtName.Text + ",<br>Your One Time Password is
: <h3> " + Otp + " </h3><br>Please use this OTP for complete registra-
tion<br><br>Thanks,<br><br>regard's<br><br> Team Online Crime Reporting
System";

msg.From = new MailAddress( "dotnet.demobyas@gmail.com");


msg.IsBodyHtml = true;
SmtpClient client = new SmtpClient("smtp.gmail.com", 587);
client.Credentials = new
NetworkCredential("dotnet.demobyas@gmail.com", "Arun@1439");

client.EnableSsl = true;
try
{
client.Send(msg);

ScriptManager.RegisterStartupScript(Page, GetType(), "",


"fun1('Please Check Ur Email For OTP');", true);

LblOtp.Visible = true;
TxtOTP.Visible = true;
BtnRegister.Visible = true;

TxtOTP.Focus();

}
catch (Exception ex)
{
ScriptManager.RegisterStartupScript(Page, GetType(), "",
"fun1('Something went wrong please try again later');", true);

protected bool CheckDropDown()


{
if (DdlDistrict.SelectedIndex == 0 || DdlEducational.SelectedIndex
== 0 || DdlIdproof.SelectedIndex == 0 || DdlNearestPoliceStation.Selec-
tedIndex == 0)
return false;
else
return true;

}
protected void BtnRegister_Click(object sender, EventArgs e)
{
if (TxtOTP.Text != Session["Otp"].ToString())
{
ScriptManager.RegisterStartupScript(Page, GetType(), "",
"fun1('Please Enter Valid OTP');", true);
TxtOTP.Focus();
return;

SqlConnection con = new SqlConnection();


con.ConnectionString = System.Configuration.ConfigurationManager.-
ConnectionStrings["ConnectionString"].ConnectionString;
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "insert into UserRegistration values(NEXT VALUE
FOR DBO.UserRegistrationSeq,@b,@c,@d,@e,@f,@g,@h,@i,@j,@k,@l,@m,@n,@o)";
cmd.Parameters.AddWithValue("@b", TxtEmail.Text);
cmd.Parameters.AddWithValue("@c", TxtName.Text);
cmd.Parameters.AddWithValue("@d", password);
cmd.Parameters.AddWithValue("@e", RadioButtonList1.SelectedItem.-
Value);
cmd.Parameters.AddWithValue("@f", TxtAddress.Text);
cmd.Parameters.AddWithValue("@g", DdlDistrict.SelectedItem.Value);
cmd.Parameters.AddWithValue("@h", long.Parse(TxtPincode.Text));
cmd.Parameters.AddWithValue("@i", TxtContact.Text);
cmd.Parameters.AddWithValue("@j", DdlEducational.SelectedItem.-
Value);
if(TxtAadhar.Text==string.Empty)
cmd.Parameters.AddWithValue("@k", "N/A");
else
cmd.Parameters.AddWithValue("@k", TxtAadhar.Text);
cmd.Parameters.AddWithValue("@l", DdlIdproof.SelectedItem.Value);
cmd.Parameters.AddWithValue("@m", TxtDocumentNo.Text);
cmd.Parameters.AddWithValue("@n", DdlNearestPoliceStation.Selected-
Item.Value);
cmd.Parameters.AddWithValue("@o", "Login Created At : " + Date-
Time.Now.ToString());

cmd.Connection = con;
con.Open();

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

ScriptManager.RegisterStartupScript(Page, GetType(), "",


"fun1('Thank you for registration');", true);

}
catch (Exception ex)
{
con.Close();
ScriptManager.RegisterStartupScript(Page, GetType(), "",
"fun1('Something went wrong please try again later');", true);
}
}
protected bool CheckEmail()
{
bool var;
SqlConnection con = new SqlConnection();
con.ConnectionString = System.Configuration.ConfigurationManager.-
ConnectionStrings["ConnectionString"].ConnectionString;
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "select * from UserRegistration where
EmailId=@EmailId";
cmd.Parameters.AddWithValue("@EmailId", TxtEmail.Text);

cmd.Connection = con;
con.Open();
SqlDataReader r = cmd.ExecuteReader();
if (r.Read())
{
var = false;
}
else
{
var = true;
}
con.Close();
return var;
}
}

Home

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" Auto-


EventWireup="true" CodeFile="HomePage.aspx.cs" Inherits="HomePage" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit"


tagprefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">


<script src="js/jquery-2.1.4.min.js"></script>
<script src="js/jquery.flip.min.js"></script>
<script>
$(function () {
$(".flip").flip({
trigger: 'hover'
});
});
</script>
<link href="StyleSheet1.css" rel="stylesheet" />
<style>
.flip {
height: 199px;
width: 300px;
margin: 0 auto;
}
.flip img {
width: 300px;
height: auto;
}
.flip .back {
background: #2184cd;
color: #fff;
text-align: center;
}
</style>
<style type="text/css">
.auto-style7
{
width: 100%;
}
.auto-style8
{
height: 381px;
}
.auto-style9
{
width: 315px;
}
.auto-style11
{
width: 697px;
}
.auto-style12
{
height: 381px;
width: 697px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<table class="auto-style7">
<tr>
<td class="auto-style9">&nbsp;</td>
<td class="auto-style11">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td align="left" class="auto-style9">
<asp:Panel ID="Panel3" runat="server" Height="657px"
Width="300px">
<div class="flip">
<div class="front">
<img src="imgs/images2.jpg" alt="" />
</div>
<div class="back">

<h3 align="center">Women Power Line<br />Call 1090</h3>


</div>
</div>
<br />
<div class="flip">
<div class="front">
<img src="imgs/images5.jpg" alt="" />
</div>
<div class="back">

<h3 align="center">Child Help Line<br />Call 1090</h3>


</div>
</div>
<br />
<div class="flip">
<div class="front">
<img src="imgs/images6.jpg" alt="" />
</div>
<div class="back">

<h3 align="center">Railway HelpLine GRP<br />Call 1512</h3>


</div>
</div>
</asp:Panel>
</td>
<td class="auto-style12">

<cc1:TabContainer ID="TabContainer1" runat="server" Activ-


eTabIndex="0" Height="657px" Width="665px">
<cc1:TabPanel ID="TabPanel1" runat="server" Header-
Text="LATEST NEWS/UPDATES">

<ContentTemplate>
<br />
<br />
<asp:SqlDataSource ID="SqlDataSource1"
runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT TOP 10 [News] FROM [News]"></asp:SqlDataSource>
<marquee bgcolor="#2E9AFE" scrollamount="2" dir-
ection="up" loop="true">
<asp:DataList ID="DataList1"
runat="server" DataSourceID="SqlDataSource1" Width="647px">
<ItemTemplate>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;<asp:Label ID="Label1" runat="server" Text='<%# Eval("News") %>'></
asp:Label>
<br />
<hr />
</ItemTemplate>
</asp:DataList>
</marquee>
</ContentTemplate>

</cc1:TabPanel>
<cc1:TabPanel ID="TabPanel2" runat="server" Header-
Text="MISSING PERSON">
<ContentTemplate>
<br />
<br />
<asp:SqlDataSource ID="SqlDataSource2"
runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [Name], [Address], [Photo], [Contactno] FROM [Miss-
ingPerson]"></asp:SqlDataSource>
<asp:DataList ID="DataList2" runat="server"
DataSourceID="SqlDataSource2" GridLines="Both" RepeatColumns="4">
<ItemTemplate>
&nbsp; &nbsp;<asp:Image ID="Image1"
runat="server" Height="134px" ImageUrl='<%# Eval("photo") %>' Width="150px"
/>
<br />
&nbsp;&nbsp; Name :
<asp:Label ID="Label2" runat="server"
Text='<%# Eval("Name") %>'></asp:Label>
<br />
&nbsp;&nbsp; Address :
<asp:Label ID="Label3" runat="server"
Text='<%# Eval("Address") %>'></asp:Label>
<br />
&nbsp;&nbsp; Contact:&nbsp;
<asp:Label ID="Label4" runat="server"
Text='<%# Eval("Contactno") %>'></asp:Label>
</ItemTemplate>
</asp:DataList>
</ContentTemplate>
</cc1:TabPanel>
<cc1:TabPanel ID="TabPanel3" runat="server" Header-
Text="MOST WANTED">
<ContentTemplate>
<br />
<br />
<asp:SqlDataSource ID="SqlDataSource3"
runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [CriminalName], [Reward], [Photo] FROM
[MostWanted]"></asp:SqlDataSource>
<asp:DataList ID="DataList3" runat="server"
DataSourceID="SqlDataSource3" GridLines="Both" RepeatColumns="4">
<ItemTemplate>
<asp:Image ID="Image2" runat="server"
Height="124px" Width="146px" ImageUrl='<%# Eval("photo") %>' />
<br />
Name :
<asp:Label ID="Label5" runat="server"
Text='<%# Eval("CriminalName") %>'></asp:Label>
<br />
Reward: Rs.
<asp:Label ID="Label6" runat="server"
Text='<%# Eval("Reward") %>'></asp:Label>
</ItemTemplate>
</asp:DataList>
</ContentTemplate>
</cc1:TabPanel>
</cc1:TabContainer>

</td>
<td class="auto-style8" align="right">
<asp:Panel ID="Panel2" runat="server" Height="657px">
<div class="flip">
<div class="front">
<img src="imgs/images1.jpg" alt="" />
</div>
<div class="back">

<h3 align="center">Control Room<br />Call 100</h3>


</div>
</div>
<br />
<div class="flip">
<div class="front">
<img src="imgs/images4.jpg" alt="" />
</div>
<div class="back">

<h3 align="center">Fire Brigrade<br />Call 101</h3>


</div>
</div>
<br />
<div class="flip">
<div class="front">
<img src="imgs/images3.jpg" alt="" />
</div>
<div class="back">

<h3 align="center">Ambulance<br />Call 108</h3>


</div>
</div> <br />

</asp:Panel>
</td>
</tr>
</table>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2"
Runat="Server">
</asp:Content>

Search
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" Auto-
EventWireup="true" CodeFile="Search.aspx.cs" Inherits="Search" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">


<style type="text/css">
.btn-success{color:#fff;background-color:#5cb85c;border-
color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-
color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;back-
ground-color:#449d44;border-color:#398439}.btn-success.active,.btn-
success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-
color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-suc-
cess.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-
success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-
success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-
toggle.btn-success:hover{color:#fff;background-color:#398439;border-
color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-
toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-
success.disabled:focus,.btn-success.disabled:hover,.btn-
success[disabled].focus,.btn-success[disabled]:focus,.btn-success[dis-
abled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-
success:focus,fieldset[disabled] .btn-success:hover{background-
color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;back-
ground-color:#fff}
.form-control{display:block;width:100%;padding:6px 12px;font-
size:14px;line-height:1.42857143;color:#555;background-color:#fff;back-
ground-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-
shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px
rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-
box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out
.15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out
.15s,box-shadow ease-in-out .15s
}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-
shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-
shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-
control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-
placeholder{color:#999}.form-control::-webkit-input-place-
holder{color:#999}.form-control::-ms-expand{background-color:transpar-
ent;border:0}.form-control[disabled],.form-control[readonly],fieldset[dis-
abled] .form-control{background-color:#eee;opacity:1}.form-control[dis-
abled],fieldset[disabled] .form-control{cursor:not-allowed}

.style1
{
width: 100%;
}
.newStyle1
{
font-family:'Roboto', Arial, Helvetica, sans-serif;
font-size: 16px;
background-color: #FF9933;
}
.style2
{
width: 388px;
font-family:'Roboto', Arial, Helvetica, sans-serif;
font-size: 16px;
}
.style3
{
width: 126px;
font-family:'Roboto', Arial, Helvetica, sans-serif;
font-size: 16px;
}
.auto-style7
{
width: 340px;
font-family: 'Roboto', Arial, Helvetica, sans-serif;
font-size: 16px;
}
.auto-style8
{
width: 300px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<br />
<table class="style1">

<tr class="newStyle1">
<td colspan="3">
&nbsp;&nbsp;
Search Police Station</td>
</tr>
<tr>
<td colspan="3">
&nbsp;</td>
</tr>
<tr>
<td class="auto-style7">
&nbsp;&nbsp;
Enter Keyword(Area Name/District/Address)</td>
<td class="auto-style8">
<asp:TextBox ID="TextBox1" runat="server" Width="280px"
style="margin-left: 0px" CssClass="form-control"
Height="25px"></asp:TextBox>
&nbsp;</td>
<td>
<asp:Button ID="Button1" runat="server" Text="Search" on-
click="Button1_Click" CssClass="btn-success" Height="31px" Width="92px" />
</td>
</tr>
<tr>
<td colspan="3">
<asp:DataList ID="DataList1" runat="server" Grid-
Lines="Both" RepeatColumns="4"
DataSourceID="SqlDataSource1" CssClass="form-control"
Font-Names="Microsoft Sans Serif">
<ItemTemplate>
<table class="style1">
<tr>
<td colspan="2">
<h3><%# Eval("PoliceStationName") %></
h3><hr /></td>
</tr>
<tr>
<td class="style3">
District</td>
<td>
<asp:Label ID="Label1" runat="server"
Text='<%# Eval("District") %>'></asp:Label>
</td>
</tr>
<tr>
<td>
Chowky Incharge</td>
<td>
<asp:Label ID="Label2" runat="server"
Text='<%# Eval("ChowkiInchar-
geName") %>'></asp:Label>
</td>
</tr>
<tr>
<td>
Address</td>
<td>
<asp:Label ID="Label3" runat="server"
Text='<%# Eval("Address") %>'></asp:Label>
</td>
</tr>
<tr>
<td>
Contact No</td>
<td>
<asp:Label ID="Label4" runat="server"
Text='<%# Eval("ContactNo") %>'></asp:Label>
</td>
</tr>
<tr>
<td>
Email Id</td>
<td>
<a href="mailto:'<%# Eval("EmailId") %>'">
<asp:Label ID="Label5" runat="server" Text='<%# Eval("EmailId") %>'></
asp:Label></a>
</td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
</td>
</tr>
<tr>
<td colspan="3">
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:Connection-
String %>"
SelectCommand="SELECT [Policestationname], [District],
[ChowkiInchargeName], [Address], [Contactno], [EmailId] FROM [Policesta-
tion] WHERE (([PolicestationArea] LIKE '%' + @PolicestationArea + '%')
OR([District] LIKE '%' + @District + '%') OR ([Address] LIKE '%' + @Address
+ '%'))">
<SelectParameters>
<asp:ControlParameter ControlID="TextBox1" Default-
Value="000"
Name="PolicestationArea" PropertyName="Text" />
<asp:ControlParameter ControlID="TextBox1" Default-
Value="000" Name="District"
PropertyName="Text" />
<asp:ControlParameter ControlID="TextBox1" Default-
Value="000" Name="Address"
PropertyName="Text" />
</SelectParameters>
</asp:SqlDataSource>
</td>
</tr>
</table>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2"
Runat="Server">
</asp:Content>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Drawing;
using System.Drawing.Text;
using System.Drawing.Imaging;

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


{
protected void Page_Load(object sender, EventArgs e)
{
Bitmap objBMP = new System.Drawing.Bitmap(80, 40);
Graphics objGraphics = System.Drawing.Graphics.FromImage(objBMP);
objGraphics.Clear(Color.Green);
objGraphics.TextRenderingHint = TextRenderingHint.AntiAlias;
//' Configure font to use for text
Font objFont = new Font("Arial",18, FontStyle.Bold);
string randomStr = "";
int[] myIntArray = new int[5];
int x;
//That is to create the random # and add it to our string
Random autoRand = new Random();

for (x = 0; x < 5; x++)


{
myIntArray[x] = System.Convert.ToInt32(autoRand.Next(0, 9));
randomStr += (myIntArray[x].ToString());

}
//This is to add the string to session cookie, to be compared later
Session.Add("randomStr", randomStr);

//' Write out the text

objGraphics.DrawString(randomStr, objFont, Brushes.White, 3, 3);


//' Set the content type and return the image
Response.ContentType = "image/GIF";
objBMP.Save(Response.OutputStream, ImageFormat.Gif);
objFont.Dispose();
objGraphics.Dispose();
objBMP.Dispose();
}
}

System Testing And Validation

Testing

The various levels of testing are

1. White Box Testing


2. Black Box Testing
3. Unit Testing
4. Functional Testing
5. Performance Testing
6. Integration Testing
7. Objective
8. Integration Testing
9. Validation Testing
10. System Testing
11. Structure Testing
12. Output Testing
13. User Acceptance Testing

White Box Testing

White-box testing (also known as clear box testing, glass box testing, transparent
box testing, and structural testing) is a method of testing software that tests internal struc-
tures or workings of an application, as opposed to its functionality (i.e. black-box testing). In
white-box testing an internal perspective of the system, as well as programming skills, are
used to design test cases. The tester chooses inputs to exercise paths through the code and de-
termine the appropriate outputs. This is analogous to testing nodes in a circuit, e.g. in-circuit
testing (ICT).

While white-box testing can be applied at the unit, integration and system levels of
the software testing process, it is usually done at the unit level. It can test paths within a unit,
paths between units during integration, and between subsystems during a system–level test.
Though this method of test design can uncover many errors or problems, it might not detect
unimplemented parts of the specification or missing requirements.

White-box test design techniques include:

 Control flow testing


 Data flow testing
 Branch testing
 Path testing
 Statement coverage
 Decision coverage

White-box testing is a method of testing the application at the level of the source code.
The test cases are derived through the use of the design techniques mentioned above: control
flow testing, data flow testing, branch testing, path testing, statement coverage and decision
coverage as well as modified condition/decision coverage. White-box testing is the use of
these techniques as guidelines to create an error free environment by examining any fragile
code.

These White-box testing techniques are the building blocks of white-box testing, whose
essence is the careful testing of the application at the source code level to prevent any hidden
errors later on. These different techniques exercise every visible path of the source code to
minimize errors and create an error-free environment. The whole point of white-box testing is
the ability to know which line of the code is being executed and being able to identify what
the correct output should be.

Levels

1. Unit testing. White-box testing is done during unit testing to ensure that the code is
working as intended, before any integration happens with previously tested code.
White-box testing during unit testing catches any defects early on and aids in any de-
fects that happen later on after the code is integrated with the rest of the application
and therefore prevents any type of errors later on.
2. Integration testing. White-box testing at this level are written to test the interactions of
each interface with each other. The Unit level testing made sure that each code was
tested and working accordingly in an isolated environment and integration examines
the correctness of the behavior in an open environment through the use of white-box
testing for any interactions of interfaces that are known to the programmer.
3. Regression testing. White-box testing during regression testing is the use of recycled
white-box test cases at the unit and integration testing levels.

White-box testing's basic procedures involve the understanding of the source code that
you are testing at a deep level to be able to test them. The programmer must have a deep un -
derstanding of the application to know what kinds of test cases to create so that every visible
path is exercised for testing. Once the source code is understood then the source code can be
analysed for test cases to be created. These are the three basic steps that white-box testing
takes in order to create test cases:

1. Input, involves different types of requirements, functional specifications, detailed de-


signing of documents, proper source code, security specifications. This is the prepara-
tion stage of white-box testing to layout all of the basic information.
2. Processing Unit, involves performing risk analysis to guide whole testing process,
proper test plan, execute test cases and communicate results. This is the phase of
building test cases to make sure they thoroughly test the application the given results
are recorded accordingly.
3. Output; prepare final report that encompasses all of the above preparations and re-
sults.
Black Box Testing

Black-box testing is a method of software testing that examines the functionality of


an application (e.g. what the software does) without peering into its internal structures or
workings (see white-box testing). This method of test can be applied to virtually every level
of software testing: unit, integration, system and acceptance. It typically comprises most if
not all higher level testing, but can also dominate unit testing as well

Test procedures

Specific knowledge of the application's code/internal structure and programming


knowledge in general is not required. The tester is aware of what the software is supposed to
do but is not aware of how it does it. For instance, the tester is aware that a particular input
returns a certain, invariable output but is not aware of how the software produces the output
in the first place.

Test cases

Test cases are built around specifications and requirements, i.e., what the application
is supposed to do. Test cases are generally derived from external descriptions of the software,
including specifications, requirements and design parameters. Although the tests used are pri-
marily functional in nature, non-functional tests may also be used. The test designer selects
both valid and invalid inputs and determines the correct output without any knowledge of the
test object's internal structure.
Test design techniques

Typical black-box test design techniques include:

 Decision table testing


 All-pairs testing
 State transition tables
 Equivalence partitioning
 Boundary value analysis
Unit testing

In computer programming, unit testing is a method by which individual units


of source code, sets of one or more computer program modules together with associated con-
trol data, usage procedures, and operating procedures are tested to determine if they are fit for
use. Intuitively, one can view a unit as the smallest testable part of an application. In proce-
dural programming, a unit could be an entire module, but is more commonly an individual
function or procedure. In object-oriented programming, a unit is often an entire interface,
such as a class, but could be an individual method. Unit tests are created by programmers or
occasionally by white box testers during the development process.

Ideally, each test case is independent from the others. Substitutes such as method
stubs, mock objects, fakes, and test harnesses can be used to assist testing a module in isola-
tion. Unit tests are typically written and run by software developers to ensure that code meets
its design and behaves as intended. Its implementation can vary from being very manual
(pencil and paper)to being formalized as part of build automation.

Testing will not catch every error in the program, since it cannot evaluate every exe-
cution path in any but the most trivial programs. The same is true for unit testing. Addition-
ally, unit testing by definition only tests the functionality of the units themselves. Therefore,
it will not catch integration errors or broader system-level errors (such as functions performed
across multiple units, or non-functional test areas such as performance).

Unit testing should be done in conjunction with other software testing activities, as
they can only show the presence or absence of particular errors; they cannot prove a complete
absence of errors. In order to guarantee correct behaviour for every execution path and every
possible input, and ensure the absence of errors, other techniques are required, namely the ap-
plication of formal methods to proving that a software component has no unexpected behav-
iour.

Software testing is a combinatorial problem. For example, every Boolean decision statement
requires at least two tests: one with an outcome of "true" and one with an outcome of "false".
As a result, for every line of code written, programmers often need 3 to 5 lines of test code.

This obviously takes time and its investment may not be worth the effort. There are
also many problems that cannot easily be tested at all – for example those that are nondeter-
ministic or involve multiple threads. In addition, code for a unit test is likely to be at least as
buggy as the code it is testing. Fred Brooks in The Mythical Man-Month quotes: never take
two chronometers to sea. Always take one or three. Meaning, if two chronometers contradict,
how do you know which one is correct?

Another challenge related to writing the unit tests is the difficulty of setting up realis-
tic and useful tests. It is necessary to create relevant initial conditions so the part of the appli -
cation being tested behaves like part of the complete system. If these initial conditions are not
set correctly, the test will not be exercising the code in a realistic context, which diminishes
the value and accuracy of unit test results.

To obtain the intended benefits from unit testing, rigorous discipline is needed
throughout the software development process. It is essential to keep careful records not only
of the tests that have been performed, but also of all changes that have been made to the
source code of this or any other unit in the software. Use of a version control system is essen-
tial. If a later version of the unit fails a particular test that it had previously passed, the ver-
sion-control software can provide a list of the source code changes (if any) that have been ap -
plied to the unit since that time.

It is also essential to implement a sustainable process for ensuring that test case fail-
ures are reviewed daily and addressed immediately if such a process is not implemented and
ingrained into the team's workflow, the application will evolve out of sync with the unit test
suite, increasing false positives and reducing the effectiveness of the test suite.

Unit testing embedded system software presents a unique challenge: Since the soft-
ware is being developed on a different platform than the one it will eventually run on, you
cannot readily run a test program in the actual deployment environment, as is possible with
desktop programs.

Functional testing
Functional testing is a quality assurance (QA) process and a type of black box test-
ing that bases its test cases on the specifications of the software component under test. Func-
tions are tested by feeding them input and examining the output, and internal program struc-
ture is rarely considered (not like in white-box testing). Functional Testing usually de-
scribes what the system does.

Functional testing differs from system testing in that functional testing "verifies a program by
checking it against ... design document(s) or specification(s)", while system testing "vali-
date a program by checking it against the published user or system requirements" (Kaner,
Falk, Nguyen 1999, p. 52).

Functional testing typically involves five steps .The identification of functions that the
software is expected to perform

1. The creation of input data based on the function's specifications


2. The determination of output based on the function's specifications
3. The execution of the test case
4. The comparison of actual and expected outputs
Performance testing

In software engineering, performance testing is in general testing performed to de-


termine how a system performs in terms of responsiveness and stability under a particular
workload. It can also serve to investigate, measure, validate or verify other quality at-
tributes of the system, such as scalability, reliability and resource usage.

Performance testing is a subset of performance engineering, an emerging computer


science practice which strives to build performance into the implementation, design and ar-
chitecture of a system.

Testing types

Load testing

Load testing is the simplest form of performance testing. A load test is usually con-
ducted to understand the behaviour of the system under a specific expected load. This load
can be the expected concurrent number of users on the application performing a specific
number of transactions within the set duration. This test will give out the response times of all
the important business critical transactions. If the database, application server, etc. are also
monitored, then this simple test can itself point towards bottlenecks in the application soft-
ware.

Stress testing

Stress testing is normally used to understand the upper limits of capacity within the
system. This kind of test is done to determine the system's robustness in terms of extreme
load and helps application administrators to determine if the system will perform sufficiently
if the current load goes well above the expected maximum.

Soak testing

Soak testing, also known as endurance testing, is usually done to determine if the sys -
tem can sustain the continuous expected load. During soak tests, memory utilization is moni-
tored to detect potential leaks. Also important, but often overlooked is performance degrada-
tion. That is, to ensure that the throughput and/or response times after some long period of
sustained activity are as good as or better than at the beginning of the test. It essentially in-
volves applying a significant load to a system for an extended, significant period of time. The
goal is to discover how the system behaves under sustained use.

Spike testing

Spike testing is done by suddenly increasing the number of or load generated by,
users by a very large amount and observing the behaviour of the system. The goal is to deter -
mine whether performance will suffer, the system will fail, or it will be able to handle dra -
matic changes in load.

Configuration testing

Rather than testing for performance from the perspective of load, tests are created to
determine the effects of configuration changes to the system's components on the system's
performance and behaviour. A common example would be experimenting with different
methods of load-balancing.

Isolation testing

Isolation testing is not unique to performance testing but involves repeating a test exe-
cution that resulted in a system problem. Often used to isolate and confirm the fault domain.

Integration testing
Integration testing (sometimes called integration and testing, abbreviated I&T) is
the phase in software testing in which individual software modules are combined and tested
as a group. It occurs after unit testing and before validation testing. Integration testing takes
as its input modules that have been unit tested, groups them in larger aggregates, applies tests
defined in an integration test plan to those aggregates, and delivers as its output the integrated
system ready for system testing.

Purpose

The purpose of integration testing is to verify functional, performance, and reliabil-


ity requirements placed on major design items. These "design items", i.e. assemblages (or
groups of units), are exercised through their interfaces using black box testing, success and
error cases being simulated via appropriate parameter and data inputs. Simulated usage of
shared data areas and inter-process communication is tested and individual subsystems are
exercised through their input interface.

Test cases are constructed to test whether all the components within assemblages in-
teract correctly, for example across procedure calls or process activations, and this is done af-
ter testing individual modules, i.e. unit testing. The overall idea is a "building block" ap-
proach, in which verified assemblages are added to a verified base which is then used to sup-
port the integration testing of further assemblages.

Some different types of integration testing are big bang, top-down, and bottom-up.
Other Integration Patterns are: Collaboration Integration, Backbone Integration, Layer Inte-
gration, Client/Server Integration, Distributed Services Integration and High-frequency Inte-
gration.

Big Bang

In this approach, all or most of the developed modules are coupled together to form a
complete software system or major part of the system and then used for integration testing.
The Big Bang method is very effective for saving time in the integration testing process.
However, if the test cases and their results are not recorded properly, the entire integration
process will be more complicated and may prevent the testing team from achieving the goal
of integration testing.

A type of Big Bang Integration testing is called Usage Model testing. Usage Model
Testing can be used in both software and hardware integration testing. The basis behind this
type of integration testing is to run user-like workloads in integrated user-like environments.
In doing the testing in this manner, the environment is proofed, while the individual compo-
nents are proofed indirectly through their use.

Usage Model testing takes an optimistic approach to testing, because it expects to


have few problems with the individual components. The strategy relies heavily on the compo-
nent developers to do the isolated unit testing for their product. The goal of the strategy is to
avoid redoing the testing done by the developers, and instead flesh-out problems caused by
the interaction of the components in the environment.

For integration testing, Usage Model testing can be more efficient and provides better
test coverage than traditional focused functional integration testing. To be more efficient and
accurate, care must be used in defining the user-like workloads for creating realistic scenarios
in exercising the environment. This gives confidence that the integrated environment will
work as expected for the target customers.

Top-down and Bottom-up

Bottom Up Testing is an approach to integrated testing where the lowest level com-
ponents are tested first, then used to facilitate the testing of higher level components. The
process is repeated until the component at the top of the hierarchy is tested.

All the bottom or low-level modules, procedures or functions are integrated and then
tested. After the integration testing of lower level integrated modules, the next level of mod-
ules will be formed and can be used for integration testing. This approach is helpful only
when all or most of the modules of the same development level are ready. This method also
helps to determine the levels of software developed and makes it easier to report testing
progress in the form of a percentage.

Top Down Testing is an approach to integrated testing where the top integrated mod-
ules are tested and the branch of the module is tested step by step until the end of the related
module.

Sandwich Testing is an approach to combine top down testing with bottom up test-
ing.

The main advantage of the Bottom-Up approach is that bugs are more easily found. With
Top-Down, it is easier to find a missing branch link.
Validation

In that case, you can use the CustomValidator control. The CustomValidator control in
ASP.NET allows you to create your own custom logic to validate user data. The
CustomValidator Control can be used on the client side and server side. JavaScript is used for
client validation; you can use any. Some of the popular ASP.NET validators
are RequiredFieldValidator, CompareValidator, RangeValidator, RegularExpressionValidator,
ValidationSummary, and CustomValidator. Server-side validation helps prevent users from
bypassing validation by disabling or changing the client script. Security Note: By default,
ASP.NET Web pages automatically validate that malicious users are not attempting to send
script or HTML elements to your application.

Introduction

This article explains validation in the Web API. Here I show the step-by-step procedure to
create the application using validation.

Validation

How validation works is like testing to determine that what the user entered in the field is
valid. After validating the entered field, it checks that it is in the correct format, specified
length, and you can compare the input value in various fields or against values. We can use
the validation for various types of information. That will be explained by the sample applica-
tion.

Types of Validation

Here we define the various types of validation that we can be use in our application. These
are as follows:

1. Required entry: It ensures the required field. The user cannot skip the entry.
2. Compare Value: It is ensures that the comparison of the user's entry with the constant
value or against the value of another constant or a specific data type. We use the com-
parison operator like equal, greater than, less than.
3. Range checking: It checks the range of the input values with the minimum and max-
imum range that is required for the input value. We can use the range checker with the
pairs of numbers, dates and alphabetic characters.
4. Pattern matching: It is used for checking the pattern of an input value that specifies the
sequence of characters.
5. Remote: It is used for checking whether the value exists on the server side.

System Maintenance

Software implementation C# is a new computing platform that simplifies application


development in the highly distributed environment of the Internet. Computing relies on
sharing of resources to achieve coherence and economies of scale, similar to a utility over a
network.

This section describes the five software implementation process as:

1. The implementation processes contains software preparation and transition activities, such
as the conception and creation of the implementation plan, the preparation for handling
problems identified during development, and the follow-up medical records management,

2. The problem and modification analysis process, which is executed once the applications
has become the responsibility of the implementation group.

3. The process considering the implementation of the modification itself.

4. The process acceptance of the modification, by confirming the modified work with the
individual who submitted the request in order to make sure the modification provided a
solution.

5. Finally, the last implementation process, also an event which does not occur on daily basis,
is the retirement of a piece of software.

Snapshots

Home page Screen:


Login Page:
Designation page:
Crime category master:
Crime Charge Sheet Master:
User details:
User access denied page:
Conclusion

In this paper, we will overcome the problem of the communication gap between the police
during their investigation. We will also provide solutions to bridge the communication gap
between police and the general user. Also, criminal information will be readily accessible to
police officials as it is stored on the cloud. The problem of reporting fake crimes will be
overcome as this application will need the verification of police to report incidents reported
by the users to broadcast it to other users using the same application. In the future, some
other security algorithms can be used to provide better security measures for the criminal
database. Future research can be dedicated to these challenges.
Future Enhancement

 This System being web-based and an undertaking of Cyber Security Division, needs
to be thoroughly tested to find out any security gaps.
 A console for the data centre may be made available to allow the personnel to monitor
on the sites which were cleared for hosting during a particular period.
 Moreover, it is just a beginning; further the system may be utilized in various other
types of auditing operation viz. Network auditing or similar process/workflow based
applications...

Bibliography

[1] T. Mohana Priya, Dr. M. Punithavalli & Dr. R. Rajesh Kanna, Machine Learning Algorithm
for Development of Enhanced Support Vector Machine Technique to Predict Stress, Global
Journal of Computer Science and Technology: C Software & Data Engineering, Volume 20,
Issue 2, No. 2020, pp 12-20

[2] Ganesh Kumar and P.Vasanth Sena, “Novel Artificial Neural Networks and Logistic
Approach for Detecting Credit Card Deceit,” International Journal of Computer Science and
Network Security, Vol. 15, issue 9, Sep. 2015, pp. 222-234

[3] Gyusoo Kim and Seulgi Lee, “2014 Payment Research”, Bank of Korea, Vol. 2015, No. 1,
Jan. 2015.

[4] Chengwei Liu, Yixiang Chan, Syed Hasnain Alam Kazmi, Hao Fu, “Financial Fraud
Detection Model: Based on Random Forest,” International Journal of Economics and
Finance, Vol. 7, Issue. 7, pp. 178-188, 2015.

[5] Hitesh D. Bambhava, Prof. Jayeshkumar Pitroda, Prof. Jaydev J. Bhavsar (2013), “A
Comparative Study on Bamboo Scaffolding And Metal Scaffolding in Construction Industry
Using Statistical Methods”, International Journal of Engineering Trends and Technology
(IJETT) – Volume 4, Issue 6, June 2013, Pg.2330-2337.

[6] P. Ganesh Prabhu, D. Ambika, “Study on Behaviour of Workers in Construction Industry to


Improve Production Efficiency”, International Journal of Civil, Structural, Environmental and
Infrastructure Engineering Research and Development (IJCSEIERD), Vol. 3, Issue 1, Mar 2013,
59-66

Web Reference

https://www.c-sharpcorner.com/

https://www.w3schools.com/cs/index.php

https://www.aspsnippets.com/

https://stackoverflow.com/

https://www.codeproject.com/

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy