online voting system report

48
Online voting system Abstract Aim: The motto of the project is to build an enterprise site, which should be able to allow people to cast their vote online. SYSTEM ANALYSIS Existing System Remote voting is exercise into two different ways. 1.proxy voting The person who is unable to be physically present authorized other person on behalf of him. 2. close envelope ballet In this the person cast is voter, enclosed in an envelope and post to register post. The problem with this system is that not always the ballets are riched in time. The Copyright from integrated ideas consultancy services 2003- 2011 1

Upload: om-kumar

Post on 22-Oct-2014

1.024 views

Category:

Documents


11 download

TRANSCRIPT

Page 1: Online Voting System Report

Online voting system

Abstract

Aim:

The motto of the project is to build an enterprise site, which

should be able to allow people to cast their vote online.

SYSTEM ANALYSIS

Existing System

Remote voting is exercise into two different ways.

1.proxy voting

The person who is unable to be physically present authorized other

person on behalf of him.

2. close envelope ballet

In this the person cast is voter, enclosed in an envelope and post

to register post. The problem with this system is that not always the ballets

are riched in time. The proxy person may exercise other ballet then the one

synthezised the person.

Proposed System

In propose system remote and user’s can exercise .There voter within any

favour using this system any level of voting like ,lokha sab voting,rajya sab

voting etc. In the proposed system we can get the result without manually

Copyright from integrated ideas consultancy services 2003-2011

1

Page 2: Online Voting System Report

Online voting system

counting.The computerized counting is simple and we can access any

information of any party.

Advantage of the proposed system

1. Time saving

2. Working load reduced to a large extent

3. Less prone to errors

4. Information available at time

5. Man power reduced

6. Many tasks are automated

7. It also provide security for the data

Copyright from integrated ideas consultancy services 2003-2011

2

Page 3: Online Voting System Report

Online voting system

Modules description

1. Election commissioner: It check about the user details like id

proof and no proxy voting cannot be done. This is election

commissioner home page .

2.Generate voter id:It check details like

name,password,state,address,block,area about the voter.

3Prepare for Election:It check prepare for election like election no

and candidates no.

4.Insert party:We have to insert the party.

5.Automatic counting:It will count how many voting has be done by

public.

Copyright from integrated ideas consultancy services 2003-2011

3

Page 4: Online Voting System Report

Online voting system

SYSTEM DESIGN

BLOCK DIAGRAM

Voter

Result

Voting

Copyright from integrated ideas consultancy services 2003-2011

4

Voter Id

Name

Password

Address

City

Personal Information

Election Commissioner Voting Day Set

Election Commissioner Voting Day Set

Result Preparation

Voting List

Nation Wide

State Wise

Party Wise

Candidate View

Cast Vote

Voter List Validation

Page 5: Online Voting System Report

Online voting system

Data Flow Diagram.

Voter ID Result

Voting Date Voting

validation

Candidate

Voter ID Validation VVvvV

Voter Date Validate

All Voters

Candidate List

Copyright from integrated ideas consultancy services 2003-2011

5

Validate voting date

Validate user

Result

Voting

Page 6: Online Voting System Report

Online voting system

E-R Diagram

Entity Relationship Diagram

Participates

has

Copyright from integrated ideas consultancy services 2003-2011

6

Voter master Name

Block

State Addresss

Voting

Party

Candidate

DateVote no

Candidates

No

Name

Party

Voter no

Result

Vote no Winner

Total vote

Page 7: Online Voting System Report

Online voting system

DataBase Table

Voter registration

Copyright from integrated ideas consultancy services 2003-2011

7

Page 8: Online Voting System Report

Online voting system

Candidate Details

Copyright from integrated ideas consultancy services 2003-2011

8

Page 9: Online Voting System Report

Online voting system

Form Design

Copyright from integrated ideas consultancy services 2003-2011

9

Page 10: Online Voting System Report

Online voting system

This form is for election commissioner login

This is election commissioner Home page

Copyright from integrated ideas consultancy services 2003-2011

10

Page 11: Online Voting System Report

Online voting system

Generate voter ID

Generate voter ID record successfully inserted

Copyright from integrated ideas consultancy services 2003-2011

11

Page 12: Online Voting System Report

Online voting system

Election information inserted successfully

Copyright from integrated ideas consultancy services 2003-2011

12

Page 13: Online Voting System Report

Online voting system

Voter home module

Copyright from integrated ideas consultancy services 2003-2011

13

Page 14: Online Voting System Report

Online voting system

Election details

Copyright from integrated ideas consultancy services 2003-2011

14

Page 15: Online Voting System Report

Online voting system

This form is for preparing candidates

Copyright from integrated ideas consultancy services 2003-2011

15

Page 16: Online Voting System Report

Online voting system

This form is for insert party

Copyright from integrated ideas consultancy services 2003-2011

16

Page 17: Online Voting System Report

Online voting system

Counting form

Copyright from integrated ideas consultancy services 2003-2011

17

Page 18: Online Voting System Report

Online voting system

Source Code

Election Commissioner Home Page Coding

void Page_Load()

{

Label1.Text=Session["election"].ToString();

}

void LinkButton1_Click(object sender, EventArgs e)

{

Response.Redirect("ElecGenerateVoterId.aspx");

}

void LinkButton3_Click(object sender, EventArgs e)

{

Response.Redirect("ElecPrepareCandidates.aspx");

}

void LinkButton4_Click(object sender, EventArgs e)

{

Response.Redirect("InsertParty.aspx");

Copyright from integrated ideas consultancy services 2003-2011

18

Page 19: Online Voting System Report

Online voting system

}

void LinkButton5_Click(object sender, EventArgs e)

{

Response.Redirect("AutomaticCounting.aspx");

}

void LinkButton2_Click(object sender, EventArgs e)

{

Response.Redirect("ElecPrepareElection.aspx");

}

Copyright from integrated ideas consultancy services 2003-2011

19

Page 20: Online Voting System Report

Online voting system

Voter Registration Coding

Void page_load()

{

Response.Write("<h2>"+"Welcome to the Voter Registration page"+"</h2>");

}

catch(Exception ex)

{

Response.Write(ex.ToString());

}

}

#region this method inert the voter registration data into the database

public int InsertVoterRegistration(string voterid, string voter_password, string

voterretypepassword, string state, string area, string block)

{

string connectionString = "server=\'(local)\'; trusted_connection=true;

database=\'onlinevoting\'";

System.Data.IDbConnection dbConnection = new

System.Data.SqlClient.SqlConnection(connectionString);

string queryString = "INSERT INTO [voterregistration] ([voterid],

[voter_password], [voterretypepasswor" +

"d], [state], [area], [block]) VALUES (@voterid, @voter_password,

@voterretypepas" +

"sword, @state, @area, @block)";

Copyright from integrated ideas consultancy services 2003-2011

20

Page 21: Online Voting System Report

Online voting system

System.Data.IDbCommand dbCommand = new

System.Data.SqlClient.SqlCommand();

dbCommand.CommandText = queryString;

dbCommand.Connection = dbConnection;

System.Data.IDataParameter dbParam_voterid = new

System.Data.SqlClient.SqlParameter();

dbParam_voterid.ParameterName = "@voterid";

dbParam_voterid.Value = voterid;

dbParam_voterid.DbType = System.Data.DbType.String;

dbCommand.Parameters.Add(dbParam_voterid);

System.Data.IDataParameter dbParam_voter_password = new

System.Data.SqlClient.SqlParameter();

dbParam_voter_password.ParameterName = "@voter_password";

dbParam_voter_password.Value = voter_password;

dbParam_voter_password.DbType = System.Data.DbType.String;

dbCommand.Parameters.Add(dbParam_voter_password);

System.Data.IDataParameter dbParam_voterretypepassword = new

System.Data.SqlClient.SqlParameter();

dbParam_voterretypepassword.ParameterName = "@voterretypepassword";

dbParam_voterretypepassword.Value = voterretypepassword;

dbParam_voterretypepassword.DbType = System.Data.DbType.String;

dbCommand.Parameters.Add(dbParam_voterretypepassword);

System.Data.IDataParameter dbParam_state = new

System.Data.SqlClient.SqlParameter();

dbParam_state.ParameterName = "@state";

dbParam_state.Value = state;

Copyright from integrated ideas consultancy services 2003-2011

21

Page 22: Online Voting System Report

Online voting system

dbParam_state.DbType = System.Data.DbType.String;

dbCommand.Parameters.Add(dbParam_state);

System.Data.IDataParameter dbParam_area = new

System.Data.SqlClient.SqlParameter();

dbParam_area.ParameterName = "@area";

dbParam_area.Value = area;

dbParam_area.DbType = System.Data.DbType.String;

dbCommand.Parameters.Add(dbParam_area);

System.Data.IDataParameter dbParam_block = new

System.Data.SqlClient.SqlParameter();

dbParam_block.ParameterName = "@block";

dbParam_block.Value = block;

dbParam_block.DbType = System.Data.DbType.String;

dbCommand.Parameters.Add(dbParam_block);

int rowsAffected = 0;

dbConnection.Open();

try {

rowsAffected = dbCommand.ExecuteNonQuery();

}

finally {

dbConnection.Close();

}

return rowsAffected;

}

#endregion

Copyright from integrated ideas consultancy services 2003-2011

22

Page 23: Online Voting System Report

Online voting system

Election preparetion Details Coding

void Button1_Click(object sender, EventArgs e)

{

int i=InsertElection(NewElectionNumber(),

DateTime.Parse(txtDate.Text), txtElecType.Text,txtState.Text);

if(i>0)

{

Response.Write("Election information inserted successfully");

}

}

int NewElectionNumber() {

string connectionString = "server=\'(local)\';

trusted_connection=true; database=\'onlinevoting\'";

System.Data.IDbConnection dbConnection = new

System.Data.SqlClient.SqlConnection(connectionString);

string queryString = "SELECT max([election_date].

[election_no]) FROM [election_date]";

System.Data.IDbCommand dbCommand = new

System.Data.SqlClient.SqlCommand();

dbCommand.CommandText = queryString;

dbCommand.Connection = dbConnection;

Copyright from integrated ideas consultancy services 2003-2011

23

Page 24: Online Voting System Report

Online voting system

dbConnection.Open();

System.Data.IDataReader dataReader =

dbCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection);

int i=0;

while(dataReader.Read())

{

try

{

i=int.Parse(dataReader[0].ToString());

}catch(Exception ex)

{

}

}

i++;

return i;

}

int InsertElection(int election_no, System.DateTime date, string

election_type, string state) {

string connectionString = "server=\'(local)\';

trusted_connection=true; database=\'onlinevoting\'";

System.Data.IDbConnection dbConnection = new

System.Data.SqlClient.SqlConnection(connectionString);

Copyright from integrated ideas consultancy services 2003-2011

24

Page 25: Online Voting System Report

Online voting system

string queryString = "INSERT INTO [election_date]

([election_no], [date], [election_type], [state]) VAL" +

"UES (@election_no, @date, @election_type, @state)";

System.Data.IDbCommand dbCommand = new

System.Data.SqlClient.SqlCommand();

dbCommand.CommandText = queryString;

dbCommand.Connection = dbConnection;

System.Data.IDataParameter dbParam_election_no = new

System.Data.SqlClient.SqlParameter();

dbParam_election_no.ParameterName = "@election_no";

dbParam_election_no.Value = election_no;

dbParam_election_no.DbType = System.Data.DbType.Int32;

dbCommand.Parameters.Add(dbParam_election_no);

System.Data.IDataParameter dbParam_date = new

System.Data.SqlClient.SqlParameter();

dbParam_date.ParameterName = "@date";

dbParam_date.Value = date;

dbParam_date.DbType = System.Data.DbType.DateTime;

dbCommand.Parameters.Add(dbParam_date);

System.Data.IDataParameter dbParam_election_type = new

System.Data.SqlClient.SqlParameter();

dbParam_election_type.ParameterName = "@election_type";

dbParam_election_type.Value = election_type;

dbParam_election_type.DbType = System.Data.DbType.String;

dbCommand.Parameters.Add(dbParam_election_type);

Copyright from integrated ideas consultancy services 2003-2011

25

Page 26: Online Voting System Report

Online voting system

System.Data.IDataParameter dbParam_state = new

System.Data.SqlClient.SqlParameter();

dbParam_state.ParameterName = "@state";

dbParam_state.Value = state;

dbParam_state.DbType = System.Data.DbType.String;

dbCommand.Parameters.Add(dbParam_state);

int rowsAffected = 0;

dbConnection.Open();

try {

rowsAffected = dbCommand.ExecuteNonQuery();

}

finally {

dbConnection.Close();

}

return rowsAffected;

}

void Button2_Click(object sender, EventArgs e)

{

DataGrid1.DataSource=ElectionDetails();

DataGrid1.DataBind();

}

System.Data.DataSet ElectionDetails() {

Copyright from integrated ideas consultancy services 2003-2011

26

Page 27: Online Voting System Report

Online voting system

string connectionString = "server=\'(local)\';

trusted_connection=true; database=\'onlinevoting\'";

System.Data.IDbConnection dbConnection = new

System.Data.SqlClient.SqlConnection(connectionString);

string queryString = "SELECT [election_date].* FROM

[election_date] order by date desc";

System.Data.IDbCommand dbCommand = new

System.Data.SqlClient.SqlCommand();

dbCommand.CommandText = queryString;

dbCommand.Connection = dbConnection;

System.Data.IDbDataAdapter dataAdapter = new

System.Data.SqlClient.SqlDataAdapter();

dataAdapter.SelectCommand = dbCommand;

System.Data.DataSet dataSet = new System.Data.DataSet();

dataAdapter.Fill(dataSet);

return dataSet;

}

</script>

<html>

<head>

</head>

<body>

<form runat="server">

Copyright from integrated ideas consultancy services 2003-2011

27

Page 28: Online Voting System Report

Online voting system

<uc1:Header id="Header1" runat="server"></uc1:Header>

<table style="WIDTH: 550px; HEIGHT: 152px"

bgcolor="cornflowerblue" border="3">

<tbody>

<tr>

<td>

<p>

<asp:Label id="Label2" runat="server"

text="Name of the

Election"></asp:Label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n

bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n

bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;<asp:TextBox id="txtElecType"

runat="server"></asp:TextBox>

</p>

<p>

Date of the

Election&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs

p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs

p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:TextBox id="txtDate" runat="server"

TextMode="SingleLine"></asp:TextBox>

yy/mm/dd

</p>

<p>

<asp:Label id="Label3" runat="server"

text="State"></asp:Label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp

Copyright from integrated ideas consultancy services 2003-2011

28

Page 29: Online Voting System Report

Online voting system

;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp

;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp

;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp

;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;

<asp:TextBox id="txtState"

runat="server"></asp:TextBox>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;

</p>

<p>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

</p>

<p>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

</p>

</td>

</tr>

</tbody>

Copyright from integrated ideas consultancy services 2003-2011

29

Page 30: Online Voting System Report

Online voting system

</table>

<table style="WIDTH: 551px; HEIGHT: 43px"

bgcolor="cornflowerblue" border="3">

<tbody>

<tr>

<td>

<asp:Label id="Label1" runat="server"

text="Enter the Election Details" font-bold="True" height="29px"

width="537px" backcolor="#C0C0FF"></asp:Label></td>

</tr>

</tbody>

</table>

<table style="WIDTH: 549px; HEIGHT: 38px"

bgcolor="cornflowerblue" border="3">

<tbody>

<tr>

<td>

<p>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:Button id="Button1"

onclick="Button1_Click" runat="server" Text="Submit"></asp:Button>

Copyright from integrated ideas consultancy services 2003-2011

30

Page 31: Online Voting System Report

Online voting system

&nbsp;&nbsp;<asp:Button id="Button2"

onclick="Button2_Click" runat="server" Text="View Election

Details"></asp:Button>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;

</p>

<p>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

</p>

</td>

</tr>

</tbody>

</table>

<!-- Insert content here -->

</form>

<asp:DataGrid id="DataGrid1" runat="server"></asp:DataGrid>

</body>

</html>

Copyright from integrated ideas consultancy services 2003-2011

31

Page 32: Online Voting System Report

Online voting system

SQL Server queriescreate database onlinevotinguse onlinevotingcreate table voterregistration(voterid varchar(50),voter_password varchar(50),voterretypepassword varchar(100),state varchar(100),area varchar(50),block varchar(100))select * from voterregistrationdelete from voterregistrationcreate table electioncomLogin(ele_name varchar(100),ele_password varchar(100))insert into electioncomLogin values('online','voting')

create table generatevoterid(voter_id int,voter_name varchar(100),photo_string varchar(100),address varchar(200),dateofbirth DateTime,fathersname varchar(100))drop table generatevoteridselect * from generatevoteriddelete from generatevoterid

create table election_date(election_no int,date datetime,election_type varchar(100),state varchar(100))create table party(name varchar(100),symbol varchar(200))insert into party values('BJP','BJP.jpg')insert into party values('congress','Congress.jpg')delete from partyselect * from partyselect * from election_datedelete from election_date

create table candidate(election_no int,candidate_no int,name varchar(100),party varchar(100),state varchar(100),block varchar(100))select * from candidatedelete from candidate

create table castvote(voter_id int,election_no int)create table vote(election_no int,candidate_no int,total_vote int)insert into vote values(1,2,0)select * from voteselect * from votedelete from vote

select vote.election_no,vote.candidate_no,candidate.name,vote.total_vote,party.name as party,candidate.state,candidate.block from vote,party,candidate where (total_vote =(select max(total_vote) from vote where election_no=1)) and (party.name=candidate.party) and

Copyright from integrated ideas consultancy services 2003-2011

32

Page 33: Online Voting System Report

Online voting system

(candidate.candidate_no=vote.candidate_no) and (candidate.block in (select distinct(block)from candidate))

SYSTEM ENVIRONMENT

Software Requirements

Operating System : Windows XP Professional. Technology : ASP.Net. Server Side Coding Tool : C#.Net Frame Work : .Net Frame Work

Back-end : Microsoft SQL Server 2000

Browser : Internet Explorer 6.

Hardware Requirement

I. Pentium or AMD processors with speed minimum 1GHz.

II. Minimum 256MB RAM.

III. Accelerated Graphics Card.

IV. Minimum 2GB Hard Disk.

V. Better performance with 82KB and above Cache Memory.

Copyright from integrated ideas consultancy services 2003-2011

33

Page 34: Online Voting System Report

Online voting system

FUTURE ENHANCEMENT

The future scope for this software is very dynamic. Next stage may be

implementated depening on the time factor.

The main advantages of this projects are:

1.It provides easy information about easy information about procedure of

online voting system.

2.It provides well structured information.

1. It makes free from manual work.

2. Any information needed can be obtained by any time by

quering it.

Copyright from integrated ideas consultancy services 2003-2011

34

Page 35: Online Voting System Report

Online voting system

CONCLUSION

Generally voting has to be perform by user by going to the voting

center. Many users like army personal or NRI cannot come to the

voting place.Therefore we have to implement a online voting system

by which the users can vote over the online.It will be greatest of

advantage for NRI and personWhich are go outside of the country

the can vote on online by the by our software only.

Copyright from integrated ideas consultancy services 2003-2011

35

Page 36: Online Voting System Report

Online voting system

BIBLIOGRAPHY

C# and .Net platform by Andrew Troelsen.

Inside C# by Tom Archer.

Fundamentals of database Systems by Ramez Elmasri

ans S. B. Navathe

Software Engineering-Roger S. Pressman

An Introduction to database system –C.J.Date

The Unified modeling language user guide-

G.Booch,J.Rambough and I Jacobson.

Copyright from integrated ideas consultancy services 2003-2011

36

Page 37: Online Voting System Report

Online voting system

Copyright from integrated ideas consultancy services 2003-2011

37