You are on page 1of 75

POLICE TRANSFER AND PROMOTION MANAGEMENT

CHAPTER 1

INTRODUCTION
The entire project has been developed keeping in view of the distributed client
server computing technology, in mind. 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 were 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.

1.1 Aim

Our aim is to make dynamic and interactive application, so that


 The system at any point of time can provide the details of the police station and
the employees.
 The system at any point of time can provide the details of transfer and promotion.
 The system at any point of time can provide the details of existing polices and
their statuses.
1.3 Objective

No need to visit head office always to obtain information regarding transfer and
promotion within the state or country.

1.4 Modular Description:

1. Splash screen: This page is used to welcome to our project.


2. Login Page: This page accepts username and password, if it is authorized the user
will be permitted to view main page.
3. Main: This page displays with two option admin login and user login.
4. About Us: This page gives the brief introduction about our application.
5. Admin main: This page provides the main page of admin.
6. User main: This page provides the main page of user.

1
POLICE TRANSFER AND PROMOTION MANAGEMENT

7. Admin Promotion: This page provides the option for admin to promote the police
from current position to higher promotion.
8. Admin Transfer Request: This page provides the option for admin to accept the
police transfer request or to reject.
9. City: This page helps to add new city to database and to list the cities in states.
10. Contact Us: This page gives the details like phone No and E-Mail id to contact
11. Position: This page helps to add new positions to database and to list the positions.
12. User Transfer request: This page helps the user to request for transfer.
13. Registration: This page helps the new user to register into website.
14. State: This page helps to add new state to database and to list the states.
15. Station: This page helps to add new station to database and to list the stations.
16. Promotion Details: This helps to view the list of promoted police

2
POLICE TRANSFER AND PROMOTION MANAGEMENT

CHAPTER 2

SYSTEM ANALYSIS

2.1 Existing System:

The existing system contains the information about all the police stations, transfer and
promotion details. It also gets integrated with the employees who are working in these
stations along with their designation.

2.2 Disadvantages of existing system:

The existing system doesn’t have system security, that means the user can login in to
system and collects the information but the data in this system is not for public. To avoid
this problem, the proposed system is developed using website enabled. That means, the
user can access the website in that system by providing username and password, so that
we can avoid the information leakage problem.

2.3 proposed System:

To overcome the drawback of the existing system, the propose system has been evolved.
This project aim is to reduce the information leakage and to make the application
interactive and dynamic.

2.4 Feasibility Study

Police transfer and promotion management system by using this system various user
can login and obtain information regarding transfer and promotion. It eases registration
process so it’s a user-friendly product. Operational feasibility: Operation of the
proposed system depends on its various users.

2.5 Technical Feasibility

3
POLICE TRANSFER AND PROMOTION MANAGEMENT

Web application which avoids more manual hours that need to spend in record keeping
and generating reports. These applications keep the data in a centralized way which is
available to all police department employees. It is very easy to manage historical data in
database. Admin can keep records of participates and system can easily inform them by
messages and emails.

2.6 Economic Feasibility

As no papers required so it reduce cost it would be beneficial because only one-time


development efforts required. All people are aware of technologies so no special skills
required to run the system.

4
POLICE TRANSFER AND PROMOTION MANAGEMENT

CHAPTER 3

SYSTEM DESIGN

3.1 Input Design

Input design is part of overall system design that require special attention designing
input data is to make the data entered easy and free from errors. The input pages are
designed using the controls available in .NET framework. Validation is made for each
and every data that is entered. Help information is provided for the users during when
the customer feels difficult. Input design is the process of converting the user originated
inputs to a computer-based format. A system user interacting through a workstation
must be able to tell the system whether to accept the input to produce reports. The
collection of input data is considered to be most expensive part of the system design.
Since the input has to be planned in such a manner so as to get relevant information,
extreme care is taken to obtain pertinent information.

3.2 Output Design

Output design this application “Police Transfer and Promotion management system”
generally refers to the results and information that are generated by the system for many
end-users. Output is the main reason for developing the system and the basis on which
they evaluate the usefulness of the application.

The output is designed in such a way that it is attractive, convenient and informative.
Pages are designed with various features, which make the console output more pleasing.
As the outputs are the most important sources of information to the users, better design
should improve the system’s relationships with us and also will help in decision
making. Page design elaborates the way output is presented and the layout available for
capturing information. One of the most important factors of the system is the output it
produces. This system refers to the results and information generated. Basically, the
output from a computer system is used to communicate the result of processing to the
user.

5
POLICE TRANSFER AND PROMOTION MANAGEMENT

Login

Admin
user

Positio FAQ
n
State Abou Conta
Station
s t Us ct Us

Promotio Promotio
n n Details FAQ Transfe
r
Transfe
Tran
r
sfer

Abou Citie
t Us s

Fig no: 3.2.1

6
POLICE TRANSFER AND PROMOTION MANAGEMENT

3.3 Admin Promotion Table

3.3.1 Admin Transfer table

3.3.2 City List Table

7
POLICE TRANSFER AND PROMOTION MANAGEMENT

3.3.3 Login Table

3.3.4 Registration Details

8
POLICE TRANSFER AND PROMOTION MANAGEMENT

3.3.5 Position List Table

3.3.6 State List Table

3.3.7 Station List table

3.3.8 User Transfer Request Table

9
POLICE TRANSFER AND PROMOTION MANAGEMENT

CHAPTER 4

DATABASE DESGN

4.1 PACKAGE - VISUAL STUDIO 2008

Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft.


It is used to develop console and graphical user Interface applications along with
Windows Pages or WPF applications, web sites, web applications, and web services in
both native codes together with managed code for all platforms supported by Microsoft
Windows, Windows Mobile, Windows CE, VB.NET Framework, VB.NET Compact
Framework and Microsoft Silver light. Visual Studio supports different programming
languages by means of language services, which allow the code editor and debugger to
support (to varying degrees) nearly any programming language, provided a language-
specific service exists. Visual Studio also includes a web-site editor and designer that
allow web pages to be authored by dragging and dropping widgets. It is used for
developing VB.NET application efficiently to get input and output design easiest one. It
will be run at windows application-based services provide the use. Visual Studio 2008,
and Visual Studio Team System 2008 codenamed Orcas (a reference to Orcas Island,
also an island in Puget Sound, like Whidbey for the previous 2005 release), were released
to MSDN subscribers on 19 November 2007 alongside .NET Framework 3.5. The source
code for the Visual Studio 2008 IDE is available under a shared source license to some
of Microsoft's partners and ISVs. Microsoft released Service Pack 1 for Visual Studio
2008 on 11 August 2008. The internal version number of Visual Studio 2008 is version
9.0 while the file format version is 10.0. Visual Studio 2008 is the last version to support
targeting Windows 2000 for C++ applications. Visual Studio 2008 is focused on
development of Windows Vista,

2007 Office system, and Web applications. For visual design, a new Windows
Presentation Foundation visual designer and a new Windows Presentation Foundation
visual designer and a new HTML/CSS editor influenced by Microsoft Expression Web
are included. J# is not included. Visual Studio 2008 requires .NET 3.5 Framework and
by default configure compiled assemblies to run on .NET Framework 3.5, but it also
supports multi-targeting which lets the developers choose which version of the .NET

10
POLICE TRANSFER AND PROMOTION MANAGEMENT

Framework (out of 2.0, 3.0, 3.5, Silverlight CoreCLR or .NET Compact Framework) the
assembly runs on. Visual Studio 2008 also includes new code analysis tools, including
the new Code Metrics tool (only in Team Edition and Team Suite Edition). For Visual
C++, Visual Studio adds a new version of Microsoft Foundation Classes (MFC 9.0) that
adds support for the visual styles and UI controls introduced with Windows Vista. [ For
native and managed code interoperability, Visual C++ introduces the STL/CLR, which is
a port of the C++ Standard Template Library (STL) containers and algorithms to managed
code. STL/CLR defines STL-like containers, iterators and algorithms that work on
C++/CLI managed objects. Visual Studio 2008 features include an XAML-based
designer (codenamed Cider), workflow designer, LINQ to SQL designer (for defining
the type mappings and object encapsulation for SQL Server data), XSLT debugger,
JavaScript Intelligence support, JavaScript Debugging support, support for UAC
manifests, a concurrent build system, among others. It ships with an enhanced set of UI
widgets, both for Windows Pages and WPF. It also includes a multithreaded build engine
(MS Build) to compile multiple source files (and build the executable file) in a project
across multiple threads simultaneously. It also includes support for compiling icon
resources in PNG format, introduced in Windows Vista. An updated XML Schema
designer was released separately sometime after the release of Visual Studio 2008. Visual
Studio Debugger includes features targeting easier debugging of multi-threaded
applications. In debugging mode, in the Threads window, which lists all the threads,
hovering over a thread displays the stack trace of that thread in tooltips. The threads can
directly be named and flagged for easier identification from that window itself. In
addition, in the code window, along with indicating the location of the currently
executing instruction in the current thread, the currently executing instructions in other
threads are also pointed out. The Visual Studio debugger supports integrated debugging
of the .NET 3.5 Framework Base Class Library (BCL) which can dynamically download
the BCL source code and debug symbols and allow stepping into the BCL source during
debugging. As of 2010 a limited subset of the BCL source is available, with more library
support planned for later.

4.1.1 Development Tools and Technologies

11
POLICE TRANSFER AND PROMOTION MANAGEMENT

My goal in this article is to provide you with an introductory, yet intensive, look at
Visual

Basic .NET and the new Microsoft®.NET platform. In order to learn what Visual Basic
.NET

is all about, you must first understand a few core aspects of the .NET platform. This
article will build your knowledge of Visual Basic .NET from the ground up, so I'll begin
by discussing the new programming model and the high-level architecture of the
platform's execution engine called the common language runtime (CLR).

While explaining what the CLR is and how it works, I'll show a few using Visual Basic
.NET. As you'll see, Visual Basic® has undergone a significant overhaul to
accommodate the CLR and its associated programming model. Consequently, Visual
Basic .NET has many new object-oriented design features and much higher levels of
type safety than previous versions of Visual Basic. Either language can be used to write
software that takes full advantage of the CLR NET Framework. Now, let me get started
by introducing the core concepts of the .NET platform Flagged.

12
POLICE TRANSFER AND PROMOTION MANAGEMENT

CHAPTER 5

SQL Server Compact Edition

5.1 Introduction

A new generation of applications is on the horizon for businesses and consumers. This
is driven by market changes such as a growing mobile workforce and its need for
productivity even when not “connected” and an explosive growth of new devices such
as personal digital assistants (PDAs), portable music players, and gaming consoles,
creating exciting possibilities for new applications. These new applications place new
demands on the data platform on which they are developed. To meet the needs of this
changing application landscape, Microsoft introduces its newest edition of the SQL
Server database product line, SQL Server 2005 Compact Edition—a maintenance-free,
compact embedded database for single-user client applications for all Windows
Platforms, including Tablet PCs, Pocket PCs, Smart Phones and Desktops. Compact
Edition is available to deploy and redistribute free of charge. This white paper outlines
the current business and consumer environment and the key factors that influence the
need for this new generation of applications. It describes how SQL Server Compact.
Edition can be used to satisfy the data platform demands of these applications.

5.2 Business Environment and Customer Challenges

Evolving business and consumer needs are placing new demands on the next generation
of applications. In the business sphere, more And more employees or information workers
are mobile and are Seeing the need to run their traditional desktop applications on mobile
devices like PDAs and Tablet PCs. For example, sales personnel require Customer
Relationship Management (CRM) applications on their mobile devices; field service
employees need to check product specifications and perform online ordering from mobile
devices, and so on. In addition, these mobile information workers cannot rely on being
connected to the corporate network at all times, but need to have the same rich and
complete application experience in the “disconnected” or “occasionally connected” state,
as they would have in the “connected” state. A classic example of this is the offline e-
mail experience presented by Microsoft Office Outlook, where users can work on their

13
POLICE TRANSFER AND PROMOTION MANAGEMENT

locally stored e-mails in a disconnected state and synchronize with the server when
connectivity is available.

Information workers also expect a seamless integrated experience between multiple


devices. For example, one may start entering data into an expense reporting application
on a PDA and continue working on the same application from a desktop at a later point,
starting from where he or she left off on the PDA.

Another growing trend in businesses today is to gain competitive advantage by gaining


insights from a plethora of data that is collected every day. This data is being gathered at
the “edges” of the enterprise – for example: inventory information gathered through
scanning radio frequency identification (RFID) tags at a warehouse – and needs to be
aggregated with data from other edge locations at a central site for analysis. Similarly, the
mobile workforce that works at the edges of the enterprise needs relevant and current
business information from the central data repository.
Meanwhile, information technology (IT) departments that develop and deploy these
line-of-business (LOB) applications in them businesses continue to grapple with the
challenge of providing robust IT services that are secure and reliable in spite of
constantly falling budgets.

IT departments continue to look for ways to develop new applications rapidly by


leveraging existing skills and tools and to find to easily deploy and manage end-user
applications, which helps to keep costs down.

services through the Internet. For example, a vendor that sells a tax application can offer
services to consumers to securely store their year-end data online for any future need.
Similarly, vendors can offer enhanced end-user experiences with their client applications
using this service model. For example, an online streaming audio/video service that
automatically downloads images of the album or video cover can enhance the end-user
experience. Staying in touch with the customer through an Internet service can also help
vendors track user preferences and better target their software offerings.
Rich consumer applications also continue to grow rapidly in mobile phones and in the
convergent devices arena. Applications such as calendaring that were in the business
realm are now also increasingly being required in personal devices.

14
POLICE TRANSFER AND PROMOTION MANAGEMENT

As application paradigms change, application developers have new requirements for the
database platform on which these applications are built. In particular, there is a growing
need for local-store databases that are

 Embeddable to provide better application security, performance, and ease of


distribution and deployment.

 Lightweight and compact to preserve system resources, especially in devices


where processor and memory is premium.

 Componential to allow application vendors to choose essential functionality


only, this keeps application size to a minimum.

 Supported on multiple devices so the same application code can be used to build
applications on multiple devices and platforms.

 Capable of providing automatic synchronization to allow end-users to work


with most recent data in an offline application experience and to push updates to
a central location.

 Built with advanced security to protect against threats such as stolen mobile
devices.

5.2.3 The Solution


In light of the changing needs of the new class of applications, Microsoft introduces its
newest edition of the SQL Server database product line, SQL Server 2005 Compact
Edition. It is an evolution of the SQL Server Mobile Edition technology. While the latter
was used exclusively for mobile devices, its capabilities are now being leveraged to create
maintenance-free, compact (less than 2 MB disk footprint) embedded databases for
single-user client applications for all Microsoft Windows platforms, including Tablet
PCs, Pocket PCs, smart phones, and desktops, to enable the scenarios discussed earlier in
the paper.
SQL Server Compact Edition also enables an application to scale up, either via a robust
synchronization with other SQL Server Editions, or by moving to a higher edition of SQL
Server.

15
POLICE TRANSFER AND PROMOTION MANAGEMENT

5.2.4 How SQL Server Compact Edition Can Help


SQL Server Compact Edition addresses the new application development challenges by
providing for faster results and increased productivity, better decision-making support
and a trusted platform.

5.2.5 Faster Results and Increased Productivity

Developers and administrators can achieve faster results with SQL Server Compact
Edition.

5.2.6 Developers

SQL Server Compact Edition is tightly integrated with Microsoft Visual Studio 2008 as
well as the .NET Framework. Developers can readily use their existing knowledge of
developing database applications with Visual Studio 2005 to build SQL Server Compact
Edition based applications, which enables them to be instantly productive. SQL Server
Compact Edition supports a familiar structured query language (SQL) syntax and
common programming model, such as ADO.NET. A significant productivity advantage
for developers are that they can use the same application code to build the application for
multiple devices and platforms. SQL Server Compact Edition applications can also be
seamlessly migrated from mobile and desktop scenarios to work with other editions of
SQL Server 2005 in multi-user or server scenarios.

5.2.7 Administrators

As the database is embedded in the application, little or no management is required.


SQL Server Compact Edition can be included in the application package and deployed
using the Click Once deployment feature of Visual Studio 2008. Alternatively, this
lightweight data store can be downloaded quickly. SQL Server Compact Edition can be
configured to keep up-to-date with the Microsoft Update services, so administrators will

16
POLICE TRANSFER AND PROMOTION MANAGEMENT

not need to bother with complicated maintenance plans. However, the user needs to
have administrative privileges to install SQL Server Compact Edition on a tablet PC or
desktop. An administrator can use SQL Server Management Studio (including Express
Edition) to administer the database.

5.2.8 Better Decisions


With SQL Server Compact Edition, together with SQL Server 2005 business
intelligence capabilities, you can extend your business insights further across the
organization to data sources in distributed and mobile applications. By enabling
synchronization to a central database, data in such applications can be captured,
analysed by SQL Server Analysis Services, and reported by SQL Server Reporting
Services. The Report Viewer Controls available in Visual Studio 2008 can be used in
applications to provide rich reports based on data from SQL Server Compact Edition.
With SQL Server Compact Edition, you can deliver the right data, at the right place and
time, in the right form factor.

5.2.9 Trusted Platform


As a leading database platform, SQL Server 2005 provides an unsurpassed level of
trust. The SQL Server product line has been inexistence for more than 10 years and has
millions of customers.

5.2.10 Reliability

Being a member of the SQL Server 2005 family, SQL Server Compact Edition takes
advantage of proven technologies. Originally built on SQL Server Mobile technology,
SQL Server Compact Edition has additional capabilities to ensure that applications
perform well and are secure. SQL Server Compact Edition includes “self-healing” and
management technologies that are designed to handle “instant off” and dead battery
scenarios in mobile devices. SQL Server Compact Edition supports two synchronization

17
POLICE TRANSFER AND PROMOTION MANAGEMENT

technologies to ensure that data is reliably delivered, supporting updates on both the
server and client end. Remote Data Access
(RDA) is a synchronization technology that can be used when a lightweight
synchronization solution is adequate (e.g. no conflict resolution). SQL Server Compact
Edition also supports merge replication, which is ideal when a more sophisticated solution
is required. Security was a critical part of the design of SQL Server Compact Edition.
Because it was designed into the product, organizations can trust the high security level
for data protection in these ways:

 Synchronization uses 128-bit SSL for secure and reliable functionality, even
though firewalls.

 SQL Server Compact Edition uses 128-bit RSA file-based encryption on devices
for database file security.

 SQL Server Compact Edition provides an encrypted data format with password
protection.
SQL Server Compact Edition uses a single file format, enabling document-safe format.

5.2.11 Better over Time

SQL Server scales up from a device to the data center, so as business requirements grow,
SQL Server Compact Edition can easily scale up to other editions of SQL Server.
Applications of all sizes are supported on the trusted SQL Server platform, including:
ISV applications that run on mobile devices or a local desktop.

 Occasionally connected applications that need automatic synchronization.

 Small company, departmental, and workgroup scenarios. Web-based applications.


Large enterprise applications, including MRP, financial, and ERP scenarios.

18
POLICE TRANSFER AND PROMOTION MANAGEMENT

5.2.12 Conclusion

SQL Server 2005 Compact Edition rises to the challenge of enabling application
vendors and IT organizations to create the next wave of applications. Whether it is
providing a rich and complete desktop-like application experience to the mobile
information workers who are occasionally connected or consumers who are demanding
more from their desktop and device applications, SQL Server Compact Edition has a
host of features and capabilities that enable it to effectively serve as a local data store
for these new applications. Such features include high security, high performance,
simple development and deployment, and automatic synchronization.

5.3 Features of VB.NET

 IO management
 Windows and Web Controls
 Database access
 Multithreading
 Remoting
 Reflections

19
POLICE TRANSFER AND PROMOTION MANAGEMENT

CHAPTER 6

SYSTEM IMPLEMENTATION

6.1 Purpose

System implementation is the important stage of project when the theoretical


design is tuned into practical system. The main stages in the implementation are as
follows:

1. Planning

2. Training

3. System testing and

4. Changeover Planning

Planning is the first task in the system implementation. At the time of implementation of
any system people from different departments and system analysis involve. They are
confirmed to practical problem of controlling various activities of people outside their
own data processing departments.

The line managers controlled through an implementation coordinating committee. The


committee considers ideas, problems and complaints of user department, it must also
consider:

1. The implication of system environment

2. Self-selection and allocation for implementation tasks

3. Consultation with unions and resources available

4. Standby facilities and channels of communication

6.2 System Maintenance

Software maintenance is far more than finding mistakes. Provision must be


made for environment changes, which may affect either the computer, or other parts of

20
POLICE TRANSFER AND PROMOTION MANAGEMENT

the computer-based systems. Such activity is normally called maintenance. It includes


both the improvement of the system functions and the corrections of faults, which arise
during the operation of a new system.

It may involve the continuing involvement of a large proportion of computer department


recourses. The main task may be to adapt existing systems in a changing environment.

Back up for the entire database files are taken and stored in storage devices like flash
drives, pen drives and disks so that it is possible to restore the system at the earliest. If
there is a breakdown or collapse, then the system gives provision to restore database files.
Storing data in a separate secondary device leads to an effective and efficient maintains
of the system. The nominated person has sufficient knowledge of the organization’s
computer passed based system to be able to judge the relevance of each proposed change.

21
POLICE TRANSFER AND PROMOTION MANAGEMENT

CHAPTER 7

Hardware Requirements (Minimum Requirement)

 Minimum RAM: - 4GB


 Hard Disk: - 500 GB
 Processor: - Intel Core(1.70GHz)

Software Requirements (minimum Requirement)

 Operating system: - Windows 7 (64bit)


 Front-End Design: - asp.Net
 Front-End Language: - Visual basic 2008
 Back-End: - My SQL Server 2005

7.1 Problem Definition

This system developed will reduce the manual work and avoid redundant data. By
maintaining the Police transfer and promotion management details manually, then
efficient reports cannot be generated. The system can generate efficient report yearly
consolidate report based on the Transfer and Promotion. As the Transfer and Promotion
details are maintained in registers it has been a tough task for admin to maintain for
long time. Instead the software can keep long and retrieve the information when needed.

22
POLICE TRANSFER AND PROMOTION MANAGEMENT

23
POLICE TRANSFER AND PROMOTION MANAGEMENT

CHAPTER 8

CODING

8.1 Admin login

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

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


{
SqlConnection Conn = new SqlConnection ("Data Source=.\\SQLEXPRESS;
AttachDbFilename=|DataDirectory|\\PoliceDatabase.mdf;Integrated Security=True;User
Instance=True");

string a, b;
protected void Page_Load(object sender, EventArgs e)
{
//string a1 = "raj" + Environment.NewLine;
//a1 = a1 + "ravi";
//TextBox3.Text = a1;
}
protected void Button1_Click(object sender, EventArgs e)

24
POLICE TRANSFER AND PROMOTION MANAGEMENT

{
//MessageBox.Show("Ente");

8.2 Admin EmpList

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class AdminEmpList : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
8.3 Admin Emp

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

25
POLICE TRANSFER AND PROMOTION MANAGEMENT

using System.Data.SqlClient;
using System.Windows.Forms;

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


{
SqlConnection Conn = new SqlConnection("Data
Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\PoliceDatabase.mdf;Inte
grated Security=True;User Instance=True");
string SqlStr;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
TextBox1.Text = TextBox1.Text.ToUpper();

if (TextBox1.Text == "")
{
MessageBox.Show("Please enter the emp code");
return;
}
Conn.Open();
SqlCommand cmd = new SqlCommand();
SqlDataReader dr;
cmd.Connection = Conn;
cmd.CommandText = "select * from EmpTab where empcode='" + TextBox1.Text
+ "'";
dr = cmd.ExecuteReader();

if (dr.Read())
{
MessageBox.Show("This record is all ready present");

26
POLICE TRANSFER AND PROMOTION MANAGEMENT

return;
}
Conn.Close();
Conn.Open();
SqlStr = "insert into empTab values(";
SqlStr = SqlStr + "'" + TextBox1.Text + "',";
SqlStr = SqlStr + "'abcd',";
SqlStr = SqlStr + "'" + TextBox2.Text + "',";
SqlStr = SqlStr + "'" + TextBox3.Text + "',";
SqlStr = SqlStr + "'" + DropDownList2.Text + "',";
SqlStr = SqlStr + "'" + TextBox4.Text + "',";
SqlStr = SqlStr + "'" + TextBox5.Text + "',";
SqlStr = SqlStr + "'" + DropDownList1.Text + "',";
SqlStr = SqlStr + "'" + DropDownList3.Text + "')";
SqlCommand cmd2 = new SqlCommand(SqlStr, Conn);
cmd2.ExecuteNonQuery();
Conn.Close();
MessageBox.Show("Record created successfully");
TextBox1.Text = "";
TextBox2.Text = "";
}
}

8.4 Admin D List

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

27
POLICE TRANSFER AND PROMOTION MANAGEMENT

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


{
protected void Page_Load(object sender, EventArgs e)
{

}
}

8.5 Admin Case Type List

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

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


{
protected void Page_Load(object sender, EventArgs e)
{

}
}
8.6 Admin Case Type

using System.Collections;
using System.Web;

28
POLICE TRANSFER AND PROMOTION MANAGEMENT

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

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


{
SqlConnection Conn = new SqlConnection("Data
Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\PoliceDatabase.mdf;Inte
grated Security=True;User Instance=True");
string SqlStr;
protected void Page_Load(object sender, EventArgs e)
{
}

protected void Button1_Click(object sender, EventArgs e)


{

TextBox1.Text = TextBox1.Text.ToUpper();

if (TextBox1.Text == "")
{
MessageBox.Show("Please enter the case type");
return;
}

Conn.Open();
SqlCommand cmd = new SqlCommand();

29
POLICE TRANSFER AND PROMOTION MANAGEMENT

SqlDataReader dr;
cmd.Connection = Conn;
cmd.CommandText = "select * from CaseTypeTab where CaseTypeName='" +
TextBox1.Text + "'";
dr = cmd.ExecuteReader();

if (dr.Read())
{
MessageBox.Show("This record is all ready present");
return;
}
Conn.Close();
Conn.Open();
SqlStr = "insert into CaseTypeTab values(";
SqlStr = SqlStr + "'" + TextBox1.Text + "',";
SqlStr = SqlStr + "'" + TextBox2.Text + "')";
SqlCommand cmd2 = new SqlCommand(SqlStr, Conn);
cmd2.ExecuteNonQuery();
Conn.Close();
MessageBox.Show("Record created successfully");
TextBox1.Text = "";
TextBox2.Text = "";
}
}

8.7 Admin Area List

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;

30
POLICE TRANSFER AND PROMOTION MANAGEMENT

using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

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


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

8.8 Admin Area

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

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


{

31
POLICE TRANSFER AND PROMOTION MANAGEMENT

SqlConnection Conn = new SqlConnection("Data


Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\PoliceDatabase.mdf;Inte
grated Security=True;User Instance=True");
string SqlStr;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
TextBox1.Text = TextBox1.Text.ToUpper();

if (TextBox1.Text == "")
{
MessageBox.Show("Please enter the Area Name");
return;
}
Conn.Open();
SqlCommand cmd = new SqlCommand();
SqlDataReader dr;
cmd.Connection = Conn;
cmd.CommandText = "select * from AreaTab where AreaName='" +
TextBox1.Text + "'";
dr = cmd.ExecuteReader();

if (dr.Read())
{
MessageBox.Show("This record is all ready present");
return;
}
Conn.Close();
Conn.Open();
SqlStr = "insert into AreaTab values(";

32
POLICE TRANSFER AND PROMOTION MANAGEMENT

SqlStr = SqlStr + "'" + TextBox1.Text + "',";


SqlStr = SqlStr + "'" + TextBox2.Text + "')";
SqlCommand cmd2 = new SqlCommand(SqlStr, Conn);
cmd2.ExecuteNonQuery();
Conn.Close();
MessageBox.Show("Record created successfully");
TextBox1.Text = "";
TextBox2.Text = "";
}
}

8.9 Admin Main Page

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

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


{
protected void Page_Load(object sender, EventArgs e)
{

}
}

33
POLICE TRANSFER AND PROMOTION MANAGEMENT

8.10 Admin Police Station Details

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

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


{
SqlConnection Conn = new SqlConnection("Data
Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\PoliceDatabase.mdf;Inte
grated Security=True;User Instance=True");
string SqlStr;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{

if (TextBox1.Text == "")
{
MessageBox.Show("Please enter the details");
return;
}

34
POLICE TRANSFER AND PROMOTION MANAGEMENT

Conn.Open();
SqlCommand cmd = new SqlCommand();
SqlDataReader dr;
cmd.Connection = Conn;
cmd.CommandText = "select * from StationTab where StationCode='" +
TextBox1.Text
+ "'";
dr = cmd.ExecuteReader();
dr.Read();
if (dr.HasRows)
{
MessageBox.Show("This record is all ready present");
return;

}
Conn.Close();
Conn.Open();
SqlStr = "insert into StationTab values(";
SqlStr = SqlStr + "'" + TextBox1.Text + "',";
SqlStr = SqlStr + "'" + DropDownList1.Text + "',";
SqlStr = SqlStr + "'" + TextBox3.Text + "',";
SqlStr = SqlStr + "'" + TextBox4.Text + "')";
SqlCommand cmd2 = new SqlCommand(SqlStr, Conn);
cmd2.ExecuteNonQuery();
Conn.Close();
MessageBox.Show("Record created successfully");
TextBox1.Text = "";
TextBox3.Text = "";
TextBox4.Text = "";
}

35
POLICE TRANSFER AND PROMOTION MANAGEMENT

8.11 Admin Promotion

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;
using System.Windows.Forms;
public partial class AdminPromotion : System.Web.UI.Page
{
SqlConnection Conn = new SqlConnection("Data
Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\PoliceDatabase.mdf;Inte
grated Security=True;User Instance=True");
string SqlStr;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Conn.Open();
SqlStr = "update EmpTab set Designation='" + DropDownList2.Text + "' where
empcode='" + Session["e1var"] + "'";
SqlCommand cmd2 = new SqlCommand(SqlStr, Conn);
cmd2.ExecuteNonQuery();
Conn.Close();

36
POLICE TRANSFER AND PROMOTION MANAGEMENT

int n1Var = 0;
Conn.Open();
SqlCommand cmd = new SqlCommand("select Max(ProNo)+1 as NewNo from
PRomotionTab", Conn);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
if (dr.IsDBNull(0)) n1Var = 1001;
else
n1Var = int.Parse(dr.GetValue(0).ToString());
}
Conn.Close();
string s1var = DetailsView1.Rows[5].Cells[1].Text;
Conn.Open();
SqlStr = "Insert into PromotionTab values(" + n1Var + ",'" +
string.Format("{0:dd/MMM/yyyy}", DateTime.Today) + "','" + Session["e1var"] + "','"
+ s1var + "','" + DropDownList2.Text + "','" + TextBox1.Text + "','" + TextBox2.Text +
"')";
SqlCommand cmd2a = new SqlCommand(SqlStr, Conn);
cmd2a.ExecuteNonQuery();
Conn.Close();
MessageBox.Show("Record created successfully");
TextBox1.Text = "";
TextBox2.Text = "";

}
protected void Button2_Click(object sender, EventArgs e)
{
Session["e1var"] = DropDownList1.Text;
Response.Redirect("AdminPromotion.aspx");
}

37
POLICE TRANSFER AND PROMOTION MANAGEMENT

8.12 Admin Promotion List

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

8.13 Admin Qualification Page

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;
using System.Windows.Forms;
public partial class AdminQPage : System.Web.UI.Page
{

38
POLICE TRANSFER AND PROMOTION MANAGEMENT

SqlConnection Conn = new SqlConnection("Data


Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\PoliceDatabase.mdf;Inte
grated Security=True;User Instance=True");
string SqlStr;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
TextBox1.Text = TextBox1.Text.ToUpper();

if (TextBox1.Text == "")
{
MessageBox.Show("Please enter the case type");
return;
}
Conn.Open();
SqlCommand cmd = new SqlCommand();
SqlDataReader dr;
cmd.Connection = Conn;
cmd.CommandText = "select * from QualificationTab where qName='" +
TextBox1.Text + "'";
dr = cmd.ExecuteReader();

if (dr.Read())
{
MessageBox.Show("This record is all ready present");
return;

}
Conn.Close();
Conn.Open();

39
POLICE TRANSFER AND PROMOTION MANAGEMENT

SqlStr = "insert into QualificationTab values(";


SqlStr = SqlStr + "'" + TextBox1.Text + "',";
SqlStr = SqlStr + "'" + TextBox2.Text + "')";
SqlCommand cmd2 = new SqlCommand(SqlStr, Conn);
cmd2.ExecuteNonQuery();
Conn.Close();
MessageBox.Show("Record created successfully");
TextBox1.Text = "";
TextBox2.Text = "";
}
}

8.14 Admin Qualification List

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

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


{
protected void Page_Load(object sender, EventArgs e)
{

}
}

8.15 Admin Station List

using System;

40
POLICE TRANSFER AND PROMOTION MANAGEMENT

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

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


{
protected void Page_Load(object sender, EventArgs e)
{

}
}

8.16 Admin Transfer

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;
using System.Windows.Forms;
public partial class AdminTransfer : System.Web.UI.Page
{

41
POLICE TRANSFER AND PROMOTION MANAGEMENT

SqlConnection Conn = new SqlConnection("Data


Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\PoliceDatabase.mdf;Inte
grated Security=True;User Instance=True");
string SqlStr;
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{
Conn.Open();
SqlStr = "update EmpTab set stationcode='" + DropDownList2.Text + "' where
empcode='" + Session["e1var"] +"'";
SqlCommand cmd2 = new SqlCommand(SqlStr, Conn);
cmd2.ExecuteNonQuery();
Conn.Close();

int n1Var = 0;
Conn.Open();
SqlCommand cmd = new SqlCommand("select Max(TranNo)+1 as NewNo from
TransferTab", Conn);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
if (dr.IsDBNull(0)) n1Var = 1001;
else
n1Var = int.Parse(dr.GetValue(0).ToString());
}
Conn.Close();
string s1var = DetailsView1.Rows[6].Cells[1].Text;
Conn.Open();

42
POLICE TRANSFER AND PROMOTION MANAGEMENT

SqlStr = "Insert into TransferTab values(" + n1Var + ",'" +


string.Format("{0:dd/MMM/yyyy}", DateTime.Today) + "','" + Session["e1var"] + "','"
+ s1var + "','" + DropDownList2.Text + "','" + TextBox1.Text + "','" + TextBox2.Text +
"')";
SqlCommand cmd2a = new SqlCommand(SqlStr, Conn);
cmd2a.ExecuteNonQuery();
Conn.Close();
MessageBox.Show("Record created successfully");
TextBox1.Text = "";
TextBox2.Text = "";
}
protected void Button2_Click(object sender, EventArgs e)
{
Session["e1var"] = DropDownList1.Text;
Response.Redirect("AdminTransfer.aspx");

}
}

8.17 Admin Transfer List

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

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


{
protected void Page_Load(object sender, EventArgs e)
{

43
POLICE TRANSFER AND PROMOTION MANAGEMENT

}
}

8.18 Admin User List

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

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


{
protected void Page_Load(object sender, EventArgs e)
{

}
}

8.19 Station Login

using System;
using System.Data;

44
POLICE TRANSFER AND PROMOTION MANAGEMENT

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

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


{
SqlConnection Conn = new SqlConnection("Data
Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\PoliceDatabase.mdf;Inte
grated Security=True;User Instance=True");

string a, b;
protected void Page_Load(object sender, EventArgs e)
{
//string a1 = "raj" + Environment.NewLine;
//a1 = a1 + "ravi";
//TextBox3.Text = a1;
}
protected void Button1_Click(object sender, EventArgs e)
{
//MessageBox.Show("Ente");

//MessageBox.Show(Application["sID"].ToString());
Conn.Open();
SqlCommand cmd = new SqlCommand();
SqlDataReader dr;

45
POLICE TRANSFER AND PROMOTION MANAGEMENT

cmd.Connection = Conn;
cmd.CommandText = "select * from EmpTab where empcode='" + TextBox1.Text
+ "' and pWord='" + TextBox2.Text + "' and stationcode='" + DropDownList1.Text +
"'";
dr = cmd.ExecuteReader();
if(dr.Read())
{
Application["StaffVar"] = TextBox1.Text;
Session["StaffVar"] = TextBox1.Text;
Application["StationVar"] = DropDownList1.Text;
Session["StationVar"] = DropDownList1.Text;
Response.Redirect("StationMainPage.aspx");

}
else
{
MessageBox.Show("Entered UserName or Password is not correct");

}
}
}

8.20 Station Main Page

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;

46
POLICE TRANSFER AND PROMOTION MANAGEMENT

using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

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


{
protected void Page_Load(object sender, EventArgs e)
{

}
}

8.21 Station Promotion List

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

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


{
protected void Page_Load(object sender, EventArgs e)
{

}
}

8.22 Station Send Msg

using System;
using System.Data;

47
POLICE TRANSFER AND PROMOTION MANAGEMENT

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

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


{
SqlConnection Conn = new SqlConnection("Data
Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\PoliceDatabase.mdf;Inte
grated Security=True;User Instance=True");

string SqlStr;
string a, b;

protected void Page_Load(object sender, EventArgs e)


{

}
protected void Button1_Click(object sender, EventArgs e)
{
int n1Var = 0;
if (Conn.State == ConnectionState.Open) { Conn.Close(); Conn.Open(); } else {
Conn.Open(); }
SqlCommand cmd = new SqlCommand("select Max(MNo)+1 as NewNo from
MessageTab", Conn);
SqlDataReader dr = cmd.ExecuteReader();

48
POLICE TRANSFER AND PROMOTION MANAGEMENT

if (dr.Read())
{
if (dr.IsDBNull(0)) n1Var = 1001;
else
n1Var = int.Parse(dr.GetValue(0).ToString());
}
Conn.Close();

Conn.Open();
SqlStr = "insert into MessageTab values(";
SqlStr = SqlStr + "" + n1Var + ",'" + DateTime.Now + "','" +
Application["StationVar"] + "','" + TextBox1.Text + "','" + TextBox2.Text + "','" +
TextBox3.Text + "','')";
SqlCommand cmd2 = new SqlCommand(SqlStr, Conn);
cmd2.ExecuteNonQuery();
Conn.Close();

MessageBox.Show("Record saved successfully");


}
}

8.23 Station Staff List

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

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

49
POLICE TRANSFER AND PROMOTION MANAGEMENT

{
protected void Page_Load(object sender, EventArgs e)
{

}
}

8.24 Station Transfer List

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

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


{
protected void Page_Load(object sender, EventArgs e)
{

}
}

8.25 Station View Message

using System;
using System.Data;
using System.Configuration;

50
POLICE TRANSFER AND PROMOTION MANAGEMENT

using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

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


{
protected void Page_Load(object sender, EventArgs e)
{

}
}

8.26 Station Action Page

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.Windows.Forms;
public partial class StationActionPage : System.Web.UI.Page
{

51
POLICE TRANSFER AND PROMOTION MANAGEMENT

SqlConnection Conn = new SqlConnection("Data


Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\PoliceDatabase.mdf;Inte
grated Security=True;User Instance=True");
string SqlStr;
protected void Page_Load(object sender, EventArgs e)
{

protected void Button1_Click(object sender, EventArgs e)


{
int a1 = 1000;
Conn.Open();
SqlCommand cmd = new SqlCommand();
SqlDataReader dr;
cmd.Connection = Conn;
cmd.CommandText = "select (max(aNo) + 1 ) as mNo from ActionTab";
dr = cmd.ExecuteReader();
if (dr.Read())
{
if (dr.IsDBNull(0)) { a1 = 1001; }
}
else
{
a1 = int.Parse(dr.GetValue(0).ToString());
}
Conn.Close();

string u1Var = "";


Conn.Open();

52
POLICE TRANSFER AND PROMOTION MANAGEMENT

SqlCommand cmd2a = new SqlCommand("select usercode from caseTab where


caseNo=" + int.Parse(DropDownList1.Text) + "", Conn);
SqlDataReader dr2a = cmd2a.ExecuteReader();
if (dr2a.Read())
{
u1Var = dr2a.GetValue(0).ToString();
}
Conn.Close();

Conn.Open();
SqlStr = "insert into ActionTab values(";
SqlStr = SqlStr + "" + a1 + ",";
SqlStr = SqlStr + "'" + string.Format("{0:dd/MMM/yyyy}", DateTime.Today) +
"',";
SqlStr = SqlStr + "'" + u1Var + "',";
SqlStr = SqlStr + "'" + DropDownList1.Text + "',";
SqlStr = SqlStr + "'" + TextBox2.Text + "')";
SqlCommand cmd2 = new SqlCommand(SqlStr, Conn);
cmd2.ExecuteNonQuery();
Conn.Close();

MessageBox.Show("Record created successfully ");


TextBox2.Text = "";

}
}
8.27 Station Case List

using System;

53
POLICE TRANSFER AND PROMOTION MANAGEMENT

using System. Data;


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

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


{
protected void Page Load(object sender, EventArgs e)
{

}
}
8.28 Station Criminal Entry

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.Windows.Forms;
public partial class StationCriminalEntry : System.Web.UI.Page

54
POLICE TRANSFER AND PROMOTION MANAGEMENT

{
SqlConnection Conn = new SqlConnection("Data
Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\PoliceDatabase.mdf;Inte
grated Security=True;User Instance=True");
string SqlStr;
protected void Page_Load(object sender, EventArgs e)
{

protected void Button1_Click(object sender, EventArgs e)


{

int n1Var = 0;
if (Conn.State == ConnectionState.Open) { Conn.Close(); Conn.Open(); } else {
Conn.Open(); }
SqlCommand cmd = new SqlCommand ("select Max(cNo)+1 as NewNo from
Criminal Tab", Conn);
SqlDataReader dr = cmd. Execute Reader ();
if (dr. Read ())
{
if (dr. IsDBNull (0)) n1Var = 1001;
else
n1Var = int. Parse (dr. Get Value (0). To String ());
}
Conn.Close();

Conn.Open();
SqlStr = "insert into Criminal Tab values (";
SqlStr = SqlStr + "" + n1Var + ",";
SqlStr = SqlStr + "'" + DateTime.Now + "',";

55
POLICE TRANSFER AND PROMOTION MANAGEMENT

SqlStr = SqlStr + "'" + Application["StationVar"] + "',";


SqlStr = SqlStr + "'" + TextBox1.Text + "',";
SqlStr = SqlStr + "'" + TextBox2.Text + "',";
SqlStr = SqlStr + "'" + TextBox3.Text + "',";
SqlStr = SqlStr + "'" + TextBox4.Text + "',";
SqlStr = SqlStr + "'" + TextBox5.Text + "')";

SqlCommand cmd2 = new SqlCommand (SqlStr, Conn);


cmd2.ExecuteNonQuery();
Conn.Close();

MessageBox.Show("Record saved successfully");

TextBox1.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
TextBox4.Text = "";
TextBox5.Text = "";

8.29 Station Criminal List

using System;
using System. Data;
using System. Configuration;
using System. Collections;
using System. Web;
using System. Web. Security;
using System.Web.UI;

56
POLICE TRANSFER AND PROMOTION MANAGEMENT

using System.Web.UI. Web Controls;


using System.Web.UI. WebControls.WebParts;
using System.Web.UI. HtmlControls;

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


{
protected void Page Load (object sender, EventArgs e)
{

}
}

8.30 Admin Case Reply List

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

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


{
protected void Page Load (object sender, EventArgs e)
{

}
}

57
POLICE TRANSFER AND PROMOTION MANAGEMENT

58
POLICE TRANSFER AND PROMOTION MANAGEMENT

CHAPTER 9

RESULT

Fig no: 9.1

59
POLICE TRANSFER AND PROMOTION MANAGEMENT

Fig no: 9.2

Fig no: 9.3

60
POLICE TRANSFER AND PROMOTION MANAGEMENT

Fig no: 9.4

Fig no: 9.5

61
POLICE TRANSFER AND PROMOTION MANAGEMENT

Fig no: 9.6

62
POLICE TRANSFER AND PROMOTION MANAGEMENT

Fig no: 9.7

Fig no: 9.8

63
POLICE TRANSFER AND PROMOTION MANAGEMENT

Fig no: 9.9

Fig no: 9.10

64
POLICE TRANSFER AND PROMOTION MANAGEMENT

Fig no: 9.11

Fig no: 9.12

65
POLICE TRANSFER AND PROMOTION MANAGEMENT

Fig no: 9.13

Fig no: 9.14

66
POLICE TRANSFER AND PROMOTION MANAGEMENT

Fig no: 9.15

67
POLICE TRANSFER AND PROMOTION MANAGEMENT

CHAPTER 10

TESTING

10.1 Introduction

Once source code has been generated, software must be tested to uncover (and
correct) as many errors as possible before delivery to customer. Our goal is to design a
series of test cases that have a high likelihood of finding errors. To uncover the errors
software techniques are used. These techniques provide systematic guidance for
designing test that

(1) Exercise the internal logic of software components, and

(2) Exercise the input and output domains of the program to

uncover errors in program function, behaviour and performance.

10.2 Steps

Software is tested from two different perspectives:

(1) Internal program logic is exercised using ―White box‖ test case design Techniques.

(2) Software requirements are exercised using ―block box‖ test case

Design techniques. In both cases, the intent is to find the maximum

number of errors with the Minimum amount of effort and time.

10.3 Testing Methodologies:

A strategy for software testing must accommodate low-level tests that are
necessary to verify that a small source code segment has been correctly implemented as
well as high-level tests that validate major system functions against customer
requirements. A strategy must provide guidance for the practitioner and a set of

68
POLICE TRANSFER AND PROMOTION MANAGEMENT

milestones for the manager. Because the steps of the test strategy occur at a time when
deadline pressure begins to rise, progress must be measurable and problems must
surface as early as possible. Following testing techniques are well known and the same
strategy is adopted during this project testing.

10.4 Unit testing

Unit testing focuses verification effort on the smallest unit of software design- the
software component or module. The unit test is white-box oriented. The unit testing
implemented in every module of student attendance management System. By giving
correct manual input to the system, the data are stored in database and retrieved. If you
want required module to access input or gets the output from the End user. Any error
will accrue the time will provide handler to show what type of error will accrued.

10.5 System testing:

System testing is actually a series of different tests whose primary purpose is to


fully exercise the computer-based system. Below we have described the two types of
testing which have been taken for this project. It is to check all modules worked on
input basis. if you want change any values or inputs will change all information, so
specified input is must.

10.6 Performance Testing:

Performance testing is designed to test the run-time performance of software within


the context of an integrated system. Performance testing occurs throughout all steps in
the testing process. Even at the unit level, the performance of an individual module may
be assessed as white-box tests are conducted.

This project reduces attendance table, codes. It will generate report fast. No has extra
time or waiting of results. entered correct data will show result few milliseconds. Just

69
POLICE TRANSFER AND PROMOTION MANAGEMENT

used only low memory of us system. Automatically do not getting access at another
software. Get user permission and access to other applications.

10.7 Test cases:

Test case is an object for execution for other modules in the architecture does not
represent any interaction by itself. A test case is a set of sequential steps to execute a test
operating on a set of predefined inputs to produce certain expected outputs. There are two
types of test cases: -manual and automated. A manual test case is executed manually while
an automated test case is executed using automation.

In system testing, test data should cover the possible values of each parameter based on
the requirements. Since testing every value is impractical, a few values should be
chosen from each equivalence class. An equivalence class is a set of values that should
all be treated

the same.

Ideally, test cases that check error conditions are written separately from the functional
test cases and should have steps to verify the error messages and logs. Realistically, if
functional test cases are not yet written, it is ok for testers to check for error conditions
when performing normal functional test cases. It should be clear which test data, if any
is expected to trigger errors. This section deals with the details of the classes of tests
which must be conducted to validate the functions, performance, and the constraints.
This is achieved basically by the means of testing which plays a vital role in the
development of the software. The various low-level testing which can be grouped on a
broader sense are discussed as below:

 Integration Testing:

Integration testing is one in which the modules are combined with one another to
synchronize the outputs and co-ordinate the flow of control. Each module is coalesced

70
POLICE TRANSFER AND PROMOTION MANAGEMENT

with other module to establish proper connectivity between the two modules. All the
individual modules have been integrated and tested.

 Validation Testing:

Validation testing deals with testing that whether the validations are justified and all the
requirements are fulfilled logically as per the requirements as the validations are
designed according to the requirements of the application – an approach to the problem
in a

logical and relational manner. All the validation testing has been done (like only the
numbers should be accepted in the phone number, amount, bill no fields, quantity and
other related fields, similarly, for the text to accepted only in related fields like the
names and other related fields). The stock validation is the major validation that keeps
track of the products dealt and the reorder levels.

10.8 Data Validation

Data validation is a very important part in any application involving a database. We have
to be aware of the specifications of the database organization and also about the kind of
data that goes into the database. We have to provide for stringent error checking, in order
to discard invalid data and prevent it from getting it into the database.
Data validation can be done in two places. While creating the database schema, we can
specify certain integrity constraints that have to be maintained between various relations
in the schema. This ensures that no insertion, deletion and update anomalies creep in
during operation. Data validation can also be done at the interface itself, to provide
more robust level of data validation. For example, in the login page whose login Id has
been established by the administrator will be given login permission. This can be
trapped at the interface level itself. And in the page, to modify the user profile, the
administrator is allowed to modify only if that login Id has need permission.

71
POLICE TRANSFER AND PROMOTION MANAGEMENT

10.9 Some Examples of Data Validation done in this project are:

 Invalid login Id cannot be entered.


 Invalid Email Id, Phone no. cannot be entered.
 All the Mandatory fields should be filled.
 And various Front End and Back End Validations.

72
POLICE TRANSFER AND PROMOTION MANAGEMENT

CHAPTER 11

Conclusion
Police and community members know that their success in fighting crime and building
strong communities depends, in large part, on creating and maintaining a strong
relationship. Despite this knowledge, police and communities too often are not yet
working together in an ideal way. This handbook is intended to provide guidance based
on “lessons learned” for the police and community organizers to work more productively
together on issues of shared concern.

As described in this handbook, certain topics emerged consistently as police officials


and community leaders described their efforts to improve police-community
cooperation.

73
POLICE TRANSFER AND PROMOTION MANAGEMENT

CHAPTER 12

FUTURE ENHANCEMENT

 We can update this system as online application


 The main advantage of online application is that, a person can report the crime
anytime from anywhere
 Users can view the progress of their complaint online
 By the future technology user can view the case details and progress of the
complaints on their mobile phones
 Face recognition technology can apply. User or witness of the crime can give the
physical information of the thief.

74
POLICE TRANSFER AND PROMOTION MANAGEMENT

CHAPTER 13

BIBLOGRAPHY
The following books were referred during the analysis and execution phase of the project

SQL SERVER 2005 REFERENCE BOOK

By Microsoft corporation

SOFTWARE ENGINEERING

By Roger. S. Pressman

Professional ASP.NET

By Wrox

MSDN 2005

By Microsoft

75

You might also like