Vous êtes sur la page 1sur 68

ABSTRACT

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.

CHAPTER-1 1. INTRODUCTION 1.1 ABOUT THE PROJECT 1.1.1 OBJECTIVES:


This system provides a voting service that allows people to vote from remote place. This system encompasses all aspects of the current voting system, with adding additional convenience and security to the overall voting process.

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

1.1.2 OVERVIEW OF THE PROJECT


Electing the front-runner in the election is the ones responsibility, Computerized Voting System provide the facility to the user to poll form the system by having their own election number and password. The polling conducted securely by the commission and the result is announced by the administrator.

The project maintains two levels of users:Administrator Level Voter Level

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.

1.1.3 PROJECT SCOPE


The system deals with how an e-vote process should be designed and implemented in order to comply with the democratic election principles and rights as well as to other human rights, which constitute the cornerstone of the international legal civilization. These issues are discussed in the light of the voting principles and rights of the users involved in an election process. The scope of the system is limited to the general public elections, and also includes every election or decision-making process, which takes place through voting. It extends also to (Internet or Intranet) polls without binding effects (if the latter - in view of their nature or their extent - could influence the public discourse in a given state or organization). The system is structured as follows: The main issues associated with e-voting in presidential public election processes are discussed. Requirements for an electronic voting system to be used in general elections. Discusses requirements stemming from the democratic nature of the election process.

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)

1.2 PLAN OF THE REPORT


Planning plays a vital role in any types of project. In this project also we planned in such a manner and it has been illustrated as follows. 9-12-11 to 20-12-11 21-12-11 to 26-2-12 27-2-12 to 1-3-12 2- 3- 12 to 18-3-12 19-3- 12 to 3-4-12 Initial study of the problem. Assigning the module for the project. Assigning the front end and back end for the project. Implementation of the project. Testing of project

1.2.1 REPORT CHART

CHAPTER-2 2 .PROBLEM DEFINITION AND PROPORSAL

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.

2.2 PROBLEM DEFINITION


Electronic voting systems are increasingly replacing the traditional paper-based voting systems. These systems can make the voting process more convenient and may therefore lead to improved turnout. Electronic recording and counting of votes could be faster, more accurate and less labor intensive. The goal of the E-Voting as a product is to automate the voting process, help in solving fraud problems, decreasing the voting time, and the process of counting. A strong relationship between the indicator from one side and the related parameters from the other side, so reaching the required data is really a big problem.

2.3 EXISTING SYSTEM


The voting system currently is a electronic voting system, in which the voter simply press the button who they would like to vote for. The electoral officials gather all the votes from voting machine . At the end of the elections, the electoral officials converge and count the votes cast for each candidate and determine the winner of each election category.

2.3.1 DRAWBACKS IN THE EXISTING SYSTEMS


The current system in use today, has a number of problems my proposed system would aim to correct. The system is highly insecure and prone to election malpractice. Due to the fact that any voting machine can be prone to have the vote on same candidate. The administration of the voting system as a whole is highly inefficient, slow and time consuming, and is highly prone to human error. Disadvantage of the existing system: Time Consuming

Expensive

Needed an agent

We have to move out for that.

2.4 PROPOSED SYSYTEM


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. The ADMINISTRATOR has the overall control for the database, the nominee who got the more n umber of polling form the user will be announced as the winner in the election.

2.4.1 GOALS OF PROPOSED SYSTEM


1. Planned approach towards working: - The working in the organization will be well planned and organized. The data will be stored properly in data stores, which will help in retrieval of information as well as its storage. 2. Accuracy: - The level of accuracy in the proposed system will be higher. All operation would be done correctly and it ensures that whatever information is coming from the center is accurate. 3. Reliability: - The reliability of the proposed system will be high due to the above stated reasons. The reason for the increased reliability of the system is that now there would be proper storage of information. 4. No Redundancy:-In the proposed system utmost care would be that no information is repeated anywhere, in storage or otherwise. This would assure economic use of storage space and consistency in the data stored. 5. Immediate retrieval of information: - The main objective of proposed system is to provide for a quick and efficient retrieval of information. 6. Immediate storage of information: - In manual system there are many problems to store the largest amount of information. 7. Easy to Operate: - The system should be easy to operate and should be such that it can be developed within a short period of time and fit in the limited budget of the user.

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.

2.5 FEASIBILITY ANALYSIS


Depending on the results of the initial investigation the survey is now expanded to a more detailed feasibility study. FEASIBILITY STUDY is a test of system proposal according to its workability, impact of the organization, ability to meet needs and effective use of the resources. It focuses on these major questions: 1. What are the users demonstrable needs and how does a candidate system meet them? 2. What resources are available for given candidate system? 3. What are the likely impacts of the candidate system on the organization? 4. Whether it is worth to solve the problem? During feasibility analysis for this project, following primary areas of interest are to be considered. Investigation and generating ideas about a new system does this.

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.

2.5.1 TECHNICAL FEASIBILITY


A study of resource availability that may affect the ability to achieve an acceptable system. This evaluation determines whether the technology needed for the proposed system is available or not. Can the work for the project be done with current equipment existing software technology & available personal? Can the system be upgraded if developed? If new technology is needed then what can be developed? his is concerned with specifying equipment and software that will successfully satisfy the user requirement. The technical needs of the system may include: Front-end and back-end selection An important issue for the development of a project is the selection of suitable front-end and back-end. When we decided to develop the project we went through an extensive study to determine the most suitable platform that suits the needs of the organization as well as helps in development of the project. The aspects of our study included the following factors.

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.

2.5.2 ECONOMICAL FEASIBILITY


Economic justification is generally the Bottom Line consideration for most systems. Economic justification includes a broad range of concerns that includes cost benefit analysis. In this we weight the cost and the benefits associated with the candidate system and if it suits the basic purpose of the organization i.e. profit making, the project is making to the analysis and design phase. The financial and the economic questions during the preliminary investigation are verified to estimate the following: The cost of hardware and software for the class of application being considered. The proposed system will give the minute information, as a result the

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.3 OPERATIONAL FEASIBILITY


It is mainly related to human organizations and political aspects. The points to be considered are: What changes will be brought with the system? What organization structures are disturbed? What new skills will be required? Do the existing staff members have these skills? If not, can they be trained in due course of time? The system is operationally feasible as it very easy for the End users to operate it. It only needs basic information about Windows platform.

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

CHAPTER-3 3. SYSTEM REQUIREMENTS

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.

3.1.1 REQUIREMENT ANALYSIS :


Requirements Analysis deals with the information gathered from the various users currently working under the organization. Analyzer gathers various information from the user in various users for their future needs and also how the user wants the software in the future. It is used to develop in the modern way, expensive is low, communication to be easier and faster, and then reduce the coding and developing any other tools to be used to develop in the simple way to be incremented in the software process. Analyzer wants to design the software with full

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.

3.2 HARDWARE REQUIEMENTS


Processor type : Pentium Dual Core PROCESSOR SPEED : 1.0 GHz RAM SPEED HARD DISK KEYBOARD MONITOR CD DRIVE : 512 MB : 1.2 GHz : 20 GB : MM keyboard : VGA 140INCH : Creative

POINTING DEVICE : Microsoft mouse

3.3 SOFTWARE REQUIEMENTS


OPERATING SYSTEM: Windows xp DATABASE: SQL server 2005 LANGUAGE: .Net framework & c# DESIGN TOOL: Rational Rose Enterprise Edition

3.4 OTHER REQUIEMENTS 3.4.1 PERFOMENCE REQUIREMENTS:


In order to maintain an acceptable speed at maximum number of uploads allowed from a particular customer will be any number of users can access the system at any time. Also connections to the servers will be based on the criteria of attributes of the user like his location, and server will be working whole 24X 7 times.

3.4 .2 NON-FUNCTIONAL REQUIREMENTS


Security Requirements The security requirements for this system span all aspects of the voting process and include voter authenticity, voter anonymity, data confidentiality, data integrity, system accountability, system integrity, system availability, system assurance, and system reliability An individual not registered to vote must not be able to cast a ballot A voter must not be able to vote more than once The privacy of the vote has to be guaranteed during the casting, transfer, reception, collection, and tabulation of votes No voter should be able to prove that they voted in a certain way None of the participants involved in the voting process (organizers, election officials, trusted third parties, voters, etc) should be able to link a vote to an identifiable voter Each vote is recorded precisely as the voter intended Each voter is ensured a "clean slate" of the system to ensure equality, confidence, and minimize system tampering The outcome of the voting process must correspond to the votes cast System and voter operations are logged and audited The system cannot be re-configured during operation Access to voted ballots is prohibited until after the close of the polls Additional ballots cannot be cast once the polling place has closed The system must be open to independent inspection and auditing

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.3 PERFORMANCE REQUIREMENTS


The following performance requirements are specified below: The prime requirement is that no error condition causes a project to exit abruptly. Any error occurred in any process should return an error messages about the nature of the error that is clear to the user.

3.4.4 OTHER FUNCTIONAL ATTRIBUTES 3.4.4.1 SECURITY


Network Applications are available via network access, it is difficult, if not impossible, to limit the population of end-users who may access the application. In order to protect sensitive content and provide secure modes of data transmission, strong security measures must be implemented. Security has to be enforced at two levels. At first level, no one other than the person, who knows the user name and password, can be able to logon to the system. At the next level, measures have to be taken so that any normal person does not exercise any of the administrator rights.

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.

CHAPTER-4 4. SYSTEM DESIGN

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.

4.2 BASIC DESIGN APPORCH 4.2.1 INTRODUCTION


Design patterns can speed up the development process by providing tested, proven development paradigms. Effective software design requires considering issues that may not become visible until later in the implementation. Reusing design patterns helps to prevent subtle issues that can cause major problems, and it also improves code readability for coders and architects who are familiar with the patterns.

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.2.2 ECC PATTERN


Engine-Collection-Class, a Design Pattern for Building Reusable Enterprise Components The Enterprise Computing Center (ECC) is a research center of the ETH Zrich established in collaboration with industry to promote education, research, and technology transfer in the general areas of enterprise IT architecture, enterprise computing, enterprise application integration, middleware, high performance and large scale data management, multi-tier architectures, and service oriented architectures.

4.2.3 ADAPTOR PATTERN


In computer programming, the adapter design pattern (often referred to as the wrapper pattern or simply a wrapper) translates one interface for a class into a compatible interface. An adapter allows classes to work together that normally could not because of incompatible interfaces, by providing its interface to clients while using the original interface. The adapter translates calls to its interface into calls to the original interface, and the amount of code necessary to do this is typically small. The adapter is also responsible for transforming data into appropriate forms. For instance, if multiple Boolean values are stored as a single integer but your consumer requires a 'true'/'false', the adapter would be responsible for extracting the appropriate values from the integer value.

4.3 USER DESIGN INTERFACE 4.3.1 THREE-TIER ARCHITECTURE


Data is a clientserver architecture in which the user interface, functional process logic ("business rules"), computer data storage and data access are developed and maintained as independent modules, most often on separate platforms. It was developed by John J. Donovan in Open Environment Corporation (OEC), a tools company he founded in Cambridge, MA. The three-tier model is a software architecture and a software design pattern. Apart from the usual advantages of modular software with well-defined interfaces, the three-tier architecture is intended to allow any of the three tiers to be upgraded or replaced independently as requirements or technology change. For example, a change of operating system in the presentation tier would only affect the user interface code. Typically, the user interface runs on a desktop PC or workstation and uses a standard graphical user interface, functional process logic may consist of one or more separate modules running on a workstation or application server, and an RDBMS on a database server or mainframe contains the computer data storage logic. The middle tier may be multi-tiered itself (in which case the overall architecture is called an "n-tier architecture"). Three-tier architecture has the following three tiers:

4.3.2 PRESENTATION TIER


This is the topmost level of the application. The presentation tier displays information related to such services as browsing merchandise, purchasing, and shopping cart contents. It communicates with other tiers by outputting results to the browser/client tier and all other tiers in the network.

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.

4.3.4 DATA TIER


This tier consists of database servers. Here information is stored and retrieved. This tier keeps data neutral and independent from application servers or business logic. Giving data its own tier also improves scalability and performance.

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.

4.4 UML DIAGRAMS USECASE:


A use case captures the interactions that occur between developers and users of information and the system itself. A use case is a UML modeling element that describes how a user of the proposed system will interact with the system to perform a discrete unit of work. It describes and signifies a single interaction over time that has meaning for the end user and is required to leave the system in a complete state; either the interaction completed or was rolled back to the initial state.

HOME

USER USER REGISTRATION

ADMIN NOMINEE REGISTRATION

NOMINEE VOTE

VOTE COUNT

RESULT

Figure1: Use case Diagram for Voting system

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.

Figure2: Class Diagram for Voting system

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.

Autheticate Voter Id and Passowd [NotValid]

Select Profile

Check for Validity [valid]

Profile to view

voter to perfom ballot

Create Ballot Report

Pass Conforation to user

Pass Report to Administrator

Perform Counting

Send Report to Adminission

Declare Results

Figure3: Activity Diagram for Voting system

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

FINAL RESULT BY ADMIN

Figure4: Sequence Diagram for Voting system

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:

2: 3: USER 4: ADMIN 7: RESULT

5: 6:

VOTE

Figure5: Collaboration Diagram for Voting system

CHAPTER-5 5. IMPLEMENTATION 5.1 .IMPLEMENTATION DETAILS:


The word implementation means changing old system to new system that is adapting new features. Each successive version can incorporate the capabilities of previous version and provides additional processing function. System implementation specifies the functional and performance test that must be performed and standards to be applied to the source code, internal documentation and external documentation such as the design specification, the test plan, the users manual, the principles of operation, and the installation and maintenance procedures. The desired functional and physical audits of source code, documents, and physical media are specified. Implementation involves careful planning, investigation of current system and the constraints involved on the implementation, design of methods to achieve the trade.

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.

CHAPTER-6 TESTING 6.1 INTRODUCTION:


There are many approaches to software testing, but effective testing of complex data is essentially a process of investigation, not merely a matter of creating and following rote procedure. One definition of testing is "the process of questioning a product in order to evaluate it", where the "questions" are things the tester tries to do with the product, and the product answers with its behaviour in reaction to the probing of the tester. Although most of the intellectual processes of testing are nearly identical to that of review or inspection, the word testing is connoted to mean the dynamic analysis of the productputting the product through its paces.

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.

6.2 TYPE OF TESTING 6.2.1 UNIT TESTING


Unit testing emphasizes the verification effort on the smallest unit of software design i.e. a software component or module. Unit testing is a dynamic method for verification, where program is actually compiled and executed. Unit testing is performed in parallel with the coding phase. Unit testing tests units or modules not the whole software. The functionality of the modules was also tested as separate units. Each of the modules was tested as separate units. In each module all the functionalities were tested in isolation. Also the state of the system after a product has been dragged in to the voting same as the state of the system if it was added by clicking the add to cart button. Also it has been ensured that all the images of the products displayed in the shop products page are drag gable and have the product property so that they can be dropped in the cart area. In the Product Description Module it has been tested that all the images are displayed properly. Users can add review and the as soon as a user adds a review it is updated in the view customer review tab. It has been checked to see if the whole page refreshes or a partial page update happens when a user writes a review. In the Cart Details it has been tested that when a user edits a quantity or removes a product from the cart, the total price is updated accordingly. It has been checked to see if the whole page refreshes or a partial page update happens when a user edits the cart. Visual Studio 2005 has in built support for testing the application. The unit testing can be done using visual studio 2005 without the need of any external application. Various methods have been created for the purpose of unit testing. Test cases are automatically generated for these methods. Methods were written to retrieve all the manufacturers from the database, strings that match a certain search term, products that match certain filter criteria, all images that belong to a particular product etc. Unit test cases were automatically generated for these methods and it can be seen in figure 6.1 that the tests have passed.

6.2.2 INTEGRATION TESTING


In integration testing a system consisting of different modules is tested for problems arising from component interaction. Integration testing should be developed from the system specification. Firstly, a minimum configuration must be integrated and tested. In my project I have done integration testing in a bottom up fashion i.e. in this project I have started construction and testing with atomic modules. After unit testing the modules are integrated one by one and then tested the system for problems arising from component interaction.

6.2.3 VALIDATION TESTING


At the validation level, testing focuses on user visible actions and user recognizable output from the system. Validations testing is said to be successful when software functions in a manner that can be reasonably expected by the customer. Two types of validation testing

6.2.3.1 ALPHA TESTING


Alpha testing is simulated or actual operational testing by potential users/customers or an independent test team at the developers' site. Alpha testing is often employed for off-the-shelf software as a form of internal acceptance testing, before the software goes to beta testing.

6.2.3.2 BETA TESTING


Beta testing comes after alpha testing. Versions of the software, known as beta version, are released to a limited audience outside of the programming team. The software is released to groups of people so that further testing can ensure the product has few faults or bugs. Sometimes, beta versions are made available to the open public to increase the feedback field to a maximal number of future users

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.

CHAPTER-8 FUTURE ENHANCEMENT


Since every system has some limitations, so the proposed system is also not untouchable in this regard. Although it includes many features but still it would not be sufficient as the user requirements are not always same. The change in the requirements will need some changes in the system to fulfill the requirements.

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.

APPENDIX A ABOUT THE SOFTWARE

INTRODUCTION TO .NET FRAMEWORK


Over the last couple of years, bandwidth for distributed computing has been an expensive one. But, Microsoft believes that the scenario has changed and it is less expensive which enables Distributed Computing effectively at lower cost. As of today there are lots of examples for distributed applications. Example of distributed applications is instant messaging, where a client talks to a list of friends in the net and communicates with other clients in the network. So, .NET is aimed at accelerating this next generation of distributed computing. .NET is a revolutionary new platform, built on open Internet Protocols and standards, with tools and services that mix computing and communications in new ways. The .NET framework is the infrastructure for overall .NET platform. It provides the richest level of integration among presentation technologies, component technologies, and data technologies ever seen on a Microsoft platform. The entire architecture has been created to develop easy Internet applications as easy as developing the desktop environment. The .NET framework provides a fully managed, protected and feature-rich application execution environment, simplified development and deployment, and seamless integration with a wide variety of languages.

User and Program Interfaces

.NET Base Classes

Common Language Runtime

.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.

PERFORMANCE AND SCALABILITY:


If a system is not scalable, there's not much point in building systems to support large numbers of concurrent users. In fact, when considering large systems, performance is important, but scalability is still more important. Performance refers to the number of processor cycles that are necessary to complete any given task, or the time that is required to complete a single task.

THE BENEFITS OF .NET


For the developer, the answer to the question "Why .NET?" revolves around the benefits of Visual Studio .NET and the meaning of ".NET." .NET is a set of cross-platform technologies.. .NET is a moving target and is clearly in a state of flux. While much of what we know about.NET is not likely to change, new methodologies and paradigms are sure to arise that will add to what we already know and understand. And, as these new and innovative technologies emerge, some will fail to achieve industry acceptance and will be discarded or will simply disappear. Before the Internet, most application development was limited to Windows-based forms. As the Internet's popularity rose, the development of web applications increased and the world began to change.

Current and future .NET servers:


SERVER Microsoft Application Center Server 2005 DESCRIPTION Manages clusters and deploys web

applications Microsoft BizTalk Server 2005 Implements business processes and

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

.NET FRAMEWORK OVERVIEW


The .NET Framework consists of the CLR, the .NET Framework Class library, 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.

Visual Studio .NET

VC++.NET

VB.NET

C# .NET

OTHER

Common Language Specification Common Language Runtime .NET Framework Class Library

COMMON TYPE SPECIFICATION (CTS)


In .NET, a type is simply a generic term used to collectively refer to an entity such as class, structure, interface, enumeration and delegates from the set. CTS fully describe all data types and programming constructs supported by the run time and how these entities interact with each other. CTS is a formal specification that describes how a given type must be defined in order to be hosted by the CLR.

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.

COMMON LANGUAGE RUNTIME (CLR)


Generally, a runtime is a component that a computer has, to execute programs written in a particular programming language. When executed, a program can dynamically link to the runtime component of its source code language to get the basic functionality that it needs. The fact that different languages require different runtimes makes life difficult for developers. To avoid such dilemmas, .NET has introduced a single Common Language Runtime that all .NET languages share. The Common Language Runtime manages the execution of code and provides services that make development easier. CLR helps in designing components and applications whose objects interact across languages. The CLR helps the objects written in different languages to communicate with each other and to tightly integrate their behaviors. The metadata information is also created at the runtime of compiling into IL using the metadata engine. The metadata tells the run time more about the code, such as the definition of each type, and the signatures of each types member as well as other data.

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

SQL SERVER 2005 FEATURES OF SQL SERVER 2005: Internet Integration:


The SQL Server 2005 database engine includes integrated XML support. It also has the scalability, availability, and security features required to operate as the data storage component of the largest Web sites. The SQL Server 2005 programming model is integrated with the Windows DNA architecture for developing Web applications, and SQL Server 2005 supports features such as English Query and the Microsoft Search Service to incorporate user-friendly queries and powerful search capabilities in web applications. Scalability and Availability: The same database engine can be used across platforms ranging from laptop computers running Microsoft Windows 98 through large, multiprocessor servers running Microsoft Windows 2000 Data Center Edition SQL Server2005 Enterprise Edition supports features such as federated servers, indexed views, and large memory support that allow it to scale to the performance levels required by the largest web sites. Enterprise-Level Database Features: The SQL Server 2005 relational database engine supports the features required to support demanding data processing environments. The database engine protects data integrity while minimizing the overhead of managing thousands of users concurrently modifying the database. SQL Server 2005 distributed queries allow you to reference data from multiple sources as if it were a part of a SQL Server 2005 database, while at the same time, the distributed transaction support protects the integrity of any updates of the distributed data. Replication allows you to also maintain multiple copies of data. Disconnected users, have them work autonomously, and then merge their modifications back to the publisher.

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.

APPENDIX B SOURCE CODE

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;

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["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"); }

} catch (Exception ex) { MessageBox.Show(ex.Message); } finally { con.Close(); } }

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(); } } } }

APPENDIX C SCREEN SHOTS


Constituency details:

WARD WISE DETAILS:

Login form:

Election department can fill the details of the voter

After details of voter is saved on the database:

Election department can see the voter details:

Before voting voter details should display by the effect of inserting their vote id:

After voting is completed:

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

Data Type Varchar2(10) Varchar2(10) Varchar2(10) Numeric(10,0) date Varchar2(50) 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

Vous aimerez peut-être aussi