Sunteți pe pagina 1din 71

CHAPTER ONE

INTRODUCTION

INFORMATION TECHNOLOGY CENTER


1|Page
CHAPTER 1
Introduction

1.1 Why we choose this project?

We choose this project to specially design software for Election


Commission of Pakistan to support the peoples to vote online via computer. This software
is developed in C#.Net programming language for providing platform independent software
that could be run across various operating systems.

1.2 Objectives :

 Online Voting is basically a modernized electronic system of voting which allows us to


obtain, mark, deliver & count ballots/votes via computer.

 Convenience: As peoples are increasingly using internet at offices & homes so it is


easy for them to vote without moving to the polling stations.

 It could reduce expenses involved in setting up & staffing polling sites etc.

 The system is designed in a way so that a voter can vote only once so preventing
multiple voting by a single voter.

 It also prevent people with wrong identification or without CNIC to cast vote to
maintain transparency.

 There is no any problem of transporting ballots as they are readily stored on the
official site computers.

 It also helps in increasing voter count as woman who can not go out due to their
house hold activities & people who are physically disable can cast their votes right
from their homes if they have internet facility.

2|Page
CHAPTER TWO

TOOLS
&
TECHNOLOGIES

INFORMATION TECHNOLOGY CENTER

CHAPTER 2

3|Page
TOOLS AND TECHNOLOGIES

• Microsoft Visual Studio 2008


• C# dot net
• SQL Server 2000
• Adobe Photoshop

 Microsoft Visual Studio 2008


Visual Studio .NET is the Microsoft RAD rapid application development tool. Visual
Studio is an integrated development environment that is used to create many types of
dot net programs. Visual Studio is more productive tool than a simple text editor. This
is because visual studio allows you to enter your program, compile it and run it----all
within an easy to use graphical Windows environment. Visual supports Console
application programming as well as web based application programming it is only so
for because we can use the asp.net in visual studio.
You can use visual studio to create console applications as well as following types of
applications.
1. Windows application:
Windows applications are the programs that take of visual
controls offered by the windows operating system, such as, menus, buttons and
editable text boxes. Windows explorer which you use to navigate the file system of
your computer is one example of windows application.
2. . ASP.NET applications ASP.NET applications are programs that run over the Internet.
You access an ASP.NET application using a web browser, such as Internet Explorer.
Examples of ASP.NET applications would be online banking, stock trading, or auction
systems
3. ASP.NET web services ASP.NET web services are also programs that run over the
Internet. ASP.NET web services are also known as XML web services. The difference is that

4|Page
you can use them to offer a service that could be used in a distributed system of
interconnected services. For example, Microsoft's Passport web service offers identification
and authentication of web users you could then use in your own web application

Starting Visual Studio .NET and Creating a Project

All of your work in VS .NET is organized into projects. Projects contain the source and executable files
for your program, among other items.

 C# dot net:
5|Page
Although C# borrows from Java, C++, C, and even Visual Basic and Pascal, it is a
truly new language—and, in the opinion of this author, quite wondrous. Since C# is new, and
since language and syntax are the blocks on which programs are built, it's especially
important to pay attention to the rules of the language

Building Desktop Applications

With all of the emphasis on distributed applications that only appear on the Internet, it's easy to
forget that not every application ever created appears on someone's website. While distributed
application development is extremely important, the desktop application hasn't gone away and
it's unlikely to go away in the near future. The simple fact is that desktop applications serve the
needs of many computer users who don't need access to the Internet, much less access to a
business partner's network.

You can create a vast assortment of application types with C#, including desktop applications.
This chapter is going to build on your knowledge of desktop applications and show you how to
create several application types including dialog-based, Single Document Interface (SDI), and
Multiple Document Interface (MDI).

Identifiers

Identifiers are names used to denote variables, constants, types, methods, objects, and so on. An
identifier begins with a letter or an underscore and ends with the character just before the
next white space.

C# identifiers are case sensitive. For example, the three variables deeFlat, DeeFlat, and
DEEFLAT are all different, as running this click procedure will show:

 ADO.NET

6|Page
ADO.NET allows you to interact with a database directly using objects of the managed provider
classes. These objects allow you to connect to the database and execute SQL statements while
directly connected to the database. Objects like the DataReader allow you to connect to a
database directly and read the rows from a table in a forward-only direction.ADO.NET also
allow you to work in a disconnected manner. When doing this, you store information from a
database locally in the memory of the computer on which your program is running. You store
that information using objects of the data set classes. Once you have that information in the
memory, you can then read and manipulate that information. For example, you can display the
columns for the rows, add new rows, modify rows, and delete rows. Periodically, you'll
reconnect to the database to synchronize your changes you've made locally with the database.
This disconnected model allows you to write applications that run on the Internet, as well as for
devices that aren't always connected to the database—PDAs such as the Palm and the Pocket PC.
It also gives you a complete C# program that connects to a database, stores the rows locally,
disconnects from the database, and then reads the contents of those local rows while
disconnected from the database. This capability to store a local copy of rows retrieved from the
database is one of the main strengths of ADO.NET. The example program illustrates the basic
ideas of using the ADO.NET disconnected model to read rows from the database and store them
locally in memory. In later chapters, you'll see how to modify data locally and then synchronize
those changes with the database.

FLOW OF CONNECTION WITH SQL SERVER 2000

7|Page
The Connection Classes

There are three Connection classes: SqlConnection, OleDbConnection, and OdbcConnection.


You use an object of the SqlConnection class to connect to a SQL Server database. You use an
object of the OleDbConnection class to connect to any database that supports OLE DB, such as
Access or Oracle. You use an object of the OdbcConnection class to connect to any database that
supports ODBC. Ultimately, all communication with a database is done through a Connection
object.

The Command Classes: There are three Command classes: SqlCommand,


OleDbCommand, and OdbcCommand. You use a Command object to run a SQL statement, such
as a SELECT, INSERT, UPDATE, or DELETE statement. You can also use a Command object

8|Page
to call a stored procedure or retrieve rows from a specific table. You run the command stored in
a Command object using a Connection object.

The Parameter Classes: There are three Parameter classes: SqlParameter,


OleDbParameter, and OdbcParameter. You use a Parameter object to pass a
parameter to a Command object. You can use a Parameter to pass a value to a SQL
statement or a stored procedure call. You can store multiple Parameter objects in a
Command object through a ParameterCollection object.

The Parameter Collection Classes: There are three Parameter Collection classes:
SqlParameter Collection, OleDbParameter Collection, and OdbcParameter Collection. You use a
Parameter Collection object to store multiple Parameter objects for a Command object.

The DataReader Classes: There are three DataReader classes: SqlDataReader,


OleDbDataReader, and OdbcDataReader. You use a DataReader object to read rows retrieved
from the database using a Command object.DataReader objects can only be used to read rows in
a forward direction. DataReader objects act as an alternative to a DataSet object. You cannot use
a DataReader to modify rows in the database

 SQL Server 2000

Microsoft® SQL Server™ 2000 extends the performance, reliability, quality, and ease-of-use of
Microsoft SQL Server version 7.0. Microsoft SQL Server 2000 includes several new features
that make it an excellent database platform for large-scale online transactional processing

9|Page
(OLTP), data warehousing, and e-commerce applications Microsoft® SQL Server™ 2000 is a
set of components that work together to meet the data storage and analysis needs of the largest
Web sites and enterprise data processing systems. Relational Database Components The database
component of Microsoft® SQL Server™ 2000 is a Structured Query Language (SQL)–based,
scalable, relational database with integrated Extensible Markup Language (XML) support for
Internet applications. Each of the following terms describes a fundamental part of the
architecture of the SQL Server 2000 database component: The OLAP Services feature available
in SQL Server version 7.0 is now called SQL Server 2000 Analysis Services. The term OLAP
Services has been replaced with the term Analysis Services. Analysis Services also includes a
new data mining component

Database

A database is similar to a data file in that it is a storage place for data. Like a data file, a database
does not present information directly to a user; the user runs an application that accesses data
from the database and presents it to the user in an understandable format. Database systems are
more powerful than data files in that data is more highly organized. In a well-designed database,
there are no duplicate pieces of data that the user or application must update at the same time.
Related pieces of data are grouped together in a single structure or record, and relationships can
be defined between these structures and records. When working with data files, an application
must be coded to work with the specific structure of each data file. In contrast, a database
contains a catalog that applications use to determine how data is organized. Generic database
applications can use the catalog to present users with data from different databases dynamically,
without being tied to a specific data format. A database typically has two main parts: first, the
files holding the physical database and second, the database management system (DBMS)
software that applications use to access data. The DBMS is responsible for enforcing the
database structure, including: Maintaining relationships between data in the database.

• Ensuring that data is stored correctly, and that the rules defining data relationships are not
violated.

• Recovering all data to a point of known consistency in case of system failures.

10 | P a g e
Relational Database

Although there are different ways to organize data in a database, relational databases are one of
the most effective. Relational database systems are an application of mathematical set theory to
the problem of effectively organizing data. In a relational database, data is collected into tables
(called relations in relational theory). A table represents some class of objects that are important
to an organization. For example, a company may have a database with a table for employees,
another table for customers, and another for stores. Each table is built of columns and rows
(called attributes and tuples in relational theory). Each column represents some attribute of the
object represented by the table. For example, an Employee table would typically have columns
for attributes such as first name, last name, employee ID, department, pay grade, and job title.
Each row represents an instance of the object represented by the table. For example, one row in
the Employee table represents the employee who has employee ID 12345.

When organizing data into tables, you can usually find many different ways to define tables.
Relational database theory defines a process called normalization, which ensures that the set of
tables you define will organize your data effectively.

Scalable

SQL Server 2000 supports having a wide range of users access it at the same time. An instance
of SQL Server 2000 includes the files that make up a set of databases and a copy of the DBMS
software. Applications running on separate computers use a SQL Server 2000 communications
component to transmit commands over a network to the SQL Server 2000 instance. When an
application connects to an instance of SQL Server 2000, it can reference any of the databases in
that instance that the user is authorized to access. The communication component also allows
communication between an instance of SQL Server 2000 and an application running on the same
computer. You can run multiple instances of SQL Server 2000 on a single computer. SQL Server

11 | P a g e
2000 is designed to support the traffic of the largest Web sites or enterprise data processing
systems. Instances of SQL Server 2000 running on large, multiprocessor servers are capable of
supporting connections to thousands of users at the same time. The data in SQL Server tables can
be partitioned across multiple servers, so that several multiprocessor computers can cooperate to
support the database processing requirements of extremely large systems. These groups of
database servers are called federations. Although SQL Server 2000 is designed to work as the
data storage engine for thousands of concurrent users who connect over a network, it is also
capable of working as a stand-alone database directly on the same computer as an application.
The scalability and ease-of-use features of SQL Server 2000 allow it to work efficiently on a
single computer without consuming too many resources or requiring administrative work by the
stand-alone user. The same features allow SQL Server 2000 to dynamically acquire the resources
required to support thousands of users, while minimizing database administration and tuning.
The SQL Server 2000 relational database engine dynamically tunes itself to acquire or free the
appropriate computer resources required to support a varying load of users accessing an instance
of SQL Server 2000 at any specific time. The SQL Server 2000 relational database engine has
features to prevent the logical problems that occur if a user tries to read or modify data currently
used by others.

Structured Query Language

To work with data in a database, you have to use a set of commands and statements (language)
defined by the DBMS software. Several different languages can be used with relational
databases; the most common is SQL. The American National Standards Institute (ANSI) and the
International Standards Organization (ISO) define software standards, including standards for the
SQL language. SQL Server 2000 supports the Entry Level of SQL-92, the SQL standard
published by ANSI and ISO in 1992. The dialect of SQL supported by Microsoft SQL Server is
called Transact-SQL (T-SQL). T-SQL is the primary language used by Microsoft SQL Server
applications.

12 | P a g e
Extensible Markup Language

XML is the emerging Internet standard for data. XML is a set of tags that can be used to define
the structure of a hypertext document. XML documents can be easily processed by the Hypertext
Markup Language, which is the most important language for displaying Web pages. Although
most SQL statements return their results in a relational, or tabular, result set, the SQL Server
2000 database component supports a FOR XML clause that returns results as an XML document.
SQL Server 2000 also supports Path queries from Internet and intranet applications. XML
documents can be added to SQL Server databases, and the OPENXML clause can be used to
expose data from an XML document as a relational result set.

These are the tools and procedures that are available.

Client Utility Profiler

Command Prompt Query Analyzer

Enterprise Manager Service Manager

Failover SQL Setup

Network Utility SQL-DMO

ODBC Transact-SQL

OLE DB Windows

Perf Monitor Wizard

13 | P a g e
 Adobe Photoshop 8.0

With its comprehensive set of retouching, painting, drawing, and Web tools, Photoshop helps
you complete any image-editing task efficiently. And with features like the History palette and
editable layer effects, you can experiment freely without sacrificing efficiency. Photoshop 7.0
rounds out its comprehensive toolset with new capabilities that help you meet every creative
challenge, master every production demand, and handle any image-editing task efficiently. Make
Web page elements transparent in Photoshop and Image Ready by simply clicking on the color
you want to knock out. And with the new dithered transparency option, you can apply partial
transparency to blend Web graphics seamlessly into any background--even patterns--without
having to select a matte color first. If you need to edit the transparent effects later, you can remap
more than one color at a time and easily restore colors to their original settings.

14 | P a g e
CHAPTER THREE

SOURCE CODE

INFORMATION TECHNOLOGY CENTER

CHAPTER 3

15 | P a g e
SOURCE CODE

3.1 Form1

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ONLINE_VOTING_SYSTEM
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)


{

private void label1_Click(object sender, EventArgs e)


{

private void history_label_Click(object sender, EventArgs e)


{

private void pictureBox1_Click(object sender, EventArgs e)


{

}
History histry;
private void history_label_Click_1(object sender, EventArgs e)
{
this.Hide();
histry = new History();
histry.Show();

}
Register_Vote reg_vote;
private void Register_Vote_label_Click(object sender,EventArgs e)
{
this.Hide();
reg_vote = new Register_Vote();

16 | P a g e
reg_vote.Show();
}
Help hlp;
private void Help_label_Click(object sender, EventArgs e)
{
this.Hide();
hlp = new Help();
hlp.Show();
}

private void EXIT_label_Click(object sender, EventArgs e)


{
Application.Exit();
}
Admin admin;
private void log_in_button_Click(object sender, EventArgs e)
{
if (user_textBox.Text == "ADMIN" && password_textBox.Text == "admin")
{
this.Hide();
admin = new Admin();
admin.Show();
}
else
{
MessageBox.Show("Invalid Username or password..!");
}
}
Developer developer;
private void About_us_label_Click(object sender, EventArgs e)
{
this.Hide();
developer = new Developer();
developer.Show();
}
}
}

3.2 About us

17 | P a g e
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ONLINE_VOTING_SYSTEM
{
public partial class Developer : Form
{
public Developer()
{
InitializeComponent();
}

private void pictureBox1_Click(object sender, EventArgs e)


{

private void pictureBox1_Click_1(object sender, EventArgs e)


{

private void project_sup_label_Click(object sender, EventArgs e)


{

private void Developer_Load(object sender, EventArgs e)


{

private void miss_name_label_Click(object sender, EventArgs e)


{

}
Form1 home_page;
private void home_button_Click(object sender, EventArgs e)
{
this.Hide();
home_page = new Form1();
home_page.Show();
}
}
}

3.3 History

18 | P a g e
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ONLINE_VOTING_SYSTEM
{
public partial class History : Form
{
public History()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)


{

}
Form1 Home_page;
private void button1_Click_1(object sender, EventArgs e)
{
this.Hide();
Home_page = new Form1();
Home_page.Show();
}

private void History_Load(object sender, EventArgs e)


{

}
}
}

3.4 Register Vote

19 | P a g e
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ONLINE_VOTING_SYSTEM
{
public partial class Register_Vote : Form
{
SqlConnection conn;
SqlDataAdapter adpt;
DataTable dt;
SqlDataAdapter adp;
DataTable dtt;
public Register_Vote()
{
InitializeComponent();
conn = new
SqlConnection("server=.;database=Voting_System;integrated security=true");
}

private void register_label_Click(object sender, EventArgs e)


{

private void Register_Vote_Load(object sender, EventArgs e)


{
Voter_CNIC_veri_textBox.Visible = false;
Votername_veri_textBox.Visible = false;
}

private void register_button_Click(object sender, EventArgs e)


{
bool verified = verifyToNadra(CNIC_maskedTextBox.Text);
if (verified)
{
bool veri = verifyToVoterList(CNIC_maskedTextBox.Text);
if (veri)
{
MessageBox.Show(name_textBox.Text + " can cast vote through given Id");
if (name_textBox.Text != null && fname_textBox.Text != null &&
CNIC_maskedTextBox.Text != null)
{
try
{
adpt = new SqlDataAdapter("insert into voter_record values('" +
name_textBox.Text + "','" + fname_textBox.Text + "','" + surname_textBox.Text
+ "','" + CNIC_maskedTextBox.Text + "','" + resi_add_textBox.Text + "','" +
union_council_textBox.Text + "','" + taluka_textBox.Text + "','" +
district_textBox.Text + "')", conn); dt = new
DataTable();

20 | P a g e
adpt.Fill(dt);
adp = new SqlDataAdapter("select voter_id from voter_record order by voter_id
desc", conn);
dtt = new DataTable();
adp.Fill(dtt);
textBox_ID.DataBindings.Add("text", dtt, "voter_id");

}
catch (Exception ee)
{
MessageBox.Show("Exception is occured" + ee);
}
}
}
else
{
MessageBox.Show(name_textBox.Text + " can't cost vote...");
}
}
else
{
MessageBox.Show("Record not available in nadra...!");
}
}
private bool verifyToNadra(string nic)
{
adpt = new SqlDataAdapter("select*from nadra where CNIC='" + nic + "'", conn);
dt = new DataTable();
adpt.Fill(dt);

Voter_CNIC_veri_textBox.DataBindings.Add("text", dt, "CNIC").ToString();


Voter_CNIC_veri_textBox.DataBindings.Clear();
string cnic = Voter_CNIC_veri_textBox.Text;
Voter_CNIC_veri_textBox.Text = "";

if (nic == cnic)
{
MessageBox.Show("Record Availabel in nadra..");
return true;
}
else
{
MessageBox.Show("No Record Available in nadra..");
return false;
}
}
private bool verifyToVoterList(string vericnic)
{
adpt = new SqlDataAdapter("select*from voter_verification where
CNIC='" + vericnic + "'", conn);
dt = new DataTable();
adpt.Fill(dt);
Votername_veri_textBox.DataBindings.Add("text", dt, "CNIC").ToString();
Votername_veri_textBox.DataBindings.Clear();
string cnic = Votername_veri_textBox.Text;
Votername_veri_textBox.Text = "";
if (vericnic == cnic)

21 | P a g e
{
MessageBox.Show("Record Available in Voter List..");
return true;
}
else
{
MessageBox.Show("No Record Available in Voter List..");
return false;
}
}
Form1 home_page;
private void home_button_Click(object sender, EventArgs e)
{
this.Hide();
home_page = new Form1();
home_page.Show();
}

private void clear_button_Click(object sender, EventArgs e)


{
name_textBox.Text = "";
fname_textBox.Text = "";
CNIC_maskedTextBox.Text = "";
surname_textBox.Text = "";
resi_add_textBox.Text = "";
union_council_textBox.Text = "";
taluka_textBox.Text = "";
district_textBox.Text = "";
}
voting vt = new voting();
public static string id;
private void next_button_Click(object sender, EventArgs e)
{
if (name_textBox.Text == "" || fname_textBox.Text == "" ||
surname_textBox.Text == "" || CNIC_maskedTextBox.Text == "" ||
taluka_textBox.Text == "" || union_council_textBox.Text == ""
|| district_textBox.Text == "")
{

MessageBox.Show("Please fill all the fields...");


}

else
{
id = textBox_ID.Text = (Convert.ToString(textBox_ID.Text));
this.Hide();
vt.Show();

}
}
}}

3.5 Voting

using System;

22 | P a g e
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ONLINE_VOTING_SYSTEM
{
public partial class voting : Form
{
SqlConnection conn;
SqlDataAdapter adpt;
DataTable dt;
SqlDataAdapter adt;
DataTable dt1;
SqlDataAdapter adt2;
DataTable dt2;
public voting()
{
InitializeComponent();
conn = new
SqlConnection("server=.;database=voting_system;integrated security=true");
}

private void voting_Load(object sender, EventArgs e)


{
Verification_textbox.Visible = false;
voter_id_textBox.Enabled = false;
Verification_textbox.Visible = false;
vote_to_comboBox.Text = "";
this.voter_id_textBox.Text = Register_Vote.id;
adt = new SqlDataAdapter("select name from candidate_record order by name
asc", conn);
dt1 = new DataTable();
adt.Fill(dt1);
vote_to_comboBox.DataSource = dt1;

vote_to_comboBox.DisplayMember = "";
vote_to_comboBox.ValueMember = "name";
adt2 = new SqlDataAdapter("select party from candidate_record where name='" +
vote_to_comboBox.Text + "'", conn);
dt2 = new DataTable();
adt2.Fill(dt2);
party_textBox.DataBindings.Add("text", dt2, "Party");
party_textBox.DataBindings.Clear();
if (party_textBox.Equals("PPP"))
{
PPP_pictureBox.Visible = true;
}
else
{
PPP_pictureBox.Visible = false;
}

23 | P a g e
}
Form1 home_page;
private void home_button_Click(object sender, EventArgs e)
{
this.Hide();
home_page = new Form1();
home_page.Show();
}

private void submit_button_Click(object sender, EventArgs e)


{
bool verified = VerifyToCNIC(nic_textBox.Text);
if (verified)
{
MessageBox.Show("Record already exsit");

}
else
{
adpt = new SqlDataAdapter("insert into vote_cast values(" +
voter_id_textBox.Text + ",'" + voter_name_textBox.Text + "','" +
nic_textBox.Text + "','" + vote_to_comboBox.Text + "','" + party_textBox.Text
+ "')", conn);
dt = new DataTable();
adpt.Fill(dt);
MessageBox.Show(voter_name_textBox.Text + " has voted successfully...");
voter_id_textBox.DataBindings.Clear();
voter_name_textBox.DataBindings.Clear();
fname_textBox.DataBindings.Clear();
surname_textBox.DataBindings.Clear();
nic_textBox.DataBindings.Clear();
vote_to_comboBox.Text = "";
}
}
private bool VerifyToCNIC(string nic)
{

adpt = new SqlDataAdapter("select*from vote_Cast where Voter_CNIC='" + nic +


"'", conn);
dt = new DataTable();
adpt.Fill(dt);

Verification_textbox.DataBindings.Add("text", dt, "Voter_CNIC").ToString();


Verification_textbox.DataBindings.Clear();
string cnic = Verification_textbox.Text;
Verification_textbox.Text = "";

if (nic == cnic)
{
return true;
}
else
{
return false;
}

24 | P a g e
private void voter_id_textBox_TextChanged(object sender, EventArgs e)
{
adpt = new SqlDataAdapter("select*from voter_record where Voter_id=" +
voter_id_textBox.Text + "", conn);
dt = new DataTable();
adpt.Fill(dt);
voter_name_textBox.DataBindings.Add("text", dt, "name");
fname_textBox.DataBindings.Add("text", dt, "fname");
surname_textBox.DataBindings.Add("text", dt, "surname");
nic_textBox.DataBindings.Add("text", dt, "CNIC");
voter_id_textBox.DataBindings.Clear();
voter_name_textBox.DataBindings.Clear();
fname_textBox.DataBindings.Clear();
surname_textBox.DataBindings.Clear();
nic_textBox.DataBindings.Clear();

private void vote_to_comboBox_SelectedIndexChanged(object sender, EventArgs e)


{
adpt = new SqlDataAdapter("select party from candidate_record where name='" +
vote_to_comboBox.Text + "'", conn);
dt = new DataTable();
adpt.Fill(dt);
party_textBox.DataBindings.Add("text", dt, "Party");
party_textBox.DataBindings.Clear();
}
Register_Vote reg_vote;
private void next_button_Click(object sender, EventArgs e)
{
this.Hide();
reg_vote = new Register_Vote();
reg_vote.Show();
}
}
}

3.6 Help

using System;
using System.Collections.Generic;

25 | P a g e
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ONLINE_VOTING_SYSTEM
{
public partial class Help : Form
{
public Help()
{
InitializeComponent();
}
Form1 home_page;
private void Home_button_Click(object sender, EventArgs e)
{
this.Hide();
home_page = new Form1();
home_page.Show();
}
}
}

3.7 Add Nominees

using System;
using System.Collections.Generic;
using System.ComponentModel;

26 | P a g e
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ONLINE_VOTING_SYSTEM
{
public partial class AddNominees : Form
{
SqlConnection conn;
SqlDataAdapter adpt;
DataTable dt;
DataSet ds;
public AddNominees()
{
InitializeComponent();
conn = new
SqlConnection("server=.;database=voting_system;integrated security=true");
}

private void AddNominees_Load(object sender, EventArgs e)


{
Update_veri_textBox.Visible = false;
Candidate_comboBox.Text = "Select Nominee";
adpt = new SqlDataAdapter("select name from candidate_record", conn);
dt = new DataTable();
adpt.Fill(dt);
Candidate_comboBox.DataSource = dt;
Candidate_comboBox.ValueMember = "Name";
Candidate_comboBox.Text = "";
CNIC_maskedTextBox1.Text = "";
textBox_District.Text = "";
textBox_id.Text = "";
textBox_Name.Text = "";
textBox_Party.Text = "";
MNA_radioButton.Checked = false;
MPA_radioButton.Checked = false;
NIC_VERI_textBox.Visible = false;
Nic_nadra_textBox.Visible = false;
adpt = new SqlDataAdapter("select max(candidate_id)as candidate_id
from candidate_record", conn);
dt = new DataTable();
adpt.Fill(dt);
last_id_textBox.DataBindings.Add("text", dt, "candidate_id");
last_id_textBox.DataBindings.Clear();
last_id_label.Text = last_id_textBox.Text;
}

private void NIC_VERI_textBox_TextChanged(object sender, EventArgs e)


{

private void button_add_Click(object sender, EventArgs e)


{

27 | P a g e
bool verified_Nadra = VerifyToCNIC_Nadra(CNIC_maskedTextBox1.Text);
if (verified_Nadra)
{
bool verified= this.verifyFromList(textBox_id.Text);
if (verified)
{
MessageBox.Show("Candidate with "+textBox_id.Text+" is already available...");
}
else
{
bool nic_verify = this.VerifyToCNIC(CNIC_maskedTextBox1.Text);
if (nic_verify)
{
MessageBox.Show("candidate with this CNIC " + CNIC_maskedTextBox1.Text + "
is already exist");

}
else
{
if (MNA_radioButton.Checked)
{
adpt = new SqlDataAdapter("insert into candidate_record values(" +
textBox_id.Text + ",'" + textBox_Name.Text + "','" + CNIC_maskedTextBox1.Text
+ "','" + textBox_Party.Text + "','" +MNA_radioButton.Text + "','" +
textBox_District.Text + "')", conn);
ds = new DataSet();
adpt.Fill(ds);
MessageBox.Show(textBox_Name.Text + " has been added in list of "
+MNA_radioButton.Text+ " catagory");
adpt = new SqlDataAdapter("select name from candidate_record", conn);
dt = new DataTable();
adpt.Fill(dt);
Candidate_comboBox.DataSource = dt;
Candidate_comboBox.ValueMember = "Name";
Candidate_comboBox.Text = "";
adpt = new SqlDataAdapter("select max(candidate_id)as candidate_id from
candidate_record", conn);
dt = new DataTable();
adpt.Fill(dt);
last_id_textBox.DataBindings.Add("text", dt, "candidate_id");
last_id_textBox.DataBindings.Clear();
last_id_label.Text = last_id_textBox.Text;
MNA_radioButton.Checked = false;
MPA_radioButton.Checked = false;
CNIC_maskedTextBox1.Text = "";
textBox_District.Text = "";
textBox_id.Text = "";
textBox_Name.Text = "";
textBox_Party.Text = "";

}
else if (MPA_radioButton.Checked)
{
adpt = new SqlDataAdapter("insert into candidate_record values(" +
textBox_id.Text + ",'" + textBox_Name.Text + "','" + CNIC_maskedTextBox1.Text
+ "','" + textBox_Party.Text + "','" + MPA_radioButton.Text + "','" +
textBox_District.Text + "')", conn);

28 | P a g e
ds = new DataSet();
adpt.Fill(ds);
MessageBox.Show(textBox_Name.Text + " has been added in list of " +
MPA_radioButton.Text + " catagory");
adpt = new SqlDataAdapter("select name from candidate_record", conn);
dt = new DataTable();
adpt.Fill(dt);
Candidate_comboBox.DataSource = dt;
Candidate_comboBox.ValueMember = "Name";
Candidate_comboBox.Text = "";
adpt = new SqlDataAdapter("select max(candidate_id)as candidate_id from
candidate_record", conn);
dt = new DataTable();
adpt.Fill(dt);
last_id_textBox.DataBindings.Add("text", dt, "candidate_id");
last_id_textBox.DataBindings.Clear();
last_id_label.Text = last_id_textBox.Text;
MNA_radioButton.Checked = false;
MPA_radioButton.Checked = false;
CNIC_maskedTextBox1.Text = "";
textBox_District.Text = "";
textBox_id.Text = "";
textBox_Name.Text = "";
textBox_Party.Text = "";
}
}
}
}
}
public bool verifyFromList(string id)
{
adpt = new SqlDataAdapter("select * from candidate_Record where Candidate_Id="
+ id + "", conn);
dt = new DataTable();
adpt.Fill(dt);
Verification_textbox.DataBindings.Add("text", dt, "candidate_Id").ToString();
Verification_textbox.DataBindings.Clear();
string veri = Verification_textbox.Text;
Verification_textbox.Text = "";
if (id == veri)
{
return true;
}
else
{
return false;
}
}
private bool VerifyToCNIC(string nic)
{
adpt = new SqlDataAdapter("select *from candidate_record where
candidate_cnic='" + nic + "'", conn);
dt = new DataTable();
adpt.Fill(dt);

NIC_VERI_textBox.DataBindings.Add("text", dt, "candidate_cnic").ToString();


NIC_VERI_textBox.DataBindings.Clear();

29 | P a g e
string cnic = NIC_VERI_textBox.Text;
NIC_VERI_textBox.Text = "";

if (nic == cnic)
{
return true;
}
else
{
return false;
}
}
private bool VerifyToCNIC_Nadra(string nic)
{
adpt = new SqlDataAdapter("select *from nadra where CNIC='" + nic + "'",
conn);
dt = new DataTable();
adpt.Fill(dt);

Nic_nadra_textBox.DataBindings.Add("text", dt, "CNIC").ToString();


Nic_nadra_textBox.DataBindings.Clear();
string cnic = Nic_nadra_textBox.Text;
Nic_nadra_textBox.Text = "";

if (nic == cnic)
{
MessageBox.Show("Record available in NADRA...");
return true;
}
else
{
MessageBox.Show("Sorry ! Indentification not matched..");
return false;
}

private void last_id_label_Click(object sender, EventArgs e)


{

private void candidate_id_label_Click(object sender, EventArgs e)


{

}
Form1 Home_page;
private void button_Home_Click(object sender, EventArgs e)
{
this.Hide();
Home_page = new Form1();
Home_page.Show();
}

private void button_clear_Click(object sender, EventArgs e)


{

30 | P a g e
MNA_radioButton.Checked = false;
MPA_radioButton.Checked = false;

CNIC_maskedTextBox1.Text = "";
textBox_District.Text = "";
textBox_id.Text = "";
textBox_Name.Text = "";
textBox_Party.Text = "";
}

private void MNA_checkBox_CheckedChanged(object sender, EventArgs e)


{

private void MPA_checkBox_CheckedChanged(object sender, EventArgs e)


{

private void button1_Click(object sender, EventArgs e)


{

}
Admin admin;
private void back_button_Click(object sender, EventArgs e)
{
this.Hide();
admin = new Admin();
admin.Show();
}

private void delete_button_Click(object sender, EventArgs e)


{
bool veri_delete = VerifyToCNIC_delete(CNIC_maskedTextBox1.Text);
if (veri_delete)
{
if (MNA_radioButton.Checked)
{
MNA_radioButton.Checked = true;
adpt = new SqlDataAdapter("delete from candidate_record
where name='" + Candidate_comboBox.Text + "'", conn);
ds = new DataSet();
adpt.Fill(ds);
MessageBox.Show(textBox_Name.Text + " has been deleted from MNA_Record...");

adpt = new SqlDataAdapter("select name from candidate_record", conn);


dt = new DataTable();
adpt.Fill(dt);
Candidate_comboBox.DataSource = dt;
Candidate_comboBox.ValueMember = "Name";
Candidate_comboBox.Text = "";
Candidate_comboBox.Text = "";
CNIC_maskedTextBox1.Text = "";
textBox_District.Text = "";
textBox_id.Text = "";
textBox_Name.Text = "";

31 | P a g e
textBox_Party.Text = "";
MNA_radioButton.Checked = false;
MPA_radioButton.Checked = false;
adpt = new SqlDataAdapter("select max(candidate_id)as
candidate_id from candidate_record", conn);
dt = new DataTable();
adpt.Fill(dt);
last_id_textBox.DataBindings.Add("text", dt, "candidate_id");
last_id_textBox.DataBindings.Clear();
last_id_label.Text = last_id_textBox.Text;

}
else if (MPA_radioButton.Checked)
{
MPA_radioButton.Checked = true;
adpt = new SqlDataAdapter("delete from candidate_record
where name='" + Candidate_comboBox.Text + "'", conn);
ds = new DataSet();
adpt.Fill(ds);
MessageBox.Show(textBox_Name.Text + " has been deleted from MPA_Record...");
adpt = new SqlDataAdapter("select name from candidate_record", conn);
dt = new DataTable();
adpt.Fill(dt);
Candidate_comboBox.DataSource = dt;
Candidate_comboBox.ValueMember = "Name";
Candidate_comboBox.Text = "";
Candidate_comboBox.Text = "";
CNIC_maskedTextBox1.Text = "";
textBox_District.Text = "";
textBox_id.Text = "";
textBox_Name.Text = "";
textBox_Party.Text = "";
MNA_radioButton.Checked = false;
MPA_radioButton.Checked = false;
adpt = new SqlDataAdapter("select max(candidate_id)as
candidate_id from candidate_record", conn);
dt = new DataTable();
adpt.Fill(dt);
last_id_textBox.DataBindings.Add("text", dt, "candidate_id");
last_id_textBox.DataBindings.Clear();
last_id_label.Text = last_id_textBox.Text;
}
else
{
MessageBox.Show("Please chech either MNA or MPA ");
}
}
else
{
MessageBox.Show("There is no record match in nominee list.....");
}
}
private bool VerifyToCNIC_delete(string delete_nic)
{

32 | P a g e
adpt = new SqlDataAdapter("select *from candidate_record where
candidate_cnic='" + delete_nic + "'", conn);
dt = new DataTable();
adpt.Fill(dt);
Update_veri_textBox.DataBindings.Add("text", dt, "candidate_cnic").ToString();
Update_veri_textBox.DataBindings.Clear();
string cnic = Update_veri_textBox.Text;
Update_veri_textBox.Text = "";

if (delete_nic == cnic)
{
return true;
}
else
{
return false;
}
}

private void update_button_Click(object sender, EventArgs e)


{
bool verify_update=VerifyToCNIC_update(CNIC_maskedTextBox1.Text);
if (verify_update)
{
if (MNA_radioButton.Checked)
{
adpt = new SqlDataAdapter("update candidate_record set candidate_id=" +
textBox_id.Text + ",Candidate_CNIC='" + CNIC_maskedTextBox1.Text + "',Party='"
+ textBox_Party.Text + "',category='" + MNA_radioButton.Text + "',District='"
+textBox_District.Text + "' where name='" + Candidate_comboBox.Text + "'",
conn);
ds = new DataSet();
adpt.Fill(ds);
MessageBox.Show("Record updated successfully...");

adpt = new SqlDataAdapter("select max(candidate_id)as candidate_id from


candidate_record", conn);
dt = new DataTable();
adpt.Fill(dt);
last_id_textBox.DataBindings.Add("text", dt, "candidate_id");
last_id_textBox.DataBindings.Clear();
last_id_label.Text = last_id_textBox.Text;
Candidate_comboBox.Text = "";
CNIC_maskedTextBox1.Text = "";
textBox_District.Text = "";
textBox_id.Text = "";
textBox_Name.Text = "";

33 | P a g e
textBox_Party.Text = "";
MNA_radioButton.Checked = false;
MPA_radioButton.Checked = false;
}
else if (MPA_radioButton.Checked)
{
adpt = new SqlDataAdapter("update candidate_record set candidate_id=" +
textBox_id.Text + ",Candidate_CNIC='" + CNIC_maskedTextBox1.Text + "',Party='"
+ textBox_Party.Text + "',category='" +MPA_radioButton.Text + "',District='"
+ textBox_District.Text + "' where name='" + Candidate_comboBox.Text + "'",
conn);
ds = new DataSet();
adpt.Fill(ds);
MessageBox.Show("Record updated successfully...");
adpt = new SqlDataAdapter("select max(candidate_id)as
candidate_id from candidate_record", conn);
dt = new DataTable();
adpt.Fill(dt);
last_id_textBox.DataBindings.Add("text", dt, "candidate_id");
last_id_textBox.DataBindings.Clear();
last_id_label.Text = last_id_textBox.Text;
Candidate_comboBox.Text = "";
CNIC_maskedTextBox1.Text = "";
textBox_District.Text = "";
textBox_id.Text = "";
textBox_Name.Text = "";
textBox_Party.Text = "";
MNA_radioButton.Checked = false;
MPA_radioButton.Checked = false;
}
else
{
MessageBox.Show("Please select the category....");
}
}
else
{
MessageBox.Show("record is not available in candidate list to update..");
}
}
private bool VerifyToCNIC_update(string update_nic)
{

adpt = new SqlDataAdapter("select *from candidate_record where


candidate_cnic='" + update_nic + "'", conn);
dt = new DataTable();
adpt.Fill(dt);

34 | P a g e
Update_veri_textBox.DataBindings.Add("text", dt, "candidate_cnic").ToString();
Update_veri_textBox.DataBindings.Clear();
string cnic = Update_veri_textBox.Text;
Update_veri_textBox.Text = "";

if (update_nic == cnic)
{
return true;
}
else
{
return false;
}
}
private void Candidate_List_richTextBox_TextChanged(object sender, EventArgs
e)
{

private void Candidate_listBox_SelectedIndexChanged(object sender,


EventArgs e)
{

private void textBox_Name_TextChanged(object sender, EventArgs e)


{

private void checkedListBox1_SelectedIndexChanged(object sender,


EventArgs e)
{

private void checkedListBox1_SelectedIndexChanged_1(object sender,


EventArgs e)
{

private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)


{

35 | P a g e
adpt = new SqlDataAdapter("select *from candidate_record Where
name='"+Candidate_comboBox.Text+"'",conn);
dt = new DataTable();
adpt.Fill(dt);
textBox_District.DataBindings.Add("text",dt,"District");
textBox_District.DataBindings.Clear();
CNIC_maskedTextBox1.DataBindings.Add("text",dt,"Candidate_CNIC");
CNIC_maskedTextBox1.DataBindings.Clear();
textBox_id.DataBindings.Add("text",dt,"Candidate_Id");
textBox_id.DataBindings.Clear();
textBox_Name.DataBindings.Add("text",dt,"Name");
textBox_Name.DataBindings.Clear();
textBox_Party.DataBindings.Add("text", dt, "Party");
textBox_Party.DataBindings.Clear();
NIC_VERI_textBox.DataBindings.Add("text",dt,"Category");
NIC_VERI_textBox.DataBindings.Clear();
if (NIC_VERI_textBox.Text.Equals("MNA"))
{
MNA_radioButton.Checked = true;
}
if (NIC_VERI_textBox.Text.Equals("MPA"))
{
MPA_radioButton.Checked = true;
}
}

private void CNIC_maskedTextBox1_MaskInputRejected(object sender,


MaskInputRejectedEventArgs e)
{

}
}
}

3.8 View Nominee

using System;

36 | P a g e
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ONLINE_VOTING_SYSTEM
{
public partial class ViewNominees : Form
{
SqlConnection con;
SqlDataAdapter adpt;
DataTable dt;
public ViewNominees()
{
InitializeComponent();
con = new
SqlConnection("server=.;database=voting_system;integrated security=true");
}
Form1 Home_page;
private void Home_button_Click(object sender, EventArgs e)
{
this.Hide();
Home_page = new Form1();
Home_page.Show();
}

private void ViewNominees_Load(object sender, EventArgs e)


{
MNA_dataGridView.Visible = false;
MPA_dataGridView.Visible = false;
adpt = new SqlDataAdapter("select* from candidate_record order by
candidate_id asc", con);
dt = new DataTable();
adpt.Fill(dt);
Nominees_dataGridView.DataSource = dt;
}
Admin admin;
private void back_button_Click(object sender, EventArgs e)
{
this.Hide();
admin = new Admin();
admin.Show();
}

private void MNA_checkBox_CheckedChanged(object sender, EventArgs e)


{

private void MPA_checkBox_CheckedChanged(object sender, EventArgs e)


{

37 | P a g e
}

private void MNA_radioButton_CheckedChanged(object sender, EventArgs e)


{
if (MNA_radioButton.Checked)
{
MNA_dataGridView.Visible = true;
MPA_dataGridView.Visible = false;
Nominees_dataGridView.Visible = false;
adpt = new SqlDataAdapter("select*from Candidate_record where category='"
+MNA_radioButton.Text+ "' order by candidate_id asc", con);
dt = new DataTable();
adpt.Fill(dt);
MNA_dataGridView.DataSource = dt;
}
if (MNA_radioButton.Checked== false &&MPA_radioButton.Checked == false)
{
MNA_dataGridView.Visible = false;
MPA_dataGridView.Visible = false;
Nominees_dataGridView.Visible = true;
}
if (MPA_radioButton.Checked)
{
MPA_dataGridView.Visible = true;
MNA_dataGridView.Visible = false;
Nominees_dataGridView.Visible = false;

adpt = new SqlDataAdapter("select*from Candidate_record where category='" +


MPA_radioButton.Text+ "' order by candidate_id asc", con);
dt = new DataTable();
adpt.Fill(dt);
MPA_dataGridView.DataSource = dt;
}
if(MPA_radioButton.Checked == false && MNA_radioButton.Checked== false)
{
MNA_dataGridView.Visible = false;
MPA_dataGridView.Visible = false;
Nominees_dataGridView.Visible = true;
}
}

private void MPA_radioButton_CheckedChanged(object sender, EventArgs e)


{
if (MPA_radioButton.Checked)
{
MPA_dataGridView.Visible = true;
MNA_dataGridView.Visible = false;
Nominees_dataGridView.Visible = false;

adpt = new SqlDataAdapter("select*from Candidate_record where category='" +


MPA_radioButton.Text + "' order by candidate_id asc", con);
dt = new DataTable();
adpt.Fill(dt);
MPA_dataGridView.DataSource = dt;
}
if(MPA_radioButton.Checked== false && MNA_radioButton.Checked == false)
{

38 | P a g e
MNA_dataGridView.Visible = false;
MPA_dataGridView.Visible = false;
Nominees_dataGridView.Visible = true;
}
if (MNA_radioButton.Checked)
{
MNA_dataGridView.Visible = true;
MPA_dataGridView.Visible = false;
Nominees_dataGridView.Visible = false;
adpt = new SqlDataAdapter("select*from Candidate_record where category='" +
MNA_radioButton.Text + "' order by candidate_id asc", con);
dt = new DataTable();
adpt.Fill(dt);
MNA_dataGridView.DataSource = dt;
}
if(MPA_radioButton.Checked== false && MNA_radioButton.Checked == false)
{
MNA_dataGridView.Visible = false;
MPA_dataGridView.Visible = false;
Nominees_dataGridView.Visible = true;
}

private void ALL_radioButton_CheckedChanged(object sender, EventArgs e)


{
if (ALL_radioButton.Checked)
{
MNA_dataGridView.Visible = false;
MPA_dataGridView.Visible = false;
Nominees_dataGridView.Visible = true;
}
}
}
}

39 | P a g e
3.9 Results
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ONLINE_VOTING_SYSTEM
{
public partial class Result : Form
{
SqlConnection con;
SqlDataAdapter adpt_result;
DataTable dt_result;
SqlDataAdapter adptNominees;
DataTable dtNomee;
SqlDataAdapter adpt_party;
DataTable dt_party;

public Result()
{
InitializeComponent();
con = new SqlConnection("server=.;database=voting_system;integrated
security=true");
}

private void Result_Load(object sender, EventArgs e)


{
comboBox1.Visible = false;
adptNominees = new SqlDataAdapter("select name from candidate_record order by
name asc", con);
dtNomee = new DataTable();
adptNominees.Fill(dtNomee);
comboBox_candidate_list.DataSource = dtNomee;
comboBox_candidate_list.DisplayMember = "";
comboBox_candidate_list.ValueMember = "name";
adpt_party = new SqlDataAdapter("select distinct party from
candidate_record", con);
dt_party = new DataTable();
adpt_party.Fill(dt_party);
Party_result_comboBox.DataSource = dt_party;
Party_result_comboBox.ValueMember = "Party";

private void button_close_Click(object sender, EventArgs e)


{
comboBox_candidate_list.Visible = false;
pictureBox2.Visible = false;
pictureBox1.Visible = false;
party_result_label.Visible = false;

40 | P a g e
Party_result_comboBox.Visible = false;
Party_textBox.Visible = false;
Party_label.Visible = false;
Vote_textBox.Visible = false;
label1.Visible = false;
label2.Visible = false;
label3.Visible = false;
label4.Visible = false;

private void button_restore_Click(object sender, EventArgs e)


{
comboBox_candidate_list.Visible = true;
pictureBox2.Visible = true;
pictureBox1.Visible = true;
party_result_label.Visible = true;
Party_result_comboBox.Visible = true;
Party_textBox.Visible = true;
Party_label.Visible = true;
Vote_textBox.Visible = true;
label1.Visible = true;
label2.Visible = true;
label3.Visible = true;
label4.Visible = true; ;

}
Form1 home_page;
private void button_Home_Click(object sender, EventArgs e)
{
this.Hide();
home_page = new Form1();
home_page.Show();
}
private void
comboBox_candidate_list_SelectedIndexChanged(object sender, EventArgs e)
{

adpt_party = new SqlDataAdapter("select party from candidate_record where


name='" + comboBox_candidate_list.Text + "'", con);
dt_party = new DataTable();
adpt_party.Fill(dt_party);
Party_textBox.DataBindings.Add("text", dt_party, "party");
Party_textBox.DataBindings.Clear();

adpt_result = new SqlDataAdapter("select count(voter_id) as voter_id from


vote_cast where candidate_name='" + comboBox_candidate_list.Text + "'", con);
dt_result = new DataTable();
adpt_result.Fill(dt_result);
Vote_textBox.DataBindings.Add("text", dt_result, "voter_id");
Vote_textBox.DataBindings.Clear();
}

private void Party_result_comboBox_SelectedIndexChanged(object sender,


EventArgs e)
{

41 | P a g e
adpt_party = new SqlDataAdapter("select count(voter_id)as Voter_Id from
vote_cast where party='" + Party_result_comboBox.Text + "'", con);
dt_party = new DataTable();
adpt_party.Fill(dt_party);
comboBox1.DataSource = dt_party;
comboBox1.DisplayMember = "voter_id";
comboBox1.ValueMember = "voter_id";
party_result_label.Text = comboBox1.Text + " Vote achieved";

}
Admin ADMIN;
private void BACK_button_Click(object sender, EventArgs e)
{
this.Hide();
ADMIN = new Admin();
ADMIN.Show();
}
Result_Table rst_tbl;
private void Total_button_Click(object sender, EventArgs e)
{
this.Hide();
rst_tbl = new Result_Table();
rst_tbl.Show();
}
}
}

42 | P a g e
CHAPTER FOUR

GRAPHICAL OVERVIEW OF THE PROJECT

INFORMATION TECHNOLOGY CENTER

CHAPTER 4

43 | P a g e
Graphical Overview of project

4.1 Form 1

44 | P a g e
4.2 About Us

4.3 History

45 | P a g e
4.4 Register Vote

46 | P a g e
47 | P a g e
4.4.1

48 | P a g e
4.4.2

49 | P a g e
4.4.3

50 | P a g e
4.4.5

51 | P a g e
4.4.6

52 | P a g e
4.5 Admin

4.5.1

53 | P a g e
4.6 Add Nominees

54 | P a g e
4.6.1
55 | P a g e
56 | P a g e
4.6.2

57 | P a g e
4.6.3

58 | P a g e
4.7 View Nominees

59 | P a g e
4.8 Results

60 | P a g e
CHAPTER Five

CONCLUSION AND FUTURE WORK

INFORMATION TECHNOLOGY CENTER

CHAPTER 5

61 | P a g e
Conclusion

5.1 Conlusion

We are gratefull to Almighty Allah; the project has successfully been completed. In
conclusion, it can be said that the required goals has been achieved. All configurations have been
made and tested on our personal Computers and they are working properly.

5.2 Future Work :

This software makes impact of register and cast vote through computer and internect.
Although this project fulfills every requirment of user there is still need to work further. The
implementation of remaining section will have to implement.

62 | P a g e
APPENDEX
APPENDIX-A

INFORMATION TECHNOLOGY CENTER


MEETING MINUTES
63 | P a g e
1 ST
M EETING M INUTES

Project Title : Online Voting Syatem


Project Supervisor : Madam Shumaila Bashir

MEETING STATISTICS
Date : Saturday, April 02, 2010
Venue : ITC, SAU
Starting Time: 11:30 am
Ending Time : 12:00 noon

MEETING PARTICIPANTS
 HAKIM ALI BALOCH (2K5-IT-64)
 SHOAIB AHMED KALWAR (2K5-IT-131)
 KANAHIA LAL (2K5-IT-70)
 NARESH SONI (2K5-IT-147)
 MOHSIN ALI (2K5-IT-103)

AGENDA
♦ Scheduling of project time period.

_______________________ _______________________
Project Supervisor Project Developer

2 ND
M EETING M INUTES

64 | P a g e
Project Title : Online Voting System
Project Supervisor : Madam Shumaila Bashir

MEETING STATISTICS
Date : Tuesday, April 08, 2010
Venue : ITC, SAU
Starting Time: 11:30 am
Ending Time : 12:00 noon

MEETING PARTICIPANTS
 HAKIM ALI BALOCH (2K5-IT-64)
 SHOAIB AHMED KALWAR (2K5-IT-131)
 KANAHIA LAL (2K5-IT-70)
 NARESH SONI (2K5-IT-147)
 MOHSIN ALI (2K5-IT-103)

AGENDA
♦ Discussion on project scope
♦ Discussion on analysis and design of the project.

_______________________ _______________________
Project Supervisor Project Developer

3 RD
M EETING M INUTES

Project Title : Online Voting System


Project Supervisor : Madam Shumaila Bashir

65 | P a g e
MEETING STATISTICS
Date : Monday, April 10, 2010
Venue : ITC, SAU
Starting Time: 11:30 am
Ending Time : 12:00 noon

MEETING PARTICIPANTS
 HAKIM ALI BALOCH (2K5-IT-64)
 SHOAIB AHMED KALWAR (2K5-IT-131)
 KANAHIA LAL (2K5-IT-70)
 NARESH SONI (2K5-IT-147)
 MOHSIN ALI (2K5-IT-103)

AGENDA
♦ Discussion on selected tools.
♦ Discussion about object-oriented language.

_______________________ _______________________
Project Supervisor Project Developer

4 TH
M EETING M INUTES

Project Title : Online Voting System


Project Supervisor : Madam Shumaila Bashir

MEETING STATISTICS
Date : Tuesday, April 19, 2010
Venue : ITC, SAU
Starting Time: 10:28 am

66 | P a g e
Ending Time : 11:12 am

MEETING PARTICIPANTS
 HAKIM ALI BALOCH (2K5-IT-64)
 SHOAIB AHMED KALWAR (2K5-IT-131)
 KANAHIA LAL (2K5-IT-70)
 NARESH SONI (2K5-IT-147)
 MOHSIN ALI (2K5-IT-103)

AGENDA
♦ First project demo was shown.
♦ Some modifications was discussed on the project

_______________________ _______________________
Project Supervisor Project Developer

5 TH
M EETING M INUTES

Project Title : Online Voting System


Project Supervisor : Madam Shumaila Bashir

MEETING STATISTICS
Date : Saturday, April 22, 2010
Venue : ITC, SAU
Starting Time: 10:28 am
Ending Time : 11:12 am

MEETING PARTICIPANTS
 HAKIM ALI BALOCH (2K5-IT-64)

67 | P a g e
 SHOAIB AHMED KALWAR (2K5-IT-131)
 KANAHIA LAL (2K5-IT-70)
 NARESH SONI (2K5-IT-147)
 MOHSIN ALI (2K5-IT-103)

AGENDA
♦ Project demo was shown after modification
♦ First draft of Project Report was shown

_______________________ _______________________
Project Supervisor Project Developer

6 TH
M EETING M INUTES

Project Title : Online Voting System


Project Supervisor : Madam Shumaila Bashir

MEETING STATISTICS
Date : Monday, April 27, 2010
Venue : ITC, SAU
Starting Time: 10:28 am
Ending Time : 11:12 am

MEETING PARTICIPANTS
 HAKIM ALI BALOCH (2K5-IT-64)
 SHOAIB AHMED KALWAR (2K5-IT-131)
 KANAHIA LAL (2K5-IT-70)
 NARESH SONI (2K5-IT-147)
 MOHSIN ALI (2K5-IT-103)

AGENDA
68 | P a g e
♦ Final demo of project was shown
♦ Project Report was done
♦ Presentation of project was roughly prepared

_______________________ _______________________
Project Supervisor Project Developer

7 TH
M EETING M INUTES

Project Title : Online Voting System


Project Supervisor : Madam Shumaila Bashir
MEETING STATISTICS
Date : Thursday, April 30, 2010
Venue : ITC, SAU
Starting Time: 10:28 am
Ending Time : 11:12 am

MEETING PARTICIPANTS
• Waseem Abbas Soomro……………….(2k5-IT-139)
• Ali Nawaz Lund………………………..(2k5-IT-38)
• Majid Ali Jatoi………………………….(2k5-IT-73)
• Muhammad Muzammil Hussain…….(2k5-IT-105)
• Waqas Tahir Memon…………………..(2k5-IT-138)

AGENDA
♦ Project, Project Report and Presentation was Finalized

_______________________ _______________________

69 | P a g e
Project Supervisor Project Developer

70 | P a g e
Page | 71

S-ar putea să vă placă și