Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 59

Public e-Grievance System

Project work submitted in partial fulfillment of the requirement for the


award of the

Submitted by

Guided By

TRIVANDRUM

1
CONTENTS

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

2. System Study………………………………………………6-8

i. Existing System

ii. Proposed System

iii. System Description

3. System Requirement……………………………………..9-19

4. Project Design…………………………………………….20

5. Data Flow Diagram……………………………………….21-22

6. System Testing…………………………………………….23-24

7. Source Code……………………………………………… 25-53

8. Output Screen…………………………………………….54-59

9. Conclusion………………………………………………..60

10.Bibliography……………………………………………..61

2
1. INTRODUCTION

The main objective of this system is used to public can be submit their grievances to the
government. The system avoid the bureaucratic influence in the current system.

In a democracy, the citizens make the government and hold it accountable. Government
is operated by bureaucracy for whom the rules and regulations are more important than
helping the citizens. Also, it tends to keep things secret and department like electricity
and water-supply, railways and telephones etc. exercise their own power. Citizens
register many complaints against government machinery. The grievances of citizens
against government machinery need to be heard and redressed otherwise, citizens will
tend to withdraw their loyalty towards it. Hence, democracy sets up appropriate
machineries for the redresses of citizen’s grievances.

3
2. System Study

i. Existing System.

At present, the public can submit their grievance to the government


through manually. This will have lots of limitations. The complaint is not
reached to the concerned authorities. Its take a lots of time for handling
grievances.

All these information are vital for the grievance system. The reports are
also included to this system on each complaints tracking. The reports are
to be also made manually by the user which is a tedious task. In addition,
they had to enter all the details of raw materials into the tables to get to a
conclusion whenever needed.

Moreover, in order to get a clear conclusion the used had to make reports
on each and every category of the equipment, which means creating
different individual reports for the particular category of the complaint and
nature of the complaint. In the existing system, the user also had to make
entries in as many tables as possible. If any modification is to be made, it
becomes tedious and cumbersome process, which takes a lot of time and
energy.

Drawbacks of Existing System

The System is manual and very tedious to maintain and make reports since
all the date are stored in document form/files/registers. And being and
organization where all the details have to be kept confidential and so
maintain them will be very risky. And to get the details of a group or a
particular member like complaints, consumers details, we have to search
through the entire files and registers to get that particular details.

The following are the list of drawbacks:

4
 All are written document.
 Bureaucratic influence.
 The data stored in the document are not reliable.
 Reports are not sufficient and are very complex.
 Redundancy of data.
 Storing and retrieval of information is time consuming.
 Verification of data is tedious.
 Large volume of data cannot be maintained efficiently.
 Maintain all the record in an orderly manner is a difficult task.
 Since all the details are stored in files & registers, which are not
computerized, it occupies a voluminous area.
 It is difficult to manually search for a particular item to obtain
information about them.
 Slow responding of the information registers.

ii. Proposed System.

In this phase, the concepts associated with the system analysis and how
they are implemented in the project is dealt with. In this, the existing
system has studied thoroughly, the problem is identified, alternative
solutions are analyzed and the best solution among them was selected.

Advantages of the proposed system.

The proposed system has been designed to eliminate the major


disadvantages of encountered in the existing system. There is no room for
errors in the proposed system. The error checking has been dealt
efficiently. The errors that could happen during data entry are also
informed to the user. At important point of the data entry , it has been
ensured that only valid data can be entered.

The proposed system has been designed in such a way to attract user by
being user friendly. With the key options in the data entry form and the

5
report generation, it helps the user and does not make him feel tedious
anymore.

iii.System Description.
The proposed system is completely menu driven. Input screens are
properly arranged and designed in such a way that the user does not feel
complicated at any stage of using this system. Therefore it is very easy for
the end users to work with such a system, Data fields are in the normalized
for there by avoiding the data redundancy.

The proposed system is developed using ASP.net and C# as front end and
MySql as its back end. In this data retrieval and memory utilization are
achieved. The designing of the screens are very much user friendly. The
data entry forms are designed and arranged in a very simple manner so
that it would be easy for any user to work on it.

6
3. SYSTEM REQUIREMENT

i. Hardware Specification

Processor : Pentium IV
HDD : 80 GB
RAM : 512 MB
Monitor :17” Color
Mouse : Logitech
Keyboard : 104 Keys.
CD Drive : 52X
Printer : Laserjet

ii. Software Specification

Operating System : Windows XP Service Pack 2


Front End : ASP.net , C#, .netframework 3.0
Back End : MySQL
Webserver : IIS

iii. Language Specification.

About .NET

The .NET Framework (pronounced dot net) is a software framework that


runs primarily on Microsoft Windows. It includes a large library and provides
language interoperability (each language can use code written in other
languages) across several programming languages. Programs written for
the .NET Framework execute in a software environment (as contrasted to
hardware environment), known as the Common Language Runtime (CLR), an
application virtual machine that provides important services such as security,

7
memory management, and exception handling. The class library and the CLR
together constitute the .NET Framework.
The .NET Framework's Base Class Library provides user interface, data
access, database connectivity, cryptography, web application development,
numeric algorithms, and network communications. Programmers produce
software by combining their own source code with the .NET Framework and
other libraries. The .NET Framework is intended to be used by most new
applications created for the Windows platform. Microsoft also produces a
popular integrated development environment largely for .NET software called
Visual Studio.

Interoperability
Because computer systems commonly require interaction between newer
and older applications, the .NET Framework provides means to access
functionality implemented in programs that execute outside the .NET
environment. Access to COM components is provided in the Sstem.Runtime.
Interop Services and System Enterprise Services namespaces of the
framework; access to other functionality is provided using the P/Invoke
feature.

Common Language Runtime Engine


The Common Language Runtime (CLR) is the execution engine of the .NET
Framework. All .NET programs execute under the supervision of the CLR,
guaranteeing certain properties and behaviors in the areas of memory
management, security, and exception handling.

Language Independence
The .NET Framework introduces a Common Type System, or CTS. The
CTS specification defines all possible datatypes and programming constructs
supported by the CLR and how they may or may not interact with each other
conforming to the Common Language Infrastructure (CLI) specification.
Because of this feature, the .NET Framework supports the exchange of types

8
and object instances between libraries and applications written using any
conforming .NET language.

Base Class Library


The Base Class Library (BCL), part of the Framework Class Library (FCL), is
a library of functionality available to all languages using the .NET
Framework. The BCL provides classes that encapsulate a number of common
functions, including file reading and writing, graphic rendering, database
interaction, XML document manipulation, and so on.

Simplified Deployment

The .NET Framework includes design features and tools which help
manage the installation of computer software to ensure it does not interfere
with previously installed software, and it conforms to security requirements.

Security

The design is meant to address some of the vulnerabilities, such as buffer


overflows, which have been exploited by malicious software. Additionally,
.NET provides a common security model for all applications.

Portability
While Microsoft has never implemented the full framework on any system
except Microsoft Windows, the framework is engineered to be platform
agnostic,[5] and cross-platform implementations are available for other
operating systems (see Silverlight and the Alternative implementations section
below). Microsoft submitted the specifications for the Common Language
Infrastructure (which includes the core class libraries, Common Type System,
and the Common Intermediate Language),[6][7][8] the C# language,[9] and
the C++/CLI language[10] to both ECMA and the ISO, making them
available as open standards. This makes it possible for third parties to create
compatible implementations of the framework and its languages on other
platforms.

9
Common Language Infrastructure (CLI)
The purpose of the Common Language Infrastructure (CLI) is to provide a
language-neutral platform for application development and execution,
including functions for Exception handling, Garbage Collection, security, and
interoperability. By implementing the core aspects of the .NET Framework
within the scope of the CLI, this functionality will not be tied to a single
language but will be available across the many languages supported by the
framework. Microsoft's implementation of the CLI is called the Common
Language Runtime, or CLR..Net was developed in 1990.

Security

.NET has its own security mechanism with two general features: Code Access
Security (CAS), and validation and verification. Code Access Security is
based on evidence that is associated with a specific assembly. Typically the
evidence is the source of the assembly (whether it is installed on the local
machine or has been downloaded from the intranet or Internet). Code Access
Security uses evidence to determine the permissions granted to the code.
Other code can demand that calling code is granted a specified permission.
The demand causes the CLR to perform a call stack walk: every assembly of
each method in the call stack is checked for the required permission; if any
assembly is not granted the permission a security exception is thrown.

The .NET Framework includes a set of standard class libraries. The class
library is organized in a hierarchy of namespaces. Most of the built-in APIs
are part of either System.* or Microsoft.* namespaces. These class libraries
implement a large number of common functions, such as file reading and
writing, graphic rendering, database interaction, and XML document
manipulation, among others. The .NET class libraries are available to all CLI
compliant languages. The .NET Framework class library is divided into two
parts: the Base Class Library and the Framework Class Library

10
Class library
The Base Class Library (BCL) includes a small subset of the entire class
library and is the core set of classes that serve as the basic API of the
Common Language Runtime.[11] The classes in mscorlib.dll and some of the
classes in System.dll and System.core.dll are considered to be a part of the
BCL. The BCL classes are available in both .NET Framework as well as its
alternative implementations including .NET Compact Framework, Microsoft
Silverlight and Mono.

Memory management

The .NET Framework CLR frees the developer from the burden of managing
memory (allocating and freeing up when done); it handles memory
management itself by detecting when memory can be safely freed. Memory is
allocated to instantiations of .NET types (objects) from the managed heap, a
pool of memory managed by the CLR. As long as there exists a reference to
an object, which might be either a direct reference to an object or via a graph
of objects, the object is considered to be in use. When there is no reference to
an object, and it cannot be reached or used, it becomes garbage, eligible for
collection. NET Framework includes a garbage collector which runs
periodically, on a separate thread from the application's thread, that
enumerates all the unusable objects and reclaims the memory allocated to
them

About ASP.NET
ASP.NET is a Web application framework developed and marketed by
Microsoft to allow programmers to build dynamic Web sites, Web
applications and Web services. It was first released in January 2002 with
version 1.0 of the .NET Framework, and is the successor to Microsoft's Active
Server Pages (ASP) technology. ASP.NET is built on the Common Language
Runtime (CLR), allowing programmers to write ASP.NET code using any

11
supported .NET language. The ASP.NET SOAP extension framework allows
ASP.NET components to process SOAP messages.

Pages

ASP.NET Web pages, known officially as Web Forms,[8] are the main building
block for application development.[9] Web forms are contained in files with an
".aspx" extension; these files typically contain static (X)HTML markup, as well
as markup defining server-side Web Controls and User Controls where the
developers place all the required static and dynamic content for the Web page.
Additionally, dynamic code which runs on the server can be placed in a page
within a block <% -- dynamic code -- %>, which is similar to other Web
development technologies such as PHP, JSP, and ASP. With ASP.NET
Framework 2.0, Microsoft introduced a new code-behind model which allows
static text to remain on the .aspx page, while dynamic code remains in an .aspx.vb
or .aspx.cs or .aspx.fs file (depending on the programming language used).[10]

Directives

A directive is special instructions on how ASP.NET should process the page.[11]


The most common directive is <%@ Page %> which can specify many attributes
used by the ASP.NET page parser and compiler.

User controls

User controls are encapsulations of sections of pages which are registered and
used as controls in ASP.NET. User controls are created as ASCX markup files.
These files usually contain static (X)HTML markup, as well as markup defining
server-side Web controls. These are the locations where the developer can place
the required static and dynamic content. A user control is compiled when its
containing page is requested and is stored in memory for subsequent requests.
User controls have their own events which are handled during the life of
ASP.NET requests. An event bubbling mechanism provides the ability to pass an
event fired by a user control up to its containing page. Unlike an ASP.NET page,

12
a user control cannot be requested independently; one of its containing pages is
requested instead.

Custom controls

Programmers can also build custom controls for ASP.NET applications. Unlike
user controls, these controls do not have an ASCX markup file, having all their
code compiled into a dynamic link library (DLL) file. Such custom controls can
be used across multiple Web applications and Visual Studio projects.
Rendering technique

ASP.NET uses a visited composites rendering technique. During compilation, the


template (.aspx) file is compiled into initialization code which builds a control
tree (the composite) representing the original template. Literal text goes into
instances of the Literal control class, and server controls are represented by
instances of a specific control class. The initialization code is combined with user-
written code (usually by the assembly of multiple partial classes) and results in a
class specific for the page. The page doubles as the root of the control tree.

Actual requests for the page are processed through a number of steps. First,
during the initialization steps, an instance of the page class is created and the
initialization code is executed. This produces the initial control tree which is now
typically manipulated by the methods of the page in the following steps. As each
node in the tree is a control represented as an instance of a class, the code may
change the tree structure as well as manipulate the properties/methods of the
individual nodes. Finally, during the rendering step a visitor is used to visit every
node in the tree, asking each node to render itself using the methods of the visitor.
The resulting HTML output is sent to the client.

After the request has been processed, the instance of the page class is discarded
and with it the entire control tree. This is a source of confusion among novice
ASP.NET programmers who rely on class instance members that are lost with
every page request/response cycle.
State management

13
ASP.NET applications are hosted by a Web server and are accessed using the
stateless HTTP protocol. As such, if an application uses stateful interaction, it has
to implement state management on its own. ASP.NET provides various functions
for state management. Conceptually, Microsoft treats "state" as GUI state.
Problems may arise if an application needs to keep track of "data state"; for
example, a finite-state machine which may be in a transient state between requests
(lazy evaluation) or which takes a long time to initialize. State management in
ASP.NET pages with authentication can make Web scraping difficult or
impossible.
Application

Application state is held by a collection of shared user-defined variables. These


are set and initialized when the Application_OnStart event fires on the loading of
the first instance of the application and are available until the last instance exits.
Application state variables are accessed using the Applications collection, which
provides a wrapper for the application state. Application state variables are
identified by name.[12]
Session state

Server-side session state is held by a collection of user-defined session variables


that are persistent during a user session. These variables, accessed using the
Session collection, are unique to each session instance. The variables can be set to
be automatically destroyed after a defined time of inactivity even if the session
does not end. Client-side user session is maintained by either a cookie or by
encoding the session ID in the URL itself.[12]

ASP.NET supports three modes of persistence for server-side session variables:


[12]

In-Process Mode
The session variables are maintained within the ASP.NET process. This is the
fastest way; however, in this mode the variables are destroyed when the
ASP.NET process is recycled or shut down.

14
ASPState Mode
ASP.NET runs a separate Windows service that maintains the state variables.
Because state management happens outside the ASP.NET process, and because
the ASP.NET engine accesses data using .NET Remoting, ASPState is slower
than In-Process. This mode allows an ASP.NET application to be load-balanced
and scaled across multiple servers. Because the state management service runs
independently of ASP.NET, the session variables can persist across ASP.NET
process shutdowns. However, since session state server runs as one instance, it is
still one point of failure for session state. The session-state service cannot be load-
balanced, and there are restrictions on types that can be stored in a session
variable.
SqlServer Mode
State variables are stored in a database, allowing session variables to be
persisted across ASP.NET process shutdowns. The main advantage of this mode
is that it allows the application to balance load on a server cluster, sharing
sessions between servers. This is the slowest method of session state management
in ASP.NET.
View state

View state refers to the page-level state management mechanism, utilized by the
HTML pages emitted by ASP.NET applications to maintain the state of the Web
form controls and widgets. The state of the controls is encoded and sent to the
server at every form submission in a hidden field known as __VIEWSTATE. The
server sends back the variable so that when the page is re-rendered, the controls
render at their last state. At the server side, the application may change the
viewstate, if the processing requires a change of state of any control. The states of
individual controls are decoded at the server, and are available for use in
ASP.NET pages using the ViewState collection

The main use for this is to preserve form information across postbacks. View state
is turned on by default and normally serializes the data in every control on the
page regardless of whether it is actually used during a postback. This behavior can
(and should) be modified, however, as View state can be disabled on a per-
control, per-page, or server-wide basis.

15
Developers need to be wary of storing sensitive or private information in the
View state of a page or control, as the base64 string containing the view state data
can easily be de-serialized. By default, View state does not encrypt the
__VIEWSTATE value. Encryption can be enabled on a server-wide (and server-
specific) basis, allowing for a certain level of security to be maintained.[15]
Server-side caching

ASP.NET offers a "Cache" object that is shared across the application and can
also be used to store various objects. The "Cache" object holds the data only for a
specified amount of time and is automatically cleaned after the session time-limit
elapses.

MySQL is the world's most popular open source database software, with over 100
million copies of its software downloaded or distributed throughout it's history.
With its superior speed, reliability, and ease of use, MySQL has become the
preferred choice for Web, Web 2.0, SaaS, ISV, Telecom companies and forward-
thinking corporate IT Managers because it eliminates the major problems
associated with downtime, maintenance and administration for modern, online
applications.

Many of the world's largest and fastest-growing organizations use MySQL to save
time and money powering their high-volume Web sites, critical business systems,
and packaged software — including industry leaders such as Yahoo!, Alcatel-
Lucent, Google, Nokia, YouTube, Wikipedia, and Booking.com.

The flagship MySQL offering is MySQL Enterprise, a comprehensive set of


production-tested software, proactive monitoring tools, and premium support
services available in an affordable annual subscription.

MySQL is a key part of LAMP (Linux, Apache, MySQL, PHP / Perl / Python),
the fast-growing open source enterprise software stack. More and more
companies are using LAMP as an alternative to expensive proprietary software
stacks because of its lower cost and freedom from platform lock-in.

16
MySQL was originally founded and developed in Sweden by two Swedes and a
Finn: David Axmark, Allan Larsson and Michael "Monty" Widenius, who had
worked together since the 1980's. More historical information on MySQL is
available on Wikipedia

Our Continued MySQL Values

We want the MySQL database to be:

* The best and the most-used database in the world for online
applications
* Available and affordable for all
* Easy to use
* Continuously improved while remaining fast, secure and reliable
* Fun to use and improve
* Free from bugs

We want the people working on MySQL to:

* Subscribe to the Open Source philosophy


* Aim to be good citizens
* Prefer partners that share our values and mindset
* Answer email and give assistance to users, customers, partners and
co-workers
* Be a virtual organization, networking with others

17
4. Project Design

Designing is the most important phase of software development. It requires a careful


planning and thinking on the part of the system designer. Designing software means
to plan how the various parts of the software are going to achieve the desired goal. It
should be done with utmost care because if the phase contains any error then that will
effect the performance of the system, as a result it may take more processing time,
more response time, extra coding workload etc.

Software design sits at the technical kernel of the software engineering process and is
applied regardless of the software process model that is used. After the software
requirements have been analyzed and specified, software design is the first of the
three technical activities Designing, Coding and Testing that are required to build and
verify the software. Each activity transforms information in such a manner that
ultimately results in validated computer software.

DESIGN GOALS

The following goals were kept in mind while designing the system:

 Make system user-friendly. This was necessary so that system could be used
efficiently and system could act as catalyst in achieving objectives.

 Make system compatible i.e. It should fit in the total integrated system. Future
maintenance and enhancement must be less.

 Make the system compatible so that it could integrate other modules of


system into itself.

 Make the system reliable, understandable and cost-effective.

18
5. DATA FLOW DIAGRAM

The Data Flow Diagram shows the flow of data or information. It can be partitioned
into single processes or functions. Data Flow Diagrams can be grouped together or
decomposed into multiple processes.

The DFD is an excellent communication tool for analysts to model processes and
functional requirements. Used effectively, it is a useful and easy to understand
modeling tool. It has broad application and usability across most software
development projects. It is easily integrated with data modeling, workflow modeling
tools, and textual specs. Together with these, it provides analysts and developers with
solid models and specs. Alone, however, it has limited usability. It is simple and easy
to understand by users and can be easily extended and refined with further
specification into a physical version for the design and development teams.
The different versions are Context Diagrams (Level 0), Partitioned Diagrams (single
process only -- one level), functionally decomposed, and leveled sets of Data Flow
Diagrams.

Data Store

A repository of information. In the physical model, this represents a file, table, etc. In
the logical model, a data store is an object or entity.

Data Flows
DFDs show the flow of data from external entities into the system, showed how the
data moved from one process to another, as well as its logical storage. There are only
four symbols:
1. Squares representing external entities, which are sources or destinations of
data.
2. Rounded rectangles representing processes, which take data as input, do
something to it, and output it.
3. Arrows representing the data flows, which can either, be electronic data or
physical items.
4. Open-ended rectangles representing data stores

19
There are several common modeling rules for creating DFDs:

1. All processes must have at least one data flow in and one data flow out.
2. All processes should modify the incoming data, producing new forms of
outgoing data.
3. Each data store must be involved with at least one data flow.
4. Each external entity must be involved with at least one data flow.
5. A data flow must be attached to at least one process.

Public Grievance
Grievance to the
s Concerne
d
authoritie
Grievance s
System

20
6. System Testing

Software testing is a critical element of the ultimate review of specification design and
coding. Testing of software leads to the uncovering of errors in the software functional
and performance requirements are met .Testing also provides a good indication of
software reliability and software quality as a whole. The result of different phases of
testing are evaluated and then compared with the expected results. If the errors are
uncovered they are debugged and corrected. A strategy approach to software testing has
the generic characteristics:
 Testing begins at the module level and works “outwards” towards the integration
of the entire computer based system.
 Different testing techniques are appropriate at different points of time.
 Testing and debugging are different activities, but debugging must be
accommodated in the testing strategy

6.1 Goals and Objectives

“Testing is a process of executing a program with the intent of finding an error”. A good
test case is one that has a probability of finding an as yet undiscovered error. A successful
test is one that uncovers an as yet undiscovered error. Our Objective is to design test
processes that systematically uncover different classes of errors and do so with minimum
amount of time and effort.

6.2 Statement of scope

A description of the scope of the software testing is developed. All the features to be
tested are noted as follows. The basic principles that guides software testing are,

 All test cases should be traceable top customer requirements. The most severe
defects from the customer’s point of view are those that cause the program to fail
to meet its requirements.

21
 Test case should be planned long before testing begins. Testing plan can begin as
soon as the requirement model is complete. Detailed definition of the test cases
can begin as soon as the design is solidified. Therefore, the entire test can be
planned before any code has been generated.

 Testing should begin “in the small” and progress towards “in the large”. The first
test planned and executed generally focus on the individual modules. As testing
progresses testing shifts focus in an attempt to find errors in integrating clusters of
modules and ultimately in the entire system

22
7. Source Code

Adminhome

<%@ Page Language="C#" AutoEventWireup="true"


CodeFile="adminhome.aspx.cs" Inherits="adminhome" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Home Page</title>
<link rel="stylesheet" href="style.css" type="text/css"
media="screen" />

<link href="adminhome.css" type="text/css" rel="Stylesheet" />


</head>
<body>
<div id="art-main">
<div class="cleared reset-box"></div>
<div class="art-header">
<div class="art-header-clip">
<div class="art-header-center">
<div class="art-header-png"></div>
<div class="art-header-jpeg"></div>
</div>
</div>
<div class="art-header-wrapper">
<div class="art-header-inner">
<div class="art-headerobject"></div>
<div class="art-logo">
<h1 class="art-logo-name"><a
href="./index.html">E</a>-Grievance System</h1>
</div>
</div>
</div>
</div>
<form id="form1" runat="server">

<div id="center">

<div align="right"><asp:Button ID="Button3" runat="server"


Text="Report"
onclick="Button3_Click1" /></div>
<table border="2">
<tr><td>
<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="false"
onrowcommand="GridView1_RowCommand"
onselectedindexchanged="GridView1_SelectedIndexChanged"
DataKeyNames="id"
onpageindexchanging="GridView1_PageIndexChanging">
<Columns>
<asp:TemplateField HeaderText="Complaint">
<ItemTemplate>

23
<asp:Label ID="Label1" runat="server" Text='<%#
Eval("complaint") %>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<Columns>
<asp:TemplateField HeaderText="Submitted Date">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%#
Eval("dates") %>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>

<Columns>
<asp:TemplateField HeaderText="Action">
<ItemTemplate>
<asp:Button ID="Button1" runat="server" Text="Take action"
CommandArgument='<%# Eval("id") %>' CommandName="Select" />
</ItemTemplate>
</asp:TemplateField>
</Columns>

<Columns>
<asp:TemplateField HeaderText="Transfer">
<ItemTemplate>
<asp:Button ID="Button2" runat="server" Text="Tranfer"
CommandArgument='<%# Eval("id") %>' CommandName="Transfer" />
</ItemTemplate>
</asp:TemplateField>
</Columns>

</asp:GridView></td></tr>
</table>
</div>
</form>
</div>
</body>
</html>

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

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


{
dbs obj = new dbs();

24
DataSet ds = new DataSet();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{

ds = obj.seldataset("select * from complaint where


department='" + Session["department"].ToString() + "'");
GridView1.DataSource = ds;
GridView1.DataBind();

}
}

protected void GridView1_SelectedIndexChanged(object sender,


EventArgs e)
{
Session["comid"] = GridView1.SelectedDataKey.Value.ToString();

}
protected void GridView1_RowCommand(object sender,
GridViewCommandEventArgs e)
{

if (e.CommandName == "Select")
{
string ip = e.CommandArgument.ToString();
Session["comid"] = ip;
Response.Redirect("takeaction.aspx");
}
else if (e.CommandName == "Transfer")
{
string ip = e.CommandArgument.ToString();
Session["comid"] = ip;
Response.Redirect("transfer.aspx");
}
}
protected void GridView1_PageIndexChanging(object sender,
GridViewPageEventArgs e)
{

protected void Button3_Click1(object sender, EventArgs e)


{
Response.Redirect("report.aspx");
}
}

<%@ Page Language="C#" AutoEventWireup="true"


CodeFile="adminlogin.aspx.cs" Inherits="admihnlogin" %>

25
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Untitled Page</title>
<link href="login.css" type="text/css" rel="Stylesheet" />

</head>
<body>
<form id="form1" runat="server">
<div align="center">
<div id="pagewrapper">

<div id="top">
<br /><br /><br /><br /><br />

</div>
<div id="middle">
<div id="lblmes"><asp:Label ID="lblmessage" runat="server"
Text=""></asp:Label>
</div>
<div id="lbluser">
<asp:Label ID="lbluser1" runat="server" Text="UserName" Font-
Bold="true" Font-Names="Arial" Font-Size="Small"></asp:Label>
</div>
<div id="txtuser">
<asp:TextBox ID="txtuname" runat="server" Width="200px"
></asp:TextBox>
<asp:RequiredFieldValidator ID="re1" runat="server"
ControlToValidate="txtuname" ErrorMessage="Enter username"
Display="Dynamic">
</asp:RequiredFieldValidator>

</div>
<div id="lblpass">
<asp:Label ID="lblpass1" runat="server" Text="Password" Font-
Bold="true" Font-Names="Arial" Font-Size="Small"></asp:Label>
</div>
<div id="txtpass">
<asp:TextBox ID="txtpass1" runat="server" Width="200px"
TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server" ControlToValidate="txtpass1" ErrorMessage="Enter
password" Display="Dynamic">
</asp:RequiredFieldValidator>
</div>
<div id="btn">
<asp:ImageButton ID="btnlogin" runat="server"
ImageUrl="~/images/btn1.jpg"
onclick="btnlogin_Click" />

</div>
<div id="lblreg">
</div>
</div>
<div id="bottom"></div>
</div>
</div>
</form>

26
</body>
</html>

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

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


{
DataSet ds = new DataSet();
String str;
dbs obj = new dbs();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
lblmessage.Text = "";
}

}
protected void btnlogin_Click(object sender, ImageClickEventArgs e)
{
str = "select username,password,department from admin where
username='" + txtuname.Text + "' and password='" + txtpass1.Text + "'";

ds = obj.seldataset(str);
if (ds.Tables[0].Rows.Count == 0)
{
lblmessage.Text = "Invalid username password";

}
else
{
Session["username"] = txtuname.Text;
Session["department"] = ds.Tables[0].Rows[0]
["department"].ToString();
Response.Redirect("adminhome.aspx");

}
}

<%@ Page Language="C#" AutoEventWireup="true"


CodeFile="adminreg.aspx.cs" Inherits="adminreg" %>

27
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<link href="adminreg.css" type="text/css" rel="Stylesheet" />
<link rel="stylesheet" href="style.css" type="text/css" media="screen"
/>

</head>
<body>
<div id="art-main">
<div class="cleared reset-box"></div>
<div class="art-header">
<div class="art-header-clip">
<div class="art-header-center">
<div class="art-header-png"></div>
<div class="art-header-jpeg"></div>
</div>
</div>
<div class="art-header-wrapper">
<div class="art-header-inner">
<div class="art-headerobject"></div>
<div class="art-logo">
<h1 class="art-logo-name"><a
href="./index.html">E</a>-Grievance System</h1>
</div>
</div>
</div>
</div>

<form id="form1" runat="server">


<div align="center">
<div id="pagewrapper">
<div id="top"></div>
<div id="middle">

<div id="lbldep"><asp:Label ID="lbldept" runat="server"


Text="Department"></asp:Label>
</div>
<div id="txtdep"><asp:TextBox ID="txtdept"
runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="rel" runat="server"
ControlToValidate="txtdept" ErrorMessage="Enter the Department Name"
Display="Dynamic"></asp:RequiredFieldValidator>
</div>
<br />
<div id="lbldepthead1">
<asp:Label ID="lbldepthead" runat="server"
Text="DepartmentHead"></asp:Label>
</div>
<div id="txtdepthead1">
<asp:TextBox ID="txtdepthead" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server" ControlToValidate="txtdept" ErrorMessage="Enter the
Department Head" Display="Dynamic"></asp:RequiredFieldValidator>

</div>
<br />

28
<div id="lbluse"><asp:Label ID="lbluser" runat="server"
Text="User Name"></asp:Label>
</div>
<div id="txtuse"><asp:TextBox ID="txtuser"
runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2"
runat="server" ControlToValidate="txtdept" ErrorMessage="Enter the User
Name" Display="Dynamic"></asp:RequiredFieldValidator>
</div><br />
<div id="lblpas"><asp:Label ID="lblpass" runat="server"
Text="Password"></asp:Label>
</div>
<div id="txtpas"><asp:TextBox ID="txtpass"
runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3"
runat="server" ControlToValidate="txtdept" ErrorMessage="Enter the
Password Name" Display="Dynamic"></asp:RequiredFieldValidator>
</div>
<br />
<div id="btnsave"><asp:Button ID="Button1" runat="server"
Text="SAVE"
onclick="Button1_Click" />
</div>
<div id="btnclear">
<asp:Button ID="Button2" runat="server" Text="CLEAR"
onclick="Button2_Click" />
</div>
</div>
</div>
</div>
</form>
</div>
</body>
</html>

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

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


{
DataSet ds = new DataSet();
String str;
dbs obj = new dbs();
protected void Page_Load(object sender, EventArgs e)
{
obj = new dbs();
}
protected void Button1_Click(object sender, EventArgs e)

29
{

str = "insert into


admin(department,departmenthead,username,Password)Values ( '" +
txtdept.Text + "','" + txtdepthead.Text + "','" + txtuser.Text + "','"
+ txtpass.Text + "')";
obj.ins(str);

}
protected void Button2_Click(object sender, EventArgs e)
{
txtdept.Text = "";
txtdepthead.Text = "";
txtuser.Text = "";
txtpass.Text = "";
}
}

<%@ Page Language="C#" AutoEventWireup="true"


CodeFile="complient.aspx.cs" Inherits="complient" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
.style1
{
width: 255px;
}
</style>
</head>
<title>Complient Registration</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen"
/>

</head>
<body>
<div id="art-main">
<div class="cleared reset-box"></div>
<div class="art-header">
<div class="art-header-clip">
<div class="art-header-center">
<div class="art-header-png"></div>
<div class="art-header-jpeg"></div>
</div>
</div>
<div class="art-header-wrapper">
<div class="art-header-inner">
<div class="art-headerobject"></div>
<div class="art-logo">
<h1 class="art-logo-name"><a
href="./index.html">E</a>-Grievance System</h1>
</div>

30
</div>
</div>
</div>
<form id="form1" runat="server">
<div align="center">
<table border="2px">
<tr>
<td>
<asp:Label ID="Label3" runat="server" Text="Enter
id"></asp:Label>
</td>
<td align="left">
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<asp:Button ID="Button2" runat="server" Text="TRACK"
onclick="Button2_Click" />
</td></tr>
<tr align="center">
<td></td>
<td>
<h5>REGISTER THE COMPLAINT</h5></td>
</tr>
<tr>
<td class="style1"><asp:Label ID="Label1" runat="server" Text="
Complaint Department"></asp:Label></td>
<td align="left"><asp:DropDownList ID="DropDownList1"
runat="server" DataTextField="department" Height="23px" Width="150px">
</asp:DropDownList></td>
</tr>

<tr><td align="left" class="style1">


<asp:Label ID="Label2" runat="server"
Text="Complaint"></asp:Label></td>
<td>
<asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine"
Height="200px" Width="550"
></asp:TextBox></td>
</tr>
<tr align="center"><td></td><td class="style1">
<asp:Button ID="Button1" runat="server" Text="Submit"
onclick="Button1_Click" /></td>
</tr>
</table>
</div>
</form>

</div>
</body>
</html>

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

31
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

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


{
string str;
dbs obj = new dbs();
DataSet ds = new DataSet();
protected void Page_Load(object sender, EventArgs e)
{

obj = new dbs();


if (!IsPostBack)
{

if (Session["username"] == null)
{
Response.Redirect("loginpublic.aspx");
}

ds = obj.seldataset("select department from admin");


DropDownList1.DataSource = ds;
DropDownList1.DataBind();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
string st;
st = DateTime.Now.ToString();
str = "insert into
complaint(department,complaint,flag,dates)Values ( '" +
DropDownList1.Text + "','" + TextBox1.Text + "'," + 0 + ",'" + st +
"')";
obj.ins(str);
Response.Redirect("keyno.aspx");
}

protected void Button2_Click(object sender, EventArgs e)


{
Session["cmpid"] = TextBox2.Text;
Response.Redirect("track.aspx");

}
}

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

32
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

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


{
string str;
dbs obj = new dbs();
DataSet ds = new DataSet();
protected void Page_Load(object sender, EventArgs e)
{

obj = new dbs();


if (!IsPostBack)
{

if (Session["username"] == null)
{
Response.Redirect("loginpublic.aspx");
}

ds = obj.seldataset("select department from admin");


DropDownList1.DataSource = ds;
DropDownList1.DataBind();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
string st;
st = DateTime.Now.ToString();
str = "insert into
complaint(department,complaint,flag,dates)Values ( '" +
DropDownList1.Text + "','" + TextBox1.Text + "'," + 0 + ",'" + st +
"')";
obj.ins(str);
Response.Redirect("keyno.aspx");
}

protected void Button2_Click(object sender, EventArgs e)


{
Session["cmpid"] = TextBox2.Text;
Response.Redirect("track.aspx");

}
}

using System;
using System.Collections;
using System.Configuration;

33
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

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


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

}
}

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="keyno.aspx.cs"


Inherits="keyno" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<link rel="stylesheet" href="style.css" type="text/css"
media="screen" />

</head>
<body>
<div id="art-main">
<div class="cleared reset-box"></div>
<div class="art-header">
<div class="art-header-clip">
<div class="art-header-center">
<div class="art-header-png"></div>
<div class="art-header-jpeg"></div>
</div>
</div>
<div class="art-header-wrapper">
<div class="art-header-inner">
<div class="art-headerobject"></div>
<div class="art-logo">
<h1 class="art-logo-name"><a
href="./index.html">E</a>-Grievance System</h1>
</div>
</div>
</div>
</div>
<form id="form1" runat="server">
<div align="center">
<table align="center" width="250px">
<tr valign="middle">
<td><asp:Label ID="Label1" runat="server" Text=""
BackColor="Red" Font-Bold="true" Font-Size="Large"></asp:Label>
</td>
</tr>
</table>

34
</div>

</form>
</div>
</body>
</html>

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

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


{
string str;
dbs obj = new dbs();
DataSet ds = new DataSet();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Session["username"] == null)
{
Response.Redirect("loginpublic.aspx");
}
}

obj = new dbs();


ds = obj.seldataset("select id from complaint order by id
desc");
str = ds.Tables[0].Rows[0][0].ToString();
Label1.Text ="Your Key number is"+ str;
}
}

<%@ Page Language="C#" CodeFile="loginpublic.aspx.cs"


Inherits="loginpublic" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Untitled Page</title>
<link href="login.css" type="text/css" rel="Stylesheet" />

</head>
<body>
<form id="form1" runat="server">
<div align="center">
<div id="pagewrapper">

35
<div id="top">
<br /><br /><br /><br /><br />

</div>
<div id="middle">
<div id="lblmes"><asp:Label ID="lblmessage" runat="server"
Text=""></asp:Label>
</div>
<div id="lbluser">
<asp:Label ID="lbluser1" runat="server" Text="UserName" Font-
Bold="true" Font-Names="Arial" Font-Size="Small"></asp:Label>
</div>
<div id="txtuser">
<asp:TextBox ID="txtuname" runat="server" Width="200px"
></asp:TextBox>
<asp:RequiredFieldValidator ID="re1" runat="server"
ControlToValidate="txtuname" ErrorMessage="Enter username"
Display="Dynamic">
</asp:RequiredFieldValidator>

</div>
<div id="lblpass">
<asp:Label ID="lblpass1" runat="server" Text="Password" Font-
Bold="true" Font-Names="Arial" Font-Size="Small"></asp:Label>
</div>
<div id="txtpass">
<asp:TextBox ID="txtpass1" runat="server" Width="200px"
TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server" ControlToValidate="txtpass1" ErrorMessage="Enter
password" Display="Dynamic">
</asp:RequiredFieldValidator>
</div>
<div id="btn">
<asp:ImageButton ID="btnlogin" runat="server"
ImageUrl="~/images/btn1.jpg"
onclick="btnlogin_Click" />

</div>
<div id="lblreg">
<a href="Registeruser.aspx"><asp:Label ID="Label1" runat="server"
Text="Register New User"></asp:Label></a>
</div>
</div>
<div id="bottom"></div>
</div>
</div>
</form>
</body>
</html>

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;

36
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

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


{
DataSet ds = new DataSet();
String str;
dbs obj = new dbs();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
lblmessage.Text = "";
}

}
protected void btnlogin_Click(object sender, ImageClickEventArgs e)
{
str = "select username,password from proof where username='" +
txtuname.Text + "' and password='" + txtpass1.Text + "'";

ds = obj.seldataset(str);
if (ds.Tables[0].Rows.Count == 0)
{
lblmessage.Text = "Invalid username password";

}
else
{
Session["username"] = txtuname.Text;

Response.Redirect("complient.aspx");

}
}
}

<%@ Page Language="C#" AutoEventWireup="true"


CodeFile="Registeruser.aspx.cs" Inherits="Registeruser" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>User Registration Page</title>
<link rel="stylesheet" href="style.css" type="text/css"
media="screen" />
</head>

<body>
<div id="art-main">
<div class="cleared reset-box"></div>
<div class="art-header">
<div class="art-header-clip">

37
<div class="art-header-center">
<div class="art-header-png"></div>
<div class="art-header-jpeg"></div>
</div>
</div>
<div class="art-header-wrapper">
<div class="art-header-inner">
<div class="art-headerobject"></div>
<div class="art-logo">
<h1 class="art-logo-name"><a
href="./index.html">E</a>-Grievance System</h1>
</div>
</div>
</div>
</div>
<form id="form1" runat="server">
<div align="center">
<table border="2px">
<tr>
<td><b>User Registration Form</b></td>
</tr>
<tr></tr>
<tr>
<td>User Name</td>
<td align="left"><asp:TextBox ID="txtuser" runat="server"
Width="200px"></asp:TextBox>
<asp:RequiredFieldValidator ID="r1" runat="server"
ControlToValidate="txtuser" Text="Enter
Name"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>Password</td>
<td align="left"><asp:TextBox ID="txtpass" runat="server"
Width="200px" TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="r2" runat="server"
ControlToValidate="txtpass" Text="Enter
password"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>Re-Enter Password</td>
<td align="left"><asp:TextBox ID="txtrepass" runat="server"
Width="200px" TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="r3" runat="server"
ControlToValidate="txtrepass" Text="Enter
password"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>Full Name</td>
<td align="left"><asp:TextBox ID="txtfull" runat="server"
Width="200px"></asp:TextBox>
<asp:RequiredFieldValidator ID="r4" runat="server"
ControlToValidate="txtfull" Text="Enter
fullname"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>Phone Number</td>

38
<td align="left"><asp:TextBox ID="txtphno" runat="server"
Width="200px"></asp:TextBox>
<asp:RequiredFieldValidator ID="r5" runat="server"
ControlToValidate="txtphno" Text="Enter
phno"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>Email</td>
<td align="left"><asp:TextBox ID="txtemail" runat="server"
Width="200px"></asp:TextBox>
<asp:RequiredFieldValidator ID="r6" runat="server"
ControlToValidate="txtemail" Text="Enter
email"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>State</td>
<td align="left"><asp:TextBox ID="txtstate" runat="server"
Width="200px"></asp:TextBox>
<asp:RequiredFieldValidator ID="r7" runat="server"
ControlToValidate="txtstate" Text="Enter
state"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>District</td>
<td align="left"><asp:TextBox ID="txtdis" runat="server"
Width="200px"></asp:TextBox>
<asp:RequiredFieldValidator ID="r8" runat="server"
ControlToValidate="txtdis" Text="Enter
District"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>Panchayath</td>
<td align="left"><asp:TextBox ID="txtpanch" runat="server"
Width="200px"></asp:TextBox>
<asp:RequiredFieldValidator ID="r9" runat="server"
ControlToValidate="txtpanch" Text="Enter
Panchayath"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td><asp:Button ID="Button1" runat="server" Text="Submit"
onclick="Button1_Click" />
</td>
</tr>
</table>
</div>
</form>
</div>
</body>

</html>

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

39
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

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


{
string str;
dbs obj = new dbs();
DataSet ds = new DataSet();
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{
obj = new dbs();
str = "insert into
proof(username,password,name,phno,email,state,district,panchayath)Value
s ( '" + txtuser.Text + "','" + txtpass.Text + "','" + txtfull.Text +
"'," + txtphno.Text + ",'" + txtemail.Text + "','" + txtstate.Text +
"','" + txtdis.Text + "','" + txtpanch.Text + "')";
obj.ins(str);
Response.Write("Successfully inserted the data");
Response.Redirect("loginpublic.aspx");
}
}

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="report.aspx.cs"


Inherits="report" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Report of Complaints</title>
<link rel="stylesheet" href="style.css" type="text/css"
media="screen" />

</head>
<body>
<div id="art-main">
<div class="cleared reset-box"></div>
<div class="art-header">
<div class="art-header-clip">
<div class="art-header-center">
<div class="art-header-png"></div>
<div class="art-header-jpeg"></div>
</div>
</div>
<div class="art-header-wrapper">
<div class="art-header-inner">
<div class="art-headerobject"></div>
<div class="art-logo">

40
<h1 class="art-logo-name"><a
href="./index.html">E</a>-Grievance System</h1>
</div>
</div>
</div>
</div>

<form id="form1" runat="server">


<div align="center">
<table border="2px">
<tr><td></td><td align="center">
<asp:Label ID="Label1" runat="server"
Text="Report"></asp:Label>
</td></tr>
<tr><td align="left">
<asp:RadioButton ID="rb1" runat="server" Text="Open Grievence"
GroupName="r1"/>
</td></tr>
<tr><td align="left">
<asp:RadioButton ID="rb2" runat="server" Text="Closed
Grivence" GroupName="r1"/>
</td></tr>
<tr><td align="left">
<asp:RadioButton ID="rb3" runat="server" Text="Grevence
Department vise" GroupName="r1"/>
</td><td align="left"><asp:DropDownList ID="DropDownList1"
runat="server" DataTextField="department" Height="23px" Width="150px">
</asp:DropDownList>
</td></tr>
<tr><td align="left">
<asp:RadioButton ID="rb4" runat="server" Text="Grevence
between Dates" GroupName="r1"/>
</td><td><asp:TextBox ID="t1" runat="server"
Width="100px"></asp:TextBox>TO<asp:TextBox ID="t2"
runat="server" Width="100px"></asp:TextBox>
</td></tr>
<tr><td></td><td>
<asp:Button ID="Button1" runat="server" Text="SHOW"
onclick="Button1_Click" />
</td></tr>
</table>
<div align="right"><asp:Button ID="Button2" runat="server"
Text="Print" OnClientClick="javascript:window.print();" />
</div>
<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="false">
<Columns>
<asp:TemplateField HeaderText="ID">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("id")
%>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateField>

<asp:TemplateField HeaderText="Department">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#
Eval("department") %>'>
</asp:Label>
</ItemTemplate>

41
</asp:TemplateField>

<asp:TemplateField HeaderText="Complaint">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#
Eval("complaint") %>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateField>

<asp:TemplateField HeaderText="Dates">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#
Eval("dates") %>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateField>
</columns>

</asp:GridView>
</div>
</form>
</div>
</body>
</html>

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

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


{
string str;
dbs obj = new dbs();
DataSet ds = new DataSet();
protected void Page_Load(object sender, EventArgs e)
{
obj = new dbs();
if (!IsPostBack)
{

ds = obj.seldataset("select department from admin");


DropDownList1.DataSource = ds;
DropDownList1.DataBind();
}
}

protected void Button1_Click(object sender, EventArgs e)


{
if (rb1.Checked == true)

42
{
ds = obj.seldataset("select id,department,complaint,dates
from complaint where flag=0");

GridView1.DataSource = ds;
GridView1.DataBind();
}
if (rb2.Checked == true)
{
ds = obj.seldataset("select id,department,complaint,dates
from complaint where flag=1");

GridView1.DataSource = ds;
GridView1.DataBind();
}
if (rb3.Checked == true)
{
ds = obj.seldataset("select id,department,complaint,dates
from complaint where department like '" + DropDownList1.Text + "'");

GridView1.DataSource = ds;
GridView1.DataBind();
}
if (rb4.Checked == true)
{
ds = obj.seldataset("select id,department,complaint,dates
from complaint where dates between '" + t1.Text + "' and '" + t2.Text +
"'");

GridView1.DataSource = ds;
GridView1.DataBind();
}
}
protected void Button2_Click(object sender, EventArgs e)
{

}
}

<%@ Page Language="C#" AutoEventWireup="true"


CodeFile="takeaction.aspx.cs" Inherits="takeaction" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Take Action</title>
<link rel="stylesheet" href="style.css" type="text/css"
media="screen" />

</head>
<body>
<div id="art-main">
<div class="cleared reset-box"></div>
<div class="art-header">
<div class="art-header-clip">
<div class="art-header-center">
<div class="art-header-png"></div>
<div class="art-header-jpeg"></div>

43
</div>
</div>
<div class="art-header-wrapper">
<div class="art-header-inner">
<div class="art-headerobject"></div>
<div class="art-logo">
<h1 class="art-logo-name"><a
href="./index.html">E</a>-Grievance System</h1>
</div>
</div>
</div>
</div>
<form id="form1" runat="server">
<div align="center">
<table border="2">
<tr><td>
<asp:Label ID="Label1" runat="server" Text="Action
Commant"></asp:Label>
</td>
<td>
<asp:TextBox ID="TextBox1" runat="server"
TextMode="MultiLine"></asp:TextBox></td>
</tr>
<tr><td>
<asp:Button ID="Button1" runat="server" Text="CLOSE"
onclick="Button1_Click" /></td></tr>
</table>
</div>
</form>
</body>
</html>

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

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


{
string str;
dbs obj = new dbs();
DataSet ds = new DataSet();
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{
obj = new dbs();
string st;
st = DateTime.Now.ToString();

44
str = "insert into action(action,dates,comment,cmpid)Values
('closed','" + DateTime.Now.ToShortDateString() + "','" + TextBox1.Text
+ "','" + Session["comid"].ToString() + "')";
obj.ins(str);
string s;
s = "update complaint set flag=1 where id='" +
Session["comid"].ToString() + "'";
obj.updt(s);
}
}

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="track.aspx.cs"


Inherits="track" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<link rel="stylesheet" href="style.css" type="text/css"
media="screen" />

</head>
<body>
<div id="art-main">
<div class="cleared reset-box"></div>
<div class="art-header">
<div class="art-header-clip">
<div class="art-header-center">
<div class="art-header-png"></div>
<div class="art-header-jpeg"></div>
</div>
</div>
<div class="art-header-wrapper">
<div class="art-header-inner">
<div class="art-headerobject"></div>
<div class="art-logo">
<h1 class="art-logo-name"><a
href="./index.html">E</a>-Grievance System</h1>
</div>
</div>
</div>
</div>
<form id="form1" runat="server">
<div align="center">
<table>
<tr><td>
<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="false"
DataKeyNames="complientid">
<Columns>
<asp:TemplateField HeaderText="Complaint ID">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#
Eval("cmpid") %>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateField>
</columns>

45
<Columns>
<asp:TemplateField HeaderText="Comment">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#
Eval("comment") %>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>

<Columns>
<asp:TemplateField HeaderText="Action">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#
Eval("action") %>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</td></tr>
</table>

</div>
</form>
</div>
</body>
</html>

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

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


{
string str;
dbs obj = new dbs();
DataSet ds = new DataSet();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{

ds = obj.seldataset("select * from action where cmpid='" +


Session["cmpid"].ToString() + "'");

GridView1.DataSource = ds;
GridView1.DataBind();

46
}

}
}

<%@ Page Language="C#" AutoEventWireup="true"


CodeFile="transfer.aspx.cs" Inherits="transfer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<link rel="stylesheet" href="style.css" type="text/css"
media="screen" />

</head>
<body>
<div id="art-main">
<div class="cleared reset-box"></div>
<div class="art-header">
<div class="art-header-clip">
<div class="art-header-center">
<div class="art-header-png"></div>
<div class="art-header-jpeg"></div>
</div>
</div>
<div class="art-header-wrapper">
<div class="art-header-inner">
<div class="art-headerobject"></div>
<div class="art-logo">
<h1 class="art-logo-name"><a
href="./index.html">E</a>-Grievance System</h1>
</div>
</div>
</div>
</div>
<form id="form1" runat="server">
<div align="center">
<table border="2">
<tr><td>
<asp:Label ID="Label1" runat="server"
Text="Department"></asp:Label></td>
<td align="left">
<asp:DropDownList ID="DropDownList1" runat="server"
DataTextField="department" Height="23px" Width="150px">
</asp:DropDownList>
</td></tr>
<tr><td>
<asp:Label ID="Label2" runat="server"
Text="Comment"></asp:Label>
</td>
<td>
<asp:TextBox ID="TextBox1" runat="server"
TextMode="MultiLine"></asp:TextBox>
</td></tr>

47
<tr><td></td>
<td>
<asp:Button ID="Button1" runat="server" Text="Transfer"
onclick="Button1_Click1" />
</td></tr>
</table>
</div>
</form>
</div>
</body>
</html>

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

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


{
string str;
dbs obj = new dbs();
DataSet ds = new DataSet();
protected void Page_Load(object sender, EventArgs e)
{
obj = new dbs();
if (!IsPostBack)
{
ds = obj.seldataset("select department from admin");
DropDownList1.DataSource = ds;
DropDownList1.DataBind();
}
}
protected void Button1_Click1(object sender, EventArgs e)
{

string st;
st = DateTime.Now.ToString();

str = "insert into action(action,dates,comment,cmpid)Values


('transfered to " + DropDownList1.Text + "','" +
DateTime.Now.ToShortDateString() + "','" + TextBox1.Text + "','" +
Session["comid"].ToString() + "')";
obj.ins(str);
string s;
s = "update complaint set flag=1 where id='" +
Session["comid"].ToString() + "'";
obj.updt(s);

}
}

48
Web.config

<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<configSections>
<sectionGroup name="system.web.extensions"
type="System.Web.Configuration.SystemWebExtensionsSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting"
type="System.Web.Configuration.ScriptingSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler"
type="System.Web.Configuration.ScriptingScriptResourceHandlerSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices"
type="System.Web.Configuration.ScriptingWebServicesSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization"
type="System.Web.Configuration.ScriptingJsonSerializationSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="Everywhere"/>
<section name="profileService"
type="System.Web.Configuration.ScriptingProfileServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication"/>
<section name="authenticationService"
type="System.Web.Configuration.ScriptingAuthenticationServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication"/>
<section name="roleService"
type="System.Web.Configuration.ScriptingRoleServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication"/></sectionGroup></sectionGroup><
/sectionGroup></configSections>
<appSettings>
<add key="myky" value="Data Source=localhost;Database=egovdb;User
Id=root;Password='digital123'"/>

</appSettings>
<connectionStrings/>
<system.web>
<!--

49
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions,
Version=3.5.0.0, Culture=neutral,
PublicKeyToken=B77A5C561934E089"/></assemblies></compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly"
defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI"
assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp"
namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions,
Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/></controls></pages>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false"
type="System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd"
validate="false" type="System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd"
validate="false" type="System.Web.Handlers.ScriptResourceHandler,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/></httpHandlers>
<httpModules>
<add name="ScriptModule"
type="System.Web.Handlers.ScriptModule, System.Web.Extensions,

50
Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/></httpModules></system.web>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs"
type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion"
value="v3.5"/>
<providerOption name="WarnAsError"
value="false"/></compiler>
<compiler language="vb;vbs;visualbasic;vbscript"
extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
warningLevel="4">
<providerOption name="CompilerVersion"
value="v3.5"/>
<providerOption name="OptionInfer"
value="true"/>
<providerOption name="WarnAsError"
value="false"/></compiler></compilers></system.codedom>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule"/>
<add name="ScriptModule"
preCondition="managedHandler" type="System.Web.Handlers.ScriptModule,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/></modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory"/>
<remove name="ScriptHandlerFactoryAppServices"/>
<remove name="ScriptResource"/>
<add name="ScriptHandlerFactory" verb="*"
path="*.asmx" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*"
path="*_AppService.axd" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" verb="GET,HEAD"
path="ScriptResource.axd" preCondition="integratedMode"
type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/></handlers></system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions"
publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0"
newVersion="3.5.0.0"/></dependentAssembly>
<dependentAssembly>
<assemblyIdentity
name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>

51
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0"
newVersion="3.5.0.0"/></dependentAssembly></assemblyBinding></runtime><
/configuration>

52
8. Output Screens

53
54
55
56
57
9. Conclusion

The objective of this project was to build a program for maintaining the details of all
Supply Order .The system developed is able to meet all the basic requirements. It will
provide the facility to the user so that they can keep tracks of all the equipments being
supplied. The management of the Inventory will be also benefited by the proposed
system, as it will automate the whole supply procedure, which will reduce the workload.
The security of the system is also one of the prime concerns.

There is always a room for improvement in any software, however efficient the system
may be. The important thing is that the system should be flexible enough for future
modifications. The system has been factored into different modules to make system adapt
to the further changes. Every effort has been made to cover all user requirements and
make it user friendly.

 Goal achieved: The System is able provide the interface to the user so that he can
replicate his desired data. .

 User friendliness: Though the most part of the system is supposed to act in the
background, efforts have been made to make the foreground interaction with user
as smooth as possible. Also the integration of the system with Inventory
Management project has been kept in mind throughout the development phase.

58
10. Bibliography

1. Professional ASP.NET 4 in C# and VB


Bill Evjen, Scott Hanselman, Devin Rader
2. MySQL : Anderson D Peter.

59

You might also like