Está en la página 1de 64

1.

ABSTRACT

Election system have functionality to perform task such as candidate application, voter application procedure, voting online, means all the task will be conducted online. Election system will provide the solution for different user like voter, candidate, and election commission. Election System is mainly divided in different modules which are voter, Administrator, candidate & Reports (Result). ELECTION SYSTEM will also have special features of analyzing candidates on basis of the detailed record of the candidate which includes features such as criminal records, attendance in the assembly, social works performed and many more details.

2. INTRODUCTION

Need of Election System:India is a constitutional democracy with a parliamentary system of government, and at the heart of the system is a commitment to hold regular, free and fair elections. These elections determine the composition of the government, the membership of the two houses of parliament, the state and union territory legislative assemblies, and the Presidency and vice-presidency. Elections in India are events involving political mobilization and organizational complexity on an amazing scale. In the 1996 election to Lok Sabha there were 1,269 candidates from 38 officially recognized national and state parties seeking election, 1,048 candidates from registered parties, not recognized and 10,635 independent candidates. A total number of 59, 25, 72,288 people voted. The Election Commission employed almost 40, 00,000 people to run the election. A vast number if civilian police and security forces were deployed to ensure that the elections were carried out peacefully. The direct cost of organizing the election mounted to approximately Rs. 5,180 million.

Problem Definition:Implementation of Election System for India with Election Forecasting capability. The Election System aims at implementing the process of election online. It consists of a website which has the option of registration for Candidates standing up for the election as well as the voters. Not only can candidates register
4

themselves but they can also notify every voter of their rallies. The voter, who also can register gets to vote for his favorite candidate. All of the registration, login related processing is validated at the Election Commission. Each voter/candidate whilst registering gets to choose the region that he is from/representing. Accordingly when they login, they will be automatically routed to that region specific domain. Every region has a Administrator who in turn is chosen by the Election Commission. The main responsibility of the EC is to ensure that all Administrators are properly installed in every region and that all Administrators are properly adhering to their responsibilities. The Administrators on the other hand have the responsibility of ensuring that all candidates that are registered within their region are authorized and also act as a buffer between the candidates and the voters by notifying the rallies of candidates in the form of Latest News to the voters. The Administrator also has the responsibility of seeing to it that only the voter having a voter ID card is able to vote, thus also ensuring that a voter who votes once will not be allowed to do so any further.

3.
BLOCK DIAGRAM

Architectural Design:

Figure 1

In Architectural Design of E.S there are different inputs which are inputted to the ELECTION SYSTEM & produce different out put, all the inputs are from different users like voter, candidate & Administrator.

4. LITERATURE SURVEY

2009 LS election :

1,269

candidates from 38 officially recognized national and state

parties seeking election. 1,048 candidates from registered parties, not recognized and 10,635 independent candidates. A total number of 59, 25, 72,288 people voted. The Election Commission employed almost 40, 00,000 people to run the election.

10

5. REQUIREMENTS PHASE

11

Election system is implemented by the following hardware and software requirements:HARDWARE REQUIREMENTS;SERVER MACHINE and CLIENT MACHINE having following minimum configurations: TWO PCs WITH WINDOWS 2000 SERVER OPERATING SYSTEM HAVING 2.0GB RAM NETWORK ADAPTER CARDS FOR HIGH SPEED ETHERNET LAN HIGH SPEED INTERNET CONNECTION SOFTWARE REQUIREMENTS: WEB BROWSER WITH EMAIL ACCOUNT. LANGUAGES- ASP, .NET. *MOZILLA is recommended for proper view. *.NET is preferred over ASP because it is faster and more modularized and easy in implementation. Also .NET is simple and easy to use. Constraints: Person should have basic Internet Literacy. Updating of voter profile should be done before every election. Site may get slow because of large population will access to ELECTION SYSTEM

12

6. ANALYSIS PHASE

13

Analysis Phase involves the process of extracting the needs of the system and analyzes what the system must do to satisfy user requirements. The goal of analysis is to understand the domain of the problem and system responsibilities by understanding how the user will use the system.

5.4 USE-CASE ANALYSIS:


A use case analysis is the most common technique used to identify the requirements of a system (normally associated with software/process design) and the information used to both define processes used and classes (which are a collection of actors and processes) which will be used both in the Use case diagram and the overall Use case in the development or redesign of a software system or program. The use case analysis is the foundation upon which the system will be built. A use case analysis is the primary form for gathering usage requirements for a new software program or task to be completed. The primary goals of a use case analysis are: 1. Designing a system from the users perspective, communicating system behavior in the users terms, and specifying all externally visible behaviors.

2. Another set of goals for a use case analysis is to clearly communicate: system requirements, how the system is to be used, the roles the user plays
14

in the system, what the system does in response to the users stimulus, what the user receives from the system, and what value the customer or user will receive from the system.

Use Case Diagram Of Election System

15

Figure 2

6.1 MODULE DIAGRAM:

16

Figure 3

17

ELECTION SYSTEM has different modules which are voter, candidate, election commission, reports.

Voter: Voter can perform different functions which are updating profile, voting see candidate profile. The democratic system in India is based on the principle of universal adult suffrage; that any citizen over the age of 18 can vote in an election (before 1989 the age limit was 21). The right to vote is irrespective of caste, creed, religion or gender. Those who are deemed unsound of mind, and people convicted of certain criminal offences are not allowed to vote.

There has been a general increase in the number of people voting in Indian elections. In 1952 61.16 per cent of the electorate voted. By 1996 the turnout for the general election was 57.94 per cent. There have been even more rapid increases in the turnout of women and members of the scheduled castes and scheduled tribes, who had tended to be far less likely to participate in elections, and voting for these groups has moved closer to the national average. Voting Procedure: 1) Voter will be login b y voter_id to voter screen. 2) Verification of voter will be done by the face reorganization. 3) If successful Voter will allowed to vote. Otherwise voter should enter valid id, password and face should properly scan.

Candidate:-

Any Indian citizen who is registered as a voter and is over 25 years of age is allowed to contest elections to the Lok Sabha or State Legislative Assemblies.
18

For the Rajya Sabha the age limit is 30 years. Candidates for the Rajya Sabha and Vidhan Sabha should be a resident of the same state as the constituency from which they wish to contest.

Every candidate has to make a deposit of Rs. 10,000/- for Lok Sabha election and 5,000/- for Rajya Sabha or Vidhan Sabha elections, except for candidates from the Scheduled Castes and Scheduled Tribes who pay half of these amounts. The deposit is returned if the candidate receives more than one-sixth of the total number of valid votes polled in the constituency. Nominations must be supported at least by one registered elector of the constituency, in the case of a candidate sponsored by a registered Party and by ten registered electors from the constituency in the case of other candidates. Returning Officers, appointed by the Election Commission, are put in charge to receive nominations of candidates in each constituency, and oversee the formalities of the election.

In a number of seats in the Lok Sabha and the Vidhan Sabha, the candidates can only be from either one of the scheduled castes or scheduled tribes. The number of these reserved seats is meant to be approximately in proportion to the number of people from scheduled castes or scheduled tribes in each state. There are currently 79 seats reserved for the scheduled castes and 41 reserved for the scheduled tribes in the Lok Sabha.

Political parties:Political parties are an established part of modern mass democracy, and the conduct of elections in India is largely dependent on the behaviour of political

19

parties. Although many candidates for Indian elections are independent, the winning candidates for Lok Sabha and Vidhan Sabha elections usually stand as members of political parties, and opinion polls suggest that people tend to vote for a party rather than a particular candidate. Parties offer candidates organizational support, and by offering a broader election campaign, looking at the record of government and putting forward alternative proposals for government, help voters make a choice about how the government is run. Political parties have to be registered with the Election Commission. The Commission determines whether the party is structured and committed to principles of democracy, secularism and socialism in accordance with the Indian Constitution and would uphold the sovereignty, unity and integrity of India. Parties are expected to hold organizational elections and have a written constitution. The Anti-defection law, passed in 1985, prevents MPs or MLAs elected as candidates from one party forming or joining a new party, unless they comprise more than one-third of the original party in the legislature

Administrator:Administrator is the person who actually manages particular section. In this Administrator perform different functions retrieving data, maintain area database.

Election Commission:ELECTION COMMISSION is higher body, which conduct elections. ELECTION COMMISSION assigns Administrator to particular region. An independent Election Commission has been established under the Constitution in order to carry out and regulate the holding of elections in India.

20

The Election Commission was established in accordance with the Constitution on 25th January 1950. Originally a Chief Election Commissioner ran the commission, but first in 1989 and later again in 1993 two additional Election Commissioners were appointed. The Election Commission is responsible for the conduct of elections to parliament and state legislatures and to the offices of the President and VicePresident. The Election Commission prepares, maintains and periodically updates the Electoral Roll, which shows who is entitled to vote, supervises the nomination of candidates, registers political parties, monitors the election campaign, including candidates funding. It also facilitates the coverage of the election process by the media, organises the regions where voting takes place, and looks after the counting of votes and the declaration of results. All this is done to ensure that elections can take place in an orderly and fair manner.

Reports:There are different Reports like Forecasted results, Actual Results of the voting, candidate list as provided by various Parties, voter list.

21

7. DESIGN PHASE

22

During design phase, the model is evaluated into actual objects that can perform the required task. There is a shift in emphasis from the application domain to implementation. The classes identified during analysis provide a framework for the design phase. System design develops the architectural detail required to build a system or product.

7.1 DATAFLOW DIAGRAMS: Context Level DFDs


.

Election Commission

Figure 4

23

Figure 5

Figure 6

24

Figure 7

Level 1 DFDs

Figure 8

25

Figure 9

Figure 10

26

Level 2 DFDs
Candidate
Candidate provide all information to authority at registration center . That information will be verified by authority on the basis documents which are provided by candidate. All the data is verified with the help of UID number .If the candidate information is correct then candidate registration completes successfully.

Level 2

Figure 13

27

Admin
The administrator has the access to manage the system and keep track of all the changes. Administrator registers The voter has to register at the ARC with all the document verification.

Administrator also has the authority to access the results of the election results & it may be given for display them with the consent of the election commission.

Figure 11

28

Voter Voter has to register after the verification of the documents at the registration centre. Voter has to provide the ADHAR [UID] number which has a format [assumed] : MH01CHM55551. Further the voter must enter a valid email ID as it is required for verification of the voter at the time of voting .

Figure 12

29

7.2 Database Schema 7.2.1. Star Schema

30

7.2.2. Snowflake Schema

31

7.2.3. E.R. Diagram


DOB Fname M name Unique_id

L name

Contact no.

gender

Person

Admin

E-mail

User name

Is a Belong s Get Resul ts Vote s

Voter Stays

View s

V_Id 32

Passsword

Stand s from

Party name

Constituency
Area name City_id City name State_id C_id State_name

Candidate
Assets

Explanation Of E.R. diagram:-

Work done

A person can be a voter, candidate and admin. So, all the personal details will be the attributes of person. A person stays in a particular constituency. The constituency comprises of stay of residence of a particular person. In case of voter, he will be having his voter id, username and password. In case of candidate, he will be having candidate id, work done, assets and his party name. In case of admin, he will be belonging to a particular constituency which will be allotted by the Election Commission. Now a person can view candidate profile, vote a candidate that belongs to his constituency.

33

A candidate will be standing for Elections from a particular constituency. Admin will get the results of each and every candidate belonging to a particular constituency and will provide the results to Election commission once voting procedure is completed.

8. IMPLEMENTATION
34

Homepage:
This is the homepage of election system that includes important links on the top of the page. A short introduction of the election system and how the site works is included in the final description.

35

screen 1

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

public partial class Home : System.Web.UI.Page { // Declare a cookie variable HttpCookie userCookie; protected void Page_Load(object sender, EventArgs e) { // Try to retrieve user's ID by reading the UserID cookie userCookie = Request.Cookies["Username"]; if (userCookie == null) { Response.Redirect("index.aspx");

36

} else { }

voter.Text += "Welcome :" + userCookie.Value;

} protected void btn_Logout_Click(object sender, EventArgs e) { Response.Redirect("Logout.aspx"); }}

VOTER REGISTRATION: Voter has to register after the verification of the documents at the registration centre. Voter has to provide the ADHAR [UID] number which has a format [assumed] : MH01CHM55551.
37

Further the voter must enter a valid email ID as it is required for verification of the voter at the time of voting .

screen 2

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

public partial class VRegister : System.Web.UI.Page { // Declare objects OleDbConnection conn; OleDbCommand cityComm; OleDbDataReader reader; OleDbCommand comm_insert;

38

string strConnection; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // Close the connection conn.Close(); } } } protected void btn_submit_Click(object sender, EventArgs e) { int id_records = 0; string old_rec_names=""; // Read the connection string from Web.config strConnection = ConfigurationManager.ConnectionStrings["Election"].ConnectionStr ing; { old_rec_names = reader[""].ToString(); } // Close the reader reader.Close(); if (old_rec_names != "") { id_records = id_records + 1; } if (id_records == 0) { txt_Mname.Text; comm_insert.Parameters["@VMname"].Value =

comm_insert.Parameters.AddWithValue("@VLname", System.Data.OleDb.OleDbType.WChar); comm_insert.Parameters["@VLname"].Value = txt_Lname.Text; comm_insert.Parameters.AddWithValue("@VPhone", System.Data.OleDb.OleDbType.Double); comm_insert.Parameters["@VPhone"].Value = Convert.ToDouble(txt_phone.Text); comm_insert.Parameters.AddWithValue("@VMobile", System.Data.OleDb.OleDbType.Double); comm_insert.Parameters["@VMobile"].Value = Convert.ToDouble(txt_mobile.Text); comm_insert.Parameters.AddWithValue("@VEmail", System.Data.OleDb.OleDbType.WChar); comm_insert.Parameters["@VEmail"].Value = txt_email.Text;

39

comm_insert.Parameters.AddWithValue("@VUniq_ID", System.Data.OleDb.OleDbType.WChar); comm_insert.Parameters["@VUniq_ID"].Value = txt_uni.Text; comm_insert.Parameters.AddWithValue("@city_id", System.Data.OleDb.OleDbType.Integer); comm_insert.Parameters["@city_id"].Value = drpdwn_city.SelectedItem.Value; comm_insert.Parameters.AddWithValue("@country", System.Data.OleDb.OleDbType.WChar); comm_insert.Parameters["@country"].Value = drpdwn_country.SelectedItem.Value; comm_insert.Parameters.AddWithValue("@Vpostal", System.Data.OleDb.OleDbType.Integer); comm_insert.Parameters["@Vpostal"].Value = Convert.ToInt32(txt_postalcode.Text); comm_insert.Parameters.AddWithValue("@VAddress", System.Data.OleDb.OleDbType.WChar); comm_insert.Parameters["@VAddress"].Value = txt_Address.Text; comm_insert.Parameters.AddWithValue("@VGender", System.Data.OleDb.OleDbType.Integer); comm_insert.Parameters["@VGender"].Value = Radiobtn_gender.SelectedItem.Value; comm_insert.Parameters.AddWithValue("@VDOB", System.Data.OleDb.OleDbType.Integer); comm_insert.Parameters["@VDOB"].Value = drpdwn_day.Text + "/" + drpdwn_month.Text + "/" + drpdwn_year.Text; comm_insert.Parameters.AddWithValue("@VUsername", System.Data.OleDb.OleDbType.WChar); comm_insert.Parameters["@VUsername"].Value = txt_Uname.Text; comm_insert.Parameters.AddWithValue("@Vpass", System.Data.OleDb.OleDbType.WChar); comm_insert.Parameters["@Vpass"].Value = txt_cpass.Text; comm_insert.ExecuteNonQuery(); //conn.Close(); Response.Redirect("index.aspx"); } else { register."; } finally { // Close the connection }

Label2.Text = "This unique id is already

40

conn.Close(); } }

protected void btn_clear_Click(object sender, EventArgs e) { txt_uni.Text = ""; txt_Fname.Text = ""; txt_Mname.Text = ""; txt_Lname.Text = ""; txt_Address.Text = ""; txt_postalcode.Text = ""; txt_phone.Text = ""; txt_mobile.Text = ""; txt_email.Text = ""; txt_Uname.Text = ""; txt_pass.Text = ""; txt_cpass.Text = ""; } }

VOTING NUMBER GENERATION:


A voting number is randomly generated and sent to email id provided by the voter at the time of registration. The voter has to check this mail and enter the same number in the field shown. After the proper voting number is entered the voting page is displayed where the voter can cast his vote to the candidate of his choice.

41

screen 3

Voting number:
using System; using System.Collections; using System.Configuration; using System.Data; 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.Data.OleDb ; using Microsoft.Office.Interop.Outlook; using System.Text; public partial class dmomail : System.Web.UI.Page { //Declare a cookie variable HttpCookie userCookie; //Microsoft.Office.Interop.Outlook.MailItem oEmail; Microsoft.Office.Interop.Outlook.Application oApp; Microsoft.Office.Interop.Outlook._MailItem oEmail; string toaddress; string strConnection; string votingcode; OleDbConnection conn; OleDbCommand comm; String strSQL; OleDbDataReader reader; protected void Page_Load(object sender, EventArgs e) {

42

// // Try to retrieve user's ID by reading the UserID cookie userCookie = Request.Cookies["Username"]; if (userCookie == null) { Response.Redirect("index.aspx"); } else { Label2.Text += "Welcome :" + userCookie.Value; } } private int RandomNumber(int min, int max) { Random random = new Random(); return random.Next(min, max); } private string RandomString(int size, bool lowerCase) { StringBuilder builder = new StringBuilder(); Random random = new Random(); char ch; for (int i = 0; i < size; i++) { ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))); builder.Append(ch); } if (lowerCase) return builder.ToString().ToLower(); return builder.ToString(); } public string GetPassword() { StringBuilder builder = new StringBuilder(); builder.Append(RandomString(3, true)); builder.Append(RandomNumber(1000, 99999)); builder.Append(RandomString(2, false)); return builder.ToString(); } protected void submit_Click(object sender, EventArgs e) { votingcode = GetPassword(); //create_db_connection(); createmailbody(create_db_connection()); } p) private Microsoft.Office.Interop.Outlook.Application CreateObject(string { } public void createmailbody(string Recipient) { if (Recipient != "") { oApp = new Microsoft.Office.Interop.Outlook.Application(); throw new NotImplementedException();

43

Label1.Text += "<br/> Please insert confirmation code into following box to give your vote."; strConnection = ConfigurationManager.ConnectionStrings["Election"].ConnectionString; strSQL = "UPDATE Voter_General SET VConfirm_code ='" + votingcode + "' WHERE VUniq_ID ='" + userCookie.Value + "'"; conn = new OleDbConnection(strConnection); try { conn.Open(); comm = new OleDbCommand(strSQL, conn); conn.Close(); } //System.Threading.Thread.Sleep(1000); } else { System."; } } Label1.Text = "You have not register your Email Id in Election

public string create_db_connection() { strConnection = ConfigurationManager.ConnectionStrings["Election"].ConnectionString; strSQL = "SELECT VEmail FROM Voter_General WHERE VUniq_ID ='" + userCookie.Value + "';"; conn = new OleDbConnection(strConnection); try { conn.Open(); comm = new OleDbCommand(strSQL, conn); try { conn.Open(); comm = new OleDbCommand(strSQL, conn); //' execute the command reader = comm.ExecuteReader(); //' Populate the list of email while (reader.Read()) { confirmcode = reader["VConfirm_code"].ToString(); } reader.Close(); } catch (System.Exception ex) { Label1.Text = "Error while sending your confirmation code. " + ex.Message; } finally

44

} if (confirm_number.Text == confirmcode) { Response.Redirect("voting.aspx"); } else if ("nocode123" == confirmcode) { Label1.Text = "you have inserted wrong confirmation code.Please insert correct one."; } else { Label1.Text = "you have inserted wrong confirmation code.Please insert correct one."; }}}}

//' Close the connection conn.Close();

45

VOTING PAGE:
The voting page displays the list of candidates from the constituency of the voter. The voter can vote the candidate of his/her choice .

Screen 4

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

public partial class Vote : System.Web.UI.Page { // Declare a cookie variable HttpCookie userCookie; protected void Page_Load(object sender, EventArgs e)

46

// Try to retrieve user's ID by reading the UserID cookie userCookie = Request.Cookies["Username"]; if (userCookie == null) { Response.Redirect("index.aspx"); } else { voter.Text += "Welcome :" + userCookie.Value; }

} protected void btn_Logout_Click(object sender, EventArgs e) { Response.Redirect("Logout.aspx"); } protected void vote_Click(object sender, EventArgs e) { Response.Redirect("dmomail.aspx"); }

VOTE SUBMITTED:
Once the voter submits his vote a screen is displayed conforming the vote. The voter can cast the vote only once . Even if the coter again tries to enter the enter the randomly generated number,he will be able to enter it but wont be able to vote again.

47

screen 5

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

public partial class voting : System.Web.UI.Page { string strConnection; int voter_vote,candidates_votes; protected void Page_Load(object sender, EventArgs e) { // Try to retrieve user's ID by reading the UserID cookie userCookie = Request.Cookies["Username"]; usercityCookie = Request.Cookies["Usercity"]; if (userCookie == null) { Response.Redirect("index.aspx"); }

48

else { } if (voter_vote == 0) { //Set cookies only when User is valid for giving vote Label1.Text = usercityCookie.Value; Label3.Text = userCookie.Value; lbl_cddt.Text = ""; btn_yes.Visible = false; btn_no.Visible = false; } else {

Response.Redirect("After_vote.aspx");

} reader1.Close(); } finally { conn.Close(); } } } public void GridView1_SelectedIndexChanged(object sender, EventArgs e) { Comm.Parameters["@CName"].Value = Selected_candidateCookie.Value; try { // Open the connection conn.Open(); // Execute the city command reader = Comm.ExecuteReader(); while (reader.Read()) { Candidate_id = Convert.ToInt32(reader["Cd_ID"]); } reader.Close(); Comm1 = new OleDbCommand("UPDATE Voter_General SET Cd_ID=@Cd_ID " + " WHERE VUniq_ID=@VUniq_ID ;", conn); Comm1.Parameters.AddWithValue("@Cd_ID", OleDbType.Integer); Comm1.Parameters["@Cd_ID"].Value = Candidate_id; Comm1.Parameters.AddWithValue("@VUniq_ID", OleDbType.WChar); Comm1.Parameters["@VUniq_ID"].Value = userCookie.Value;

49

Comm1.ExecuteNonQuery(); CANDIDATE " + Comm2 = new OleDbCommand("SELECT Cvotes FROM " WHERE Cd_ID=@Cd_ID ;", conn); Comm2.Parameters.AddWithValue("@Cd_ID", OleDbType.Integer); Comm2.Parameters["@Cd_ID"].Value = Candidate_id; reader = Comm2.ExecuteReader(); while (reader.Read()) { candidates_votes = Convert.ToInt32(reader["Cvotes"]); } candidates_votes = candidates_votes + 1; lbl_cddt.Text = Convert.ToString(candidates_votes); reader.Close(); Comm2 = new OleDbCommand("UPDATE Candidate SET Cvotes=@Cvotes " + " WHERE Cd_ID=@Cd_ID ;", conn); Comm2.Parameters.AddWithValue("@Cvotes", OleDbType.Integer); Comm2.Parameters["@Cvotes"].Value = candidates_votes; Comm2.Parameters.AddWithValue("@Cd_ID", OleDbType.Integer); Comm2.Parameters["@Cd_ID"].Value = Candidate_id; Comm2.ExecuteNonQuery(); Response.Redirect("After_vote.aspx"); } finally { conn.Close(); } } }

ELECTION RESULTS:

50

Administrator also has the authority to access the results of the election results & it may be given for display them with the consent of the election commission. The results are stored according to the constituencies.

screen 6

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

public partial class AdminHome : System.Web.UI.Page { // Declare a cookie variable HttpCookie userCookie; // Define data objects

51

OleDbConnection conn; OleDbCommand cityComm; OleDbDataReader reader; protected void Page_Load(object sender, EventArgs e) { // Try to retrieve user's ID by reading the UserID cookie userCookie = Request.Cookies["Username"]; if (userCookie != null) { if (userCookie.Value == "IN01XXX1234567") { //Set cookies only when User is valid for giving vote } else { } else { } } Label1.Text = "Welcome : Admin";

Response.Redirect("noAdmin.aspx");

Response.Redirect("index.aspx");

} private void BindGrid() { // Read the connection string from Web.config string connectionString = ConfigurationManager.ConnectionStrings["Election"].ConnectionStr ing; // Initialize connection conn = new OleDbConnection(connectionString); cityComm = new OleDbCommand("SELECT DISTINCT CConstituenecy FROM Candidate ;", conn); try { // Open the connection conn.Open(); // Execute the city command reader = cityComm.ExecuteReader(); // Populate the list of cities drpdwn_city.DataSource = reader;

if (!IsPostBack) { { BindGrid(); } }

52

drpdwn_city.DataValueField = "CConstituenecy"; drpdwn_city.DataTextField = "CConstituenecy"; drpdwn_city.DataBind(); cityComm.Parameters["@CConstituenecy"].Value = drpdwn_city.SelectedItem.Text; // Enclose database code in Try-Catch-Finally try { // Open the connection conn.Open(); // Execute the command reader = cityComm.ExecuteReader(); // Fill the grid with data grid.DataSource = reader; grid.DataBind(); // Close the reader reader.Close();} finally{ // Close the connection conn.Close();}} else { Label1.Text = "Please select Constituency to view report."; }}}

53

9. SECURITY

54

Figure 13

As shown in the diagram we have implemented a two tier security.

In the first tier the user will be registering in an ARC center. There

he will be checked and frisked of all his documents such as Passport, Unique ID and PAN Card. Thus we have taken care that the voter doesnt register with FAKE

IDs or doesnt register twice.

55

After registration the user can login from anywhere and vote any

time till the time for voting expires. In the second tier we have taken care of the issue incase the user

does lose his username or password to another person. If Tier 1 is breached, then in tier 2 there is an option of Get voting

number which is nothing but a randomly generated number that is sent to his email address. Thus even if an unauthorized user gets hold of another users

username and password, he is still required to know the password of the victims email address. Thus Tier 2 takes care of the breaching done in tier 1 and thus voter

can vote without worrying about security.

56

10. TESTING PHASE

57

TESTING:10.1 UNIT TESTING In this stage of testing every webpage was individually build and after a successful build it was run in the browser. The errors reported were fixed back and the testing was performed recursively until the web page gave result as per specified in the requirements document by making appropriate changes in the .css and .aspx files of the respective web pages.

10.2 INTEGRATION TESTING In this we started with linking two pages at a time and then running them in the browser .The approach followed was top down, breadth first approach of integration testing. The modules which would run simultaneously were integrated at the same level and dependent modules were integrated subsequently thus integrating all the web forms into one single website. At every stage database connectivity was tested and the SQL queries used in the code file were individually tested and integrated in the system only after they gave desired results. 10.3 VALIDATION TESTING

The beta testing was conducted by selecting a few people and providing them with our website. The problems encountered by them were reported to us at regular intervals and our project team fixed those problems and made the necessary changes in the User Interface to make it more comfortable and user friendly. 10.4 REGRESSION TESTING

58

Regression testing was performed whenever a new module was added to check that the system still compiles with its specified requirements and that the addition of a new module did not have any unintended effects on the existing system. Thus the compatibility of different components in the system was checked.

11. CONCLUSION

59

Election System is system which will help the different users like voter, candidate, Administrator & election commission to perform their respective task inefficient way. The most important benefit by the use of our ELECTION SYSTEM is it will reduce costs which spend on off line election system and to provide easy way to participate in election procedure by online voting.

60

12. LIMITATIONS & FUTURE SCOPE

61

Limitations: In villages, there is still a problem of everyone not having Availability of resources is still a major issue in remote parts enough knowledge of computers.

of India. Future Scope: Implementation of the system all over India will guarantee great returns as the system aims at delivering accurate results with minimum use of resources. The Election System has a tremendous scope in the entire election system of India, Municipal Corporation election, District level election, Rajya sabha & Lok sabha. Since the procedure is simple & the system can be accessed from any nearby computer the voting percentage will increase. Centralized and effective schemes can be further added to suite the election type (eg. Lok sabha, Rajya sabha). Instead of mailing system, Biometric verification can be done for authentication process.

62

13. BIBLIOGRAPHY

63

Books: Programming ASP.NET by Jesse Liberty and Dan Hurwitz Beginning ASP.NET 2.0 in VB 2005 by Matthew MacDonald Microsoft SQL Server 2005 by Petersons Publications Websites: www.w3schools.com www.indian-election.com www.wikipedia.com www.google.com www.rajakarta.com

64

También podría gustarte