Professional Documents
Culture Documents
CERTIFICATE
ONLINE POLICE SERVICE
Project report submitted to the Karpagam Academy of Higher
Education in partial fulfilment of the requirements for the award
of the Degree of
Bachelor of Computer Application
Submitted by
M.Santhiya(15cau046)
Associate Professor
COIMBATORE-641 021
March-2018
KARPAGAM ACADEMY OF HIGHER EDUCATION
(Established Under Section 3 of UGC Act, 1956)
COIMBATORE-641 021
This is to certify that the project work entitled ONLINE POLICE SERVICE done
by M.Santhiya(15cau046) during the period Dec 2017-April 2018 in partial fulfilment of the
Bachelor of Computer Application is submitted for the viva voice held on 4th April.
Examiners:
1.
2.
Bachelor of Computer Application
CERTIFICATE
This is to certify that the project work entitled “ONLINE POLICE SERVICE” is the
the year 4th April 2018, in partial fulfillment of the requirements for the award of the Degree
of Bachelor of Computer Application, is the record of student’s own work carried out by
under my supervision.
Place :
Date:
DECLARATION
I hereby declare that the project entitled ONLINE POLICE SERVICE submitted to the
original work.
Place:
Date:
M.SANTHIYA
___________________________________________________________________________
ACKNOWLEDGMENT
ACKNOWLEDGEMENT
___________________________________________________________________________
CONTENTS
TABLE OF CONTENTS
INDEX
ABSTRACT
I. INTRODUCTION
1.1 OBJECTIVES
2.1EXISTING SYSTEM
2.2PROPOSED SYSTEM
III. SYSTEM
SPECIFICATION
3.1HARDWARE AND
SOFTWARE
REQUIREMENTS
3.2SYSTEM OVERVIEW
4.1INTRODUCTION
4.2DFD
4.3DFD-SYMBOLS
4.4E-R DIAGRAMS
V. SYSTEM TESTING
VI. CONCLUSION
VII FUTURE
ENHANCEMENT
VIII.
BIBLIOGRAPHY
IX.
SCREENSHOTS
TABLE STRUCTURE
SAMPLE CODING
ABSTRACT
ABSTRACT
Criminal investigation tracker with suspect prediction keeps track and maintains history
about each and every case in the database which ultimately avoids manual and paper
work.It is based on decentralized client-server architecture in order to facilitate
independent functioning of all units.Here information flows from lower units to higher
units and vice-versa. The project is built on multi tier architecture.It provides quick
access to data which is essential for effective prevention, control and detection of
crime.It also helps decision-making and decision support processes.Crime investigation
system is an intelligent decision support system that can assist human investigators by
automatically constructing plausible scenarios. Some of the benefits of crime
investigation system to existing system are quick retrieval of data, huge saving of time,
proper deployment & utilization of manpower, cost reduction leading to saving in
expenditure It enables the police service to supervise and administer any incident and
process related information by providing standardized processes and procedures to
monitor and improve performance.Using this application people can give their
complaint through online.To register any type of complaint they need to register his
personal details along with login details. Asp.net is used as the front-end tool and for
maintaining the database SQL SERVER is used as the Backend.
___________________________________________________________________________
INTRODUCTION
INTRODUCTION
1.1OBJECTIVE
Crime investigation system is an intelligent decision support system that can assist
human investigators by automatically constructing plausible scenarios.Some of the
benefits of crime investigation system to existing system are quick retrieval of data, huge
saving of time, proper deployment & utilization of manpower, cost reduction leading to
saving in expenditure It enables the police service to supervise and administer any
incident and process related information by providing standardized processes and
procedures to monitor and improve performance. Using this application people can give
their complaint through online. To register any type of complaint they need to register
his personal details along with login details. Asp.net is used as the front-end tool and for
maintaining the database SQL SERVER is used as the Backend.
The project aim is to implement the advertisement details using frontend ASP.Net and
the backend is SQL server.
MODULES DESCRIPTION:
This project contain the various modules such as FIR copy details, missing criminal details,
case handled officers details, case status details.Admin is overall controller of this system. Admin can
manage the all data entry, update and delete the details in the data base.
___________________________________________________________________________
SYSTEM ANALYSIS
CHAPTER 2
2.1 EXISTING SYSTEM
Manual processing of data is very tedious and time consuming and leads to erroneous
results, at times. In order to overcome these snags computers are being used extensively in
all fields thereby minimizing manual labor and errors to a great extent. Taking all the
advantages involved in computerizing, the proposed system “Online Crime Report”
integrates all the manual activities by linking them under a single head. This System
processes the day-to-day activities and generates tender reports that help the user to get a
good grasp of the situation(s) and take decisions quickly and in-time. In this type of the soft
program must to maintain all the crime investigation details and user will able to see their
detail through the online. Missing details are displayed on the separated link. All users are
allowed to view that details but not modify the details. . This soft program is for the crime
investigation is used to reduce the time of the Crime investigator.
DISADVANTAGES:
Lot of space is required to store all the details of the thieves and the complaints
Data is spread across a number of record books, which have to be manually integrated
to arrive at a solution.
The system is prone to human errors. Detection of errors is a difficult task since every
thing is done manually.
Tracking of errors to their origin is difficult
There is no security to data. anyone can view through the data concerning the
activities of the Consultancy
Any modification to the data requires searching through all the records and then
making the relevant changes.
The process is very time consuming.
ADVANTAGES:
The required information can be retrieved easily.
The details can be stored in the storage system permanently.
Corrections can be made easily.
High speed.
Reports can be generated.
Large volume of records to process.
___________________________________________________________________________
SYSTEM SPECIFICATION
CHAPTER 3
SYSTEM SPECIFICATION
SOFTWARE REQUIREMENTS:
ASP.NET
In addition to (or instead of) using <% %> code blocks to program dynamic
content, ASP.NET page developers can use ASP.NET server controls to
program Web pages. Server controls are declared within an .aspx file using
custom tags or intrinsic HTML tags that contain a runat="server" attributes
value. Intrinsic HTML tags are handled by one of the controls in the
System.Web.UI.HtmlControls namespace.
Any tag that doesn't explicitly map to one of the controls is assigned the type of
System.Web.UI.HtmlControls.HtmlGenericControl. Server controls
automatically maintain any client-entered values between round trips to the
server. This control state is not stored on the server (it is instead stored within an
<input type="hidden"> form field that is round-tripped between requests).
Note also that no client-side script is required.
In addition to supporting standard HTML input controls, ASP.NET enables
developers to utilize richer custom controls on their pages. For example, the
following sample demonstrates how the <asp:adrotator> control can be used to
dynamically display rotating ads on a page.
ASP.NET Web Forms provide an easy and powerful way to build dynamic Web
UI.
ASP.NET Web Forms pages can target any browser client (there are no script
library or cookie requirements).
ASP.NET Web Forms pages provide syntax compatibility with existing ASP
pages.
ASP.NET server controls provide an easy way to encapsulate common
functionality.
ASP.NET ships with 45 built-in server controls. Developers can also use
controls built by third parties.
ASP.NET server controls can automatically project both up level and down
level HTML.
ASP.NET templates provide an easy way to customize the look and feel of list
server controls.
ASP.NET validation controls provide an easy way to do declarative client or
server data validation.
SECURITY
MYSQL
Microsoft SQL Server is a Structured Query Language (SQL) based, client/server
relational database. Each of these terms describes a fundamental part of the
architecture of SQL server.
Database
A database is similar to a data file in that it is a storage place for data. Like a
data file, a database does not present information directly to a user; the user runs
an application that accesses data from the database and presents it to the user in
an understandable format.
A database typically has two components: the files holding the physical
database and the database management system (DBMS) software that
applications use to access data. The DBMS is responsible for enforcing the
database structure, including:
Maintaining the relationships between data in the database.
Ensuring that data is stored correctly and that the rules defining data
relationships are not violated.
Recovering all data to a point of known consistency in case of system failures.
Relational Database
There are different ways to organize data in a database but relational databases
are one of the most effective. Relational database systems are an application of
mathematical set theory to the problem of effectively organizing data. In a
relational database, data is collected into tables (called relations in relational
theory).
When organizing data into tables, you can usually find many different ways to
define tables. Relational database theory defines a process, normalization, which
ensures that the set of tables you define will organize your data effectively.
Client/Server:-
To work with data in a database, you must use a set of commands and statements
(language) defined by the DBMS software. There are several different languages
that can be used with relational databases; the most common is SQL. Both the
American National Standards Institute (ANSI) and the International Standards
Organization (ISO) have defined standards for SQL. Most modern DBMS
products support the Entry Level of SQL-92, the latest SQL standard (published
in 1992).
Microsoft SQL Server supports a set of features that result in the following benefits:
SQL Server includes a set of administrative and development tools that improve
your ability to install, deploy, manage, and use SQL Server across several sites.
Scalability
The same database engine can be used across platforms ranging from laptop
computers running Microsoft Windows® 95/98 to large, multiprocessor servers
running Microsoft Windows NT®, Enterprise Edition.
Datawarehousing
SQL Server includes tools for extracting and analyzing summary data for online
analytical processing (OLAP). SQL Server also includes tools for visually
designing databases and analyzing data using English-based questions.
Databases
High Availability
Ensuring high availability requires a certain amount of redundancy in the system. For
database systems, the redundancy traditionally takes the form of having a primary
server acting as a master, and using replication to keep secondaries available to take
over in case the primary fails. This means that the “server” that the application
connects to is in reality a collection of servers, not a single server. In a similar
manner, if the application is using a sharded database, it is in reality working with a
collection of servers, not a single server. In this case, a collection of servers is usually
referred to as a form.
One of the projects aiming to provide high availability for MYSQL is MYSQL
Fabric, an integrated system for managing a collection of MYSQL servers, and a
frame work on top of which high availability and database sharing is built. MYSQL
Fabric is open-source and is intended to be extensible , easy to use, and to support
procedure execution even in the presence of failure, providing an execution model
usually called resilient execution. MYSQL client libraries are extended so they are
hiding the complexities of handling failover in the event of a server failure, as well
as correctly dispatching transactions to the shards. As of September 2013, there is
correctly support for Fabric-aware versions of Connector/J, Connector/PHP,
Connector/Python, as well as some rudimentary support for Hibernate and Doctrine.
As of May 2014, MYSQL Fabric is in the general availability stage of development.
INPUT DESIGN
Input design is the process of connecting the user-originated inputs into a computer to used
formats. The goal of the input design is to make data entry Logical and free from errors.
Errors in the input database controlled by input design this application is being developed in a
user-friendly manner. The forms are being designed in such a way that during the processing
the cursor is placed in the position where the data must be entered. An option of selecting an
appropriate input from the values of validation is made for each of the data entered.
Concerning clients comfort the project is designed with perfect validation on each field and to
display error messages with appropriate suggestions. Help managers are also provided
whenever user entry to a new field he/she can understand what is to be entered. Whenever
user enter a error data error manager displayed user can move to next field only after entering
a correct data
OUTPUT DESIGN
Computer output is the most important and direct source of information to the user.
Efficient intelligible output design should improve the system's relationship with the user and
admin in decision-making. Output design generally refers to the results generated by the
system. For many end users on the basis of the output the evaluate the usefulness of the
application. Efficient software must be able to produce and efficient effective reports.
SYSTEM DESIGN
DATABASE DESIGN
The database design involves creation of tables that are represented in physical database as
stored files. They have their own existence. Each table constitute of rows and columns where
each row can be viewed as record that consists of related information and column can be
viewed as field of data of same type. The table is also designed with some position can have a
null value. The database design of project is designed in such a way values are kept without
redundancy and with normalized format. Refer the appendix for screen shots of Database
Design
Level-0 Crime
Intelligence
CRIME_DB
ADMIN
Password Provide Service
Level-1
Login
Admin
Username Wrong User Not
Authenticate
Password Password Password
Criminal Record
Success Login
CRIMINAL_TB
FIR Copy
Process FIR_TB
Crime Enquiry
Process ENQUIRY_TB
Missing Criminal
Process
MISSING_TB
Search Case
Inv
Process FIR_TB
Report
Fig 4.3 DFD for ONLINE POLICE SERVICE
NAME
User name Password Section
C_ID
Address
Maintain
Admin
Crime
IVT_ID
Status C_ID Address
Investigator Criminal
SYSTEM TESTING
TESTING AND METHODLOGIES
System testing is the state of implementation, which is aimed at ensuring that the system
works accurately and efficiently as expect before live operation, commences. It certifies that
the whole set of programs hang together System testing requires a test plan, that consists of
several key activities and steps for run program, string, system and user acceptance testing.
The implementation of newly design package is important in adopting a successful new
systemTesting is important stage in software development. System test is implementation
should be a confirmation that all is correct and an opportunity to show the users that the
system works as they expected It accounts the largest percentage of technical effort in
software development process.Testing phase is the development phase that validates the code
against the functional specifications. Testing is a vital to the achievement of the system goals.
The objective of testing is to discover errors. To fulfill this objective a series of test step such
as the unit test, integration test, validation and system test where planned and executed.
UNIT TESTING
Here each program is tested individually so any error apply unit is debugged. The sample
data are given for the unit testing. The unit test results are recorded for further references.
During unit testing the functions of the program unit validation and the limitations are
tested.Unit testing is testing changes made in a existing or new program this test is carried out
during the programming and each module is found to be working satisfactorily. For example
in the registration form after entering all the fields we click the submit button. When submit
button is clicked ,all the data in form are validated. Only after validation entries will be added
to the database.Unit testing comprises the set of tests performed by an individual prior to
integration of the unit into large system. The situation is illustrated in as follows
Coding-> Debugging ->Unit Testing -> Integration testing->Output Testing
The four categories of test that a programmer will typically perform on a program unit
Functional test
Performance test
Stress Test
Structure test
Functional test involve exercising the code with nominal input values for which the expected
results are known as well as boundary values and special values.Performance testing
determines the amount of execution time spent in various parts of unit program through put
and response time and device utilization by the program.A variation of stress testing called
sensitivity testing in same situations a very small range of data contained in a the bounds of
valid data may cause extreme and even erroneous processing or profound performance
degradation.Structured testing is concerned with a exercising the internal logic of a program
and traversing paths. Functional testing, stress testing performance testing are referred as
“black box” testing and structure testing is referred as “white box” testing
OUTPUT TESTING
Asking the user about the format required by them tests the output generated by the system
under consideration .It can be done in two ways, One on screen and other on printer format.
The output format on the screen is found to be correct as the format designed n system test.
SYSTEM TESTING
In the system testing the whole system is tested for interface between each
modulesand program units are tested and recorded. This testing is done with
sample data . The securities, communication between interfaces are tested System
testing is actually a series of different tests whose primary purpose is to fully
exercise the computer based system although each test has a different purpose
all work to verify that all system elements properly integrated and perform allocate
function.
It involves two kinds of activities namely
Integrated testing
Acceptance testing
INTEGRATED TESTING
Integrated testing is a systematic technique for constructing tests to uncover errors associated
with interface.
Objective is to take unit tested modules and build a program structure that has been dictated
by design
ACCEPTANCE TESTING
Acceptance testing involves planning an execution of a functional test, performance test and
stress test to verify that the implemented system satisfies the requirement.
The acceptance testing is the final stage of the user the various possibilities of the data are
entered and the results are tested.
VALIDATION TESTING
Software validation is achieved through a series of test that demonstrates the conformity and
requirements. Thus the proposed system under consideration has to be tested by validation
and found to be working satisfactorily. For example in customer enters phone number field
should contain number otherwise it produces an error message Similarly in all the forms the
fields are validated
SYSTEM IMPLEMENTATION
Implementation is the stage in the project where the theoretical design is turned into a
working system. The most crucial stage is achieving a successful new system and giving a
user confidence in that the new system will work efficiently and effectively in the
implementation stage. The stage consist of
IMPLEMENTATION PROCEDURES
The implementation phase is less creative than system design. A system design may be
dropped at any time prior to implementation, although it becomes more difficult when it goes
to the design phase. The final report of the implementation phase includes procedural
flowcharts, record layouts, and a workable plan for implementing the candidate system
design into a operational design.
USER TRAINING
It is designed to prepare the users for testing & converting the system. There is several ways
to trail the users they are:
User manual
Help screens
Training demonstrations.
User manual:
The summary of important functions about the system & software can be provided as a
document to the user. User training is designed to prepare the user for testing and convening
a system. They summary of important functions about the system and the software can be
provided as a document to the user
Open http page
Dot net is opened existing user the type the username and password
Click the submit button
Help Screens:
This features now available in every software package, especially when it is used with a
menu. The user selects the “Help” option from the menu. The System success the necessary
description or information for user reference.
TRAINING DEMONSTRATION:
Another user training element is a training demonstration. Live demonstration with personal
contact is extremely effective for training users.
OPERATIONAL DOCUMENTATION:
Documentation means of communication; it establishes the design and performance criteria
of the project. Documentation is descriptive information that portrays the use and /or
operation of the system. The user will have to enter the user name and password if is valid he
participate in auction. Otherwise if it is new user he needs to registerDocumentation means of
communication; it establishes design & performance criteria for phases of the project.
Documentation is descriptive information that portrays he use &/or operation of the system.
DOCUMENTATION TOOLS:
Document production & desktop publishing tool support nearly every aspect of software developers.
Most software development organizations spend a substantial amount of time developing
documents, and in many cases the documentation process itself is quite inefficient. It is not use
unusual for a software development effort on documentation. For this reason, Documentation tools
provide an important opportunity to improve productivity.
DOCUMENT RESTRUCTURING:
Creating document is far too time consuming. If the system works, we’ll live with what we
have. In some cases, this is the correct approach. It is not possible to recreate document for
hundreds of computer programs.Documentation must be updated, but we have limited
resources. It may not be necessary to fully re document an application. Rather, those portions
of the system that are currently undergoing change are fully documented.The system is
business critical and must be fully re documented. Even in this case, an intelligent approach
is to pare documentation to an essential minimum.
SYSTEM MAINTENANCE
PERFECTIVE MAINTENANCE:
Changes made to the system to add features or to improve the performance.In future any
more features can be added in “DOT NET Communication” and it can easily adopt the
changes.
PREVENTIVE MAINTENANCE:
Changes made to the system to avoid future problems. Any changes can be made in the future
and our project can adopt the changes.
CONCLUSION
The main objective of the project is to bring a full-fledged computerized organization, and to
enable the transaction details to maintain records, which makes of the employees
easier.Thus, the proposed system has been developed with good amount of flexibility
without compromising on the response time.Computerization of the entire system will
enhance more accuracy and reduces major part of clerical works. Fast, clear and legible
reports can be generated without any ambiguity. Integrated database design and ease of
maintenance is a major advantage of the system. User friendliness is a unique feather of the
system.Hence by developing a system that is user-friendly in nature, many users are able to
work on the system with little of computer knowledge and training.
FUTURE ENHANCEMENT
The project has been developed and the objectives are achieved successfully. The project has
been developed with front end as VB.Net and backend as SQL Server. The frontend can also
be changed. ASP.Net can replace the front-end tool such as HTML and CSS for more speed.
The system is currently developed and ready for implementation to include the system is
highly feasible and user friendly. To provide better facility regarding security, it uses security
provider software and we access any place and any where use that. It can have an
enhancement on proper in the future according to the user’s requirements.
BIBLIOGRAPHY
Elias Awath, “SYSTEM ANALYSIS AND DESIGN”,Tata Mc Graw Hill Publication, Sixth
Edition,2003
S.Ramachandran,”COMPUTER AIDED DESIGN”, Air Walk Publication, Third Edition,2003
.Richard Fairley,”SOFTWARE ENGINEERING CONCEPTS”,Tata Mc Graw Hill Publication,
Second Edition,1997
Visual Basic .NET How to Program (2nd Edition) by Harvey M. Deitel, Paul J.
Deitel, Tem R. Nieto
Login form
Criminal Details Form
Output design
TABLE DESIGN
Login Coding
Imports System.Data.SqlClient
Imports System.Data
PartialClass _Default
Inherits System.Web.UI.Page
Dim con AsNew SqlConnection("Data Source=DOTNET-PC\SQLEXPRESS;Initial
Catalog=crimes;Persist Security Info=True;User ID=sa;pwd=sql;")
Dim com AsNew SqlCommand
Dim adp AsNew SqlDataAdapter
Dim ds AsNew DataSet
Dim qry AsString
Dim i AsInteger
EndSub
EndIf
EndSub
Imports System.Data.SqlClient
Imports System.Data
Imports System.IO
PartialClass crimnal
Inherits System.Web.UI.Page
Dim con AsNew SqlConnection("Data Source=DOTNET-PC\SQLEXPRESS;Initial
Catalog=crimes;Persist Security Info=True;User ID=sa;pwd=sql;")
Dim com AsNew SqlCommand
Dim adp AsNew SqlDataAdapter
Dim ds AsNew DataSet
Dim qry AsString
Dim i AsInteger
ProtectedSub Page_Load(ByVal sender AsObject, ByVal e As System.EventArgs)
HandlesMe.Load
Dim p AsString
Try
qry = "select cid from criminal"
com = New SqlCommand(qry, con)
adp = New SqlDataAdapter(com)
ds = New DataSet
adp.Fill(ds, "criminal")
i = ds.Tables(0).Rows.Count
p = ds.Tables(0).Rows(i - 1)(0)
p = Mid(p, 1)
p = Val(p) + 1
TextBox1.Text = p
Catch ex As Exception
TextBox1.Text = "4045"
EndTry
TextBox2.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox3.Text = ""
EndSub
Dim p AsString
Try
qry = "select cid from criminal"
com = New SqlCommand(qry, con)
adp = New SqlDataAdapter(com)
ds = New DataSet
adp.Fill(ds, "criminal")
i = ds.Tables(0).Rows.Count
p = ds.Tables(0).Rows(i - 1)(0)
p = Mid(p, 1)
p = Val(p) + 1
TextBox1.Text = p
Catch ex As Exception
TextBox1.Text = "4045"
EndTry
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
EndSub
EndSub
Try
qry = "select cid from criminal"
com = New SqlCommand(qry, con)
adp = New SqlDataAdapter(com)
ds = New DataSet
adp.Fill(ds, "criminal")
i = ds.Tables(0).Rows.Count
p = ds.Tables(0).Rows(i - 1)(0)
p = Mid(p, 1)
p = Val(p) + 1
TextBox1.Text = p
Catch ex As Exception
TextBox1.Text = "4045"
EndTry
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
EndSub
MsgBox("Sucessfully Updated")
con.Close()
Dim p AsString
Try
qry = "select cid from criminal"
com = New SqlCommand(qry, con)
adp = New SqlDataAdapter(com)
ds = New DataSet
adp.Fill(ds, "criminal")
i = ds.Tables(0).Rows.Count
p = ds.Tables(0).Rows(i - 1)(0)
p = Mid(p, 1)
p = Val(p) + 1
TextBox1.Text = p
Catch ex As Exception
TextBox1.Text = "4045"
EndTry
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
EndSub
EndClass
FIR DETAILS CODING
Imports System.Data.SqlClient
Imports System.Data
PartialClass fir
Inherits System.Web.UI.Page
Dim con AsNew SqlConnection("Data Source=DOTNET-PC\SQLEXPRESS;Initial
Catalog=crimes;Persist Security Info=True;User ID=sa;pwd=sql;")
Dim com AsNew SqlCommand
Dim adp AsNew SqlDataAdapter
Dim ds AsNew DataSet
Dim qry AsString
Dim i AsInteger
ProtectedSub Button1_Click(ByVal sender AsObject, ByVal e As
System.EventArgs) Handles Button1.Click
If TextBox1.Text = ""Or TextBox2.Text = ""Or TextBox4.Text = ""Or
TextBox5.Text = ""Or TextBox6.Text = ""Then
MsgBox("enter all fields")
Else
qry = "insert into fir values('" + TextBox1.Text + "','" +
TextBox2.Text + "','" + DropDownList4.Text + "','" + TextBox4.Text + "','"
+ TextBox5.Text + "','" + DropDownList1.Text + "','" + DropDownList2.Text +
"','" + DropDownList3.Text + "','" + TextBox6.Text + "')"
com = New SqlCommand(qry, con)
con.Open()
com.ExecuteNonQuery()
MsgBox("Sucessfully saved")
con.Close()
EndIf
Dim p AsString
Try
qry = "select cid from fir"
com = New SqlCommand(qry, con)
adp = New SqlDataAdapter(com)
ds = New DataSet
adp.Fill(ds, "fir")
i = ds.Tables(0).Rows.Count
p = ds.Tables(0).Rows(i - 1)(0)
p = Mid(p, 4)
p = Val(p) + 1
TextBox1.Text = p
Catch ex As Exception
TextBox2.Text = "12067"
EndTry
TextBox1.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
DropDownList1.Text = "Select"
DropDownList2.Text = "Select"
DropDownList3.Text = "Select"
DropDownList4.Text = "select"
EndSub
Try
qry = "select cid from fir"
com = New SqlCommand(qry, con)
adp = New SqlDataAdapter(com)
ds = New DataSet
adp.Fill(ds, "fir")
i = ds.Tables(0).Rows.Count
p = ds.Tables(0).Rows(i - 1)(0)
p = Mid(p, 1)
p = Val(p) + 1
TextBox1.Text = p
Catch ex As Exception
TextBox2.Text = "1267"
EndTry
TextBox1.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
DropDownList1.Text = "Select"
DropDownList2.Text = "Select"
DropDownList3.Text = "Select"
DropDownList4.Text = "select"
EndSub
Try
qry = "select cid from fir"
com = New SqlCommand(qry, con)
adp = New SqlDataAdapter(com)
ds = New DataSet
adp.Fill(ds, "fir")
i = ds.Tables(0).Rows.Count
p = ds.Tables(0).Rows(i - 1)(0)
p = Mid(p, 1)
p = Val(p) + 1
TextBox2.Text = p
Catch ex As Exception
TextBox2.Text = "1267"
EndTry
TextBox1.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
DropDownList1.Text = "Select"
DropDownList2.Text = "Select"
DropDownList3.Text = "Select"
DropDownList4.Text = "select"
EndSub
Catch ex As Exception
MsgBox("sorry invalid")
EndTry
EndSub
Dim p AsString
Try
qry = "select cid from fir"
com = New SqlCommand(qry, con)
adp = New SqlDataAdapter(com)
ds = New DataSet
adp.Fill(ds, "fir")
i = ds.Tables(0).Rows.Count
p = ds.Tables(0).Rows(i - 1)(0)
p = Mid(p, 1)
p = Val(p) + 1
TextBox2.Text = p
Catch ex As Exception
TextBox2.Text = "1267"
EndTry
Try
IfNot IsPostBack Then
qry = "Select cid from criminal "
com = New SqlCommand(qry, con)
adp = New SqlDataAdapter(com)
ds = New DataSet
adp.Fill(ds, "criminal")
i = ds.Tables("criminal").Rows.Count
For j = 0 To i - 1
DropDownList4.Items.Add(ds.Tables("criminal").Rows(j)
(0))
Next
EndIf
Catch ex As Exception
EndTry
EndSub
DropDownList4.Text = ds.Tables("criminal").Rows(0)(0)
TextBox4.Text = ds.Tables("criminal").Rows(0)(1)
EndSub
EndClass
Crime Investigation
Imports System.Data.SqlClient
Imports System.Data
PartialClass crime
Inherits System.Web.UI.Page
Dim con AsNew SqlConnection("Data Source=DOTNET-PC\SQLEXPRESS;Initial
Catalog=crimes;Persist Security Info=True;User ID=sa;pwd=sql;")
Dim com AsNew SqlCommand
Dim adp AsNew SqlDataAdapter
Dim ds AsNew DataSet
Dim qry AsString
Dim i AsInteger
ProtectedSub Button1_Click(ByVal sender AsObject, ByVal e As
System.EventArgs) Handles Button1.Click
qry = "insert into crime values('" + DropDownList1.Text + "','" +
TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "','" +
TextBox4.Text + "','" + TextBox5.Text + "','" + TextBox6.Text + "','" +
TextBox7.Text + "','" + DropDownList2.Text + "','" + TextBox9.Text + "','"
+ TextBox10.Text + "','" + TextBox14.Text + "','" + TextBox12.Text + "','"
+ TextBox11.Text + "','" + TextBox13.Text + "','" + TextBox15.Text + "')"
com = New SqlCommand(qry, con)
con.Open()
com.ExecuteNonQuery()
MsgBox("sucessfully saved")
con.Close()
TextBox1.Text = ""
TextBox10.Text = ""
TextBox11.Text = ""
TextBox12.Text = ""
TextBox13.Text = ""
TextBox14.Text = ""
TextBox15.Text = ""
DropDownList2.Text = "Select"
TextBox2.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
DropDownList2.Text = "Select"
TextBox9.Text = ""
DropDownList1.Text = "Select"
EndSub
Catch ex As Exception
EndTry
EndSub
EndSub
EndSub
EndClass
Report Missing criminal
Imports System.Data.SqlClient
Imports System.Data
Imports System.IO
PartialClass missingcrime2
Inherits System.Web.UI.Page
Dim con AsNew SqlConnection("Data Source=DOTNET-PC\SQLEXPRESS;Initial
Catalog=crimes;Persist Security Info=True;User ID=sa;pwd=sql;")
Dim com AsNew SqlCommand
Dim adp AsNew SqlDataAdapter
Dim ds AsNew DataSet
Dim qry AsString
Dim i AsInteger
ProtectedSub Page_Load(ByVal sender AsObject, ByVal e As System.EventArgs)
HandlesMe.Load
EndSub
EndSub