ONLINE VOTING SYSTEM PROJECT REPORT | ONLINE POLING SYSTEM
Project Overview
This project entitled as "ONLINE VOTING SYSTEM" is basically a prototype of examination system.In this a student choose their examination center according to its preference and generate their admit card and will give exam to that center and will see the result instantly.
Download Code
CONTENTS
- INTRODUCTION
- OBJECTIVE
- ABOUT THE ORGANIZATION
- SYSTEM ANALYSIS
Identification
of Need
Preliminary
Investigation
Feasibility
Studies
Project
Planning
Project
Scheduling
SRS
Software
Engineering Paradigm
ERD,Class
Diagram
- SYSTEM DESIGN
Database
Design
Module
Description
Data
Integrity and Constraint
User
Design
- CODING
Project
Coding (with Comment and Description)
Standardization
of Coding
Error
Handling
Parameters
Calling/passing
Validation
Checks
- TESTING
Testing
Mythologies
Testing
Strategies
Test
Case
Bugs
Report
- SYSTEM SECURITY
Access
and Audit Control
Database
Security
- COST ESTIMATION
- SCREEN SHOTS
- BIBLOGRAPHY
TITLE
OF THE PROJECT
Online
Voting
System
ABSTRACT
This project is basically a prototype
of examination system.In this a student
choose their examination center according to its preference and generate their
admit card and will give exam to that center and will see the result instantly.
INTRODUCTION
This project comes in my mind when
I go for the counseling of UPTU. There are so many steps to take admission in a
desired college in a desired stream.
So I want to automatized this
system from beginning to end.In my project I am starting with the examination
system which is taken manually. I am trying to automatize this module
first.Here there are some special points
of focus in my project…
1-First student fill their personal and academic details online
and choose their examination center .in form, only show those
centers which are available.
2-After all verification process, the administrator
will issue the admit card and the print out is taken by the student.
3- Student will take this admit card and go to the
respective center where the center administrator issue the test in the spot and
after giving the test student will see their result instantly.
INTRODUCTION ABOUT
ORGANIZATION
SOFTWARE DEVELOPMENT LIFE CYCLE
A software life cycle is a series of identifiable stages that a software
product undergoes during this lifetime. a life cycle represent all the
activities required to make a software product transit through its life cycle
phases. the different stages include problem recognition and feasibility study.
Phases of life cycle:-
Ø
Recognition of need preliminary investigation
Ø
Feasibility study
Ø
Analysis
Ø
Design
Ø
Coding and testing
Ø
Implementation
system analysis
The complete
understanding of software requirements is essential for the success of a
software development effort. The requirements analysis task is a process of
discovery, refinement modeling andspecification. The software scope initially
established by the system engineer and refined during software project planning
in detail. Modules of the required data, information and control flow, and
operational behavior and created. Alternative solutions are analyzed and
allocated to various softwareelements.
Requirements
analysis is a software engineering task that bridges the gap between system
level software allocation and software design.
Analysis, a bridge between System
Engineering and Software Design.
existing system
The manual system seems to be time consuming and less
efficient with respect to the following procedures:
Ø
Maintenance of a large amount of student and their management is a tedious job.
Ø
Searching and matching the students with appropriate
criteria was very tedious.
Ø
The most importantly, it took time to provide
services manually, thus more chances of student dissatisfaction.
IDENTIFICATION OF NEED FOR NEW SYSTEM
Erroneous
Input And Output
In the existing
system, humans performed all the tasks. As in the human tendency, error is also
a possibility. Therefore, the inputs entered by the person who is working in
the Company, in the registers may not be absolutely fullproof and may be
erroneous. As a result of wrong input, the output reports etc will also be
wrong which would in turn affect the performance
Portability
System that existed previously was manual. As a result, the
system was less portable. One has to carry the loads of many registers to take
the data from one place to another. A big problem was that the system was less
flexible and if we wanted to calculate yearly or monthly maintenance report or
efficiency report, then it was a big headache.
Security
Security concerns were also one of the motives of the Company
for the need of software. In the registers, the data is not secure as anybody
can tamper with the data written in the registers. While in this software, just
a password makes it absolutely secure from the reach of unauthorized persons.
PRELIMINARY INVESTIGATION
Present system
of the company was manual, therefore it was an incompetent system. The
daily-to-daily entries are also done manually.
The objective of
my project is to create an easy and confirmable rapport between the Management
of the college and its students.
Computerization of the system is needed.
The main
objectives of project are as follows:
- The software is developed for smooth functioning.
- To handle large amount of data, that is a tedious job in case of third party system.
- To avoid delaying in searching.
- To increase system efficiency and reliability.
- To reduce the effort involved in processing.
FEASIBILITY SUDTY
Before getting
started on the new system it was important to determine the feasibility
involved in the developed system so that the new system development could be
developed. Feasibility is this determine of whether or not a project is not
worth doing. The project followed in making this determination is called a feasibility study. This type of
study determines if a project can and should be taken. Once it has been
determining that, project is feasible, after that analyst can go ahead and
prepares the project specification, which finalizes project
requirements.Feasibility studies are undertaken within tight time constraints.
The developed
system is started after considering the main three types of feasibilities that
are discussed below:-
Technical Feasibility:-
As we know the
technical feasibility is concerned with specifying equipment and software that
will successfully satisfy the user requirement. The technical needs of the
system may vary considerably, but might include:
- The facility to produce outputs in a given time.
- Response time under certain condition is minimal.
- Ability to process a certain volume of transaction at a particular speed.
- Facilty to communicate data to distinct location.
In examining the
technical feasibility, configuration of the system is given more importance
than the actual make of hardware. The configuration should give the complete
picture about the system’s requirements- how many workstations are required,
how these units are interconnected so that they could operate and communicate
smoothly.
Economic Feasibility:-
Economic
analysis is the most frequently used technique for evaluating the effectiveness
of the proposed system. More commonly known as cost/benefits analysis, the
procedure is to determine the benefits and savings that are expected from the
purposed system and compared with costs. If benefits out weigh cost, a decision
is taken to design and implement the system. Otherwise, further justification
or alternative of the proposed system will have to be made if it has a chance
of being approved. This is an on going effort that improves in accuracy at each
phase of the system life cycle. The analysis part also clears the doubt of
economic problems which could be possible in developing the system. As already
mentioned that the company has to just pay the developed software cost and not
other investment is needed at the time of implementation of the new system as
the preliminary requirements already exist in the company.
Operational Feasibility:-
Proposed
projects are beneficial only if they can be turned into information system that
will meet the operating requirements of the organization. This test of
feasibility asks if the system will work when it developed and installed. Are
there major barriers to implementation? Some of the important questions that
are useful to test the operational feasibility of a project are given below:
·
Is there sufficient support for the project from
the implementation? From user? If the present system is well liked and used to
the extent that persons will not be able to see reasons for change, there may
be resistance.
·
Are current business methods acceptable to the
user? If they are not, user may welcome a
change that will bring about a more operational and useful system.
·
Have the user been involved in the planning and
development of the project? If they are involved at the earliest stage of
project development, the chances of resistance can be possibly reduced.
·
Will the proposed system cause harm? Will it
produce poorer result in any case or area?
- Will the performance of staff member fall down
after implementation? Issue that appears to be quite minor at the early
stage can grow into major problem after Implementation.
- Therefore, it is always advisable to consider operational aspects carefully. The system is developed keeping in mind that it should be user friendly and easy to operate hence the system is operational feasible.
SOFTWARE PROCESS MODEL FOLLOWED:
SPIRAL MODEL:
The Spiral Model is one that couples the iterative nature of prototyping with
controlled and systematic aspect of linear sequential or waterfall model. It
provides the potential for rapid development of incremental versions of the
system. Here it is used for successful development of Sales and Product
Management System.
Spiral Model consists of four phases:
v Planning
v Risk
Analysis
v Engineering
v Customer
Evolution
Fig: 2
Software Development Process moves throughout these
four phase until the Software is not implemented .In the last phase (Customer
Evaluation), End User evaluates the product, and gives the comments according
to requirement. On basis Software either goes forward in the phases or for
implementation process.
SYSTEM DESIGNING APPROACHES:
Top – Down
designing:
The top - down designing approach started with major
components of the system. It is a stepwise refinement which starts from an
abstract design, in each steps the design is refined two or more concrete
levels until we reach a level where no – more refinement is possible or not
needed.
Bottom – Up
designing:
In bottom – up designing the most basic and primitive
components are designed first, and we proceed to higher level components. We
work with layers of abstractions and abstraction are implemented until the
stage is reached where the operations supported by the layer is complete.
Fig: 2.1
Approach we
are following:
In
this project we are following Mixed
Approach i.e. a combination of top – down and bottom – up. We are
developing some of the components using top – down designing approach (e.g. the
WebPages) and the some components in bottom – up designing approach (e.g. the
middle tier classes).
Gantt chart
|
I have to estimate
the number of days required for each of the seven tasks as follow
|
Modularity:
The principle of
modularity says to divide the big projects into simpler pieces called modules.
The project has been divided into simpler pieces called modules. The software
system developed by us is modular because it allows the principle of separation
of concerns to be applied in two phases:
When dealing with the details of each module in isolation (and ignoring
details of other modules) and when dealing with the overall characteristics of
all modules and their relationships in order to integrate them coherent system.
Abstraction:
Abstraction is required to identify the system artifacts for
modeling; abstraction is required to separate metalanguage core constructs and
concerns into layers; abstraction is required to partition conceptual areas
within layers. UML is a method to construct system models from the core of
Model Driven Architecture. Abstraction is a method that is required to
construct elements of the common core. Abstraction is a general idea that is not
based on a physical, practical data. In software engineering SDLC processes abstraction
is the method that is used to simplify and generalize the processes before
concrete models can be built. Abstraction is used to list the findings from the
cognitive knowledge both tacit and explicit knowledge. The steps to abstraction
can be described as.
Correctness:
A program is functionally correct if it behaves according to the
specification of the functions it should provide. The specification of the
system is available and it is possible to determine unambiguously whether or
not a program meets the specifications. The correctness of our project
establishes the equivalence between the software and its specification. We are
more systematic and precise in assessing correctness depending on how rigorous
we are in specifying functional requirements.
Reliability:
The Software
Developed by us and presented here fully reliable if the user depends on it.
The software application will operate as expected now and over for long period
also. As Software engineering can truly be called an engineering discipline
only when we can achieve software reliability comparable to the reliability of
other products. Our development is perfect in this discipline.
Robustness:
Our application is
robust, it behaves “reasonably” even in circumstances that had been even not
anticipated in the requirements specification-for example when user inputs incorrect or incomplete data then itproduce a
valid error message and either resumes for same operation or continues the next
operation depending upon the situation. The project performs all necessary
checks before processing the input if theinput is not correct then it does not
process it any more and sends the error message to the user. For example if the
user give string value in text box that is for numeric value then it doesn’t
take and also inform the user and same for vise-versa. In our software suppose
in client module if user gives an already
User Friendliness:
The application is
very much user friendly. The biggest reason behind it is its GUI environment.
Every user finds it easy to use. Novice programmer’s use it qualifies as user
friendly by virtue of different properties than an application that is used by
expert programmers. For example a nonprogrammer appreciates the use of menus. A
novice user appreciates verbose messages and feels comfortable while using
software, if he commits any mistake he is prompted with appropriate message to
cancel the effect of mistake if possible. Same feature is quite helpful for
expert user also.
The confirmation messages before almost all those processes whose effect cannot
be cancelled late on gives more confident in working for both new and expert
user. The software always asks for the confirmation before any kind of deletion
because the record deleted once cannot be recalled so there very less
possibility of accidental of data.loss.
DFD
0 LEVEL DFD
|
|
|
1LEVEL DFD
The term design
used in two ways used as a verb, it represents the process of design for the
system.The objective of the design process is to produce a model of
representation of a system which can be used later to build the system. The
produced model is called the design of the system.
The design process for software systems often
has four levels, they are :-
Ø
Data
Design
Ø
Architectural Design
Ø
Interface Design
Ø
Procedural Design
DATA BASE
DESIGN
During this
phase of dat5a design, the relation of the data structure to the software requirement
specification is to be designed and the data dictionary used in this should be
specified. An important activity during design is to identify the program
modules that must operate directly upon the logical data structures.
Table 1:student_registration_details
Field Name
|
Type
|
Size
|
Constraints
|
roll_no
|
int
|
|
Primary
|
name
|
Varchar
|
50
|
Not Null
|
birth_date
|
int
|
|
|
birth_month
|
varchar
|
10
|
|
birth_year
|
int
|
|
|
father_name
|
Varchar
|
50
|
|
mother_name
|
Varchar
|
50
|
|
gender
|
Varchar
|
10
|
|
year_of_quali_exam
|
int
|
50
|
|
high_school_board
|
Varchar
|
50
|
|
high_school_per
|
float
|
|
|
intermediate_board
|
Varchar
|
50
|
|
intermediate_per
|
float
|
|
|
permanent_mailing_address
|
Varchar
|
200
|
|
category_vertical
|
Varchar
|
5
|
|
physically_handicapped
|
Varchar
|
5
|
|
army_quota
|
Varchar
|
5
|
|
counselling_center_choice
|
Varchar
|
100
|
|
email_id
|
Varchar
|
50
|
|
occupation_father
|
Varchar
|
50
|
|
occupation_mother
|
Varchar
|
50
|
|
income_scale
|
Varchar
|
50
|
|
center_id
|
int
|
|
|
security_answer
|
Varchar
|
50
|
|
photo
|
Varchar
|
max
|
|
status
|
int
|
|
|
Table 2 :student_test_details
Field Name
|
Type
|
Size
|
Constraints
|
paper_id
|
int
|
|
Primary
|
test_marks
|
int
|
|
|
roll_no
|
int
|
|
|
status1
|
int
|
|
|
status2
|
int
|
|
|
q1
|
int
|
|
|
q2
|
int
|
|
|
q3
|
int
|
|
|
q4
|
int
|
|
|
q5
|
int
|
|
|
q6
|
int
|
|
|
q7
|
int
|
|
|
q8
|
int
|
|
|
q9
|
int
|
|
|
q10
|
int
|
|
|
Table 3:login_password
Field Name
|
Type
|
Size
|
Constraints
|
|
roll_no
|
int
|
|
Primary
|
|
passwd
|
Varchar
|
50
|
|
|
Table 4:test
Field Name
|
Type
|
Size
|
Constraints
|
ques_id
|
int
|
50
|
Primary
|
question
|
varchar
|
max
|
|
option1
|
Varchar
|
50
|
|
option2
|
varchar
|
50
|
|
option3
|
varchar
|
50
|
|
option4
|
varchar
|
50
|
|
answer
|
int
|
|
|
Table
5 : examination_center
Field Name
|
Type
|
Size
|
Constraints
|
|
center_id
|
int
|
|
Primary Key
|
|
center_name
|
Varchar
|
max
|
|
|
available_seats
|
int
|
|
|
|
total_seats
|
int
|
|
|
|
MODULE DESCRIPTION
Modules in the Project
- Administrator Section
- Student Section
- Login Module
Module: ADMINISTRATOR SECTION:
·
Administrator will view & manage the whole
application
·
Administrator will create,modify or destroy questions.
·
Administrator will grant the details of students.
·
Administrator will issue the admit cards to
students.
·
Administrator will issue the question papers to
the students.
Module: STUDENT SECTION:
·
Student will register himself in the
system.
·
Student can upload their photograph .
·
Student can update their details.
·
Student can print their admit card
online.
·
Student can give exam online to their
respective system.
Module: LOGIN SECTION:
·
This module gives the both administrator
and user both..
§ Administrator
can go their admin page after login.
Some Spcial points of attracition in my project are as followsà
1 Showing only those centers in the
registration form which are
available::::see the registration.aspx.cs file.
2 Random generation of the question and the
logic that no questions are repeated
3 Only after issuing paper by the
administrator , the start test option appears in the user’s profile.
4 There are 2 status of an exam paper
….mentioned in student_test _details
Status1: the paper is issued to the student but the student has not yet
started and submitted the paaper .
Status2: the student has submitted the paaper and now the start test
paper option disappears from the
student’s profile.
5 on starting the paper a page appears that asks
for the end time:time at which student has to submit the paper.a
And the admin pass
123456789
Both these data will
be given to the students at the examination center.
6 on registration approval by the
administrator the status1 field goes 1 and the “generate admit card” option is
enabled in the view registration page of the student’s profile.
7 in issue paper the admin at the
examination center sees the roll no. o f the candidate and sees his center and
selects the center .
Accordingly all the
roll no. enrolled in the center are shown and there the admin at the center can
issue them the paper.
8 in the approve registration paper the
admin can approve the registration according to the percentage and the date of
birth and accordingly a field:status in the
Student_registration_table
is set which tells whether the student’s registration is approved or
disapproved. This is used in the view
registration status status page of the student’s profile.
9 in the view registration status page of
the student’s profile if the status in the Student_registration_table is set to
1 then registration is approved
2……………………disapproved
0…………………….pending
Explicitly defines the set of consistence database
states, orchanges of state or both. These are following types of integrity
rules:
Primary
Keys
TABLE
NAME
|
PRIMARY
KEY
|
Foreign
Key
|
examination_center
|
center_id
|
|
login_password
|
roll_no
|
yes
|
student_registration_details
|
roll_no
|
|
student_test_details
|
paper_id
|
|
test
|
ques_id
|
|
Entity
Integrity
It states that “If the attribute A of relation R
is a prime attribute of R then A cannot accept null value”.
In my project I have maintained the entity
integrity by making it sure that no primary key have null value. Above relation
all have primary key.
Referential
Integrity
This rule is concerned with the foreign keys with
the attributes of relation having domain that are those of primary key of
another relation .Referential integrity can be stated as ”Given two relation R
and S suppose R refers to the relation S via a set of attribute that forms the
primary keys of S and this set of attribute form a foreign key in R. Then the
value of the foreign key in a tuple R must either be equal to the primary key
of a tuple of S or be entirely null”.
SYSTEM
CONSTRAINTS
PERFORMANCE CONSTRAINTS:-
ü
Should
maintain the information of masters table properly.
ü
Should
filter students according to criteria online.
ü
Should perform periodical reviews and observations
of various aspects.
Interface Design:
The
architectural design provides a software engineer with a picture of the program
structure. Like the blue print for a house where as Interface design focuses on
the design of interface between software modules. The design of inter faces
between the software between the software and other non-human procedures and
consumers of information i.e. other external entities and the design of the
interface between a human and the computer.
Developer’s
Responsibilities Overview
The developer is
responsible for
1.
Developing the system.
2.
Installing the Software on the Client’s hardware.
3. For conducting any user training that might
be needed for using the
system.
4.
Maintaining the system for usage after installation.
User’s Characteristics:-
The users of
this system are the employee of the company who use different features of this
application. And the administrator will be the person who is at managerial
level and will create the users and give permissions to the users on the
modules.
Procedural Design:-
Procedural
Design occurs after data, architectural and interface designs have been
established. The procedural specification is required to define algorithmic details,
so that people outside the software domain could more readily understand the
specification, and no new learning would be required.
Code Efficiency:
As my project is
based on Object Oriented Meth logy .OOP is based on using same code again and
again. In this way, codes are managed effectively and take minimal effort.
CODING
Admin.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
publicpartialclassadmin
: System.Web.UI.Page
{
protectedvoid Page_Load(object
sender, EventArgs e)
{
if (Session["admin"]
== "")
{
Response.Redirect("home.aspx");
}
}
protectedvoid LinkButton1_Click(object sender, EventArgs
e)
{
}
protectedvoid LinkButton4_Click(object sender, EventArgs
e)
{
}
protectedvoid LinkButton4_Click1(object sender, EventArgs
e)
{
Session.Abandon();
}
}
Approve_registration.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
publicpartialclassDefault2
: System.Web.UI.Page
{
SqlConnection con = newSqlConnection("Data
Source=GAURAV-PC\\SQLEXPRESS;Initial Catalog=counselling_system;Integrated
Security=True");
protectedvoid Page_Load(object
sender, EventArgs e)
{
if (Session["admin"]
== "")
{
Response.Redirect("home.aspx");
}
}
protectedvoid Button1_Click(object
sender, EventArgs e)
{
con.Open();
DataSet ds = newDataSet();
SqlDataAdapter dap = newSqlDataAdapter("select
roll_no from student_registration_details where high_school_per>="
+ approveregtminper.Text + " and
intermediate_per>=" + approveregtminper.Text + " and year_of_quali_exam>=" +
approveregtminyear.Text + "and (status=0 OR
status=2) ", con);
dap.Fill(ds, "registration_roll");
DropDownList1.DataSource =
ds.Tables[0];
DropDownList1.DataTextField = "roll_no";
DropDownList1.DataBind();
DropDownList1.Items.Insert(0, newListItem("--select--", "--select--"));
}
protectedvoid DropDownList1_SelectedIndexChanged(object sender, EventArgs
e)
{
if (DropDownList1.SelectedIndex > 0)
{
Session["approve"]
= DropDownList1.SelectedItem.ToString();
Response.Redirect("approve_student_reg.aspx");
}
}
protectedvoid LinkButton1_Click(object sender, EventArgs
e)
{
Session.Abandon();
Response.Redirect("home.aspx");
}
}
Approve_student_reg.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
publicpartialclassapprove_student_reg
: System.Web.UI.Page
{
SqlConnection con = newSqlConnection("Data
Source=GAURAV-PC\\SQLEXPRESS;Initial Catalog=counselling_system;Integrated
Security=True");
void fill()
{
SqlCommand cmd = newSqlCommand("select
name,birth_date,birth_month,birth_year,father_name,mother_name,gender,year_of_quali_exam,
high_school_board,high_school_per,intermediate_board,intermediate_per,
permanent_mailing_address,category_vertical,physically_handicapped,army_quota,
counselling_center_choice,email_id,occupation_father,occupation_mother,income_scale,security_answer
from student_registration_details where roll_no=" + Session["approve"].ToString() + "", con);
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
tname.Text = dr["name"].ToString();
ddate.Text = dr["birth_date"].ToString();
dmonth.Text = dr["birth_month"].ToString();
dyear.Text = dr["birth_year"].ToString();
tfathername.Text = dr["father_name"].ToString();
tmothername.Text = dr["mother_name"].ToString();
dgender.Text = dr["gender"].ToString();
dyearofexam.Text = dr["year_of_quali_exam"].ToString();
dboard10.Text = dr["high_school_board"].ToString();
tpercent10.Text = dr["high_school_per"].ToString();
tpercent12.Text = dr["intermediate_per"].ToString();
dboard12.Text = dr["intermediate_board"].ToString();
tpermanentmailingaddress.Text = dr["permanent_mailing_address"].ToString();
dverticalquota.SelectedItem.Text =
dr["category_vertical"].ToString();
dphysicallyhad.Text = dr["physically_handicapped"].ToString();
darmy.SelectedItem.Text = dr["army_quota"].ToString();
dcounsellingcntr.SelectedItem.Text
= dr["counselling_center_choice"].ToString();
temailid.Text = dr["email_id"].ToString();
dfatherocc.Text = dr["occupation_father"].ToString();
dmotherocc.Text = dr["occupation_mother"].ToString();
dincomescale.Text = dr["income_scale"].ToString();
tsecurityquestion.Text = dr["security_answer"].ToString();
}
con.Close();
}
protectedvoid Page_Load(object
sender, EventArgs e)
{
if (Session["admin"]
== "")
{
Response.Redirect("home.aspx");
}
if (IsPostBack == false)
fill();
lcheck.Visible = true;
bsubmit.Visible = true;
}
protectedvoid bsubmit_Click(object
sender, EventArgs e)
{
lcheck.Visible = false;
SqlCommand cmd = newSqlCommand("update
student_registration_details set status=1 where roll_no=" +
Session["approve"].ToString() + "", con);
SqlCommand cmd1 = newSqlCommand("insert
into student_test_details(test_marks,roll_no,status1,status2)values(0,"+Session["approve"].ToString()+",0,0)", con);
try
{
bsubmit.Visible = false;
lcheck.Visible = false;
con.Open();
cmd.ExecuteNonQuery();
cmd1.ExecuteNonQuery();
Label1.Text = "Approval Granted";
}
catch (Exception
ex)
{
Label1.Text = "Approval not
Granted";
}
finally
{
Session.Abandon();
con.Close();
}
}
protectedvoid lcheck_Click(object
sender, EventArgs e)
{
bsubmit.Visible = false;
lcheck.Visible = false;
SqlCommand cmd = newSqlCommand("update
student_registration_details set status=2 where roll_no=" +
Session["approve"].ToString() + "", con);
try
{
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
catch (Exception
ex)
{
}
finally
{
Label1.Text = "Registration Disapproved";
Session.Abandon();
}
}
protectedvoid LinkButton1_Click(object sender, EventArgs
e)
{
Session.Abandon();
}
}
Change_Password.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
publicpartialclassDefault2
: System.Web.UI.Page
{
SqlConnection con = newSqlConnection("Data
Source=GAURAV-PC\\SQLEXPRESS;Initial Catalog=counselling_system;Integrated
Security=True");
protectedvoid Page_Load(object
sender, EventArgs e)
{
if (Session["rol"].ToString()
== "")
{
Response.Redirect("login.aspx");
}
if (IsPostBack == false)
{
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("
select name,photo,category_vertical from student_registration_details where
roll_no=" + Session["rol"].ToString()
+ "", con);
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
lname.Text = dr["name"].ToString();
lcategory.Text = dr["category_vertical"].ToString();
lrollno.Text = Session["rol"].ToString();
if (dr["photo"].ToString()
== "0")
{
lphotomsg.Text = "Please upload your photo";
}
else
{
Image1.ImageUrl = "~/upload_photograph/" + dr["photo"].ToString();
}
changepwdtnempwd.Text = "";
changepwdtverifypassword.Text = "";
}
if (Session["rol"].ToString()
== "")
Response.Redirect("login.aspx");
}
protectedvoid Button1_Click(object
sender, EventArgs e)
{
SqlCommand cmd = newSqlCommand("update
login_password set passwd='"+changepwdtnempwd.Text+"' where roll_no="+Session["rol"]+"",
con);
try
{
con.Open();
cmd.ExecuteNonQuery();
changepwdlupdatemsg.Text = "Password successfully Updated.....!";
}
catch (Exception
ex)
{
changepwdlupdatemsg.Text = "Password update not successfull....please
retry....!";
}
finally
{
con.Close();
}
}
}
Default.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
publicpartialclass_Default
: System.Web.UI.Page
{
SqlConnection con = newSqlConnection("Data
Source=GAURAV-PC\\SQLEXPRESS;Initial Catalog=counselling_system;Integrated
Security=True");
staticint aid;
void fill()
{
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
DataSet ds = newDataSet();
SqlDataAdapter dap = newSqlDataAdapter("select
center_id,center_name from examination_center where available_seats>0 ",
con);
con.Open();
dap.Fill(ds, "centres");
dcounsellingcntr.DataSource =
ds.Tables[0];
dcounsellingcntr.DataTextField = "center_name";
dcounsellingcntr.DataValueField = "center_id";
dcounsellingcntr.DataBind();
dcounsellingcntr.Items.Insert(0, newListItem("--select--", "--select--"));
con.Close();
}
protectedvoid Page_Load(object
sender, EventArgs e)
{
if (IsPostBack == false)
{
fill();
l2army.Visible = false;
l2board10.Visible = false;
l2board12.Visible = false;
l2examcenter.Visible = false;
l2fatherocc.Visible = false;
l2gen.Visible = false;
l2incomescale.Visible = false;
l2motherocc.Visible = false;
l2physcalyh.Visible = false;
l2vertical.Visible = false;
l2yearofqualifyingexam.Visible = false;
bsubmit.Enabled = false;
totherboard10.Enabled = false;
totherboard12.Enabled = false;
totherboard10.Visible = false;
totherboard12.Visible = false;
lboardother10.Visible = false;
lboardother12.Visible = false;
}
}
protectedvoid DropDownList4_SelectedIndexChanged(object sender, EventArgs
e)
{
if (dboard10.SelectedIndex == 3)
{
totherboard10.Enabled = true;
totherboard10.Visible = true;
lboardother10.Visible = true;
}
else
{
totherboard10.Enabled = false;
totherboard10.Visible = false;
lboardother10.Visible = false;
}
}
int auto_id()
{
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
int p;
SqlCommand cmd = newSqlCommand("select
count(roll_no) from student_registration_details ", con);
con.Open();
p = Convert.ToInt32(cmd.ExecuteScalar());
con.Close();
if (p == 0)
{
aid = 5000;
}
else
{
SqlCommand cmd1 = newSqlCommand("select
max(roll_no) from student_registration_details
", con);
con.Open();
p = Convert.ToInt32(cmd1.ExecuteScalar());
con.Close();
aid = p + 1;
}
return aid;
}
protectedvoid bsubmit_Click(object
sender, EventArgs e)
{
ccJoin.ValidateCaptcha(TextBox1.Text);
if (!ccJoin.UserValidated)
{
Label2.Text = "please fill write code";
}
else
{
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
int x = auto_id();
String s10, s12;
if (dboard10.SelectedIndex == 3)
{
s10 = totherboard10.Text;
}
else
{
s10 =
dboard10.SelectedItem.ToString();
}
if (dboard12.SelectedIndex == 3)
{
s12 = totherboard10.Text;
}
else
{
s12 =
dboard12.SelectedItem.ToString();
}
SqlCommand cmd = newSqlCommand("select
available_seats from examination_center where center_id=" +
dcounsellingcntr.SelectedValue.ToString() + "
", con);
con.Open();
int p = Convert.ToInt32(cmd.ExecuteScalar());
con.Close();
SqlCommand cmd1 = newSqlCommand("update
examination_center set available_seats=" + (p - 1) + " where center_name='" +
dcounsellingcntr.SelectedItem.ToString() + "'",
con);
SqlCommand cmd2 = newSqlCommand("insert
into
student_registration_details(name,birth_date,birth_month,birth_year,father_name,mother_name,gender,year_of_quali_exam,high_school_board,high_school_per,intermediate_board,intermediate_per,
permanent_mailing_address,category_vertical,physically_handicapped,army_quota,counselling_center_choice,email_id,occupation_father,occupation_mother,income_scale,center_id,roll_no,security_answer,status)values('"
+ tname.Text + "'," +
ddate.SelectedItem + ",'" + dmonth.SelectedItem.ToString()
+ "'," + dyear.SelectedItem + ",'" + tfathername.Text + "','" + tmothername.Text + "','" + dgender.SelectedItem.ToString()
+ "'," +
dyearofexam.SelectedItem.ToString() + ",'"
+ s10 + "'," + tpercent10.Text + ",'" + s12 + "',"
+ tpercent12.Text + ",'" +
tpermanentmailingaddress.Text + "','"
+ dverticalquota.SelectedItem.ToString() + "','"
+ dphysicallyhad.SelectedItem.ToString() + "','"
+ darmy.SelectedItem.ToString() + "','"
+ dcounsellingcntr.SelectedItem.ToString() + "','"
+ temailid.Text + "','" +
dfatherocc.SelectedItem.ToString() + "','"
+ dmotherocc.SelectedItem.ToString() + "','"
+ dincomescale.SelectedItem.ToString() + "',"
+ dcounsellingcntr.SelectedValue.ToString() + ","
+ x + ",'" +
tsecurityquestion.Text + "',0)",
con);
SqlCommand cmd3 = newSqlCommand("insert
into login_password (roll_no,passwd)values(" + x + ",'12345')", con);
try
{
con.Open();
cmd1.ExecuteNonQuery();
cmd2.ExecuteNonQuery();
cmd3.ExecuteNonQuery();
Session["roll"] = x;
Response.Redirect("msg.aspx");
}
catch (Exception
ex)
{
}
finally
{
con.Close();
}
}
}
protectedvoid dboard12_SelectedIndexChanged(object sender, EventArgs
e)
{
if (dboard12.SelectedIndex==3)
{
totherboard12.Enabled = true;
totherboard12.Visible = true;
lboardother12.Visible = true;
}
else
{
totherboard12.Enabled = false;
totherboard12.Visible = false;
lboardother12.Visible = false;
}
}
protectedvoid undertaking_CheckedChanged(object sender, EventArgs
e)
{
if (cundertaking.Checked==true&&darmy.SelectedIndex>0
&& ddate.SelectedIndex>0 &&
dboard12.SelectedIndex>0&&dboard10.SelectedIndex>0&&dcounsellingcntr.SelectedIndex>0&&dyearofexam.SelectedIndex>0&&dverticalquota.SelectedIndex>0&&dphysicallyhad.SelectedIndex>0&&dfatherocc.SelectedIndex>0&&dmotherocc.SelectedIndex>0)
{
bsubmit.Enabled = true;
Label1.Text = "";
}
else
{
bsubmit.Enabled = false;
Label1.Text = "plesae Fill all required fields.....!";
cundertaking.Checked = false;
}
}
protectedvoid tname_TextChanged(object sender, EventArgs
e)
{
}
protectedvoid tname_TextChanged1(object sender, EventArgs
e)
{
}
protectedvoid tpermanentmailingaddress_TextChanged(object sender, EventArgs
e)
{
}
protectedvoid TextBox1_TextChanged(object sender, EventArgs
e)
{
}
}
Insert questions
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
publicpartialclassissue_paper
: System.Web.UI.Page
{
SqlConnection con = newSqlConnection("Data
Source=GAURAV-PC\\SQLEXPRESS;Initial Catalog=counselling_system;Integrated
Security=True");
protectedvoid Page_Load(object
sender, EventArgs e)
{
if(Session["admin"]=="")
{
Response.Redirect("home.aspx");
}
if (IsPostBack == false)
{
fill();
issuepaperlemailid.Visible = false;
issuepaperlemailidanswer.Visible = false;
issuepaperlgenfer.Visible = false;
issuepaperlgenderanswer.Visible = false;
issuepaperlname.Visible = false;
issuepaperlnameanswer.Visible = false;
issuepaperlemailid.Visible = false;
issuepaperlemailid.Visible = false;
issuepaperlstdetails.Visible = false;
issuepaperiimage.Visible = false;
issuepaperbissue.Visible = false;
}
}
void fill()
{
DataSet ds = newDataSet();
SqlDataAdapter dap = newSqlDataAdapter("select
center_id,center_name from
examination_center ", con);
dap.Fill(ds, "center_id");
issuepaperdcenter.DataSource =
ds.Tables[0];
issuepaperdcenter.DataTextField = "center_name";
issuepaperdcenter.DataValueField="center_id";
issuepaperdcenter.DataBind();
issuepaperdcenter.Items.Insert(0, newListItem("--select--", "--select--"));
}
protectedvoid DropDownList1_SelectedIndexChanged(object sender, EventArgs
e)
{
DataSet ds = newDataSet();
SqlDataAdapter dap = newSqlDataAdapter("select
roll_no from student_registration_details where
center_id="+issuepaperdcenter.SelectedValue.ToString()+"and status=1", con);
issuepaperdselrollno.Visible = true;
issuepaperdselrollno.Visible = true;
dap.Fill(ds, "roll_no");
issuepaperdselrollno.DataSource =
ds.Tables[0];
issuepaperdselrollno.DataTextField = "roll_no";
issuepaperdselrollno.DataBind();
issuepaperdselrollno.Items.Insert(0, newListItem("--select--", "--select--"));
}
protectedvoid
issuepaperdselrollno_SelectedIndexChanged(object
sender, EventArgs e)
{
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd1 = newSqlCommand("select
photo from student_registration_details where roll_no="+issuepaperdselrollno.SelectedItem.ToString()+"", con);
con.Open();
SqlDataReader dr1 = cmd1.ExecuteReader();
if (dr1.Read())
{
string p = dr1["photo"].ToString();
issuepaperiimage.ImageUrl = "~/upload_photograph/" + p;
}
con.Close();
issuepaperlemailid.Visible = true;
issuepaperlemailidanswer.Visible = true;
issuepaperlgenfer.Visible = true;
issuepaperlgenderanswer.Visible = true;
issuepaperlname.Visible = true;
issuepaperlnameanswer.Visible = true;
issuepaperlemailid.Visible = true;
issuepaperlemailid.Visible = true;
issuepaperlstdetails.Visible = true;
issuepaperiimage.Visible = true;
issuepaperbissue.Visible= true;
SqlCommand cmd= newSqlCommand("select
* from student_registration_details where roll_no=" +
issuepaperdselrollno.SelectedItem.ToString() + "",
con);
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
issuepaperlemailidanswer.Text = dr["email_id"].ToString();
issuepaperlnameanswer.Text = dr["name"].ToString();
issuepaperlgenderanswer.Text = dr["gender"].ToString();
}
}
protectedvoid issuepaperbissue_Click(object sender, EventArgs
e)
{
SqlCommand cmd = newSqlCommand("update
student_test_details set status1=1 where roll_no="+issuepaperdselrollno.SelectedItem.ToString()+" ", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid LinkButton1_Click(object sender, EventArgs
e)
{
Session.Abandon();
}
}
Update questions
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
publicpartialclassupdate_question
: System.Web.UI.Page
{
SqlConnection con = newSqlConnection("Data
Source=GAURAV-PC\\SQLEXPRESS;Initial Catalog=counselling_system;Integrated
Security=True");
protectedvoid Page_Load(object
sender, EventArgs e)
{
if (Session["admin"]
== "")
{
Response.Redirect("home.aspx");
}
if (IsPostBack == false)
{
DataSet ds = newDataSet();
SqlDataAdapter dap = newSqlDataAdapter("select
ques_id from test ", con);
dap.Fill(ds, "question_id");
updatequestdquestno.DataSource =
ds.Tables[0];
updatequestdquestno.DataTextField =
"ques_id";
updatequestdquestno.DataBind();
updatequestdquestno.Items.Insert(0,
newListItem("--select--", "--select--"));
updatemsg.Text = "";
deslmsg.Text = "";
}
}
protectedvoid
updatequestdquestno_SelectedIndexChanged(object
sender, EventArgs e)
{
if (updatequestdquestno.SelectedIndex > 0)
{
updatemsg.Text = "";
SqlCommand cmd = newSqlCommand("select
* from test where ques_id=" +
updatequestdquestno.SelectedItem.ToString() + "",
con);
try
{
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
desquestion.Text = dr["question"].ToString();
desopt1.Text = dr["option1"].ToString();
desopt2.Text = dr["option2"].ToString();
desopt3.Text = dr["option3"].ToString();
desopt4.Text = dr["option4"].ToString();
desanswer.Text = dr["answer"].ToString();
}
}
catch (Exception
ex)
{
}
finally
{
con.Close();
}
}
else
{
updatemsg.Text = "please select a question ID";
desquestion.Text = "";
desopt1.Text = "";
desopt2.Text = "";
desopt3.Text = "";
desopt4.Text = "";
desanswer.Text = "";
}
}
protectedvoid deesiquestset_Click(object sender, EventArgs
e)
{
SqlCommand cmd = newSqlCommand("update
test set question='"+desquestion.Text+"'
,option1='"+desopt1.Text+"',option2='"+desopt2.TabIndex+"',option3='"+desopt3.Text+"',option4='"+desopt4.Text+"', answer="+desanswer.Text+"", con);
try
{
con.Open();
cmd.ExecuteNonQuery();
}
catch (Exception
ex)
{
deslmsg.Text = "Update not successfull..Please Retry..!";
}
finally
{
con.Close();
deslmsg.Text = "Update Successfull...!";
}
}
protectedvoid LinkButton1_Click(object sender, EventArgs
e)
{
Session.Abandon();
}
}
Delete question
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
publicpartialclassDefault4
: System.Web.UI.Page
{
SqlConnection con = newSqlConnection("Data
Source=GAURAV-PC\\SQLEXPRESS;Initial Catalog=counselling_system;Integrated
Security=True");
protectedvoid Page_Load(object
sender, EventArgs e)
{
deletequeslpleaseselaqstion.Text = "";
deletelmsg.Text = "";
if (Session["admin"]
== "")
{
Response.Redirect("home.aspx");
}
if (IsPostBack == false)
{
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
DataSet ds = newDataSet();
SqlDataAdapter dap = newSqlDataAdapter("select
ques_id from test ", con);
dap.Fill(ds, "question_id");
deletequesdselectqstion.DataSource
= ds.Tables[0];
deletequesdselectqstion.DataTextField = "ques_id";
deletequesdselectqstion.DataBind();
deletequesdselectqstion.Items.Insert(0, newListItem("--select--",
"--select--"));
}
}
protectedvoid DropDownList1_SelectedIndexChanged(object sender, EventArgs
e)
{
}
protectedvoid Button1_Click(object
sender, EventArgs e)
{
if (deletequesdselectqstion.SelectedIndex > 0)
{
SqlCommand cmd = newSqlCommand("delete
from test where ques_id=" +
deletequesdselectqstion.SelectedItem.ToString() + "",
con);
try
{
con.Open();
cmd.ExecuteNonQuery();
deletelmsg.Text = "Deletion successfull...!";
}
catch (Exception
ex)
{
deletelmsg.Text = "Deletion not successfull...!";
}
finally
{
con.Close();
}
}
else
{
deletequeslpleaseselaqstion.Text = "Please select a proper question ID";
}
}
protectedvoid LinkButton1_Click(object sender, EventArgs
e)
{
Session.Abandon();
}
}
Final result
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
publicpartialclassDefault2
: System.Web.UI.Page
{
protectedvoid Page_Load(object
sender, EventArgs e)
{
finalresultlmaks.Text = Session["mark"].ToString();
finalcorrectquestons.Text = Session["correct"].ToString();
finalresultlwrong.Text = Session["wrong"].ToString();
finallpercentage.Text = Session["p"].ToString()+"%";
finreslunattempted.Text = Session["unattempt"].ToString();
}
}
Generate Admit
Card
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
publicpartialclassgenerate_admit_card
: System.Web.UI.Page
{
SqlConnection con = newSqlConnection("Data
Source=GAURAV-PC\\SQLEXPRESS;Initial Catalog=counselling_system;Integrated
Security=True");
protectedvoid Page_Load(object
sender, EventArgs e)
{
if (Session["rol"].ToString()
== "")
{
Response.Redirect("login.aspx");
}
else
{
SqlCommand cmd = newSqlCommand("select
* from student_registration_details where roll_no=" + Session["rol"] + "
", con);
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
Image1.ImageUrl = "~/upload_photograph/"+dr["photo"].ToString();
admtcardladdress.Text = dr["permanent_mailing_address"].ToString();
admtcardlappno.Text = dr["application_no"].ToString();
admtcardlcorse.Text = "Bachelor of Technology";
admtcaldat.Text = dr["birth_date"].ToString();
admtcardlemal.Text = dr["email_id"].ToString();
admtcardlexamcenter.Text = dr["counselling_center_choice"].ToString();
admtcardlexamtmng.Text = "9;00 A.M. To 12:00 A.M.";
admtcardlfathername.Text = dr["father_name"].ToString();
admtcrdmothername.Text = dr["mother_name"].ToString();
admtcardlgender.Text = dr["gender"].ToString();
admtcardlname.Text = dr["name"].ToString();
admtcardlphyscallycapp.Text =
dr["physically_handicapped"].ToString();
admtcardlroll.Text = dr["roll_no"].ToString();
admtcardlvertquota.Text = dr["category_vertical"].ToString();
admtclyr.Text = dr["birth_year"].ToString();
admtlmon.Text = dr["birth_month"].ToString();
admtcardlarmy.Text = dr["army_quota"].ToString();
genadmtcardlname2.Text = dr["name"].ToString();
admtcardladdress.Text = dr["permanent_mailing_address"].ToString();
}
}
}
protectedvoid Button1_Click(object
sender, EventArgs e)
{
Button1.Visible = false;
}
protectedvoid LinkButton1_Click(object sender, EventArgs
e)
{
Session.Abandon();
}
}
Home
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
publicpartialclasshome
: System.Web.UI.Page
{
SqlConnection con = newSqlConnection("Data
Source=GAURAV-PC\\SQLEXPRESS;Initial Catalog=counselling_system;Integrated
Security=True");
protectedvoid Page_Load(object
sender, EventArgs e)
{
}
protectedvoid Button1_Click(object
sender, EventArgs e)
{
if (hometusername.Text == "administrator"&&
hometpassword.Text == "9919445029")
{
Session["admin"]
= "9919445029";
Response.Redirect("admin.aspx");
}
//SqlCommand cmd = new SqlCommand("SELECT
student_registration_details.name FROM student_registration_details INNER JOIN
login_password ON student_registration_details.roll_no =
login_password.roll_no where
student_registration_details.roll_no="+logintuserid.Text+" AND
login_password.passwd='"+logintpassword.Text+"'", con);
SqlCommand cmd=newSqlCommand ("select
* from login_password where roll_no="+hometusername.Text +" and passwd='"+hometpassword.Text +"'",con);
con.Open();
try
{
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
Session["rol"] = dr["roll_no"].ToString();
// logintuserid.Text
= "";
Response.Redirect("login_user_home.aspx");
}
else
{
homellognerrormsg.Text = "Invalid user ID and Password combination....please
retry...!";
//logintpassword.Text = "";
//logintuserid.Text = "";
}
}
catch (Exception
ex)
{
}
finally
{
con.Close();
}
}
}
Insert Questions
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
publicpartialclassissue_paper
: System.Web.UI.Page
{
SqlConnection con = newSqlConnection("Data
Source=GAURAV-PC\\SQLEXPRESS;Initial Catalog=counselling_system;Integrated
Security=True");
protectedvoid Page_Load(object
sender, EventArgs e)
{
if(Session["admin"]=="")
{
Response.Redirect("home.aspx");
}
if (IsPostBack == false)
{
fill();
issuepaperlemailid.Visible = false;
issuepaperlemailidanswer.Visible = false;
issuepaperlgenfer.Visible = false;
issuepaperlgenderanswer.Visible = false;
issuepaperlname.Visible = false;
issuepaperlnameanswer.Visible = false;
issuepaperlemailid.Visible = false;
issuepaperlemailid.Visible = false;
issuepaperlstdetails.Visible = false;
issuepaperiimage.Visible = false;
issuepaperbissue.Visible = false;
}
}
void fill()
{
DataSet ds = newDataSet();
SqlDataAdapter dap = newSqlDataAdapter("select
center_id,center_name from
examination_center ", con);
dap.Fill(ds, "center_id");
issuepaperdcenter.DataSource =
ds.Tables[0];
issuepaperdcenter.DataTextField = "center_name";
issuepaperdcenter.DataValueField="center_id";
issuepaperdcenter.DataBind();
issuepaperdcenter.Items.Insert(0, newListItem("--select--", "--select--"));
}
protectedvoid DropDownList1_SelectedIndexChanged(object sender, EventArgs
e)
{
DataSet ds = newDataSet();
SqlDataAdapter dap = newSqlDataAdapter("select
roll_no from student_registration_details where
center_id="+issuepaperdcenter.SelectedValue.ToString()+"and status=1", con);
issuepaperdselrollno.Visible = true;
issuepaperdselrollno.Visible = true;
dap.Fill(ds, "roll_no");
issuepaperdselrollno.DataSource =
ds.Tables[0];
issuepaperdselrollno.DataTextField = "roll_no";
issuepaperdselrollno.DataBind();
issuepaperdselrollno.Items.Insert(0, newListItem("--select--", "--select--"));
}
protectedvoid
issuepaperdselrollno_SelectedIndexChanged(object
sender, EventArgs e)
{
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd1 = newSqlCommand("select
photo from student_registration_details where roll_no="+issuepaperdselrollno.SelectedItem.ToString()+"", con);
con.Open();
SqlDataReader dr1 = cmd1.ExecuteReader();
if (dr1.Read())
{
string p = dr1["photo"].ToString();
issuepaperiimage.ImageUrl = "~/upload_photograph/" + p;
}
con.Close();
issuepaperlemailid.Visible = true;
issuepaperlemailidanswer.Visible = true;
issuepaperlgenfer.Visible = true;
issuepaperlgenderanswer.Visible = true;
issuepaperlname.Visible = true;
issuepaperlnameanswer.Visible = true;
issuepaperlemailid.Visible = true;
issuepaperlemailid.Visible = true;
issuepaperlstdetails.Visible = true;
issuepaperiimage.Visible = true;
issuepaperbissue.Visible= true;
SqlCommand cmd= newSqlCommand("select
* from student_registration_details where roll_no=" +
issuepaperdselrollno.SelectedItem.ToString() + "",
con);
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
issuepaperlemailidanswer.Text = dr["email_id"].ToString();
issuepaperlnameanswer.Text = dr["name"].ToString();
issuepaperlgenderanswer.Text = dr["gender"].ToString();
}
}
protectedvoid issuepaperbissue_Click(object sender, EventArgs
e)
{
SqlCommand cmd = newSqlCommand("update
student_test_details set status1=1 where roll_no="+issuepaperdselrollno.SelectedItem.ToString()+" ", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid LinkButton1_Click(object sender, EventArgs
e)
{
Session.Abandon();
}
}
Login page
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
publicpartialclassDefault3
: System.Web.UI.Page
{
SqlConnection con = newSqlConnection("Data
Source=GAURAV-PC\\SQLEXPRESS;Initial Catalog=counselling_system;Integrated
Security=True");
protectedvoid Page_Load(object
sender, EventArgs e)
{
if (IsPostBack == false)
{
logintpassword.Text = "";
logintuserid.Text = "";
//loginlmsg
}
}
protectedvoid loginbsubmit_Click(object sender, EventArgs
e)
{
//SqlCommand cmd = new SqlCommand("SELECT
student_registration_details.name FROM student_registration_details INNER JOIN
login_password ON student_registration_details.roll_no =
login_password.roll_no where
student_registration_details.roll_no="+logintuserid.Text+" AND
login_password.passwd='"+logintpassword.Text+"'", con);
SqlCommand cmd = newSqlCommand("select
* from login_password where
roll_no=" + logintuserid.Text + "
and passwd='" + logintpassword.Text + "'",
con);
con.Open();
try
{
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
Session["rol"] = dr["roll_no"].ToString();
// logintuserid.Text
= "";
Response.Redirect("login_user_home.aspx");
}
else
{
loginlmsg.Text = "Invalid user ID and Password combination....please
retry...!";
//logintpassword.Text = "";
//logintuserid.Text = "";
}
}
catch (Exception
ek)
{
}
finally
{
con.Close();
//loginlmsg.Text = "";
logintpassword.Text = "";
logintuserid.Text = "";
}
}
}
Login user page
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
publicpartialclassDefault3
: System.Web.UI.Page
{
SqlConnection con = newSqlConnection("Data
Source=GAURAV-PC\\SQLEXPRESS;Initial Catalog=counselling_system;Integrated Security=True");
protectedvoid Page_Load(object
sender, EventArgs e)
{
if (Session["rol"].ToString()
== "")
{
Response.Redirect("login.aspx");
}
if (IsPostBack == false)
{
lphotomsg.Text = "";
SqlCommand cmd = newSqlCommand("
select name,photo,category_vertical from student_registration_details where
roll_no=" + Session["rol"].ToString()
+ "", con);
SqlCommand cmd1 = newSqlCommand("
select status1,status2 from student_test_details where roll_no=" +
Session["rol"].ToString() + "", con);
con.Open();
SqlDataReader dr1 = cmd.ExecuteReader();
if (dr1.Read())
{
luhlwelcome.Text = dr1["name"].ToString();
lname.Text = dr1["name"].ToString();
lcategory.Text = dr1["category_vertical"].ToString();
lrollno.Text = Session["rol"].ToString();
if (dr1["photo"].ToString()
== "0")
{
lphotomsg.Text = "Please upload your photo";
}
else
{
Image1.ImageUrl = "~/upload_photograph/" + dr1["photo"].ToString();
LinkButton3.Enabled = false;
}
}
con.Close();
con.Open();
SqlDataReader dr = cmd1.ExecuteReader();
if (dr.Read())
{
if (dr["status1"].ToString()
== "1"&& dr["status2"].ToString() == "0")
{
loginuserhomelstrtest.Visible = true;
loginuserhomelstrtest.Enabled = true;
}
else
{
loginuserhomelstrtest.Visible = false;
loginuserhomelstrtest.Enabled = false;
}
}
else
{
loginuserhomelstrtest.Visible =
false;
loginuserhomelstrtest.Enabled =
false;
}
con.Close();
}
}
protectedvoid LinkButton1_Click(object sender, EventArgs
e)
{
}
protectedvoid LinkButton2_Click(object sender, EventArgs
e)
{
}
protectedvoid LinkButton4_Click(object sender, EventArgs
e)
{
}
protectedvoid LinkButton5_Click(object sender, EventArgs
e)
{
Response.Redirect("out_time.aspx");
}
}
Manage student
records
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
publicpartialclassDefault2
: System.Web.UI.Page
{
SqlConnection con = newSqlConnection("Data
Source=GAURAV-PC\\SQLEXPRESS;Initial Catalog=counselling_system;Integrated
Security=True");
protectedvoid Page_Load(object
sender, EventArgs e)
{
if (Session["admin"]
== "")
{
Response.Redirect("home.aspx");
}
if (IsPostBack == false)
{
}
}
protectedvoid managerapprove_CheckedChanged(object sender, EventArgs
e)
{
}
protectedvoid RadioButtonList1_SelectedIndexChanged(object sender, EventArgs
e)
{
con.Open();
DataSet ds = newDataSet();
SqlDataAdapter dap = newSqlDataAdapter("select
application_no 'App. No.',roll_no 'Roll no.',Name
,(convert(varchar,birth_date)+'-'+birth_month+'-'+convert(varchar,birth_year))
as 'DOB',gender,category_vertical 'Category',counselling_center_choice 'center'
from student_registration_details where status=" +
RadioButtonList1.SelectedValue + "",
con);
dap.Fill(ds,"student_records");
GridView1.DataSource=ds.Tables[0];
GridView1.DataBind();
con.Close();
}
protectedvoid GridView1_SelectedIndexChanged(object sender, EventArgs
e)
{
}
protectedvoid LinkButton1_Click(object sender, EventArgs
e)
{
Session.Abandon();
}
}
Out time
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
publicpartialclassDefault2
: System.Web.UI.Page
{
protectedvoid Page_Load(object
sender, EventArgs e)
{
lmsg.Visible = false;
troll.Text = Session["rol"].ToString();
Session["end"]
= tendtime.Text;
}
protectedvoid bsbmt_Click(object
sender, EventArgs e)
{
if (tadmpass.Text == "123456789")
{
Response.Redirect("question_paper.aspx");
}
else
{
lmsg.Text = "Please enter the correct fields";
}
}
}
Question paper
using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
publicpartialclassDefault2
: System.Web.UI.Page
{
ArrayList al = newArrayList();
protectedvoid Page_Load(object
sender, EventArgs e)
{
Label1.Text = DateTime.Now.ToShortTimeString();
//DateTime p =
DateTime.Parse(Session["end"].ToString());
//if (p <= DateTime.Parse(Label1.Text))
//{
// calc();
//}
if (Session["rol"].ToString()
== "")
{
Response.Redirect("login.aspx");
}
if (IsPostBack == false)
{
//lblend.Text =
DateTime.Now.AddHours(1).ToLongTimeString();
ch1.Text = "0"; ch2.Text = "0";
ch3.Text = "0"; ch4.Text = "0"; ch5.Text = "0";
ch6.Text = "0"; ch7.Text = "0"; ch8.Text = "0";
ch9.Text = "0"; ch10.Text = "0";
ques_fill(testlquest1, s1, a1,
b1, c1, d1);
ques_fill(testlques2, s2, a2,
b2, c2, d2);
ques_fill(testlques3, s3, a3,
b3, c3, d3);
ques_fill(testlques4, s4, a4,
b4, c4, d4);
ques_fill(testlques5, s5, a5,
b5, c5, d5);
ques_fill(testlques6, s6, a6,
b6, c6, d6);
ques_fill(testlques7, s7, a7,
b7, c7, d7);
ques_fill(testlques8, s8, a8,
b8, c8, d8);
ques_fill(testlques9, s9, a9,
b9, c9, d9);
ques_fill(testlques10, s10,
a10, b10, c10, d10);
}
}
void ques_fill(Label
l, Label ans, RadioButton
p, RadioButton q, RadioButton
t, RadioButton sp)
{
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
Random r = newRandom();
int choice = r.Next(108, 113) + r.Next(1, 10) +
r.Next(1, 10) + r.Next(1, 10);
if (al.Contains(choice))
{
ques_fill( l, ans,p, q,
t, sp);
}
else
{
SqlCommand cmd = newSqlCommand("select
* from test where ques_id=" + choice + "
", con);
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
ans.Text = dr["answer"].ToString();
l.Text = dr["question"].ToString();
p.Text = dr["option1"].ToString();
q.Text = dr["option2"].ToString();
t.Text = dr["option3"].ToString();
sp.Text = dr["option4"].ToString();
}
con.Close();
}
al.Add(choice);
}
protectedvoid a1_CheckedChanged(object sender, EventArgs
e)
{
ch1.Text = "1";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q1=1 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid b1_CheckedChanged(object sender, EventArgs
e)
{
ch1.Text = "2";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q1=2 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid c1_CheckedChanged(object sender, EventArgs
e)
{
ch1.Text = "3";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q1=3 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid d1_CheckedChanged(object sender, EventArgs
e)
{
ch1.Text = "4";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q1=4 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid c2_CheckedChanged(object sender, EventArgs
e)
{
ch2.Text = "3";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q2=3 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid a5_CheckedChanged(object sender, EventArgs
e)
{
ch5.Text = "1";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q5=1 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid b5_CheckedChanged(object sender, EventArgs
e)
{
ch5.Text = "2";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q5=2 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid c5_CheckedChanged(object sender, EventArgs
e)
{
ch5.Text = "3";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q5=3 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid d5_CheckedChanged(object sender, EventArgs
e)
{
ch5.Text = "4";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q5=4 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid a6_CheckedChanged(object sender, EventArgs
e)
{
ch6.Text = "1";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q6=1 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid b6_CheckedChanged(object sender, EventArgs
e)
{
ch6.Text = "2";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q6=2 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid c6_CheckedChanged(object sender, EventArgs
e)
{
ch6.Text = "3";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q6=3 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid d6_CheckedChanged(object sender, EventArgs
e)
{
ch6.Text = "4";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q6=4 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid a7_CheckedChanged(object sender, EventArgs
e)
{
ch7.Text = "1";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q7=1 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid b7_CheckedChanged(object sender, EventArgs
e)
{
ch7.Text = "2";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q7=2 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid c7_CheckedChanged(object sender, EventArgs
e)
{
ch7.Text = "3";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q7=3 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid d7_CheckedChanged(object sender, EventArgs
e)
{
ch7.Text = "4";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q7=4 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid a8_CheckedChanged(object sender, EventArgs
e)
{
ch8.Text = "1";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q8=1 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid b8_CheckedChanged(object sender, EventArgs
e)
{
ch8.Text = "2";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q8=2 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid c8_CheckedChanged(object sender, EventArgs
e)
{
ch8.Text = "3";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q8=3 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid d8_CheckedChanged(object sender, EventArgs
e)
{
ch8.Text = "4";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q8=4 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid a9_CheckedChanged(object sender, EventArgs
e)
{
ch9.Text = "1";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q9=1 where roll_no=" + Session["rol"].ToString() + " ", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid b9_CheckedChanged(object sender, EventArgs
e)
{
ch9.Text = "2";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q9=2 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid c9_CheckedChanged(object sender, EventArgs
e)
{
ch9.Text = "3";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q9=3 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid d9_CheckedChanged(object sender, EventArgs
e)
{
ch9.Text = "4";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q9=4 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid a10_CheckedChanged(object sender, EventArgs
e)
{
ch10.Text = "1";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q10=1 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid b10_CheckedChanged(object sender, EventArgs
e)
{
ch10.Text = "2";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q10=2 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid c10_CheckedChanged(object sender, EventArgs
e)
{
ch10.Text = "3";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q10=3 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid d10_CheckedChanged(object sender, EventArgs
e)
{
ch10.Text = "4";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q10=4 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid a3_CheckedChanged1(object sender, EventArgs
e)
{
ch3.Text = "1";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q3=1 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid a2_CheckedChanged1(object sender, EventArgs
e)
{
ch2.Text = "1";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q2=1 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid b2_CheckedChanged1(object sender, EventArgs
e)
{
ch2.Text = "2";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q2=2 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid d2_CheckedChanged1(object sender, EventArgs
e)
{
ch2.Text = "4";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q2=4 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid d3_CheckedChanged1(object sender, EventArgs
e)
{
ch3.Text = "4";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q3=4 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid b3_CheckedChanged1(object sender, EventArgs
e)
{
ch3.Text = "2";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q3=2 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid c3_CheckedChanged1(object sender, EventArgs
e)
{
ch3.Text = "3";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q3=3 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid a4_CheckedChanged1(object sender, EventArgs
e)
{
ch4.Text = "1";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q4=1 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid b4_CheckedChanged1(object sender, EventArgs
e)
{
ch4.Text = "2";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q4=2 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid c4_CheckedChanged1(object sender, EventArgs
e)
{
ch4.Text = "3";
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_test_details set q4=3 where roll_no=" + Session["rol"].ToString() + "", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid d4_CheckedChanged1(object sender, EventArgs
e)
{
ch4.Text = "4";
string h = "update
student_test_details set q4=4 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
void abc(string cm)
{
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
//SqlCommand cmd = new SqlCommand("update
student_test_details set q4=4 where roll_no=" +
Session["rol"].ToString() + "", con);
SqlCommand cmd = newSqlCommand(cm, con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
protectedvoid a5_CheckedChanged1(object sender, EventArgs
e)
{
ch5.Text = "1";
string h = "update
student_test_details set q5=1 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
protectedvoid b5_CheckedChanged1(object sender, EventArgs
e)
{
ch5.Text = "2";
string h = "update
student_test_details set q5=2 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
protectedvoid c5_CheckedChanged1(object sender, EventArgs
e)
{
ch5.Text = "3";
string h = "update
student_test_details set q5=3 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
protectedvoid d5_CheckedChanged1(object sender, EventArgs
e)
{
ch5.Text = "4";
string h = "update
student_test_details set q5=4 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
protectedvoid a6_CheckedChanged1(object sender, EventArgs
e)
{
ch6.Text = "1";
string h = "update student_test_details
set q6=1 where roll_no=" + Session["rol"].ToString()
+ "";
abc(h);
}
protectedvoid b6_CheckedChanged1(object sender, EventArgs
e)
{
ch6.Text = "2";
string h = "update
student_test_details set q6=2 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
protectedvoid c6_CheckedChanged1(object sender, EventArgs
e)
{
ch6.Text = "3";
string h = "update
student_test_details set q6=3 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
protectedvoid d6_CheckedChanged1(object sender, EventArgs
e)
{
ch6.Text = "4";
string h = "update
student_test_details set q6=4 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
protectedvoid a7_CheckedChanged1(object sender, EventArgs
e)
{
ch7.Text = "1";
string h = "update
student_test_details set q7=1 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
protectedvoid b7_CheckedChanged1(object sender, EventArgs
e)
{
ch7.Text = "2";
string h = "update
student_test_details set q7=2 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
protectedvoid c7_CheckedChanged1(object sender, EventArgs
e)
{
ch7.Text = "3";
string h = "update
student_test_details set q7=3 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
protectedvoid d7_CheckedChanged1(object sender, EventArgs
e)
{
ch7.Text = "4";
string h = "update
student_test_details set q7=4 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
protectedvoid a8_CheckedChanged1(object sender, EventArgs
e)
{
ch8.Text = "1";
string h = "update
student_test_details set q8=1 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
protectedvoid b8_CheckedChanged1(object sender, EventArgs
e)
{
ch8.Text = "2";
string h = "update
student_test_details set q8=2 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
protectedvoid c8_CheckedChanged1(object sender, EventArgs
e)
{
ch8.Text = "3";
string h = "update
student_test_details set q8=3 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
protectedvoid d8_CheckedChanged1(object sender, EventArgs
e)
{
ch8.Text = "4";
string h = "update
student_test_details set q8=4 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
protectedvoid a9_CheckedChanged1(object sender, EventArgs
e)
{
ch9.Text = "1";
string h = "update
student_test_details set q9=1 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
protectedvoid b9_CheckedChanged1(object sender, EventArgs
e)
{
ch9.Text = "2";
string h = "update
student_test_details set q9=2 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
protectedvoid c9_CheckedChanged1(object sender, EventArgs
e)
{
ch9.Text = "3";
string h = "update
student_test_details set q9=3 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
protectedvoid d9_CheckedChanged1(object sender, EventArgs
e)
{
ch9.Text = "4";
string h = "update
student_test_details set q9=4 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
protectedvoid a10_CheckedChanged1(object sender, EventArgs
e)
{
ch10.Text = "1";
string h = "update
student_test_details set q10=1 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
protectedvoid b10_CheckedChanged1(object sender, EventArgs
e)
{
ch10.Text = "2";
string h = "update
student_test_details set q10=2 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
protectedvoid c10_CheckedChanged1(object sender, EventArgs
e)
{
ch10.Text = "3";
string h = "update
student_test_details set q10=3 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
protectedvoid d10_CheckedChanged1(object sender, EventArgs
e)
{
ch10.Text = "4";
string h = "update
student_test_details set q10=4 where roll_no=" + Session["rol"].ToString() + "";
abc(h);
}
void calc()
{
int marks = 0,cor=0,wro=0;
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
if (ch1.Text == s1.Text)
{
marks += 3;
cor++;
}
elseif (ch1.Text == "0")
{
}
else
{
marks -= 1;wro++;
}
if (ch2.Text == s2.Text)
{
marks += 3; cor++;
}
elseif (ch2.Text == "0")
{
}
else
{
marks -= 1;wro++;
}
if (ch3.Text == s3.Text)
{
marks += 3; cor++;
}
elseif (ch3.Text == "0")
{
}
else
{
marks -= 1; wro++;
}
if (ch4.Text == s4.Text)
{
marks += 3; cor++;
}
elseif (ch4.Text == "0")
{
}
else
{
marks -= 1;wro++;
}
if (ch5.Text == s4.Text)
{
marks += 3; cor++;
}
elseif (ch5.Text == "0")
{
}
else
{
marks -= 1;wro++;
}
if (ch6.Text == s6.Text)
{
marks += 3; cor++;
}
elseif (ch6.Text == "0")
{
}
else
{
marks -= 1;wro++;
}
if (ch7.Text == s7.Text)
{
marks += 3; cor++;
}
elseif (ch7.Text == "0")
{
}
else
{
marks -= 1;wro++;
}
if (ch8.Text == s8.Text)
{
marks += 3; cor++;
}
elseif (ch8.Text == "0")
{
}
else
{
marks -= 1;wro++;
}
if (ch9.Text == s9.Text)
{
marks += 3; cor++;
}
elseif (ch9.Text == "0")
{
}
else
{
marks -= 1;wro++;
}
if (ch10.Text == s10.Text)
{
marks += 3; cor++;
}
elseif (ch10.Text == "0")
{
}
else
{
marks -= 1;wro++;
}
SqlCommand cmd=newSqlCommand("update
student_test_details set status2=1,test_marks="+marks+" where roll_no="+Session["rol"].ToString()+"",con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
questionpaperbsubmit.Enabled = false;
Session["correct"]
= cor;
Session["wrong"]
= wro;
Session["mark"]
= marks;
float per = (float)((marks*100)
/ 30);
Session["p"]
= per;
Session["unattempt"]
= 10 - cor - wro;
Response.Redirect("final_result.aspx");
}
protectedvoid Button1_Click(object
sender, EventArgs e)
{
calc();
}
protectedvoid BulletedList1_Click(object sender, BulletedListEventArgs
e)
{
}
}
Recover password
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
publicpartialclassDefault3
: System.Web.UI.Page
{
SqlConnection con = newSqlConnection("Data
Source=GAURAV-PC\\SQLEXPRESS;Initial Catalog=counselling_system;Integrated
Security=True");
protectedvoid Page_Load(object
sender, EventArgs e)
{
if (IsPostBack == false)
{
recoverpwdtusername.Text = "";
recoverpwdtsecans.Text = "";
changepasslwrongcomb.Text = "";
}
}
protectedvoid recoverpwdbrecover_Click(object sender, EventArgs
e)
{
SqlCommand cmd = newSqlCommand("Select
l.passwd from student_registration_details s FULL JOIN login_password l ON
l.roll_no="+recoverpwdtusername.Text +"
WHERE s.security_answer='"+recoverpwdtsecans.Text+"'",con );
try
{
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
Session["password"] = dr["passwd"].ToString();
Response.Redirect("recover_password_msg.aspx");
}
else
{
changepasslwrongcomb.Text = "Wrong combination of User name and
Password.....Retry....!";
}
}
catch (Exception
ex)
{
}
finally
{
con.Close();
}
}
}
Registration
status
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
publicpartialclassregistration_status
: System.Web.UI.Page
{
SqlConnection con = newSqlConnection("Data
Source=GAURAV-PC\\SQLEXPRESS;Initial Catalog=counselling_system;Integrated Security=True");
void start()
{
if (IsPostBack == false)
{
if (Label1.Text == "Approved")
{
LinkButton1.Enabled = true;
}
else
LinkButton1.Enabled = false;
}
}
protectedvoid Page_Load(object
sender, EventArgs e)
{
if (Session["rol"].ToString()
== "")
{
Response.Redirect("login.aspx");
}
int a=0;
SqlCommand cmd = newSqlCommand("select
name,photo,category_vertical, status from student_registration_details where
roll_no=" + Session["rol"].ToString()
+ "", con);
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
if(dr.Read())
a = Convert.ToInt32(dr["status"].ToString());
lname.Text = dr["name"].ToString();
lcategory.Text = dr["category_vertical"].ToString();
lrollno.Text = Session["rol"].ToString();
if (dr["photo"].ToString()
== "0")
{
lphotomsg.Text = "Please upload your photo";
}
else
{
Image1.ImageUrl = "~/upload_photograph/" + dr["photo"].ToString();
}
con.Close();
if (a == 0)
{
Label1.Text = "Pending";
}
if (a == 1)
{
Label1.Text = "Approved";
LinkButton1.Enabled = true;
}
if (a == 2)
{
Label1.Text = "Disapproved";
}
}
protectedvoid LinkButton1_Click(object sender, EventArgs
e)
{
}
}
Upload photograph
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
publicpartialclassupload_photograph
: System.Web.UI.Page
{
protectedvoid Page_Load(object
sender, EventArgs e)
{
if (Session["rol"].ToString()
== "")
{
Response.Redirect("login.aspx");
}
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("
select name,photo,category_vertical from student_registration_details where
roll_no=" + Session["rol"].ToString()
+ "", con);
con.Open();
SqlDataReader dr1 = cmd.ExecuteReader();
if (dr1.Read())
{
lname.Text = dr1["name"].ToString();
lcategory.Text = dr1["category_vertical"].ToString();
lrollno.Text = Session["rol"].ToString();
if (dr1["photo"].ToString()
== "0")
{
lphotomsg.Text = "Please upload your photo";
}
else
{
Image1.ImageUrl = "~/upload_photograph/" + dr1["photo"].ToString();
}
if (Session["rol"].ToString()
== "")
{
Response.Redirect("login.aspx");
}
if (IsPostBack == false)
{
}
}
}
protectedvoid Button1_Click(object
sender, EventArgs e)
{
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_registration_details set photo='"+uploadphotoffileupload.FileName+"' where roll_no="+Session["rol"].ToString()+" ", con);
if (uploadphotoffileupload.FileName != "" )
{
uploadphotoffileupload.SaveAs(Server.MapPath("upload_photograph/")
+ uploadphotoffileupload.FileName);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
uploadphotoiimage.ImageUrl = "~/upload_photograph/" +
uploadphotoffileupload.FileName;
}
else
{
Label1.Text = "please upload a proper file ...!";
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
publicpartialclassupload_photograph
: System.Web.UI.Page
{
protectedvoid Page_Load(object
sender, EventArgs e)
{
if (Session["rol"].ToString()
== "")
{
Response.Redirect("login.aspx");
}
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("
select name,photo,category_vertical from student_registration_details where
roll_no=" + Session["rol"].ToString()
+ "", con);
con.Open();
SqlDataReader dr1 = cmd.ExecuteReader();
if (dr1.Read())
{
lname.Text = dr1["name"].ToString();
lcategory.Text = dr1["category_vertical"].ToString();
lrollno.Text = Session["rol"].ToString();
if (dr1["photo"].ToString()
== "0")
{
lphotomsg.Text = "Please upload your photo";
}
else
{
Image1.ImageUrl = "~/upload_photograph/" + dr1["photo"].ToString();
}
if (Session["rol"].ToString()
== "")
{
Response.Redirect("login.aspx");
}
if (IsPostBack == false)
{
}
}
}
protectedvoid Button1_Click(object
sender, EventArgs e)
{
string m = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
SqlConnection con = newSqlConnection(m);
SqlCommand cmd = newSqlCommand("update
student_registration_details set photo='"+uploadphotoffileupload.FileName+"' where roll_no="+Session["rol"].ToString()+" ", con);
if (uploadphotoffileupload.FileName != "" )
{
uploadphotoffileupload.SaveAs(Server.MapPath("upload_photograph/")
+ uploadphotoffileupload.FileName);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
uploadphotoiimage.ImageUrl = "~/upload_photograph/" +
uploadphotoffileupload.FileName;
}
else
{
Label1.Text = "please upload a proper file ...!";
}
}
}
TESTING METHODOLOGIES
INTRODUCTION:
Testing presents
an interesting anomaly. A series of test cases are created that are intended to
“demolish” the software that has been created. Testing requires that the
developer discard preconceived notions of the “correctness” of the software
just developed and overcome a conflict of interest that occurs when errors are
uncovered.
Testing objectives:
These are
follows:-
- Testing is process of executing a program with the intent of finding an error.
- A good test case is one that has a high probability of finding an as-yet undiscovered error.
- A successful test is one that uncovers as-yet undiscovered error. If the testing is conducted successfully it will uncover errors in the software. Testing cannot show the absence of defects, it can only show those software errors are present.
Testing principles:
- All tests should be traceable to customer requirements.
- Tests should be planned long before testing beings.
- The pare to principle applies to testing (this principle implies that 80% of all errors uncovered during testing likely be traceable to 20% of all program modules).
- Testing should begin “in the small” and progress toward testing “in the large”.
- Exhaustive testing is not possible.
Testing Strategies:
UNIT TESTING
Unit testing
begins at the vortex of the spiral and concentrates on each unit of the
software as implemented in source code. Testing progress by moving outward
along the spiral, to integration testing, where the focus is on design and the
construction of the software architecture. Taking another turn outward on the
spiral, we encounter validation testing, where requirements against the
software that has been constructed. Unit testing makes heavy use of white-box
testing techniques, exercising specific paths in a module’s control structure
to ensure complete coverage and maximum error detection.
System testing
Software is
only one element of a larger computer-base software is incorporate with other
system element and series of system integration and validation not conducted
test are conducted. These tests fail outside the scope of the software process
and are by software engineer.
A classic
system-testing problem is “finger-pointing”. This occurs when an error is
uncovered, and each system element developer blames the other for the problem.
The software engineer should anticipate potential interfacing problem and…..
1)
Design error-handling path that test all information
coming from other element.
2)
Conduct a series of test that stimulate bad data.
3)
If finger pointing dose occur then record the result of
test.
4)
Participate in planning and design of system test to
ensure that the software is tested.
System testing
is actually a series of different test whose primary purpose is to fully
exercise the computer-based system. Each have different purpose, all work have been
properly integrated and perform function.
We discuss the
type of system test for software-based system:-
a) Recovery testing:-
Recovery testing is a system test that force the software to fail
verifies that recovery is properly performed. If recovery is automatic,
reinitialization, check pointing mechanisms, data recovery requires human
intervention, the mean-time-to-repair (mttr) is evaluated to determine whether
it is within acceptable limits.
b) Security testing:-
Security testing
attempt to verify that protection mechanism built in to a system will in fact,
protect it from improper penetration to quote beizer: “the system’s security
must, of course, be tested for invulnerability from frontal attack-but must
also be tested for invulnerability from flank or rear attack.”
During system
testing, the tester plays role of individual who desire to penetrate the
system. Anything goes! The tester may attempt to acquire password through
external means: may attack the system with custom software designed to breakdown
any defense
that have been
constructed: may overwhelm the system, may through insecure data, hoping to
find the key to system entry.
c) Stress testing:-
Stress testing executes a system in a
manner that demands resources in abnormal quantity, frequency or volume. E.g.
special test may design that generate ten interrupt per second, when one or two
is the average rate.
A variation of
stress testing is techniques called sensitivity testing. In some situation, a
very small range of data contained within the bound of valid data for a program
may cause extreme and even erroneous processing performance.
d) Performance testing:-
Performance
testing is design to test the run-time performance of software within the
context of an integrated system. Performance testing occurs throughout all
steps in the testing process. Even at the unit level, the performance of an
individual module may be accessed as white-box test are conducted. Performance
test and software instrumentation. That is, it is often necessary to measure
resource utilization in an extorting fashion.
White-box testing:
Sometimes called
glass-box testing, is a test design method that uses the control structure of
the procedural design to device test cases. Using white-box testing methods,
the software engineer can derive test case that:
1.
Guarantee that all independent path within a module
have been exercised at least once.
2.
Exercise all logical decision on their true and false
sides;
3.
Execute all loops at their boundaries and within their
operational bounds; and
4.
Exercise internal data structure to assure their
validity.
A reasonable
question might be posed at this juncture: “why spend time and energy worrying
about (and testing) logical minutiae when we might better expand effort
ensuring that program requirements have
been met?”
started another way, why don’t we spend all of our energies on black-box test?
The answer lies in the nature of software defects.
- Logic errors and incorrect assumptions are inversely proportional to the probability that a program path will be executed. Errors tends to creep into our work when we design and implement function, conditions
or control that are out of the mainstream. Everyday processing tends to
be well understood (and well
scrutinized), while “special case” processing tends to fall into the
cracks.
- We often believe that a logical path is not likely flow to be executed when, in fact, it may be execute on a regular basis. The logical flow of a program is sometimes counterintuitive, meaning that our unconscious assumption about flow of control and data may lead us to make design errors that are uncovered only once path testing commences.
- Typographical errors are random. When a program is translated into programming language source code, it is likely that typing errors will occur. Many will be uncovered by syntax checking mechanisms, but others will go undetected until testing begins it is as likely what a typo will exist on an obscure logical path as on a mainstream path.
Each of these
reason provides an argument for conducting white-box tests. Black box testing,
no matter how throught, may miss the kinds of errors noted above. As beizer has
stated [BE190]: “Bugs lurks in corners and congregate at boundaries.” White-box
testing is for more likely to uncover them.
Black-box testing:-
Focuses on the
functional requirements of the software. That is, black-box testing enables the
software engineer to drive sets of input conditions that will fully exercise
all functional requirements for a program. Black-box
testing is not
an alternative to white-box techniques. Rather, it is a complimentary is not an
alternative to white-box methods.
Black-box
testing attempts to find errors in the following categories:
- Incorrect or missing functions.
- Interface errors.
- Errors in data structures or external database access.
- Performance errors and
- Initialization and termination errors.
Unlike white-box
testing, which is performed early in the testing process, black-box testing
tends to be applied during later stages of testing. Because black-box testing
purposely this regards control structures, attention is focused on the
information domain. Tests are designed to answer the following questions:
- How is functional validity tested?
- What classes of input will make good test cases?
- Is the system particularly sensitive to certain input values?
- What data rates and data volume can the system tolerate?
- What effect will specific combinations of data have on system operation?
By applying
black-box techniques, we drive a set of test cases that satisfy the following
criteria :
1.
test case that reduce, by account that is greater than
on, the number of additional test cases that must be design to achieve
reasonable testing, and
2.
test cases that tell us something about the presence or
absence of classes of errors, rather than errors associated only with the
specific test at hand.
Test Case Design
Project Name OES
|
Document No.
|
Test Case Author: Prashant
|
Date
|
BUGS REPORT
Project OES
|
Page No
|
Bug Report
Author :Pooja
|
Document
No. TC/2011/1.4
Date
|
SECURITY MECHANISM
The system
security problem can be divided into four related issues-security, integrity,
privacy, confidentiality.
System security:
Refers to the
technical innovations and procedures applied to the hardware and operating
system to protect against deliberate or accidental damage from a defined
threat. In contrast data security is the protections against data from loss
disclosure, modification and destruction.
System integrity:
Refers to the
proper functioning of hardware and programs, appropriate physical security, and
safe against external threats such as eavesdropping and wire-tapping.
In contrast data
integrity makes sure that data do not differ from their original form and have
not been accidentally or intentionally disclosed, altered or destroyed.
Privacy:
Defines the
right of the users or organization to determine what information they are
willing to share with or accept from others and how the other organizations can
be protected against unwelcome, unfair or excessive dissemination of
information about it.
Confidentiality:
Is a special
status given to sensitive information in a database to minimize possible
invasion of privacy. It is an attribute of information that characterizes its
need for protection.
DataBase Security:
My I have
implemented ample security for database
of my project. Database is accessible to only Administrator of the system
because there is separate provision for access control for the database .A
person who give right user id and password only that person is able to enter
into database. Along with that encrypted field is provided so that a malicious
person is not able to capture it. like in Login Form and Smart Card Module
where the user id and password is enter into the textbox in encrypted form.
Control measures:
Primary goal of
authenticated is to allow access to legitimate system user ant to deny access
to authorized parties.Password is the mechanism of the authentication which I
used in my application.
The primary goal
of authenticated is to allow acess to legitimate system user ant to deny access
to unauthorized parties.The two primary measures of authenmtication
effectiveness are
- The false acceptance rates,that is the percentage of illegitimate users erroneously admitted.
- The false rejection ratio that is the percentage of legitimate user who are denied access due to the authenticated mechanism.
After system
security risks have be evaluated, the next step is to:
- Select the measures that are internal and external to the facility.
- The measures are generally classified under the following:
- Identification:
There are three schemes
for identifying persons to the computer
v
something you know – such as password. A
password is the most commonly used means for authentication identity of people.
Passwords should be hard to guess and easy to remember.
v
Something you are – such as figure prints or
voiceprints.
v
Something you have- such as the credit card, key
or special terminal
- Access
control: various steps are
taken to control access to a computer facility.
one way is to
use an encoded card system with a log-keeping capability Encryption is an
effective and practical way to safeguard data transmitted over an unprotected
communication channel.
3.
Audit
control: it protects a system from external security branches and
internal fraud or embezzlement. The resources invested an audit control,
however should balance with the sensitivity of the data being manipulated. One
problem with audit controls is that it is difficult to prove their worth until
the system has been violated or a company officer imprisoned. For this reason
audibility must be supported at all management level and planned into every
system.
4.
System
integrity:it is a line of defense that concentrates on the functioning
of hardware, database and supportive software, physical security and operating
procedures. The most costly software loss is program error. It is possible to eliminate
such errors through proper testing routines. Parallel runs should be
implemented whenever possible. Physical security provides safeguard against the
destruction of hardware, databases and documentation –fire, flood, theft,
sabotage and eavesdropping and loss of power through proper backup.
With respect to this project :
Initially
the user authentication is done with password and access is allowed with the
type of the user logging to system. Also only administrator has a write to add
or delete a user and define the category of that user. In addition to this SQL
is used and tables are fully normalized, data integrity and consistency can be
easily maintain just by putting few constraints in the database table. In
addition to this various validation checks are used to ensure that only
relevant data is forwarded to the database.
SOFTWARE AND
HARDWARE REQUIREMENTSPECIFICATIONS
Requirement Specification:
a)Software Tools
Language Used: The languages
used at front-end are C# .
The
causes of selecting this language are:
·
Highly technical language.
·
User friendly environment of working.
·
Provide low cost solution to the project.
·
GUI feature
·
Better designing aspects for developers
Database Used:The Database used
are SQL Server2005
and MS-Access
(Export files will be in Access).The important features of SQL
Server 2000 are:
·
It provides better security aspect to the
system.
·
Better portability that enables user to be
flexible on work.
·
Can manage large amount of data.
·
It provides reliable system with better
integrity and validity of data.
IDE Used:The integrated
Development Environment is
Microsoft
Visual Studio .Net
b) Platform Used:
Microsoft IIS 6 (Internet Information Services) as
web server to host our website.
- Hardware Requirement Specification:
The
required hardware combination for this project will be as following :-
·
Intel Pentium or Celeron class processor.
·
Processor Speed – 1.7GHz or above.
·
RAM -
256 MB or above.
·
HDD - 20 GB or above.
·
VGA Monitor.
·
Scroll mouse, Multimedia Keyboard, CD-Drive.
COST ESTIMATION OF PROJECT
For any given
set of requirement it is desirable to know how much it will cost to develop the
software to satisfy the given requirement and how much time development will
take.
These estimate
are needed before development is initiated. the primary reason for cost and schedule estimation is to be enable
the client or developer to perform a cost benefit analysis and for project monitoring.
and control. a more practical use of these estimates is in bidding for software
project.
Cost in a
project is due to the requirement for software ,hardware and human resource
.Hardware resource are such thing as the computer time terminal time and memory
required for the project whereas software resource include the tool and
compiler needed during development .The bulk of cost of software development is
due to the human resources needed and most cost estimation procedure focus on
this aspect most cost estimates are determine in terms of person-month. by
properly including the overhead in rupee cost of a person-month ,beside including
the direct cost of the person month, most costs for a project can be
incorporated by using PM as the basic measure .Estimate can be based on
subjective opinion of some person or determine through the use of model.
There are many
ways of estimating cost of project I have use COCOMO(Constructive Cost Model) .the model has following hierarchy:
Model 1
The basic COCOMO
model computed software development efforts land cost as a fuction of a program
size expressed in estimated lines of code.
Model 2:
The
intermediated COCOMO model computer software development effort as a program
size and a set of ”cost driver ”that include subjective assessment of vehicle , hardware personnel and project
attributes.
Model 3:
The advance
COCOMO model incorporate all characteristics of the intermediate version with
an assessment of the cost drivers impact on each step of software engineering.
The basic COCOMO
equation takes the form
E=abKLOCbb
D=CbEdb
Where E is the
effort applied in person month ,D is the development time in the chronological
month , and KLOC is the estimated number of delivered lines of code for the
project . The coefficientaband cb and the exponent bb
and dbwere taken as:
This project is
organic so
ab=4
bb=1.05
cb=2.5
db=0.38
LOC=1555
KLOC
=3000/1000 = 3.0
E=2.4(KLOC)2.5
=7.6
=7 PERSON
PER MONTH
New calculated
the D the development time in chronological months
D=2.5 E0.35
=5.2 months
approximately
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.