Anda di halaman 1dari 40

Online Voting Portal

A PROJECT REPORT

Submitted in partial fulfillment of the requirement of


BACHELOR OF TECHNOLOGY
IN
INFORMATION TECHNOLOGY
Submitted By
Pratiyush Ranjan
Saurabh Kumar
Sourav Poddar
Under the supervision of
Mr. Deepak Kant Netam
(Assistant Professor)

TO
DEPARTMENT OF INFORMATION TECHNOLOGY
INSTITUTE OF TECHNOLOGY,
GURU GHASIDAS VISHWAVIDYALAYA BILASPUR, INDIA
(CENTRAL UNIVERSITY)
SESSION: 2010- 2014

DECLARATION

We, hereby declare that the work presented in this dissertation


entitled Online Voting Portal has been done by us, and this
dissertation embodies our own work.

Name of team members


Mr. Pratiyush Ranjan (161021)
Mr. Saurabh Kumar (161011)
Mr. Sourav Poddar (161018)

DEPARTMENT OF INFORMATION TECHNOLOGY


INSTITUTE OF TECHNOLOGY,
GURU GHASIDAS VISHWAVIDYALAYA, BILASPUR
(CENTRAL UNIVERSITY)

CERTIFICATE
This is to certify that the project entitled Online Voting Portal
submitted by Pratiyush Ranjan (Roll No.:161021), Saurabh Kumar
(Roll No.:161011), Sourav Poddar (Roll No.:161018) under my
supervision at department of Information Technology, Institute of
Technology, Guru Ghasidas Vishwavidyalaya, Bilaspur.
To the best of my knowledge and belief the report
Embodies the work of the candidates themselves,
Has duly been completed,
Fulfills the requirement of the B.Tech degree of the University

___________________
(Signature of the Supervisor)
Name:
Designation:

CERTIFICATE BY THE EXAMINERS

The Project Report entitled Online Voting System Submitted by


Pratiyush Ranjan (Roll No.:161021), Saurabh Kumar (Roll
No.:161011), Sourav Poddar (Roll No.:161018) has been examined
by the undersigned as a part of the examination and fulfills the
requirement of Bachelor of Technology in Information Technology
of Guru Ghasidas Vishwavidyalaya, BILASPUR.

______________

_____________

(Signature)
(Signature)

Examiner 1

Examiner 2

Name
Designation
Date:

Name
Designation
Date:

ACKNOWLEDGEMENT
This acknowledgement transcends the reality of formality when we would
like to express deep gratitude and respect to all those people behind the
screen who guided, inspired and helped us for the completion of our project
work.
We are grateful to our project guide Mr. Deepak Kant Netam for all the
help and guidance given for this project and for his dynamic leadership and
implementing the experience in this project.
We are highly obliged to Dr. Amit Khaskalam, (Head Of Department,
Information Technology, Institute of Technology, GGV, Bilaspur) for his
valuable suggestions and incredible support in providing all the facilities.
We also like to thank Mr. Santosh Soni, Mr. Agnivesh Pandey, Mr.
Pankaj Chandra, Mr. Abhishek Jain, Mr. Suhel Ahmed, Mr. Anand
Prakash Rawal and Ms. Akanksha Gupta who have continuously helped
and gave valuable suggestions to guide us in the successful completion of
the project work.
We are highly obliged to Prof. Shailendra Kumar, (Director, Institute of
Technology, GGV, Bilaspur) for his incredible support in providing all the
facilities.
We are very thankful to our friends for encourage and support during this
preparation of this project and whole course.
Our sincere thanks to our parents who were always there when we needed
them to give their moral support and help by all the ways which were
possible by them. As a result, this came into existence with their help.

PREFACE
Our project is user friendly Online Voting System which will encourage
more voters to shift to the online voting methodology. Increasing the voting
percentage across the country is the major goal of this project. People have
to visit the booth to cast their vote in the present system across the country.
Online Voting Portal is online and hence even people who live out of their
home town can also vote. This project report deals with the creation and
management of polling and election details. This is a system which enables
all citizens to cast their vote online. Database of all the eligible citizens and
candidates are maintained by the system. In order to prevent voter frauds we
have used some security levels which include a separate user and password
for every user.
This project report includes all the scopes which were taken into
consideration for the completion of Online voting system. The E-R Diagram,
Use Case Diagram, Sequence Diagrams and Data Flow Diagrams are used to
explain the internal working structure of the project. The various Snapshots
which are displayed in this report give the overall user viewpoint of the
website. This report includes the System Analysis which includes the
advantages of implementing Online Voting System on a wider platform. The
Future Enhancement of the online voting system gives an idea of all the
future scopes where we can successfully implement the online voting
system. This project Report also includes the source codes which were used
to frame the project into practicality.

Table of Contents
Chapter
1.

Title

Page No.

Introduction
Analysis

2.

2.1 System Analysis


2.2 System Specification

3.

Previous Work
Design Approach
4.1 Introduction To Design

4.

4.2 Use Case Diagram


4.3 Sequence Diagram
4.4 Data Flow Diagram
4.5 E-R Diagram

5.

Testing

6.

Snapshots

7.

Source code

8.

Conclusion

9.

Future Enhancement
References

Chapter 1
INTRODUCTION
The aim of the project is to create and manage polling and election details.
This is a system which enables all citizens to cast their vote online. In order
to prevent voter frauds we have used some security levels. Increasing the
voting percentage across the country is the major goal of this project. People
have to visit the booth to cast their vote in the present system across the
country. This system is online and hence even people who live out of their
home town can also vote. Database of all the eligible citizens and candidates
are maintained by the system.
Online voting system gathers its own significance since the NRI voting
Rights bill have been passed by the parliament on Feb 11 ,2011. . The new
law will allow an Indian citizen residing abroad to enroll in voters list and
exercise his franchise even if he or she remained away from place of
residence in India for more than six months owing to employment, education
or otherwise. In the present case the person should be present within the
constituency on the day of polling for exercising his right to vote.
Thus our project, online voting should enhance the opportunities of voters
outside the country to vote for their nation on implementation

Chapter 2
ANALYSIS
2.1 System Analysis

1. Existing System
Existing system is a manual one in which users and the details of the
candidates are stored in books .The users have to wait a long time in queues
for voting .Wrong and unwanted votes are given .counting of votes are done
manually which takes lots of time and inaccurate counting is done. It is very
difficult to maintain historical data.

DISADVANTAGES:
The following are the disadvantages of the existing system

It is difficult to maintain important information in books.

More manual hours are needed for counting of votes.

It is tedious to manage historical data which needs much space to keep


all the information regarding the voters and the candidates.

Voters have to wait in a long queue for voting they have to travel long
distances.
8

2. Proposed System
The VOTING SOFTWARE is a software application which avoids more
manual hours that need to spend in record keeping and calculating votes.
Through this the users and the candidates are registered online. Their
information is stored in the database the admin can easily access the details
of the voters and the candidates The voters are allowed to vote online they
can even vote by sitting at home .Every User s allowed to vote only once so
there is no chance of duplicated votes. This application keeps the data in a
centralized way which is available to all the users simultaneously. It is very
easy to manage historical data in database. They can easily use the tool that
decreases manual hours spending for normal things and hence increases the
performance.

3. Objective of the System


The objective of the VOTING SOFTWARE is to provide better information
for the users of this system easily they can vote from anywhere without
facing any difficulty.

2.2 System Specifications

Hardware Requirements:

Pentium-IV(Processor).

Microsoft Compatible 101 or more Key Board

Software Requirements:

Operating System :

Programming language: .NET

Web-Technology:

ASP.NET 2.0

Front-End:

C#.NET

Back-End:

Sql Server 2010

Windows 7

10

Chapter 3
PREVIOUS WORKS

E-voting through internet was first used for political elections in the
2000 in US.

Countries like Estonia and U.A.E have use internet voting nationwide.

NASA has also developed software for voting for the astronauts
aboard the International Space Station (ISS).

Beside, Dominion Voting is a renowned service provider of elections.

11

Chapter 4
DESIGN APPROACH

4.1 INTRODUCTION TO DESIGN:


Design is the first step in the development phase for any techniques and
principles for the purpose of defining a device, a process or system in
sufficient detail to permit its physical realization.
Once the software requirements have been analyzed and specified the
software design involves three technical activities - design, coding,
implementation and testing that are required to build and verify the software.
The design activities are of main importance in this phase, because in this
activity, decisions ultimately affecting the success of the software
implementation and its ease of maintenance are made. These decisions have
the final bearing upon reliability and maintainability of the system. Design is
the only way to accurately translate the customers requirements into
finished software or a system.Design is the place where quality is fostered in
development. Software design is a process through which requirements are
12

translated into a representation of software. Software design is conducted in


two steps. Preliminary design is concerned with the transformation of
requirements into data.

4.2 USECASE DIAGRAMS:


Actor:
A coherent set of roles that users of use cases play when interacting with the
use `cases.

Use case:
A description of sequence of actions, including variants, that a system
performs that yields an observable result of value of an actor.

A Use case is a description of set of sequence of actions Graphically it


is rendered as an ellipse with solid line including only its name. Use case
diagram is a behavioral diagram that shows a set of use cases and actors
and their relationship. It is an association between the use cases and
actors. An actor represents a real-world object.
13

Details of Candidates

Details of Voters
Candidate

Details of votes

Calculation of Votes

Administrator

Declaring the results

Vote

Voter

View Results

14

4.3 SEQUENCE DIAGRAM:


A sequence diagram is an introduction that empathizes the time ordering of
messages. Graphically a sequence diagram is a table that shows objects
arranged along the X-axis and messages ordered in increasing time along the
Y-axis

Database

Candidate

Voting System

Administrator

Voter
Registration

Generates unique Id
Registration

Generates unique Id
Stores the details of the voter and candidate
Vote
Vote
Vote
Calculate The Votes
Gives the results
Stores the results
Get the Results
Get the results

15

4.4 DATA FLOW DIAGRAMS:


The DFD takes an input-process-output view of a system i.e. data objects
flow into the software, are transformed by processing elements, and resultant
data objects flow out of the software.
Data objects represented by labeled arrows and transformation are
represented by circles also called as bubbles. DFD is presented in a
hierarchical fashion i.e. the first data flow model represents the system as a
whole. Subsequent DFD refine the context diagram (level 0 DFD), providing
increasing details with each subsequent level.

Registration

Unique Id Generated

Not Valid User

Allowed ToLogin

Allowed To Vote

16

4.5
E-R Diagrams:

17

Chapter 5
TESTING

Testing is a process of executing a program with the intent of finding an


error. Testing is a crucial element of software quality assurance and presents
ultimate review of specification, design and coding.
System Testing is an important phase. Testing represents an interesting
anomaly for the software. Thus a series of testing are performed for the
proposed system before the system is ready for user acceptance testing.
A good test case is one that has a high probability of finding an as
undiscovered error. A successful test is one that uncovers an as undiscovered
error.
Testing Objectives:
1.

Testing is a process of executing a program with the intent of


finding an error

2.

A good test case is one that has a probability of finding an as yet


undiscovered error

3.

A successful test is one that uncovers an undiscovered error


18

Testing Principles:

All tests should be traceable to end user requirements

Tests should be planned long before testing begins

Testing should begin on a small scale and progress towards


testing in large

Exhaustive testing is not possible

To be most effective testing should be conducted by a


independent third party

The primary objective for test case design is to derive a set of tests that has
the highest livelihood for uncovering defects in software. To accomplish this
objective two different categories of test case design techniques are used.
They are
White box testing.
Black box testing.
White-box testing:
White box testing focus on the program control structure. Test cases are
derived to ensure that all statements in the program have been executed at
least once during testing and that all logical conditions have been executed.
Block-box testing:
Black box testing is designed to validate functional requirements without
regard to the internal workings of a program. Black box testing mainly
19

focuses on the information domain of the software, deriving test cases by


partitioning input and output in a manner that provides through test
coverage. Incorrect and missing functions, interface errors, errors in data
structures, error in functional logic are the errors falling in this category.
Testing strategies:
A strategy for software testing must accommodate low-level tests that are
necessary to verify that all small source code segment has been correctly
implemented as well as high-level tests that validate major system functions
against customer requirements.
Testing fundamentals:
Testing is a process of executing program with the intent of finding error. A
good test case is one that has high probability of finding an undiscovered
error. If testing is conducted successfully it uncovers the errors in the
software. Testing cannot show the absence of defects, it can only show that
software defects present.
Testing Information flow:
Information flow for testing flows the pattern. Two class of input provided to
test the process. The software configuration includes a software
requirements specification, a design specification and source code.
Test configuration includes test plan and test cases and test tools. Tests are
conducted and all the results are evaluated. That is test results are compared
with expected results. When erroneous data are uncovered, an error is
implied and debugging commences.

20

Unit testing:
Unit testing is essential for the verification of the code produced during the
coding phase and hence the goal is to test the internal logic of the modules.
Using the detailed design description as a guide, important paths are tested
to uncover errors with in the boundary of the modules. These tests were
carried out during the programming stage itself. All units of Vienna SQL
were successfully tested.
Integration testing:
Integration testing focuses on unit tested modules and build the program
structure that is dictated by the design phase.
System testing:
System testing tests the integration of each module in the system. It also
tests to find discrepancies between the system and its original objective,
current specification and system documentation. The primary concern is the
compatibility of individual modules. Entire system is working properly or
not will be tested here, and specified path ODBC connection will correct or
not, and giving output or not are tested here these verifications and
validations are done by giving input values to the system and by comparing
with expected output. Top-down testing implementing here.
21

Acceptance Testing:
This testing is done to verify the readiness of the system for the
implementation. Acceptance testing begins when the system is complete. Its
purpose is to provide the end user with the confidence that the system is
ready for use. It involves planning and execution of functional tests,
performance tests and stress tests in order to demonstrate that the
implemented system satisfies its requirements.
Tools to special importance during acceptance testing include:
Test coverage Analyzer records the control paths followed for each test
case.
Timing Analyzer also called a profiler, reports the time spent in various
regions of the code are areas to concentrate on to improve system
performance.
Coding standards static analyzers and standard checkers are used to inspect
code for deviations from standards and guidelines.
Test Cases:
Test cases are derived to ensure that all statements in the program have been
executed at least once during testing and that all logical conditions have
been executed.
Using White-Box testing methods, the software engineer can drive test cases
that

Guarantee that logical decisions on their true and false sides.

22

Exercise all logical decisions on their true and false sides.

Execute all loops at their boundaries and within their operational


bounds.

Exercise internal data structure to assure their validity.


The test case specification for system testing has to be submitted for review
before system testing commences.

Chapter 6
SNAPSHOTS
Home Screen:

Login choice:

23

Voter Login:

Voter Registration:

24

Voter Home:

Voter Polling:
25

Result Viewing:

Candidate Login:

26

Admin Home:

Forgot Password:

27

Chapter 7.
SOURCE CODE
Home Page coding:
using
using
using
using
using
using
using
using
using
using

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

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


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

28

Voter Login:
using
using
using
using
using
using
using
using
using
using
using

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

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


{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["votingswConnectionString"].ToSt
ring());
protected void Page_Load(object sender, EventArgs e)
{
con.Open();
}
protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
{
int k = 0;
string s = "select userid,pwd from vote";
SqlCommand cmd1= new SqlCommand(s, con);
SqlDataReader dr = cmd1.ExecuteReader();

while (dr.Read())
{
if (TextBox1.Text == dr.GetValue(0).ToString() & TextBox2.Text ==
dr.GetValue(1).ToString())
{
Response.Redirect("InvalidVote.aspx");
}
else
{
k = 1;
}
}
dr.Close();
if (k == 1)
{
string str = "insert into vote values('" + TextBox1.Text + "','" + TextBox2.Text +
"')";

SqlCommand cmd = new SqlCommand(str, con);


cmd.ExecuteNonQuery();

29

}
}

Response.Redirect("Voterpolling.aspx");

Voter Registration:
using
using
using
using
using
using
using
using
using
using
using

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

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


{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["votingswConnectionString"].ToSt
ring());
protected void Page_Load(object sender, EventArgs e)
{
con.Open();
}
protected void Button1_Click(object sender, EventArgs e)
{
Session["uid"] = TextBox1.Text;
string str;
str = "insert into
voterreg(fname,lname,dob,POB,FathersName,TelephoneNum,Email,Address,ward,Area,Dis
trict,Pwd,ConfirmPwd,UserType,Question,Answer) values ('" + TextBox1.Text + "','" +
TextBox2.Text + "','" + TextBox4.Text + "','" + TextBox5.Text + "','" + TextBox6.Text + "',"
+ TextBox7.Text + ",'" + TextBox8.Text + "','" + TextBox9.Text + "','" + TextBox10.Text +
"','" + TextBox11.Text + "','" + DropDownList1.SelectedItem.Text + "','" + TextBox12.Text
+ "','" + TextBox13.Text + "','" + DropDownList3.SelectedItem.Text + "','" +
DropDownList2.SelectedItem.Text+ "','" + TextBox15.Text + "')";
SqlCommand cmd = new SqlCommand(str,con);
cmd.ExecuteNonQuery();
Response.Redirect("RegAckVoter.aspx");
}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = "";
TextBox2.Text = "";
TextBox4.Text = "";
TextBox5.Text = "";
TextBox6.Text = "";
TextBox7.Text = "";
TextBox8.Text = "";
TextBox9.Text = "";
TextBox10.Text = "";
TextBox11.Text = "";

30

DropDownList1.SelectedItem.Text = DropDownList1.Items[0].Text;
TextBox12.Text = "";
TextBox13.Text = "";
DropDownList2.SelectedItem.Text = DropDownList2.Items[0].Text;
DropDownList3.SelectedItem.Text = DropDownList3.Items[0].Text;
TextBox15.Text = "";
}

Voter Polling:
using
using
using
using
using
using
using
using
using
using
using

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

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


{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["votingswConnectionString"].ToSt
ring());
int i = 0;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
con.Open();
string qry = "select * from place";
SqlCommand cmd = new SqlCommand(qry, con);
//SqlDataReader dr=cmd.ExecuteReader();
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(ds);
DropDownList1.DataSource = ds;
DropDownList1.DataTextField = "area";

31

DropDownList1.DataBind();
string qry1 = "select Distinct(fname) from candidatereg";
SqlCommand cmd1 = new SqlCommand(qry1, con);
//SqlDataReader dr=cmd.ExecuteReader();
DataSet ds1 = new DataSet();
SqlDataAdapter da1 = new SqlDataAdapter(cmd1);
da1.Fill(ds1);
DropDownList2.DataSource = ds1;
DropDownList2.DataTextField = "fname";
DropDownList2.DataBind();
con.Close();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
int k=0;
con.Open();
int count = total_votes();
//Application["count"] = count;

string s3 = "select location,candidatename,partyname from polling";


SqlCommand cmd3 = new SqlCommand(s3, con);
SqlDataReader dr1 = cmd3.ExecuteReader();
//while (dr1.Read() == true)
while(dr1.Read())
{
if (DropDownList1.SelectedItem.Text == dr1.GetValue(0).ToString() &
DropDownList2.SelectedItem.Text == dr1.GetValue(1).ToString() & Label4.Text ==
dr1.GetValue(2).ToString())
{
k = 1;
}
}
dr1.Close();
if (k == 1)
{
string s4 = "update polling set totalvotes='" + count + "' where location='" +
DropDownList1.SelectedItem.Text + "' and candidatename='" +
DropDownList2.SelectedItem.Text + "' ";
SqlCommand cmd4 = new SqlCommand(s4, con);
cmd4.ExecuteNonQuery();
}
else
{
string s1 = "insert into polling values('" + DropDownList1.SelectedItem.Text +
"','" + DropDownList2.SelectedItem.Text + "','" + Label4.Text + "','" + count + "')";
SqlCommand cmd = new SqlCommand(s1, con);

32

//SqlDataReader dr2 = cmd.ExecuteReader();


cmd.ExecuteNonQuery();

con.Close();

}
////string s2 = "update polling set totalvotes=1+count where location=";
////Response.Redirect("RegAck.aspx");

protected void Button2_Click(object sender, EventArgs e)


{
DropDownList1.SelectedItem.Text = DropDownList1.Items[0].Text;
DropDownList2.SelectedItem.Text = DropDownList2.Items[0].Text;
}
protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
{
con.Open();
string n = DropDownList2.Text;
string loc = DropDownList1.SelectedItem.Text;
string s = "select party from candidatereg where fname='" + n + "'and district='" +
loc+ "' ";
SqlCommand cmd1=new SqlCommand();
cmd1.Connection = con;
cmd1.CommandText = s;
SqlDataReader dr6=cmd1.ExecuteReader();
if (dr6.Read())
{
Label4.Visible = true;
Label4.Text = dr6[0].ToString();
}
dr6.Close();

}
public int total_votes()
{
int j=0;
SqlCommand cmd8 = new SqlCommand("select totalvotes from polling where
candidatename='"+DropDownList2.SelectedItem.Text+"'", con);
object d= cmd8.ExecuteScalar();
if (d != null)
{
i = int.Parse(d.ToString());
j = i + 1;
return j;
}
else
{
i = 0;
j = i + 1;

33

return j;
}}}

Voter Results Display:


using
using
using
using
using
using
using
using
using
using
using

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

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


{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["votingswConnectionString"].ToSt
ring());
protected void Page_Load(object sender, EventArgs e)
{
con.Open();
SqlDataAdapter da = new SqlDataAdapter("select * from polling", con);
DataSet ds = new DataSet();
da.Fill(ds, "polling");
GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();
}
}

Admin Home:
using
using
using
using
using
using
using
using
using
using

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

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


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

Admin Results:
34

using
using
using
using
using
using
using
using
using
using
using

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

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


{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["votingswConnectionString"].ToSt
ring());
protected void Page_Load(object sender, EventArgs e)
{
con.Open();
SqlDataAdapter da = new SqlDataAdapter("select * from polling", con);
DataSet ds = new DataSet();
da.Fill(ds, "polling");
GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();
}
}

Forgot Password:
using
using
using
using
using
using
using
using
using
using
using

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

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


{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["votingswConnectionString"].ToSt
ring());
protected void Page_Load(object sender, EventArgs e)
{
con.Open();
}
protected void Button1_Click(object sender, EventArgs e)
{
string s1 = "select pwd from candidatereg where Question='" +
DropDownList1.SelectedItem.Text + "' and Answer='" + TextBox2.Text + "' and userid='"
+ TextBox1.Text + "'";
SqlCommand cmd = new SqlCommand(s1, con);
SqlDataReader dr;

35

dr = cmd.ExecuteReader();
if (dr.Read())
{
Label5.Text = dr[0].ToString();
}
else
{
Label5.Text = "try again";
}

}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = "";
}

TextBox2.Text = "";

Chapter 8
CONCLUSION
The package was designed in such a way that future modifications can be
done easily. The following conclusions can be deduced from the
development of the project.

Automation of the entire system improves the efficiency

It provides a friendly graphical user interface which proves to


be better when compared to the existing system.

It gives appropriate access to the authorized users depending on


their permissions.

It effectively overcomes the delay in communications.

Updating of information becomes so easier.


36

System security, data security and reliability are the striking

features.

The System has adequate scope for modification in future if it is


necessary.

Chapter 9
FUTURE ENHANCEMENTS:
It is an easy way and an effective way for voting which allows the reduction
of travelling ,waiting in a long queues avoid unwanted votes and duplicated
votes, And we can get the accurate number of votes.
Well I and my team member have worked hard in order to present an
improved website better than the existing ones regarding the information
about the various activities. Still we found out that the project can be done in
a better way. Primarily, when we register we get an unique id by using that
unique id we allowed to login and allowed to vote .Each and every user are
37

allowed to vote only once nobody is allowed to vote more than once and
only the registered persons only can vote .The candidate also gets registered
by getting a unique id and he can compete from anywhere and can see the
results.
The next enhancement that we can add different kinds of buttons for easy
access and easy availability to each and every one in remote areas .These are
the enhancements that we could think of at present.

References
The following books were referred during the analysis and execution phase
of the project
MICROSOFT .NET WITH C#
Microsoft .net series
ASP .NET 2.0 PROFESSIONAL
Wrox Publishers
ASP .NET WITH C#
Apress Publications
C# COOK BOOK
38

reilly Publications
PROGRAMMING MICROSOFT ASP .NET 2.0 APPLICATION
Wrox Professional Guide
BEGINNING ASP .NET 2.0 E-COMMERCE IN C#
Novice to Professional.

WEBSITES:
WWW.GOOGLE.COM
WWW.ELECTIONCOMMISSION.NIC

39

Anda mungkin juga menyukai