Académique Documents
Professionnel Documents
Culture Documents
VOTING SYSTEM is an voting technique. It is based on the other services like RESERVATION SYSTEM .In this system people who have citizenship of INDIA and whose age is above 18 years of any sex can give his\her vote without going to any polling booth. There is a DATABASE which is maintained by the ELECTION COMMISION OF INDIA in which all the names of voter with complete information is stored. In VOTING SYSTEM a voter can use his\her voting right without any difficulty. He\She has to fill a registration form to register himself\herself. All the entries is checked by the DATABASE which has already all information about the voter. If all the entries are correct then a USER ID and PASSWORD is given to the voter, by using that ID and PASSWORD he\she can use his\her vote. If conditions are wrong then that entry will be discarded.
Computerized voting system is designed to vote for the candidate from the remote place by log in to the project. This project can effectively count the number of votes and thereby calculate the percentage of votes. Also the number of vote a candidate obtains is also obtained by avoiding the errors. Along with the number the percentage of votes for each candidate is calculated. All the calculations are done by the system which reduces the human efforts. The system is so designed that it can also check for duplication. It then decides the winner in every section. Users are categorized into two classes: Administrator and Voters. The administrator is responsible for managing user accounts, polls, authentication, system resources and logs and safekeeping of the system, where as voters only have the ability to vote for the party effect of correct voter identification.
This system is designed to improve the current voting process in the following ways: 1. Allow voters to vote can poll without the use of absentee of electronic machine. 2. Reduce the number of legitimate votes not counted by reducing the number of overvotes, and eliminating vote tampering 3. Improve the registration process by allowing voters to check their registration status prior to voting and centralizing registration databases 4. Increase voter confidence and improve the voting experience
Main facilities available in this project are:Maintaining voters Identification. Providing updating of voters information. Administrator maintains the complete information of voter. Voter can vote from system.
The E-Voting system passes 3 major steps: 1- Pre-Voting (preparing administration, committee, candidates, and voters) 2- Voting (Voting process itself) 3- Post-Voting(Result counting and generating reports)
2.1 INTRODUCTION
Elections allow the populace to choose their representatives and express their preferences for how they will be governed. Naturally, the integrity of the election process is fundamental to the integrity of democracy itself. The election system must be sufficiently robust to withstand a variety of fraudulent behaviors and must be sufficiently transparent and comprehensible that voters and candidates can accept the results of an election. Unsurprisingly, history is littered with examples of elections being manipulated in order to influence their outcome. The design of a good voting system, whether electronic or using traditional paper ballots or mechanical devices must satisfy a number of sometimes competing criteria. The anonymity of a voters ballot must be preserved, both to guarantee the voters safety when voting against a malevolent candidate, and to guarantee that voters have no evidence that proves which candidates received their votes. The existence of such evidence would allow votes to be purchased by a candidate. The voting system must also be tamper-resistant to thwart a wide range of attacks, including ballot stuffing by voters and incorrect tallying by insiders. Another factor is the importance of human factors. A voting system must be comprehensible to and usable by the entire voting population, regardless of age, infirmity, or disability. Providing accessibility to such a diverse population is an important engineering problem and one where, if other security is done well, electronic voting could be a great improvement over current paper systems. Flaws in any of these aspects of a voting system, however, can lead to indecisive or incorrect election results. There have been several studies on using computer technologies to improve elections. These studies caution against the risks of moving too quickly to adopt electronic voting machines because of the software engineering challenges, insider threats, network vulnerabilities, and the challenges of auditing.
Expensive
Needed an agent
ADVANTAGES OF PROPOSED SYSTEM: 1. Reduces the human workload 2. All the data relevant to item information are stored in the database. 3. Searching can be done effectively. 4. The generation of result. 5. Ease in getting people to participate. The proposed system can be used even by the nave users and it does not require any educational level, experience, and technical expertise in computer field but it will be of good use if the user has the good knowledge of how to operate a computer.
STEPS IN FEASIBILITY ANALYSIS Eight steps involved in the feasibility analysis are: Form a project team and appoint a project leader. Prepare system flowcharts. Enumerate potential proposed system. Define and identify characteristics of proposed system. Determine and evaluate performance and cost effective of each proposed system. Weight system performance and cost data. Select the best-proposed system. Prepare and report final project directive to management.
Front-end selection: 1. It must have a GUI that assists employees that are not from IT background. 2. Scalability and extensibility. 3. Flexibility. 4. Robustness. 5. According to the organization requirement and the culture. 6. Must provide excellent reporting features with good printing support. 7. Platform independent. 8. Easy to debug and maintain. 9. Event driven programming facility. 10. Front end must support some popular back end like Ms Access. According to the above stated features we selected PHP as the front-end for developing our project.
Back-end Selection: 1. Multiple user support. 2. Efficient data handling. 3. Provide inherent features for security. 4. Efficient data retrieval and maintenance. 5. Stored procedures. 6. Popularity. 7. Operating System compatible. 8. Easy to install. 9. Various drivers must be available. 10. Easy to implant with the Front-end. According to above stated features we selected MY SQL as the backend. The technical feasibility is frequently the most difficult area encountered at this stage. It is essential that the process of analysis and definition be conducted in parallel with an assessment to technical feasibility. It centers on the existing computer system and to what extent it can support the proposed system.
performance is improved This feasibility checks whether the system can be developed with the available funds. The Online voting system does not require enormous amount of money to be developed. This can be done economically if planned judicially, so it is economically feasible. The cost of project depends upon the number of man-hours required.
2.5.4SCHEDULEFEASIBILITY
Time evaluation is the most important consideration in the development of project. The time schedule required for the developed of this project is very important since more development time effect machine time, cost and cause delay in the development of other systems. A reliable Online voting system can be developed in the considerable amount of time
3.1 INTRODUCTION
As the goal of the application is ease of use and to provide an interactive interface, extensive research has been done to gain an insight into the needs and behaviors of various users. The working of the application is made convenient and easy to use for the end user. Users can be classified into two types based on their knowledge of the vote that suit their needs. They can be classified as users who know about election that would satisfy their needs and users who have to figure out the product that would satisfy their needs. Users who know about the registration should be able to find the entry easily with the click of a button. Such users can search for the party by party name. Users who have to figure out the votes that would satisfy their needs could use a search term to find a list of parties and then should be able to filter the result based on various parameters party name, id, party head. The users should be able to view the complete specification of the nominees and various images at different Zoom levels. The user should be able to read the terms and conditions needed to elect the member. They should be able to write their own reviews. They should be able to print out the specifications for details of the nominees.. To increase the ease of use the user should be able to add a vote, the selection of the party is made by pressing the logo. A user should not able to edit the voted candidate. They should be able to update the details of the party, nominees, user if required necessarily. The application can be made interactive by pop up messages when user been voted for the nominee.
requirements needed by the user. The requirement analysis is a feature that must be included in a new system.
3.1.2 PURPOSE
The purpose of this document is to provide an approaching into the requirement for the development of the project. The content of this document serves as a communal required agreement between the admin and then developer concerning the functionalities that the project exhibits. The main purpose of this project is to protect the data from the client and monitoring the client activities from the admin system itself. This project decreases the manual effort, time and helps in maintaining various records and gives the administrator with overall control of the system.
3.1.2 SCOPE
The e-voting system to be discussed makes up a relatively small part of the whole election process. From a technical viewpoint the elections are made up of the following components: calling of elections, registration of candidates, preparation of polling list, voting (a subset of which is e-voting), counting of votes.5
Other components such as auditing, reviewing of complaints and other supporting activities could be mentioned.
The e-voting system discussed in this paper assumes that: a) Voter lists have been prepared and are available in a suitable format, b) The candidate lists have been prepared and are available in a suitable format, c) e-votes are counted separately and are later added to the rest of the votes. In other words the input of the e-voting system is made up from: a) Voter lists (including the polling division and constituency assigned to the voter), b) Candidate lists (by constituencies), c) expressed will of the voters, and the output is made up from: a) Summarized voting result of e-voters, b) List of voters who used e-voting.
3.1.4 OVERVIEW
System requirements are expressed in a software requirement document. The Software requirement specification is the official statement of what is required of the system developers. This requirement document includes the requirements definition and the requirement specification. The software requirement document is not a design document. It should set out what the system should do without specifying how it should be done. The requirement set out in this document is complete and consistent.
The software specification document satisfies the following: It specifies the external system behaviors. It specifies constraints on the implementation. It is easy to change. It serves as reference tool for system maintainers. It record forethought about the life cycle of the system. It characterizes acceptable response to undesired events.
Privacy: the voting system has to protect privacy, concealing the relation between voter and his/her cast vote, and ensuring that the voter's choice will remain anonymous. This requirement must be fulfilled once the voter has cast his/her vote and must be preserved during the counting processes. Integrity: A voting system has to protect the vote against manipulation once it is cast and until it is counted. Therefore the channel must to provide measures to prevent and/or detect any attempted to change the voter's intent once the vote has been cast. Voter Verifiability Cast as Intended: Voter must have the possibility to check that his/her vote has been accurately recorded. In the case of remote voting, this implies the availability to check if the vote received by the election officials and stored in the remote Ballot Box (in a physical or electronic manner) is the same as cast by the voter. It is important to note that the requirement cannot conflict with others once. Voter Verifiability Counted as Cast: In the counted as cast verification, voters must have the possibility to verify the inclusion of his/her vote in the final tally. It is considered as security improvement. Prevention of Intermediate results: It is important to prevent the disclosure of intermediate results before the election is closed. This way, or the voters have the same information during the voting stage. This implies that the secrecy of the vote must be preserved until the tally process. Ballot Box Accuracy: Protection of the ballot box against the addition of bogus ballots or the elimination of valid ballots is needed. In the case that multiple voting is allowed, this measured must guarantee that one vote per voter will be counted. Prevention of Voting Errors: The voting channel has to prevent involuntary voting errors by voters when casting their votes (e.g., under-voting, over-voting). This practice is becoming more common for poll-site voting in complex elections.
Ease of Use: the voting channel must be easy to use by average voters. In remote voting this requirement is of paramount importance to prevent disenfranchisement and facilitate the participation of voters. Correctness: All input votes are correctly counted and no other votes are counted Robustness: The counting tolerates the corrupt or faulty behavior of any group of authorities up to a threshold.
3.4.4.2 RELIABILITY
Software reliability is defined in statistical terms as "the probability of failure-free operation of a computer program in a specified environment for a specified time. In hardware, failures due to physical wear (e.g., the effects of temperature, corrosion, shock) are more likely than a design-related failure. Unfortunately, the opposite is true for software. In fact, all software failures can be traced to design or implementation problems. When a Client sends an updating to the Administrator, it must reach properly without fail. Informally, software is reliable if the users can depend on it. This product is guaranteed to provide reliable outcome.
3.4.4.3 MAINTAINABILITY
The term software maintenance is commonly used to refer to the modifications that are made to a software system in its initial release. Process Tracking and Control System is developed with ease of maintenance in mind. The modules in Process Tracking and Control System are clearly documented and have power over the least degree of coupling so that they can be modified independently.
3.2.6.4 USABILITY
Since the system is placed on for network users, any type users can use the system. The system provides GUI interface for the users. The system provides information to the users according to their accessibility level.
4.1 INTRODUCTION
A design pattern is a general reusable solution to a commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations. Object-oriented design patterns typically show relationships and interactions between classes or objects, without specifying the final application classes or objects that are involved. Design patterns reside in the domain of modules and interconnections. At a higher level there are Architectural patterns that are larger in scope, usually describing an overall pattern followed by an entire system. Not all software patterns are design patterns. For instance, algorithms solve computational problems rather than software design problems.
In order to achieve flexibility, design patterns usually introduce additional levels of indirection, which in some cases may complicate the resulting designs and hurt application performance. By definition, a pattern must be programmed anew into each application that uses it. Since some authors see this as a step backward from software reuse as provided by components, researchers have worked to turn patterns into components. Meyer and Arnout claim a two-thirds success rate in componentizing the best-known patterns. Often, people only understand how to apply certain software design techniques to certain problems. These techniques are difficult to apply to a broader range of problems. Design patterns provide general solutions, documented in a format that doesn't require specifics tied to a particular problem.
4.3.3 APPLICATION TIER (business logic, logic tier, data access tier, or middle tier)
The logic tier is pulled out from the presentation tier and, as its own layer, it controls an applications functionality by performing detailed processing.
3 TIER ARCHITECTURE 1 WEB APPLICATION In system software, a web application is an application that is accessed over a network such as the Internet or an intranet. The term may also mean a computer software application that is hosted in a browser-controlled environment (e.g. a Java applet)[citation needed] or coded in a browser-supported language (such as JavaScript, combined with a browser-rendered markup language like HTML) and reliant on a common web browser to render the application executable.
HOME
NOMINEE VOTE
VOTE COUNT
RESULT
CLASS DIAGRAM Aclass is a repesentation of objects that reflects their structure and behavior within the system. The class diagram captures the logical structure of the system the classes and things that make up the mode. It is static model, describing what exists and the attributes and behavior it has,rather than how something is done. Class diagrams are most to illustrate relationship between classes and interfaces. The usage scenario implies a set objets that are manipulate as an actor interacts with the sytem. These objects are categorized into classes a collection of things that have similar attributes and common behavior.
ACTIVITY DIAGRAM Activity diagram are used to model the behavior of a system, the way in which these behaviors are related in an overall flow of the system. It uses rounded rectangles to imply a specific system function, arrows to represent flow through the system, decision diamonds to deficit a branching decision and solid horizontal lines to indicate that parallel activities are occurring.
Select Profile
Profile to view
Perform Counting
Declare Results
SEQUENCE DIAGRAM A Sequence diagram is a structured representation of behavior as a series of sequential steps over time. It is used to depict work flow, message passing and how elements in general cooperate over time to achieve a result. A sequence and understand hoe these events are related to classes.
NOMINEE
USER
ADMIN
VOTE
RESULT
NOMINEE REGISTRATION
ADMIN AUTHENTICATION
USER REGISTRATION
ADMIN AUTHENTICATION
VOTING
ADMIN VIEW
COLLABORATION DIAGRAM
A Collaboration diagram has classes, links and messages. The links show how the classes communicate, while the messages travel on the links. Any two classes that communicate must be joined by links. Two classes may only be joined by one link , but there can be many messages passing between them. The messages are directional, so use either or . To create a collaboration diagram in Rational Rose, ensure first that the Use Case that you want to illustrate is present
NOMINE E
1:
5: 6:
VOTE
MODULES
This project deals with various modules: 1.ADMINISTRATOR MODULE 2. USERS REGISTRATION MODULE 3. CONSTITUENCY AND WARD MODULE 4. PARTY AND NOMINIEES MODULE 5. RESULT MODULES
1. ADMINISTRATOR MODULES: In this module the role of commissioner is to maintain the field officers and take responsibility of users request to make forward to Field Officers and he has privileges to accept or reject the nominees requests who can participates in election. 2. USERS REGISTRATION MODULES: This module a general user is willing to participate in voting then first he has to make request to administrator by filling registration form. After getting the permissions he will get a username, password, using that username, password he/she attends in election. 3. CONSTITUENCY AND WARD MODULES: In this specified module the commissioner is enter the details of each constituency and zone details. Total area is divided into zones and each zone contain many constituencies to select the nominated persons. 4. PARTY AND NOMINIEES MODULES: In this election the members/nominees whose participating in election may belongs to a particular party and each party contain its own party symbol, agenda/manifesto and campaigns. The persons (nominated) who participating in election may belongs to party. 5. ELECTION AND RESULT MODULES: In this module nominated peoples are participating in election and based on the users who participates in polling the nominated person will be elected.
6.1.1. DEFINITIONS:
The following are some of the terms and definitions that are related to the test plan of the Voting System: Pass/Fail criteria: Decision rules that are used to determine whether a software item passes or fails a test. Test: A collection of one or more test cases Test Item: A software item that is an objective of testing. Test Plan: A document describing the scope, approach, resources and schedule of the intended testing activities. Test Summary Report: A document summarizing the testing activities and results. Testing: The process of analyzing a software item to detect the differences between the existing and required conditions.
CHAPTER-7 CONCLUSION
This paper describes some of the technological activities we have been carrying out within the E-Voting project, which has the goal of introducing e-voting systems for the next presidential elections. We believe that a transition to new technologies, especially in a country which is particularly cautious towards new technologies in the polling stations requires a multi-disciplinary approach that allows taking into account not only the usability requirements of the voters, but also those non-functional requirements that help guaranteeing security and build trust on the new voting machines. So far, we tested our prototypes in pilots that are among the largest e-voting tests ever performed. Several changes and refinements still need to be implemented in the e-voting solutions, both functional (like audio interfaces for visually impaired people) and non functional, in order to reduce costs, size, and improve robustness of the prototypes. The technological actions described above, together with the sociological, communication, and normative actions planned for the second phase will gradually broaden the size of experimentations to the whole province, allowing for a smooth introduction of e-voting systems .
7.1 LIMITATIONS
This application does not have a built in check out process. An external checkout package has to be integrated in to this application. Also users cannot save the votes so that they can access later i.e. they cannot create wish lists which they can access later. This application does not have features by which user can set votes ranges for the expects alerts once the limit reaches the particular range.
SCOPE FOR FUTURE WORK The following things can be done in future. The current system can be extended to allow the users to create accounts and save the users enhancement. The users could subscribe for registration alerts which would enable them to receive messages with the password the authentication is miss used by someone. The current system is confined only to the registering process. It can be extended to have an easy to use thumb sensing process. Users can view the multiple aspects which made to know the updating instantly made at the admin level.
.NET Framework:
The runtime known as the Common Language Runtime (CLR) and Class Libraries combine together to provide services and solutions that can be easily integrated within and across a variety of systems. The Common Language Runtime is a vital part of the .NET framework.
WHY .NET
.NET, like any other technology, must be carefully evaluated before an educated decision can be made concerning its use. Before we continue discussing the values of .NET we will briefly look at how problems can be solved using .NET.
provides data through an agreed-upon interface Microsoft Commerce Server 2005 Helps in building . e-Commerce
applications. Microsoft Exchange 2005 Enables messaging and collaboration (e-mail). Microsoft Host Integration 2005 Allows mainframe. Microsoft Internet Security and Acceleration Server 2005 Microsoft SQL Server 2005 Offers database storage services. and analysis Operates as a firewall and web cache. communication with the
Common Language Specification (CLS), a number of .NET languages and Visual Studio .NET. The overall architecture of the .NET Framework is depicted in the figure.
VC++.NET
VB.NET
C# .NET
OTHER
Common Language Specification Common Language Runtime .NET Framework Class Library
CTS also defines a number of syntactic constructs such as the use of unsigned types that may or may not be supported by a given .NET aware languages. The CTS is shared by the CTR and by compilers and other tools. The CTS provides a framework for cross language integration. Built-in types can be accessed through the system class in the Base Class Library and through reserved keywords in the .NET languages.
A runtime is an environment in which programs are executed. For example, to execute a program in written in VB 6, the machine must have a VB runtime installed. Since, different languages required different runtime environment. To avoid such problems .NET introduces a single Common Language Runtime. Once our code is written, we compile it, and compiler translates it to Microsoft Intermediate Language (MSIL). MSIL is a CPU-Independent set of instructions that can be efficiently converted to native code. MSIL code is a language-
independent code. The linker then links the IL code converted by one language compiler with the IL code compiled by another language compiler. The result is an EXE or DLL, containing the IL code, which is saved to disk.
On execution, the IL code and any requested functionality from the .NET base classes is brought together. The Just In Time (JIT) compiler processes the combined code creating
managed native code which is passed to CLR. The runtime automatically handles object layout and manages references to objects, releasing them when they are no longer being used.
VISUAL BASIC.NET
Visual Basic .NET is the next generation of Visual Basic, but it is also a significant departure from previous generations. Experienced Visual Basic 6 developers will feel comfortable with Visual Basic .NET code and will recognize most of its constructs. However, Microsoft has made some changes to make Visual Basic .NET a better language and an equal player in the .NET world. These include such additions as a Class keyword for defining classes and an Inherits a keyword for object inheritance, among others. Visual Basic 6 code can't be compiled by the Visual Basic .NET compiler without significant modification. The good news is that Microsoft has provided a migration tool to handle the task
Ease installation, deployment and use: SQL Server 2005 includes a set of administrative and development tools that improve upon the process of installing, deploying, managing, and using SQL Server across several sites. SQL Server 2005 also supports a standards-based programming model integrated with the Windows DNA, making the use of SQL Server databases and data warehouses a seamless part of building powerful and scalable systems. These features allow you to rapidly deliver SQL Server applications that users can implement with a minimum of installation and administrative overhead.
namespace Onlinevoting { public partial class Form4 : Form { public Form4() { InitializeComponent(); } public int u; private void label1_Click(object sender, EventArgs e) { } private void Form4_Load(object sender, EventArgs e) { pictureBox2.Visible = false ; pictureBox3.Visible = false; pictureBox4.Visible = false; pictureBox5.Visible = false; label14.Visible = false; label15.Visible = false; label16.Visible = false; label13.Visible = false; }
private void button2_Click(object sender, EventArgs e) { this.Hide(); Form1 f1 = new Form1(); f1.Show(); } private void Form4_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Rectangle da = new Rectangle(5, 35, 1200, 800); LinearGradientBrush lb = new LinearGradientBrush(da, Color.Blue, Color.Yellow, LinearGradientMode.ForwardDiagonal); Pen p = new Pen(Color.Red, 10); Rectangle da1 = new Rectangle(80, 30, 1200, 800); g.DrawRectangle(p, da1); }
private void button3_Click(object sender, EventArgs e) { pictureBox2.Visible = true ; pictureBox3.Visible = true ; pictureBox4.Visible = true ; pictureBox5.Visible = true ; label14.Visible = true ; label15.Visible = true ; label16.Visible = true ; label13.Visible = true ; int f=0; SqlConnection con = new SqlConnection(@"Data Source=SABARY\SQLEXPRESS;Initial Catalog=voting;Integrated Security=True"); try { con.Open(); SqlCommand cmd = new SqlCommand("select * from vote where vid=" + (Convert.ToInt32(textBox1.Text )) + "", con); SqlDataReader dr1 = cmd.ExecuteReader(); if (dr1.Read() && f == 0) {
// byte[] picarr = (byte[])dr["im"]; // MemoryStream ms = new MemoryStream(picarr); //ms.Seek(0, SeekOrigin.Begin); //pictureBox1.Image = Image.FromStream(ms); //f = 1; textBox1.Text = dr1["vid"].ToString(); textBox2.Text = dr1["vname"].ToString(); textBox3.Text = dr1["vfname"].ToString(); textBox4.Text = dr1["vgender"].ToString(); dateTimePicker1.Text = dr1["vdob"].ToString(); textBox9.Text = dr1["vaddress"].ToString(); textBox5.Text textBox6.Text textBox7.Text textBox8.Text = = = = dr1["wid"].ToString(); dr1["wardname"].ToString(); dr1["consid"].ToString(); dr1["consname"].ToString();
byte[] picarr = (byte[])dr1["vimage"]; MemoryStream ms = new MemoryStream(picarr); ms.Seek(0, SeekOrigin.Begin); //pictureBox1.Image = Image.FromStream(ms); pictureBox1.Image = Image.FromStream(ms); f = 1; }
else { Console.WriteLine("data not found in your database"); } dr1.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { con.Close(); } } private void pictureBox3_Click(object sender, EventArgs e) { pictureBox2.Visible = false; pictureBox4.Visible = false; pictureBox5.Visible = false; pictureBox3.Visible = false; label14.Visible = false; label15.Visible = false; label16.Visible = false; label13.Visible = false; textBox1.Text = string.Empty ; textBox2.Text = string.Empty; textBox3.Text = string.Empty; textBox4.Text = string.Empty; dateTimePicker1.Text = string.Empty; textBox9.Text = string.Empty; textBox5.Text textBox6.Text textBox7.Text textBox8.Text = = = = string.Empty; string.Empty; string.Empty; string.Empty;
try { con.Open(); SqlCommand cmd = new SqlCommand("select * from data", con); SqlDataReader dr1 = cmd.ExecuteReader(); while (dr1.Read()) { u = int.Parse(dr1["nr"].ToString()); f = 1; } dr1.Close(); if (f == 1) { u = u + 1; SqlCommand cmd1 = new SqlCommand("update data set nr='" + u + "'", con); cmd1.ExecuteNonQuery(); MessageBox.Show("succes"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { con.Close(); } } private void pictureBox2_Click(object sender, EventArgs e) { pictureBox2.Visible = false; pictureBox4.Visible = false; pictureBox5.Visible = false; pictureBox3.Visible = false; label14.Visible = false; label15.Visible = false; label16.Visible = false; label13.Visible = false; textBox1.Text = string.Empty ; textBox2.Text = string.Empty; textBox3.Text = string.Empty; textBox4.Text = string.Empty; dateTimePicker1.Text = string.Empty; textBox9.Text = string.Empty; textBox5.Text textBox6.Text textBox7.Text textBox8.Text = = = = string.Empty; string.Empty; string.Empty; string.Empty;
int f = 0; SqlConnection con = new SqlConnection(@"Data Source=SABARY\SQLEXPRESS;Initial Catalog=voting;Integrated Security=True"); try { con.Open(); SqlCommand cmd = new SqlCommand("select * from data", con); SqlDataReader dr1 = cmd.ExecuteReader(); while (dr1.Read()) { u = int.Parse(dr1["congress"].ToString()); f = 1; } dr1.Close(); if (f == 1) { u = u + 1; SqlCommand cmd1 = new SqlCommand("update data set congress='" + u + "'", con); cmd1.ExecuteNonQuery(); MessageBox.Show("succes"); }
private void pictureBox5_Click(object sender, EventArgs e) { pictureBox2.Visible = false; pictureBox4.Visible = false; pictureBox5.Visible = false; pictureBox3.Visible = false; label14.Visible = false; label15.Visible = false; label16.Visible = false; label13.Visible = false; textBox1.Text = string.Empty ; textBox2.Text = string.Empty; textBox3.Text = string.Empty; textBox4.Text = string.Empty; dateTimePicker1.Text = string.Empty; textBox9.Text = string.Empty; textBox5.Text textBox6.Text textBox7.Text textBox8.Text = = = = string.Empty; string.Empty; string.Empty; string.Empty;
int f = 0; SqlConnection con = new SqlConnection(@"Data Source=SABARY\SQLEXPRESS;Initial Catalog=voting;Integrated Security=True"); try { con.Open(); SqlCommand cmd = new SqlCommand("select * from data", con); SqlDataReader dr1 = cmd.ExecuteReader(); while (dr1.Read()) { u = int.Parse(dr1["kdmk"].ToString()); f = 1; } dr1.Close();
if (f == 1) { u = u + 1; SqlCommand cmd1 = new SqlCommand("update data set kdmk='" + u + "'", con); cmd1.ExecuteNonQuery(); MessageBox.Show("succes"); }
} catch (Exception ex) { MessageBox.Show(ex.Message); } finally { con.Close(); } } private void pictureBox4_Click(object sender, EventArgs e) { pictureBox2.Visible = false; pictureBox4.Visible = false; pictureBox5.Visible = false; pictureBox3.Visible = false; label14.Visible = false; label15.Visible = false; label16.Visible = false; label13.Visible = false; textBox1.Text = string.Empty ; textBox2.Text = string.Empty; textBox3.Text = string.Empty; textBox4.Text = string.Empty; dateTimePicker1.Text = string.Empty; textBox9.Text = string.Empty; textBox5.Text textBox6.Text textBox7.Text textBox8.Text = = = = string.Empty; string.Empty; string.Empty; string.Empty;
int f = 0; SqlConnection con = new SqlConnection(@"Data Source=SABARY\SQLEXPRESS;Initial Catalog=voting;Integrated Security=True"); try { con.Open(); SqlCommand cmd = new SqlCommand("select * from data", con); SqlDataReader dr1 = cmd.ExecuteReader(); while (dr1.Read()) { u = int.Parse(dr1["ldmk"].ToString()); f = 1; } dr1.Close(); if (f == 1) { u = u + 1; SqlCommand cmd1 = new SqlCommand("update data set ldmk='" + u + "'", con); cmd1.ExecuteNonQuery(); MessageBox.Show("succes"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { con.Close(); } }
} }
namespace Onlinevoting { public partial class Form6 : Form { public Form6() { InitializeComponent(); } private void BRBUTTON2OWSE_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "JPeg Image|*.jpg|Bitmap Image|*.bmp|Gif Image|*.gif"; DialogResult dr = ofd.ShowDialog(); if (dr == DialogResult.Cancel) return; pictureBox1.Image = Image.FromFile(ofd.FileName); } private void button2_Click(object sender, EventArgs e) { SqlConnection cn = new SqlConnection(@"Data Source=SABARY\SQLEXPRESS;Initial Catalog=voting;Integrated Security=True"); MemoryStream ms = new MemoryStream(); pictureBox1.Image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg); byte[] pic_arr = new byte[ms.Length]; ms.Position = 0; ms.Read(pic_arr, 0, pic_arr.Length); SqlCommand cmd = new SqlCommand("insert into vote(vid,vname,vfname,vgender,vdob,vaddress,wid,wardname,consid,c onsname,vimage) values(@vid,@vname,@vfname,@vgender,@vdob,@vaddress,@wid,@wardnam e,@consid,@consname,@vimage)", cn); cmd.Parameters.AddWithValue("@vid", (textBox1.Text)); cmd.Parameters.AddWithValue("@vname", textBox2.Text.ToString()); cmd.Parameters.AddWithValue("@vfname", textBox3.Text).ToString(); cmd.Parameters.AddWithValue("@vgender", textBox4.Text.ToString()); cmd.Parameters.AddWithValue("@vdob", (dateTimePicker1.Text.ToString())); cmd.Parameters.AddWithValue("@vaddress", textBox9.Text).ToString(); cmd.Parameters.AddWithValue("@wid", textBox5.Text.ToString()); cmd.Parameters.AddWithValue("@wardname", textBox6.Text.ToString()); cmd.Parameters.AddWithValue("@consid", textBox7.Text.ToString()); cmd.Parameters.AddWithValue("@consname", textBox8.Text.ToString()); cmd.Parameters.AddWithValue("@vimage", pic_arr); cn.Open();
try { if ((textBox1.Text != "") & (textBox2.Text != "") & (textBox3.Text != "") & (textBox4.Text != "") & (textBox9.Text != "") & (textBox5.Text != "") & (textBox6.Text != "") & (textBox7.Text != "") & (textBox8.Text != "")) { int rs = cmd.ExecuteNonQuery(); if (rs > 0) { MessageBox.Show("Data Added Sucessfullly"); textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = ""; //dateTimePicker1.Text=DateTime.Now.tos textBox9.Text = ""; textBox5.Text = ""; textBox6.Text = ""; textBox7.Text = ""; textBox8.Text = ""; pictureBox1.Image = null; } } else { MessageBox.Show("Enter the All the Details"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { cn.Close(); } }
private void button3_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection(@"Data Source=SABARY\SQLEXPRESS;Initial Catalog=voting;Integrated Security=True"); try { con.Open(); SqlCommand cmd = new SqlCommand("delete from vote where vid=" + (Convert.ToInt32(textBox1.Text )) + "", con); cmd.ExecuteNonQuery(); textBox1.Text = string.Empty; textBox2.Text = string.Empty; textBox3.Text = string.Empty; textBox4.Text = string.Empty; //dateTimePicker1.Text=DateTime.Now.tos textBox9.Text = string.Empty; textBox5.Text = string.Empty; textBox6.Text = string.Empty; textBox7.Text = string.Empty; textBox8.Text = string.Empty; pictureBox1.Image = null;
MessageBox.Show("onew row deleted"); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { con.Close(); } } private void button4_Click(object sender, EventArgs e) { int f = 0; SqlConnection con = new SqlConnection(@"Data Source=SABARY\SQLEXPRESS;Initial Catalog=voting;Integrated Security=True"); try { con.Open(); vote SqlCommand cmd = new SqlCommand("select * from where vid=" + (Convert.ToInt32(textBox1.Text)) + "", con); SqlDataReader dr1 = cmd.ExecuteReader();
if (dr1.Read() && f == 0) {
textBox1.Text = dr1["vid"].ToString(); textBox2.Text = dr1["vname"].ToString(); textBox3.Text = dr1["vfname"].ToString(); textBox4.Text = dr1["vgender"].ToString(); dateTimePicker1.Text = dr1["vdob"].ToString(); textBox9.Text = dr1["vaddress"].ToString(); textBox5.Text textBox6.Text textBox7.Text textBox8.Text = = = = dr1["wid"].ToString(); dr1["wardname"].ToString(); dr1["consid"].ToString(); dr1["consname"].ToString();
byte[] picarr = (byte[])dr1["vimage"]; MemoryStream ms = new MemoryStream(picarr); ms.Seek(0, SeekOrigin.Begin); //pictureBox1.Image = Image.FromStream(ms); pictureBox1.Image = Image.FromStream(ms); f = 1; } else { Console.WriteLine("data not found in your database"); } dr1.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { con.Close(); } } } }
Login form:
Before voting voter details should display by the effect of inserting their vote id:
APPENDIX D TABLES
ADMINSTRATOR TABLE
Column Name Login id Password Data Type Varchar2(10) Varchar2(10) Allow Nulls
VOTER
Column Name Voter ID Name Father name Gender dob Address Voter image
Allow Nulls
NOMINEE
Column Name Voter ID Name Gender Address Constituency Name Constituency Number Ward Name Ward Number Total ward Data Type Varchar2(10) Varchar2(10) Numeric(10,0) Varchar2(20) Varchar2(20) Numeric(10,0) Varchar2(20) Numeric(10,0) Numeric(10,0) Allow Nulls
CONSTITUENCY
Column Name Constituency ID Constituency Name Constituency Number Total voters Data Type Numeric(10,0) Varchar2(20) Numeric(10,0) Numeric(10,0) Allow Nulls
WARD
Column Name Ward ID Ward Name Ward Number Data Type Numeric(10,0) Varchar2(20) Numeric(10,0) Allow Nulls
VOTE
Column Name Party Name Party Symbol Total Votes Data Type Varchar2(10) Varchar2(10) Numeric(10,0) Allow Nulls