Sie sind auf Seite 1von 123

ABSTRACT

Our project topic is Online Examination System. An online Examination


System Is a special type of application program where examination of the
student can be taken in a correct and efficient manner .Online Examination
System consist of some pages of question(MCQ types) and the student are to
give the correct answers of those question by selecting the appropriate choice.
Once a page is be submitted, it will not possible to return back to that page. This
system is also capable of determining the performance of the students and
given result instantaneously.
The detail view of the project is given below:
1. The main view of our project will be to design a user friendly front page
where all the information about the online examination will be provided.
2. The foremost requirement of this system is the security. The security
Measurement will be implemented in terms of User-id and Password.

ACKNOWLEDGEMENTS

I will start by saying a big Thank you to my guidence, sunil yadav, for all the
support to me has given me while development the code. It has occupied a
significant part of my spare I would also like to thank the other members of the
ASP.net Standards Committee who wrote committee papers on the
multithreading facilities: Dharam Chand , Sunil kumar , Sudir Pathak, Ritesh
verma, Sunil Yadav discussed them at the committee meetings, and otherwise
helped shaped the multithreading and concurrency support in ASP.NET .

Finally, I would like to thank the following people, whose suggestions have
Greatly improved this Devloping Online Examnation System: Mr. Nishant
(IOS Devloper) , Rama krishana.(ASP.NET Programer) reviews and to
Prakash who, as technical proofreader, painstakingly checked all content for
outright errors in the final manuscript during production.

TABLE OF CONTENTS
1. Introduction

1.1 Background
1.2 objectives
1.3 Purpose,Scope and Applicability
1.3.1 Purpose
1.3.2 Scope
1.3.3 Applicability
1.4 Achievements
1.5 Organisation of Report
2. Survey Of Technologies
3. Requiertments And Analysis
3.1. Problem Defination
3.2. Requiertments Specification
3.3 Planning and scheduling
3.4. Software and Hardware Requirements
3.5. Priliminary Product Description
3.6. Conceptual Models
4. System Design
4.1 Basic Modules
4.2 Data Design
4.2.1

Schema Design

4.2.2

Data Integrity and Constraints

4.3 Procedural Design


4.3.1

Logic Diagrams

4.3.2 Data Structures

4.3.3 Algorithms design


4.4 User Interface Design
4.5 Security Issues
4.6 Test Cases Design
5. Implementation and Testing
5.1 Implementation Approaches
5.2 Coding Details and Code Efficiency
5.2.1

Code Efficiency

5.3 Testing Approach


5.3.1

Unit Testing

5.3.2

Integrated Testing

5.4 Modifications and Improvements


6. Results and Discussion
6.1 Test Reports
6.2 User Documentation
7. Conclusions
7.1 Coclusion
7.2 Limitations of the System
7.3 Future Scope of the Project
References
Glossary
Appendix A

INTRODUCTION

On Line Examination itself represent the examination through the internet. This
project will help the university/ Institution to evaluate the question have
multiple option with one correct answer. This project contains two types of
question viz. subjective and objective. Students have to write the descriptive
answer for the subjective question will be randomly generated. It would be
evaluated automatically i.e. by the system.
This project helps the management to conducting online examination and save
recourse. The university/Institution can conduct the online examination and
announce the status or result in a few data. The examination department is
responsible for the marinating of question paper and it would be completely
secure. This is the era of computer and we are adopting fast mechanism to
solve any problem. On line examination is also a way to give result as soon as
we submit our paper

BACKGROUND

As the name of the project On-Line Examination suggests, the


system/application has to manage the examination for various department of an
academy. So to keep the information correct and fast, it will manage the
status/information of that examination of that examination so one can get the
details of exam as per their program.
Earlier it was a very time consuming and tedious process where both students as
well as university used to perform all tasks manually be it Student Registration,
Sqtting Question Papers, Setting Schedules to finally declaring the result. It was
cumbersome since these details were now generated, managed and kept in
computers.It was still not that much simpler Later the process became a lot
easier when computer system were introduced and all for students because they
were stll expected to come in person to register, appear for exam at exam center
and for all those formalities. Now we are expected to develop an web
application which converts all of these tasks atomized as well as web enabled.
There are applications already working in this area like MCSE, CCNA which
conducts their examination online.

We, as a 6th sem. student of BCA are making this project by taking help from
theses already working and tested applications as well as making our own set of

improvements. This application is coded in .Net. This Software project is very


much helpful to students, Examination department and Exam controller. It
stores the information about Students, Exams,
Report, Results, Students details and Fee Status etc. As we know that this
software project is coded in .Net programming language, it is user friendly. That
means this software is easy to operate. Even a person having less knowledge of
computer can easily operate is, he will be guided throughout by the software to
operate it. This Software is a best effort of changing in paper work to electronic
work. This application is divided into many module, and each module is related
to different part of code. This integration makes the project very user friendly.
Another advantage of this software is the database that is designed very
strongly, the current and previous information is stored in this database and
maintain the database very easily.
University used to keep all the details in files manually.

OBJECTIVES

The On line test System is developed using Asp.net and sql fully meets the
objectives of the system for which it has been developed. The system has
reached a steady state where all bugs have been eliminated. The system is
operated at a high level of efficiency and all the teacher and user associated
with the system understands its advantage. The system soves the problem. It
was intended to solveas requirement specification. To appear for an exam in
manual system in an university is very time consuming process. Now the
purpose of this system is to overcome the shortfall faced in the previous systems
already working in the area.
The website will have to be secure, and properly working on WAN. It should be
speedy with good interface. The university may conduct examination in various
countries and in different languages. It should support multiple platforms at
least those used by people commonly

PURPOSE

Through this package we provide a fully customized web application. This


system is an automated system so that the functional working of it is effective
and time saving. In this modern era time is the most precious thing, so in
context of time the new system will be effective to do a group of task in easy
and secure manner.
To appear for an exam in manual system in an university is very time
consuming process. Now the purpose of this system is to overcome the shortfall
faced in the previous systems already working in the area.
The website will have to be secure, and properly working on WAN. It should be
speedy with good interface. The university may conduct examination in various
countries and in different languages. It should support multiple platforms at
least those used by people commonly

SCOPE

Methodology of the system is clear that result in the complete and proper
working of the system from the requirements achieved. it contains the working
model for the development of system. A sequential step of model is followed to
develop the system so that it will maintain various software engineering
features/parameters.
No need to take leave, visit a different town, city or even states in some cases.
People can appear right from their laptop or home desktop.
To develop this application, weve taken into account some assumptions. They
are:
1. University will provide each student a unique student Id during
enrollment time. The purpose of this is so that no one can register on
behalf of any other student. and only the student himself/herself can
register for the examination using this id.
2. Student login name will be generated automatically by concatenating
student first Name and Enrollment No.
Like : Shwati has student id 13P
So, Swati student login here will be Swati_P1

APPLICABILITY
This project is applicable for not a particular institute or particular university
this project can use any institute or any university which has conducted this
type examination or test. Like CCNA citification course conduct this type of
examination. This type of examination can conduct any institute which is
affiliated by Cisco Certified Network Associated organization and conduct
an exam to those papers which is allowed by Organisation. This project helps
to save human resources and time consumption.

ACHIEVEMENTS
The achievements tucked under our belt after the completion of this project are
enumerable. We got to develop practical abilities and knowledge about practical
tools/techniques in order to solve real life problems related to the
University/Instituation. It made us to involve in the practical work for
understanding and solving problems in the fields of computing. We got a reallife experience to put into practice some of the techniques we have been taught
throughout our previous courses. Now we are capable of objectively criticizing
our own work and making constructive suggestions for improvement or further
work based on our experience. And apart from these all what we learnt is the
way to demonstrate originality, teamwork, inspiration, planning and
organization.
Contributions of our project, both direct and indirect has been discussed
in the previous topic and as far as the degree to which our goals laid out
by project objective is concerned, we can say that all those are achieved.
Though there is some functionality which could be added to make it more
sophisticated, but they were not part of our objective and therefore, we
have left them as future scope of the project.

SURVEY OF TECHNOLOGIES
To develop this package different types of tools and database
are used which are as follows:
1.

ASP.NET

2.

Microsoft-sql server 2008

3.

Microsoft word processor

1. ASP.NET :
ASP.NET is an opensource server side - web application framework designed
for web development to produce dynamic web sites, web applications and web
services .

It was first released in January 2002 with version 1.0 of the .NET framework ,
and is the successor to Microsoft's Active Server Pages (ASP) technology.
ASP.NET is built on the Command Language Runtime (CLR), allowing
programmers to write ASP.NET code using any supported .NET language .
The ASP.NET SOAP extension framework allows ASP.NET components to
process SOAP messages.

ASP.NET is in the process of being re-implemented as a modern and


modular web framework together with other frameworks like Entity
Framework .The new framework will make use of the new open-source .NET
Compiler Platform (code-name "Roslyn") and be cross platform ASP.NET

MVC, ASP.NET Web API, and ASP.NET Web Pages (a platform using only
Razor pages) will merge into a unified MVC 6. The project is called "ASP.NET
vNext".

2.Microsoft-SQL Server 2008


Microsoft SQL Server fulfills these responsibilities :

Reduction and redundancy :


Centralized control of the DBA avoids the unnecessary duplication of data
and effectively Reduces the total amount of data storage required. It also
eliminates the extra processing and of the inconsistencies e.g. Same format
of grade card for all student.

PROBLEM DEFINATION

The problem here is to develop a web application which completely automize


the examination process for an university.
To perform this the complete problem has been divided into five sub-problems
so that they can be solved easily and after that can be integrated to make it an
integrated working application
Online Registration / Enrollment of Student
Online Login
Online Schedule
Online Manage the question bank
Online Examination
Online Result declaration
Online display randomly question.
The questions will be display randomly from question bank.

At the Login module user name and password facility and credentials should
be checked properly at the time of login for student, expert, controller and Exam
Dept Admin. In the schedule Module send the exam schedule to the student.
In question bank module for the examination could be changed dynamically.
Automatic checking of objective answers and manual checking of descriptive
answers

should

be

facilitated,

if

any.

In the Objective answers module will be checked automatically by the system


from the database and the subjective answer manually checking by exam
department will take place.
In the exam module When the student starts the exam the timer will start
automatically and show the student how much time is left.
At result module display the result of each student and send by the exam. Dept.

REQUIERTMENT SPECIFICATION
On the basis of system study performed in an organization about all the
functions that deals with Online examination following requirements are
specified.
Functional Requirements :

The Functional Requirements of the project are as follows:


To provide the functionality to students to appear for the exam online.
To provide login interface through which only authorized user can pass
by.
The timer facility should be provide once the student appears in the
Exam.
The web application provide question to the student randomly.
The system should support WAN so that exam can given from anywhere.
This system should handle multiple exam at the same time.
To functionally enable Exam Controller to define criteria and create
Admin and Experts.

To functionally enable Exam Dept Admin to manage Question Bank


To functionally enable Exam Dept Admin to declare schedule and
Results.
To functionally enable Expert to send set of Questions.
Non-Functional Requirements
The Non-Functional Requirements of the project are as follows:
The system should be reliable and robust.
The system should be User friendly.
The system should be completely Consistent and Secure.
Interface requirements
Interface should be easy to follow,
Interface shouldnt have very much graphics,
Interface shouldnt have hidden buttons, and
Interface should produce relevant error message.

PLANNING AND SCHEDULING


Gantt chart :
Gantt chart are a project control technique that can be used for several purpose
including scheduling and planning. Gantt chart is also known bar chart with
each box representing an activity.

Pert chart:
Pert stands for program evalution and review technique. A pert chart is a
network of boxes and arrows. The boxes in the pert chart can be decorated with
starting and ending dates for activities.

SOFTWARE AND HARDWARE REQUIREMENT


SPECIFICATION

Hardware Requirements:
1. 100 MBPS processor

: Intel Pentium III 1.2 GHz

2. RAM

: 132 MB

3. Cache Memory

: 512 KB

4. Hard Disk

: 20 GB

5. Lancard

: 10/100 MBPS

6. HUB

: 1012

Software Requirements:
1. Operating System

: WINDOWS 2007 / WINDOWS

2. Front End

: ASP.NET

3. RDBMS Tools Used

: SQL SERVER 2008

FEASIBILITY STUDY

1.) ECONOMIC FEASIBILITY


Economic analysis is most frequently used for evaluation of the
effectiveness of the system. More commonly knows ascost/benefit analysis
the procedure is to determine the benefit and saving that are expected from a
system and compare them with costs, decisions is made to design and
implement the system.
This part of feasibility study gives the top management the economic
justification for the new system. This is an important input to the
management the management, because very often the top management does
not like to get confounded by the various technicalities that bound to be
associated with a project of this kind. A simple economic analysis that gives
the actual comparison of costs and benefits is muchmore meaningful in such
cases.
In the system, the organization is most satisfied by economic feasibility.
Because, if the organization implements this system, it need not require any
additional hardware resources as well as it will besaving lot of time.

2.) TECHNICAL FEASIBILITY


Technical feasibility centers on the existing manual system of the test
management process and to what extent it can support the system.
According to feasibility analysis procedure the technical feasibility of the
system is analyzed and the technical requirements such as software facilities,
procedure, inputs are identified. It is also one ofthe important phases of the
system development activities.
The system offers greater levels of user friendliness combined with greater
processing speed. Therefore, the cost of maintenance can be reduced. Since,
processing speed is very high and the work is reduced in the maintenance
point of view management convince that the project is operationally feasible.
3) BEHAVIOURAL FEASIBILITY
People are inherently resistant to change and computer has been known to
facilitate changes. An estimate should be made of how strong the user is
likely to move towards the development of computerized system. These are
various levels of users in order to ensure proper authentication and
authorization and security of sensitive data of theorganization

PRELIMINARY PRODUCT DESCRIPTION


The system will facilitate online examination and documentation of results. The
system can conduct various examinations for various subjects. All one needs to
do is change the database accordingly.
project deals with registration or enrollment of students, submission of
registration forms and issuing unique id and password to enrolled students
This application has Login module we need the user name and password facilty
and credentials should be checked properly at the time of login for
student,expert, controller and Exam Dept Admin.
The application has schedule Module send the exam schedule to the student.
The application has question bank module for the examination could be
Dyanamic application.
The application will facilitate Objective answers module will be checked
automatically by the system from the database and the subjective answer
manually checking by exam department will take place.

CONCEPTUAL MODELS
DATA TABLES
Admin Table :
S.no.
1.

Field Name
User Name

Data Type
Text

2.

Pass Word

Text

3.

User type

Text

S.no.
1.

Field Name
Teacher Id

Data Type
Number

2.

Teacher Name

Text

S.No.
1.
2.

Field name
Student Name
Status

Data Type
Text
Number

3.

Semester

Text

4.

Subject

Text

5.

Month

Text

Description
Store user name for
checking
correct
username
Store
password
corresponding to
username
User
Type
Administrator
or
User

Teacher Table:
Description
Unique key for
Every Teacher
Name of Teacher

Attendance Table:

Subject Table:

Description
Name of Student
Total number
classes attended by
particular
Student
In which Semester
Student is Studying
The Subject Wise
Attendance Is
maintained
The Month Wise
Attendance

S.No.
1.

Field name
Code

Data Type
Number

2.

Subject Name

Text

3.

Semester

Text

S.No.
1.

Field name
Student ID

Data Type
Number

2.

Student Name

Text

3.

Course

Text

4.

Semester

Text

Description
Subject code a
unique key
Name of Subjects
in all semester
In which Semester
student is studying

Student Table:
Description
This is the roll no
of the student
This is the name of
student
This is the course
in which the
students are
studying .
This is the
semester in which
Students are
Studying.

BASIC MODULES
In Our Project with the help of Divide and Conquer theory we can divide
overall program in Five Modules
These five modules are:
Login Module
Student Module
ExamController Module
Exam Dept Module
Expert Module
Login Module :
This is the first module in this project a anyone who want to enter into this
project/application . he/she must have pass through this module, in other word
we can say that this is authentication module because the user authentication
with his/her.To provided user name and password facility and credentials
should be checked properly at the time of login for student,expert, controller
and Exam Dept Admin.

Student Login Form :


This is the form in this project a student who want to enter into this project
application. he/she must have pass through this module, in other word we can
say that this is authentication module because the user authentication with
his/her.
Registration
In this module student can get his/her whole information like his name, address
fees detail,program and courses. the user can select only one course at the
time.Our student table will register the student.University will provide each
student a unique student Id during enrollment time. The purpose of this is so
that no one can register on behalf of any other student. and only the student
himself/herself can register for the examination using this id as password.
Students only submit his/her documents and fees after the registration.
View Schedule
In this schedule form student get his/her schedule according to his registration.
The schedule is managed by the exam dept.
Exam process
When the student starts the exam the timer will start automatically and show
the student how much time is left.

Show Result
In the result form will manage the result(Subjective and Objective questions)
and Status of the student. This table contains the student id from which we will
help us in generating the result.
ExamController Module
The controller has authority to modify the criteria is provided to the controller
of examination and provide an interface from where controller will create new
Expert and Admin for Exam Dept.
ManageAdmin
In this module the controller will Create, Delete and Edit admin for the exam
dept with all of there details.
A Loginname and password has been provided through which the admin can
later login to perform all of there tasks.
ManageExpert
In this module the controller will Create,Delete and Edit experts for they can
later send question sets for objective as well as subjective questions which will
be asked to solve to students under exam process.

Sane as ManageAdmin module, A Loginname and password has been provided


hete too through which the expert can later login to send questions.

Exam Dept Module


In the exam dept will manage the question bank sent by experts.and make
schedule and declare Result.
ManageSchForStu
In this form the exam dept. managed the schedule and sends to the student with
their exam dates.
For this first he see all the details of registered students and allot them date
accordingly.
ManageQusBank
his form manage the subjective and objective question in the question bank sent
by the expert module. The Manage Qustion Bank managed the question will be
display randomly from question bank.
CheckSubQus
This module checks the subjective question attempted by the student during the
exam. subjective answer manually checking by exam department will take place

Declare result
in this form the exam dept. manage the result and sends to the student when
they complete their exam.
Expert Module
In the expert module the Experts to send a collection of questions(objective
and subjective) in Question Bank
Subjective Question
SubQus table will contain Subjective question and its right answer. To not
provide facility of copy and paste while attempting the Subjective questions on
the web page.Here the iSubQusId is the primary key.
Objective Question
ObjQus table will contain objective question and four options and right answer.
Objective answers will be checked automatically by the system from the
database. Here the question id is the primary key.

DATA DESIGN
Student
Our student table will register the student.University will provide each student a
unique student Id during enrollment time. The purpose of this is so that no one
can register on behalf of any other student. and only the student himself/herself
can register for the examination using this id and password. Students only
submit his/her documents and fees after the registration.In this student table
store his/her whole information like his name, address fees detail,program and
courses. the user can select only one course at the time.
Subjective Question
SubQus table will contain Subjective question and its right answer. Here the
iSubQusId is the primary key.
Objective Question
ObjQus table will contain objective question and four options and right answer.
Here the question id is the primary key.
Result

result table will contain the result(Subjective and Objective questions) and
Status of the student. This table contains the student id from which we will help
us in generating the result.
Schedule
Exam Dept managed the schedule and it to student while successfully
resgistraion.This module contains information about their exam with their date.
ExamDept
Our ExamDept table will register the institute or university Examination
department administrator.This ManageAdmin form can access only the
controller. the controller has also controllerId and Password & controllername..
Examdept table will maintain the id and password of Examdept admin.
controller will make admin for different center. The Exam Dept will manage the
question bank sent by experts and evaluated the answer.

SCHEMA DESIGN
Expert
Our Expert table will register the institute or university Expert administrator.
This ManageExpert form can access only the controller. This module contain
the information about expert like his name & expert in which course.
Subjective Question Attempted
In this SubQAttempted table will have iSubQAId , iStuId, iSubQusId, And
tAns. iStuId will be the foreign key for the table Student.
Objective Question Attempted
ObjQAttempted table will have iObjQAId, iStuId, iObjQusId, And cAns. iStuId
will be the foreign key for the table Student.
Course
In the course table contains the information about the iCouId,cCouName,
iSemester and the iProId. Here the iCouId is the primary key.
Program

This program table contains the information about the like course iProgId,
cProgName, and the iFessof the program. Here the iProgId is the primary key.

DATA INTEGRITY AND CONSTRAINTS


Student
Primary key iStuId
Alternate key cENo, cFName, cLName, cProgram, iStudyCenCode,
vLoginName,
vPasswd
Foreign key iCouId (for Student table)
Course
Primary key iCouId
Alternate key CouCode, CouName, iSemester
Foreign key iCouId(for Course table)
ExamDept
Primary key iUserId

Alternate key vLoginName, vPasswde


Expert
Primary key iExId
Alternate key cFName, cLname, cCourse, vLoginName, vPasswd
ObjQAttempted
Primary key iObjQAId
Alternate key cAns
Foreign key iObjQusId (for ObjQAttempted table)
ObjQus
Primary key iObjQusId
Alternate key tObjQus, cOptionA, cOptionB, cOptionC, cOptionD, cAns,
CStatus
Foreign key iExpertId (for Expert table)
Program
Primary key iProgId
Alternate key cProgName, cDuration, iFess

Result
Primary key iResultId
Alternate key iMarkOfSub, iMarkOfObj, bStatus
Foreign key iStuId(for result table )
Schedule
Primary key iSchId
Alternate key dtSDate
Foreign key iStuId(for Schedule table)
SubQAttempted
Primary key iSubQAId
Alternate key tAns
SubQus
Primary key iSubQusId
Foreign key iSubQusId(for SubQAttempted table)
Alternate key tQus,tAns, iMaxMarks, cStatus

Foreign key iExpertId(for SubQus table)

PROCEDURAL DESIGN
Logic Diagrams
Process Diagram

Exam Dept :
Exam dept
Exam DeptId
Exam dept

Vloginname
Vpassword
Board

DATA STRUCTURE

USER INTERFACE DESIGN


STUDENT
Registration

SECURITY ISSUES
Security is an important issue for modern IT system. System administrator and
security administrator are responsible for safeguards organization data and
computing infrastructure.
Password Encryption: Whatever security measures taken, in any case if
anyone with destructive or malicious mind gets access to the database he can
temper the critical data. To restrict it weve used encrypting algorithm
facilitated to us by MicroSoft ASP.Net .
Two algorithms are there
SHA1- It takes the password and encrypt it in a string of 40 characters
MD5- It takes the password and encrypt it in a string of 32characters
The beauty of these algos are that whatever be the length of password the
length of converted string remains same.
However a question arise here that if this thing is that good then why
didnt we used it for storing each and every data????
The answer lies in the fact that not all data are needed to be encrypted as
long as we keep the critical data(like password encrypted and safe). It

will only increase the load on server and network with no additional
advantage. So weve not used this encryption algo on all data blindly.
We have implemented different approach related to security issue for our
project Online Examination :
Authorization:
Super Admin has authorized to give permission to admin for the
registration of the students.
Authentication:
Only registered students can appear for the examination. Every registered
student has different and unique UserId.
Information Integrity:
Only Super admin has right in the modification of the information. There
is no possibility by the end user or unauthorized user of hacking the
information.
Detection:
Super Admin will have a bank up of the project. Also there is a complex
and alphanumeric password for admin and student. Super admin itself has
a complex and alphanumeric password. There is a option for changing the
password by all the admin and itself after every month.

TEST CASES DESIGN


Student Login: Appearing for examination, Student must have to be begin
through student login form. There are three field in the student login page and
Every field has to filled by student. Student can not used character in the login
id field. Student registration will be cancelled automatically by the system after
appearing in the examination.
Admin Login :- To register the student admin has to login first. The Id field is
numeric.
Registration :- Userid and password will be generated by the administrator.
VALIDATION CRITERIA
1.

In each form, no field which is not nullable should be left blank.

2.

All numeric fields should be checked for non-numeric values. Similarly,

text fields like names should not contain any numeric characters.
3.

All primary keys should be automatically generated to prevent the user

from entering any existing key.


4.

Use of error handling for each Save, Edit, delete and other important

operations.
5.

Whenever the user Tabs out or Enter from a text box, the data should be

validated and if it is invalid, focus should again be sent to the text box with
proper message.

TEST CASE 1
MODULE NAME: Manage Admin

SNo
1

Test Case Description

Test Data Expected Result

The Controller leaves the Admin

Error

Admin Name field blank.

displayed

Name

message
to

is
the

Controller and focus is


set on the text box.
2

The

Controller

enters password

Error

message

incorrect different password , confirm password and Cofirm


and confirm password

password

password
match!!!.

IMPLEMENTATION APPROACHES

doesnt

Implementation is the second-last phase of any SDLC. It takes place after


coding is performed and the system is passed through a strict testing phase and
is free against any development-time error. There are many implementation
approaches and based on the requirement and constraints, the best suitable tech
is used.
For our On-Line Examination System, we have used Direct Implementation
approach. In this approach the old system which is being used is replaced by the
new developed system. . The advantage of this technique is it is very cost
effective and the new system helps in various ways. As it overcome the all
disadvantages of the previous system and maintain reliability.
This system is tested first very carefully. Then after it is being used in any
organization.

CODING DETAILS AND CODE EFFICIENCY


Code Details

DBMgt.
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient ;

/// <summary>
/// Summary description for DBMgt
/// </summary>

public class DBMgt


{
public DBMgt()
{
}
public

SqlConnection

SqlConnection("Server=.;uid=sa;pwd=;integrated
security=true;database=OnLEDB");
SqlDataAdapter adpt;
DataSet dtst;
SqlCommand cmd;
private string strDel
public void OpenCon()
{
if(con.State==ConnectionState.Closed)
con.Open();

con=new

else
{
con.Close();
con.Open();
}
}
public void CloseCon()
{
if(con.State==ConnectionState.Open)
con.Close();
}
public bool ExecuteNonQueryStoreProc(string StrProcName, SqlParameter[]
parList)
{
SqlCommand cmd = new SqlCommand(StrProcName, con);
cmd.CommandType = CommandType.StoredProcedure;

for (int inc = 0; inc < parList.Length; inc++)


cmd.Parameters.Add(parList[inc]);
OpenCon();
int i = cmd.ExecuteNonQuery();
CloseCon();
if (i == 1)
return true;
else
return false;
}
public

SqlCommand

ExecuteReaderStoreProc(string

SqlParameter[] parList)
{
SqlCommand cmd = new SqlCommand(StrProcName, con);
cmd.CommandType = CommandType.StoredProcedure;
for (int inc = 0; inc < parList.Length; inc++)

StrProcName,

cmd.Parameters.Add(parList[inc]);
OpenCon();
cmd.ExecuteReader();
CloseCon();
return cmd;
}
public object ExecuteScalerStoreProc(string StrProcName, SqlParameter[]
parList)
{
SqlCommand cmd = new SqlCommand(StrProcName, con);
cmd.CommandType = CommandType.StoredProcedure;
for (int inc = 0; inc < parList.Length; inc++)
cmd.Parameters.Add(parList[inc]);
OpenCon();
object obj = cmd.ExecuteScalar();
CloseCon();

return obj;
}
}
Student Login
Login
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using System.Data.SqlClient;
public partial class Student_Login : System.Web.UI.Page
{
DBMgt objDBMgt = new DBMgt();
protected void Page_Load(object sender, EventArgs e)
{

}
protected void btnLoginButton_Click(object sender, EventArgs e)
{
try
{
string

sha1pwd

FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text.T
rim(), "sha1");
SqlParameter[] parList = new SqlParameter[4];

parList[0]

new

SqlParameter("@vLoginName

",

txtUserName.Text.Trim());
parList[1]

new

SqlParameter("@vPassword",

txtPassword.Text.Trim());
parList[2] = new SqlParameter("@Yes_No", SqlDbType.Int, 4);
parList[3] = new SqlParameter("@iStuId", SqlDbType.Int, 4);
parList[2].Direction = ParameterDirection.Output;
parList[3].Direction = ParameterDirection.Output;
SqlCommand

cmd

objDBMgt.ExecuteReaderStoreProc("checkStudentLogin", parList);
if (cmd != null)
{
if (Convert.ToInt16(cmd.Parameters["@Yes_No"].Value) == 1)
{
Session["iStuId"]
Convert.ToInt16(cmd.Parameters["@iStuId"].Value);

FormsAuthentication.RedirectFromLoginPage(txtUserName.Text,
true);
}
else
FailureText.Visible = true;
}

}
catch (SqlException SqlEx)

// This Catch block is used to Catch the

Sql or Backend related Problem


{

lblMsg.Text = "Sorry for inconvenience!!!!<br>Following BackEnd


related Error Occured:

+'" + SqlEx.Message + "'<br>Try Again!!!";

catch (Exception ex)

// This Block is used to catch any

exception occured if not related to upper exception


{
lblMsg.Text = "Sorry for inconvenience!!!!<br>Following Error
Occured: +'" + ex.Message + "'<br>Try Again!!!";
}

}
}

CODE EFFICIENCY
Doing something and Doing something in proper and correct manner,

both are very different. The same theory is applied in the case of our coding
too. Some of the code efficiencty measures that weve taken are :
1. If certain lines of codes(code segment) are being used repeatedly at different
places in the project with very slight changes then instead of writing that codes
at every places related codes can be grouped together in Classes(and in
functions) so that they can be called from different pages with proper
parameters wherever required.
DBMgt claas is one such class which has functions like
OpenCon()
ExecuteNonQueryStoreProc()
ExecuteReaderStoreProc()
ExecuteReaderStoreProc()

TESTING APPROACH
Unit Testing

Unit testing focuses verification error on the smallest unit of software design
the software component or module. Using the component-level design
description as a guide, important control paths are tested to uncover errors
within the boundary of the module. The relative complexity of tests and the
errors those tests uncover is limited by the constrained scope established for unit
testing. The unit test focuses on the internal processing logic can be conducted
in parallels for multiple components.
Unit Test Considerations
The tests that occur as part of unit tests are illustrated. The module interface is
tested to ensure that information properly flows into and out of the program unit
under test. Local data structures are examined to ensure that data stored
temporarily maintains its integrity during all control structure are exercised to
ensure that all statements in a module have been executed at least once.
Boundary conditions are tested to ensure that the module operates properly at
boundaries established to limit or restrict processing. And finally all error
handling paths are tested.
Test of data flow across a module interface are required before any other
test is initiated. If data do not enter and exit properly, all other tests are moot. In
addition, local data structures should be exercised and the local impact on

global data should be ascertained during unit testing. Selective testing of


execution paths is an essential task during the unit test.
Among the more common errors in Computations are:
1. Blank test box entries.
2. Misunderstood or incorrect Entries i.e. In Name Fields numeric values are
entered.
3. Incorrect Initialization.
4. Incorrect symbolic representation of an expression.

INTEGRATED TESTING

Integration testing is systematic technique for constructing the software


architecture while at the same time conducting tests to uncover errors associated
with interfacing. The objective is to take unit tested components and build a
program structures that has been dictated by design.
Modifications and Improvements:
In testing phase, beside some small errors we got to know about as serious error
which we didnt thought about on.
We didnt proper use of DataSet. Because of this our site was running slowly.
After proper using of DataSet our site becomes fast, i.e. page loaded very
quickly. What we were doing that for each item we have opened the connection.
But at page load we brought all the item and then start retrieving one by one.
This is the very big improvement in our site.

RESULT AND DISCUSSION

TEST REPORTS
Super Admin Login:
If the id field is filled by character the error generated and shown by *. That
it should be numeric.
If the user id or password does exist then error will be generated that User Id
or password does not exist.
Registration:
Required field validator means we have fill the text.
Compare to validate mean the field should match from the previous field.
Student Login:
Appearing for examination, Student must have to be begin through student login
form. There are three field in the student login page and Every field has to filled
by student.Student can not used character in the login id field.
Student registration will be cancelled automatically by the system after
appearing in the examination.
Admin Login :-

USER DOCUMENTATION

Admin Login page


Loginid :- demo
Userid:- demo

Student Loginid:- a
Password:- a

DATABASE SCRIPT
USE [EXAM]
GO
/****** Object: ForeignKey [FK_Exam_type_Exam_type]
Script Date:
03/28/2014 16:53:59 ******/
ALTER TABLE [dbo].[Exam_type] DROP CONSTRAINT [FK_Exam_type_Exam_type]
GO
/****** Object: ForeignKey [FK__oe_exams__mid__35BCFE0A]
Script Date:
03/28/2014 16:55:01 ******/
ALTER TABLE [dbo].[oe_exams] DROP CONSTRAINT [FK__oe_exams__mid__35BCFE0A]
GO
/****** Object: StoredProcedure [dbo].[GetQuestionPageWise]
Script
Date: 03/28/2014 16:55:01 ******/
DROP PROCEDURE [dbo].[GetQuestionPageWise]
GO
/****** Object: Table [dbo].[oe_exams]
Script Date: 03/28/2014 16:55:00
******/
DROP TABLE [dbo].[oe_exams]
GO
/****** Object: StoredProcedure [dbo].[SubmitQuestion]
Script Date:
03/28/2014 16:55:00 ******/
DROP PROCEDURE [dbo].[SubmitQuestion]
GO
/****** Object: Table [dbo].[subset]
Script Date: 03/28/2014 16:53:59
******/
DROP TABLE [dbo].[subset]
GO
/****** Object: Table [dbo].[category]
Script Date: 03/28/2014 16:53:59
******/
DROP TABLE [dbo].[category]
GO
/****** Object: Table [dbo].[Exam_type]
Script Date: 03/28/2014
16:53:59 ******/
DROP TABLE [dbo].[Exam_type]
GO
/****** Object: Table [dbo].[oe_members]
Script Date: 03/28/2014
16:53:59 ******/
DROP TABLE [dbo].[oe_members]
GO
/****** Object: Table [dbo].[oe_questions]
Script Date: 03/28/2014
16:53:59 ******/
DROP TABLE [dbo].[oe_questions]
GO
/****** Object: Table [dbo].[oe_subjects]
Script Date: 03/28/2014
16:53:59 ******/
DROP TABLE [dbo].[oe_subjects]
GO
/****** Object: Table [dbo].[student]
Script Date: 03/28/2014 16:53:59
******/
DROP TABLE [dbo].[student]
GO
/****** Object: Table [dbo].[student]
Script Date: 03/28/2014 16:53:59
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[student](
[StudentID] [bigint] IDENTITY(1,1) NOT NULL,

[RegID] [nvarchar](50) NULL,


[Category] [nvarchar](50) NULL,
[FName] [nvarchar](200) NULL,
[Mname] [nvarchar](200) NULL,
[Lname] [nvarchar](200) NULL,
[FatherName] [nvarchar](200) NULL,
[MotherName] [nvarchar](200) NULL,
[dob] [nvarchar](50) NULL,
[gender] [nvarchar](50) NULL,
[sCategory] [nvarchar](50) NULL,
[Email] [nvarchar](50) NULL,
[Mobile] [nvarchar](50) NULL,
[Phone] [nvarchar](50) NULL,
[Physical_chal] [nvarchar](50) NULL,
[Matric_board] [nvarchar](200) NULL,
[Matric_passyear] [nvarchar](50) NULL,
[Matric_percentage] [nvarchar](50) NULL,
[Matric_totalmarks] [nvarchar](50) NULL,
[Matric_obtainmarks] [nvarchar](50) NULL,
[Inter_board] [nvarchar](200) NULL,
[Inter_passyear] [nvarchar](50) NULL,
[Inter_percentage] [nvarchar](50) NULL,
[Inter_totalmarks] [nvarchar](50) NULL,
[Inter_obtainmarks] [nvarchar](50) NULL,
[UG_stream] [nvarchar](200) NULL,
[UG_board] [nvarchar](200) NULL,
[UG_passyear] [nvarchar](50) NULL,
[UG_percentage] [nvarchar](50) NULL,
[UG_totalmarks] [nvarchar](50) NULL,
[UG_obtainmarks] [nvarchar](50) NULL,
[PG_stream] [nvarchar](200) NULL,
[PG_board] [nvarchar](200) NULL,
[PG_passyear] [nvarchar](50) NULL,
[PG_percentage] [nvarchar](50) NULL,
[PG_totalmarks] [nvarchar](50) NULL,
[PG_obtainmarks] [nvarchar](50) NULL,
[Postal_street1] [nvarchar](200) NULL,
[Postal_street2] [nvarchar](200) NULL,
[Postal_city] [nvarchar](100) NULL,
[Postal_state] [nvarchar](100) NULL,
[Postal_zipcode] [nvarchar](50) NULL,
[Postal_country] [nvarchar](100) NULL,
[Perma_street1] [nvarchar](200) NULL,
[Perma_street2] [nvarchar](200) NULL,
[Perma_city] [nvarchar](100) NULL,
[Perma_state] [nvarchar](100) NULL,
[Perma_zipcode] [nvarchar](50) NULL,
[Perma_country] [nvarchar](100) NULL
) ON [PRIMARY]
GO
SET IDENTITY_INSERT [dbo].[student] ON
INSERT [dbo].[student] ([StudentID], [RegID], [Category], [FName], [Mname],
[Lname], [FatherName], [MotherName], [dob], [gender], [sCategory], [Email],
[Mobile], [Phone], [Physical_chal], [Matric_board], [Matric_passyear],
[Matric_percentage], [Matric_totalmarks], [Matric_obtainmarks],
[Inter_board], [Inter_passyear], [Inter_percentage], [Inter_totalmarks],
[Inter_obtainmarks], [UG_stream], [UG_board], [UG_passyear],
[UG_percentage], [UG_totalmarks], [UG_obtainmarks], [PG_stream],
[PG_board], [PG_passyear], [PG_percentage], [PG_totalmarks],
[PG_obtainmarks], [Postal_street1], [Postal_street2], [Postal_city],
[Postal_state], [Postal_zipcode], [Postal_country], [Perma_street1],

[Perma_street2], [Perma_city], [Perma_state], [Perma_zipcode],


[Perma_country]) VALUES (1, N'SR1000', N'A', N'ashish', N'kumar',
N'kaushik', N'vindo kaushik', N'savita kaushik', N'28/11/1984', N'male',
N'ST/SC', N'akaushik855@gmail.com', N'9654679085', N'28521222', N'No',
N'CBSE', N'2000', N'56%', N'500', N'300', N'CBSE', N'2002', N'54%', N'500',
N'250', N'BA', N'Delhi university', N'2007', N'74%', N'500', N'450',
N'BTECH', N'Delhi University', N'2008', N'56%', N'600', N'500', N'dwarka',
N'dwarka palam', N'nde delhi', N'110046', N'110046', N'india', N'Nanagal
Raya', N'delhi palam', N'new delhi', N'delhi', N'110046', N'india')
SET IDENTITY_INSERT [dbo].[student] OFF
/****** Object: Table [dbo].[oe_subjects]
Script Date: 03/28/2014
16:53:59 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[oe_subjects](
[sid] [int] IDENTITY(1,1) NOT NULL,
[sname] [nvarchar](50) NULL,
[noq] [int] NULL
) ON [PRIMARY]
GO
SET IDENTITY_INSERT [dbo].[oe_subjects] ON
INSERT [dbo].[oe_subjects] ([sid], [sname], [noq]) VALUES (1, N'English',
0)
INSERT [dbo].[oe_subjects] ([sid], [sname], [noq]) VALUES (2, N'Math', 0)
SET IDENTITY_INSERT [dbo].[oe_subjects] OFF
/****** Object: Table [dbo].[oe_questions]
Script Date: 03/28/2014
16:53:59 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[oe_questions](
[qid] [int] IDENTITY(1,1) NOT NULL,
[question] [nvarchar](2000) NOT NULL,
[ans1] [nvarchar](1000) NOT NULL,
[ans2] [nvarchar](1000) NOT NULL,
[ans3] [nvarchar](1000) NOT NULL,
[ans4] [nvarchar](1000) NOT NULL,
[cans] [nvarchar](50) NOT NULL,
[sid] [int] NULL,
[category] [char](50) NULL,
[subset] [nvarchar](100) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[oe_questions] ON
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (36, N'Campuses,
Edition, Hudibras, Love''s Metamorphosis and The Woman in the Moon are the
best works of John Lyly, who wrote mostly', N'Novels were few and could be
enjoyed only by the educated', N'National themes and sentiments were
dramatized.', N'Drama was the best way for the author to earn money', N'All
of the above', N'Option 2', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (37, N'Who among the

following University Wits is primarily known for his Friar Bacon and Friar
Bunge?', N'Lyly', N'Peele', N'Greene', N'Keyed', N'Option 2', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (16, N'The Spenserian
poet who had said that he became "irrecoverably a poet" by reading the
Faerie Queen when a boy, is', N'Dryden', N'Fletcher', N'Moore', N'Cowley',
N'Option 4', 1, N'A
',
N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (17, N'In which of the
following, Naples has been described as a place "of more pleasure than
profit and yet of more profit than pity"?', N'Euphuism by Lyly', N'Pando to
by Greene', N'The Adventures of Master F.J. by Gascoigne', N'Rosalinda by
Lodge', N'Option 2', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (25, N'Campuses,
Edition, Hudibras, Love''s Metamorphosis and The Woman in the Moon are the
best works of John Lyly, who wrote mostly', N'Novels were few and could be
enjoyed only by the educated', N'National themes and sentiments were
dramatized.', N'Drama was the best way for the author to earn money', N'All
of the above', N'Option 2', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (38, N'Who is credited
for introducing the first English comedy, The Supposes, the first verse
satire, The Steel Glass, and the first translation from the Greek tragedy
Jocasta?', N'Sackville', N'Gascoigne', N'Erasmus', N'Philip Sidney',
N'Option 3', 1, N'B
',
N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (29, N'In which of the
following, Naples has been described as a place "of more pleasure than
profit and yet of more profit than pity"?', N'Euphuism by Lyly', N'Pando to
by Greene', N'The Adventures of Master F.J. by Gascoigne', N'Rosalinda by
Lodge', N'Option 2', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (31, N'An interesting
work of this period is a verse debate of two birds who advocate their relative merits. What is the name of the poem, which is often found in the
school anthologies in India?', N'Ormolu', N'The Owl and the Nightingale',
N'Cuckoo Song', N'The Cricket and the Grass-hopper', N'Option 4', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (45, N'The one that
traces the genealogy of a Shoemaker is', N'Cobbler', N'Shoemaker''s
Holiday', N'School of Abuse', N'The Gentle Craft', N'Option 3', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (48, N'Who among the
following University Wits is primarily known for his Friar Bacon and Friar
Bunge?', N'Lyly', N'Peele', N'Greene', N'Keyed', N'Option 2', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (50, N'The Spenserian
poet who had said that he became "irrecoverably a poet" by reading the
Faerie Queen when a boy, is', N'Dryden', N'Fletcher', N'Moore', N'Cowley',
N'Option 4', 1, N'A
',
N'english subset')

INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],


[ans4], [cans], [sid], [category], [subset]) VALUES (56, N'The one that
traces the genealogy of a Shoemaker is', N'Cobbler', N'Shoemaker''s
Holiday', N'School of Abuse', N'The Gentle Craft', N'Option 3', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (43, N'About Total''s
Miscellany a character in Shakespeare''s play says, "I had rather than
forty shillings I had my Book of Songs and Sonnets here." Who is the
speaker and in which play?', N'Slender in The Merry Wives of Windsor',
N'Cali ban in The Tempest', N'Rosalind in As You Like It', N'Don Pedro in
Much Ado About Nothing', N'Option 2', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (44, N'On whose tomb
the following lines have been inscribed?
"Good friend for Jesus'' sake forebear To dig the dust enclosed hearer;
Blest be the man that spares these stones, And curst be he that moves my
bones"', N'Marlowe''s', N'Sidney''s', N'Shakespeare''s', N'Milton''s',
N'Option 2', 1, N'A
',
N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (46, N'A noteworthy
work produced under the French influence in England was Layamon''s
voluminous poem of about 30,000 lines, named Brut. What is this book
about?', N'It is a legendary history of Britain', N'It is the story of
Brutus', N'It is King Arthur''s quest', N'It is a long pastoral poem',
N'Option 3', 1, N'B
',
N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (49, N'Who is credited
for introducing the first English comedy, The Supposes, the first verse
satire, The Steel Glass, and the first translation from the Greek tragedy
Jocasta?', N'Sackville', N'Gascoigne', N'Erasmus', N'Philip Sidney',
N'Option 3', 1, N'B
',
N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (51, N'In which of the
following, Naples has been described as a place "of more pleasure than
profit and yet of more profit than pity"?', N'Euphuism by Lyly', N'Pando to
by Greene', N'The Adventures of Master F.J. by Gascoigne', N'Rosalinda by
Lodge', N'Option 2', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (52, N'There is one
tale in The Canterbury Tales which is a shrewd satire on unequal marriages.
Which one is that?', N'The Nun''s Priest''s Tale of the Cock Chanticleer
and the Fox', N'The Merchant''s Tale of January and May', N'The Wife of
Bath''s Tale', N'The Knight''s Tale', N'Option 1', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (53, N'An interesting
work of this period is a verse debate of two birds who advocate their relative merits. What is the name of the poem, which is often found in the
school anthologies in India?', N'Ormolu', N'The Owl and the Nightingale',
N'Cuckoo Song', N'The Cricket and the Grass-hopper', N'Option 4', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (59, N'Who among the
following University Wits is primarily known for his Friar Bacon and Friar

Bunge?', N'Lyly', N'Peele', N'Greene', N'Keyed', N'Option 2', 1, N'A


', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (61, N'The Spenserian
poet who had said that he became "irrecoverably a poet" by reading the
Faerie Queen when a boy, is', N'Dryden', N'Fletcher', N'Moore', N'Cowley',
N'Option 4', 1, N'A
',
N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (54, N'About Total''s
Miscellany a character in Shakespeare''s play says, "I had rather than
forty shillings I had my Book of Songs and Sonnets here." Who is the
speaker and in which play?', N'Slender in The Merry Wives of Windsor',
N'Cali ban in The Tempest', N'Rosalind in As You Like It', N'Don Pedro in
Much Ado About Nothing', N'Option 2', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (55, N'On whose tomb
the following lines have been inscribed?
"Good friend for Jesus'' sake forebear To dig the dust enclosed hearer;
Blest be the man that spares these stones, And curst be he that moves my
bones"', N'Marlowe''s', N'Sidney''s', N'Shakespeare''s', N'Milton''s',
N'Option 2', 1, N'A
',
N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (57, N'A noteworthy
work produced under the French influence in England was Layamon''s
voluminous poem of about 30,000 lines, named Brut. What is this book
about?', N'It is a legendary history of Britain', N'It is the story of
Brutus', N'It is King Arthur''s quest', N'It is a long pastoral poem',
N'Option 3', 1, N'B
',
N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (58, N'Campuses,
Edition, Hudibras, Love''s Metamorphosis and The Woman in the Moon are the
best works of John Lyly, who wrote mostly', N'Novels were few and could be
enjoyed only by the educated', N'National themes and sentiments were
dramatized.', N'Drama was the best way for the author to earn money', N'All
of the above', N'Option 2', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (60, N'Who is credited
for introducing the first English comedy, The Supposes, the first verse
satire, The Steel Glass, and the first translation from the Greek tragedy
Jocasta?', N'Sackville', N'Gascoigne', N'Erasmus', N'Philip Sidney',
N'Option 3', 1, N'B
',
N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (62, N'In which of the
following, Naples has been described as a place "of more pleasure than
profit and yet of more profit than pity"?', N'Euphuism by Lyly', N'Pando to
by Greene', N'The Adventures of Master F.J. by Gascoigne', N'Rosalinda by
Lodge', N'Option 2', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (63, N'There is one
tale in The Canterbury Tales which is a shrewd satire on unequal marriages.
Which one is that?', N'The Nun''s Priest''s Tale of the Cock Chanticleer
and the Fox', N'The Merchant''s Tale of January and May', N'The Wife of

Bath''s Tale', N'The Knight''s Tale', N'Option 1', 1, N'B


', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (64, N'An interesting
work of this period is a verse debate of two birds who advocate their relative merits. What is the name of the poem, which is often found in the
school anthologies in India?', N'Ormolu', N'The Owl and the Nightingale',
N'Cuckoo Song', N'The Cricket and the Grass-hopper', N'Option 4', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (65, N'About Total''s
Miscellany a character in Shakespeare''s play says, "I had rather than
forty shillings I had my Book of Songs and Sonnets here." Who is the
speaker and in which play?', N'Slender in The Merry Wives of Windsor',
N'Cali ban in The Tempest', N'Rosalind in As You Like It', N'Don Pedro in
Much Ado About Nothing', N'Option 2', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (66, N'On whose tomb
the following lines have been inscribed?
"Good friend for Jesus'' sake forebear To dig the dust enclosed hearer;
Blest be the man that spares these stones, And curst be he that moves my
bones"', N'Marlowe''s', N'Sidney''s', N'Shakespeare''s', N'Milton''s',
N'Option 2', 1, N'A
',
N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (67, N'The one that
traces the genealogy of a Shoemaker is', N'Cobbler', N'Shoemaker''s
Holiday', N'School of Abuse', N'The Gentle Craft', N'Option 3', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (68, N'A noteworthy
work produced under the French influence in England was Layamon''s
voluminous poem of about 30,000 lines, named Brut. What is this book
about?', N'It is a legendary history of Britain', N'It is the story of
Brutus', N'It is King Arthur''s quest', N'It is a long pastoral poem',
N'Option 3', 1, N'B
',
N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (69, N'Campuses,
Edition, Hudibras, Love''s Metamorphosis and The Woman in the Moon are the
best works of John Lyly, who wrote mostly', N'Novels were few and could be
enjoyed only by the educated', N'National themes and sentiments were
dramatized.', N'Drama was the best way for the author to earn money', N'All
of the above', N'Option 2', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (70, N'Who among the
following University Wits is primarily known for his Friar Bacon and Friar
Bunge?', N'Lyly', N'Peele', N'Greene', N'Keyed', N'Option 2', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (71, N'Who is credited
for introducing the first English comedy, The Supposes, the first verse
satire, The Steel Glass, and the first translation from the Greek tragedy
Jocasta?', N'Sackville', N'Gascoigne', N'Erasmus', N'Philip Sidney',
N'Option 3', 1, N'B
',
N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (72, N'The Spenserian

poet who had said that he became "irrecoverably a poet" by reading the
Faerie Queen when a boy, is', N'Dryden', N'Fletcher', N'Moore', N'Cowley',
N'Option 4', 1, N'A
',
N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (73, N'In which of the
following, Naples has been described as a place "of more pleasure than
profit and yet of more profit than pity"?', N'Euphuism by Lyly', N'Pando to
by Greene', N'The Adventures of Master F.J. by Gascoigne', N'Rosalinda by
Lodge', N'Option 2', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (74, N'There is one
tale in The Canterbury Tales which is a shrewd satire on unequal marriages.
Which one is that?', N'The Nun''s Priest''s Tale of the Cock Chanticleer
and the Fox', N'The Merchant''s Tale of January and May', N'The Wife of
Bath''s Tale', N'The Knight''s Tale', N'Option 1', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (75, N'An interesting
work of this period is a verse debate of two birds who advocate their relative merits. What is the name of the poem, which is often found in the
school anthologies in India?', N'Ormolu', N'The Owl and the Nightingale',
N'Cuckoo Song', N'The Cricket and the Grass-hopper', N'Option 4', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (76, N'About Total''s
Miscellany a character in Shakespeare''s play says, "I had rather than
forty shillings I had my Book of Songs and Sonnets here." Who is the
speaker and in which play?', N'Slender in The Merry Wives of Windsor',
N'Cali ban in The Tempest', N'Rosalind in As You Like It', N'Don Pedro in
Much Ado About Nothing', N'Option 2', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (77, N'On whose tomb
the following lines have been inscribed?
"Good friend for Jesus'' sake forebear To dig the dust enclosed hearer;
Blest be the man that spares these stones, And curst be he that moves my
bones"', N'Marlowe''s', N'Sidney''s', N'Shakespeare''s', N'Milton''s',
N'Option 2', 1, N'A
',
N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (78, N'The one that
traces the genealogy of a Shoemaker is', N'Cobbler', N'Shoemaker''s
Holiday', N'School of Abuse', N'The Gentle Craft', N'Option 3', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (79, N'A noteworthy
work produced under the French influence in England was Layamon''s
voluminous poem of about 30,000 lines, named Brut. What is this book
about?', N'It is a legendary history of Britain', N'It is the story of
Brutus', N'It is King Arthur''s quest', N'It is a long pastoral poem',
N'Option 3', 1, N'B
',
N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (81, N'Who among the
following University Wits is primarily known for his Friar Bacon and Friar
Bunge?', N'Lyly', N'Peele', N'Greene', N'Keyed', N'Option 2', 1, N'A
', N'english subset')

INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],


[ans4], [cans], [sid], [category], [subset]) VALUES (83, N'The Spenserian
poet who had said that he became "irrecoverably a poet" by reading the
Faerie Queen when a boy, is', N'Dryden', N'Fletcher', N'Moore', N'Cowley',
N'Option 4', 1, N'A
',
N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (89, N'The one that
traces the genealogy of a Shoemaker is', N'Cobbler', N'Shoemaker''s
Holiday', N'School of Abuse', N'The Gentle Craft', N'Option 3', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (80, N'Campuses,
Edition, Hudibras, Love''s Metamorphosis and The Woman in the Moon are the
best works of John Lyly, who wrote mostly', N'Novels were few and could be
enjoyed only by the educated', N'National themes and sentiments were
dramatized.', N'Drama was the best way for the author to earn money', N'All
of the above', N'Option 2', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (82, N'Who is credited
for introducing the first English comedy, The Supposes, the first verse
satire, The Steel Glass, and the first translation from the Greek tragedy
Jocasta?', N'Sackville', N'Gascoigne', N'Erasmus', N'Philip Sidney',
N'Option 3', 1, N'B
',
N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (84, N'In which of the
following, Naples has been described as a place "of more pleasure than
profit and yet of more profit than pity"?', N'Euphuism by Lyly', N'Pando to
by Greene', N'The Adventures of Master F.J. by Gascoigne', N'Rosalinda by
Lodge', N'Option 2', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (85, N'There is one
tale in The Canterbury Tales which is a shrewd satire on unequal marriages.
Which one is that?', N'The Nun''s Priest''s Tale of the Cock Chanticleer
and the Fox', N'The Merchant''s Tale of January and May', N'The Wife of
Bath''s Tale', N'The Knight''s Tale', N'Option 1', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (86, N'An interesting
work of this period is a verse debate of two birds who advocate their relative merits. What is the name of the poem, which is often found in the
school anthologies in India?', N'Ormolu', N'The Owl and the Nightingale',
N'Cuckoo Song', N'The Cricket and the Grass-hopper', N'Option 4', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (87, N'About Total''s
Miscellany a character in Shakespeare''s play says, "I had rather than
forty shillings I had my Book of Songs and Sonnets here." Who is the
speaker and in which play?', N'Slender in The Merry Wives of Windsor',
N'Cali ban in The Tempest', N'Rosalind in As You Like It', N'Don Pedro in
Much Ado About Nothing', N'Option 2', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (88, N'On whose tomb
the following lines have been inscribed?
"Good friend for Jesus'' sake forebear To dig the dust enclosed hearer;
Blest be the man that spares these stones, And curst be he that moves my

bones"', N'Marlowe''s', N'Sidney''s', N'Shakespeare''s', N'Milton''s',


N'Option 2', 1, N'A
',
N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (90, N'A noteworthy
work produced under the French influence in England was Layamon''s
voluminous poem of about 30,000 lines, named Brut. What is this book
about?', N'It is a legendary history of Britain', N'It is the story of
Brutus', N'It is King Arthur''s quest', N'It is a long pastoral poem',
N'Option 3', 1, N'B
',
N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (91, N'Campuses,
Edition, Hudibras, Love''s Metamorphosis and The Woman in the Moon are the
best works of John Lyly, who wrote mostly', N'Novels were few and could be
enjoyed only by the educated', N'National themes and sentiments were
dramatized.', N'Drama was the best way for the author to earn money', N'All
of the above', N'Option 2', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (92, N'Who among the
following University Wits is primarily known for his Friar Bacon and Friar
Bunge?', N'Lyly', N'Peele', N'Greene', N'Keyed', N'Option 2', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (93, N'Who is credited
for introducing the first English comedy, The Supposes, the first verse
satire, The Steel Glass, and the first translation from the Greek tragedy
Jocasta?', N'Sackville', N'Gascoigne', N'Erasmus', N'Philip Sidney',
N'Option 3', 1, N'B
',
N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (94, N'The Spenserian
poet who had said that he became "irrecoverably a poet" by reading the
Faerie Queen when a boy, is', N'Dryden', N'Fletcher', N'Moore', N'Cowley',
N'Option 4', 1, N'A
',
N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (144, N'The one that
traces the genealogy of a Shoemaker is', N'Cobbler', N'Shoemaker''s
Holiday', N'School of Abuse', N'The Gentle Craft', N'Option 3', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (95, N'In which of the
following, Naples has been described as a place "of more pleasure than
profit and yet of more profit than pity"?', N'Euphuism by Lyly', N'Pando to
by Greene', N'The Adventures of Master F.J. by Gascoigne', N'Rosalinda by
Lodge', N'Option 2', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (96, N'There is one
tale in The Canterbury Tales which is a shrewd satire on unequal marriages.
Which one is that?', N'The Nun''s Priest''s Tale of the Cock Chanticleer
and the Fox', N'The Merchant''s Tale of January and May', N'The Wife of
Bath''s Tale', N'The Knight''s Tale', N'Option 1', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (97, N'An interesting
work of this period is a verse debate of two birds who advocate their relative merits. What is the name of the poem, which is often found in the
school anthologies in India?', N'Ormolu', N'The Owl and the Nightingale',

N'Cuckoo Song', N'The Cricket and the Grass-hopper', N'Option 4', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (98, N'About Total''s
Miscellany a character in Shakespeare''s play says, "I had rather than
forty shillings I had my Book of Songs and Sonnets here." Who is the
speaker and in which play?', N'Slender in The Merry Wives of Windsor',
N'Cali ban in The Tempest', N'Rosalind in As You Like It', N'Don Pedro in
Much Ado About Nothing', N'Option 2', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (99, N'On whose tomb
the following lines have been inscribed?
"Good friend for Jesus'' sake forebear To dig the dust enclosed hearer;
Blest be the man that spares these stones, And curst be he that moves my
bones"', N'Marlowe''s', N'Sidney''s', N'Shakespeare''s', N'Milton''s',
N'Option 2', 1, N'A
',
N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (100, N'The one that
traces the genealogy of a Shoemaker is', N'Cobbler', N'Shoemaker''s
Holiday', N'School of Abuse', N'The Gentle Craft', N'Option 3', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (101, N'A noteworthy
work produced under the French influence in England was Layamon''s
voluminous poem of about 30,000 lines, named Brut. What is this book
about?', N'It is a legendary history of Britain', N'It is the story of
Brutus', N'It is King Arthur''s quest', N'It is a long pastoral poem',
N'Option 3', 1, N'B
',
N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (102, N'Campuses,
Edition, Hudibras, Love''s Metamorphosis and The Woman in the Moon are the
best works of John Lyly, who wrote mostly', N'Novels were few and could be
enjoyed only by the educated', N'National themes and sentiments were
dramatized.', N'Drama was the best way for the author to earn money', N'All
of the above', N'Option 2', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (103, N'Who among the
following University Wits is primarily known for his Friar Bacon and Friar
Bunge?', N'Lyly', N'Peele', N'Greene', N'Keyed', N'Option 2', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (104, N'Who is credited
for introducing the first English comedy, The Supposes, the first verse
satire, The Steel Glass, and the first translation from the Greek tragedy
Jocasta?', N'Sackville', N'Gascoigne', N'Erasmus', N'Philip Sidney',
N'Option 3', 1, N'B
',
N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (105, N'The Spenserian
poet who had said that he became "irrecoverably a poet" by reading the
Faerie Queen when a boy, is', N'Dryden', N'Fletcher', N'Moore', N'Cowley',
N'Option 4', 1, N'A
',
N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (106, N'In which of the
following, Naples has been described as a place "of more pleasure than

profit and yet of more profit than pity"?', N'Euphuism by Lyly', N'Pando to
by Greene', N'The Adventures of Master F.J. by Gascoigne', N'Rosalinda by
Lodge', N'Option 2', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (111, N'The one that
traces the genealogy of a Shoemaker is', N'Cobbler', N'Shoemaker''s
Holiday', N'School of Abuse', N'The Gentle Craft', N'Option 3', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (114, N'Who among the
following University Wits is primarily known for his Friar Bacon and Friar
Bunge?', N'Lyly', N'Peele', N'Greene', N'Keyed', N'Option 2', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (116, N'The Spenserian
poet who had said that he became "irrecoverably a poet" by reading the
Faerie Queen when a boy, is', N'Dryden', N'Fletcher', N'Moore', N'Cowley',
N'Option 4', 1, N'A
',
N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (107, N'There is one
tale in The Canterbury Tales which is a shrewd satire on unequal marriages.
Which one is that?', N'The Nun''s Priest''s Tale of the Cock Chanticleer
and the Fox', N'The Merchant''s Tale of January and May', N'The Wife of
Bath''s Tale', N'The Knight''s Tale', N'Option 1', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (108, N'An interesting
work of this period is a verse debate of two birds who advocate their relative merits. What is the name of the poem, which is often found in the
school anthologies in India?', N'Ormolu', N'The Owl and the Nightingale',
N'Cuckoo Song', N'The Cricket and the Grass-hopper', N'Option 4', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (109, N'About Total''s
Miscellany a character in Shakespeare''s play says, "I had rather than
forty shillings I had my Book of Songs and Sonnets here." Who is the
speaker and in which play?', N'Slender in The Merry Wives of Windsor',
N'Cali ban in The Tempest', N'Rosalind in As You Like It', N'Don Pedro in
Much Ado About Nothing', N'Option 2', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (110, N'On whose tomb
the following lines have been inscribed?
"Good friend for Jesus'' sake forebear To dig the dust enclosed hearer;
Blest be the man that spares these stones, And curst be he that moves my
bones"', N'Marlowe''s', N'Sidney''s', N'Shakespeare''s', N'Milton''s',
N'Option 2', 1, N'A
',
N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (112, N'A noteworthy
work produced under the French influence in England was Layamon''s
voluminous poem of about 30,000 lines, named Brut. What is this book
about?', N'It is a legendary history of Britain', N'It is the story of
Brutus', N'It is King Arthur''s quest', N'It is a long pastoral poem',
N'Option 3', 1, N'B
',
N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (113, N'Campuses,

Edition, Hudibras, Love''s Metamorphosis and The Woman in the Moon are the
best works of John Lyly, who wrote mostly', N'Novels were few and could be
enjoyed only by the educated', N'National themes and sentiments were
dramatized.', N'Drama was the best way for the author to earn money', N'All
of the above', N'Option 2', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (115, N'Who is credited
for introducing the first English comedy, The Supposes, the first verse
satire, The Steel Glass, and the first translation from the Greek tragedy
Jocasta?', N'Sackville', N'Gascoigne', N'Erasmus', N'Philip Sidney',
N'Option 3', 1, N'B
',
N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (117, N'In which of the
following, Naples has been described as a place "of more pleasure than
profit and yet of more profit than pity"?', N'Euphuism by Lyly', N'Pando to
by Greene', N'The Adventures of Master F.J. by Gascoigne', N'Rosalinda by
Lodge', N'Option 2', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (118, N'There is one
tale in The Canterbury Tales which is a shrewd satire on unequal marriages.
Which one is that?', N'The Nun''s Priest''s Tale of the Cock Chanticleer
and the Fox', N'The Merchant''s Tale of January and May', N'The Wife of
Bath''s Tale', N'The Knight''s Tale', N'Option 1', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (119, N'An interesting
work of this period is a verse debate of two birds who advocate their relative merits. What is the name of the poem, which is often found in the
school anthologies in India?', N'Ormolu', N'The Owl and the Nightingale',
N'Cuckoo Song', N'The Cricket and the Grass-hopper', N'Option 4', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (120, N'About Total''s
Miscellany a character in Shakespeare''s play says, "I had rather than
forty shillings I had my Book of Songs and Sonnets here." Who is the
speaker and in which play?', N'Slender in The Merry Wives of Windsor',
N'Cali ban in The Tempest', N'Rosalind in As You Like It', N'Don Pedro in
Much Ado About Nothing', N'Option 2', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (121, N'On whose tomb
the following lines have been inscribed?
"Good friend for Jesus'' sake forebear To dig the dust enclosed hearer;
Blest be the man that spares these stones, And curst be he that moves my
bones"', N'Marlowe''s', N'Sidney''s', N'Shakespeare''s', N'Milton''s',
N'Option 2', 1, N'A
',
N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (122, N'The one that
traces the genealogy of a Shoemaker is', N'Cobbler', N'Shoemaker''s
Holiday', N'School of Abuse', N'The Gentle Craft', N'Option 3', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (123, N'A noteworthy
work produced under the French influence in England was Layamon''s
voluminous poem of about 30,000 lines, named Brut. What is this book
about?', N'It is a legendary history of Britain', N'It is the story of

Brutus', N'It is King Arthur''s quest', N'It is a long pastoral poem',


N'Option 3', 1, N'B
',
N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (124, N'Campuses,
Edition, Hudibras, Love''s Metamorphosis and The Woman in the Moon are the
best works of John Lyly, who wrote mostly', N'Novels were few and could be
enjoyed only by the educated', N'National themes and sentiments were
dramatized.', N'Drama was the best way for the author to earn money', N'All
of the above', N'Option 2', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (125, N'Who among the
following University Wits is primarily known for his Friar Bacon and Friar
Bunge?', N'Lyly', N'Peele', N'Greene', N'Keyed', N'Option 2', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (126, N'Who is credited
for introducing the first English comedy, The Supposes, the first verse
satire, The Steel Glass, and the first translation from the Greek tragedy
Jocasta?', N'Sackville', N'Gascoigne', N'Erasmus', N'Philip Sidney',
N'Option 3', 1, N'B
',
N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (127, N'The Spenserian
poet who had said that he became "irrecoverably a poet" by reading the
Faerie Queen when a boy, is', N'Dryden', N'Fletcher', N'Moore', N'Cowley',
N'Option 4', 1, N'A
',
N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (128, N'In which of the
following, Naples has been described as a place "of more pleasure than
profit and yet of more profit than pity"?', N'Euphuism by Lyly', N'Pando to
by Greene', N'The Adventures of Master F.J. by Gascoigne', N'Rosalinda by
Lodge', N'Option 2', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (129, N'There is one
tale in The Canterbury Tales which is a shrewd satire on unequal marriages.
Which one is that?', N'The Nun''s Priest''s Tale of the Cock Chanticleer
and the Fox', N'The Merchant''s Tale of January and May', N'The Wife of
Bath''s Tale', N'The Knight''s Tale', N'Option 1', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (130, N'An interesting
work of this period is a verse debate of two birds who advocate their relative merits. What is the name of the poem, which is often found in the
school anthologies in India?', N'Ormolu', N'The Owl and the Nightingale',
N'Cuckoo Song', N'The Cricket and the Grass-hopper', N'Option 4', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (131, N'About Total''s
Miscellany a character in Shakespeare''s play says, "I had rather than
forty shillings I had my Book of Songs and Sonnets here." Who is the
speaker and in which play?', N'Slender in The Merry Wives of Windsor',
N'Cali ban in The Tempest', N'Rosalind in As You Like It', N'Don Pedro in
Much Ado About Nothing', N'Option 2', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (132, N'On whose tomb
the following lines have been inscribed?

"Good friend for Jesus'' sake forebear To dig the dust enclosed hearer;
Blest be the man that spares these stones, And curst be he that moves my
bones"', N'Marlowe''s', N'Sidney''s', N'Shakespeare''s', N'Milton''s',
N'Option 2', 1, N'A
',
N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (133, N'The one that
traces the genealogy of a Shoemaker is', N'Cobbler', N'Shoemaker''s
Holiday', N'School of Abuse', N'The Gentle Craft', N'Option 3', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (136, N'Who among the
following University Wits is primarily known for his Friar Bacon and Friar
Bunge?', N'Lyly', N'Peele', N'Greene', N'Keyed', N'Option 2', 1, N'A
', N'english subset')
GO
print 'Processed 100 total records'
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (138, N'The Spenserian
poet who had said that he became "irrecoverably a poet" by reading the
Faerie Queen when a boy, is', N'Dryden', N'Fletcher', N'Moore', N'Cowley',
N'Option 4', 1, N'A
',
N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (134, N'A noteworthy
work produced under the French influence in England was Layamon''s
voluminous poem of about 30,000 lines, named Brut. What is this book
about?', N'It is a legendary history of Britain', N'It is the story of
Brutus', N'It is King Arthur''s quest', N'It is a long pastoral poem',
N'Option 3', 1, N'B
',
N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (135, N'Campuses,
Edition, Hudibras, Love''s Metamorphosis and The Woman in the Moon are the
best works of John Lyly, who wrote mostly', N'Novels were few and could be
enjoyed only by the educated', N'National themes and sentiments were
dramatized.', N'Drama was the best way for the author to earn money', N'All
of the above', N'Option 2', 1, N'A
', N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (137, N'Who is credited
for introducing the first English comedy, The Supposes, the first verse
satire, The Steel Glass, and the first translation from the Greek tragedy
Jocasta?', N'Sackville', N'Gascoigne', N'Erasmus', N'Philip Sidney',
N'Option 3', 1, N'B
',
N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (139, N'In which of the
following, Naples has been described as a place "of more pleasure than
profit and yet of more profit than pity"?', N'Euphuism by Lyly', N'Pando to
by Greene', N'The Adventures of Master F.J. by Gascoigne', N'Rosalinda by
Lodge', N'Option 2', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (141, N'An interesting
work of this period is a verse debate of two birds who advocate their relative merits. What is the name of the poem, which is often found in the
school anthologies in India?', N'Ormolu', N'The Owl and the Nightingale',
N'Cuckoo Song', N'The Cricket and the Grass-hopper', N'Option 4', 1, N'A
', N'english subset')

INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],


[ans4], [cans], [sid], [category], [subset]) VALUES (142, N'About Total''s
Miscellany a character in Shakespeare''s play says, "I had rather than
forty shillings I had my Book of Songs and Sonnets here." Who is the
speaker and in which play?', N'Slender in The Merry Wives of Windsor',
N'Cali ban in The Tempest', N'Rosalind in As You Like It', N'Don Pedro in
Much Ado About Nothing', N'Option 2', 1, N'B
', N'english subset 2')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (143, N'On whose tomb
the following lines have been inscribed?
"Good friend for Jesus'' sake forebear To dig the dust enclosed hearer;
Blest be the man that spares these stones, And curst be he that moves my
bones"', N'Marlowe''s', N'Sidney''s', N'Shakespeare''s', N'Milton''s',
N'Option 2', 1, N'A
',
N'english subset')
INSERT [dbo].[oe_questions] ([qid], [question], [ans1], [ans2], [ans3],
[ans4], [cans], [sid], [category], [subset]) VALUES (145, N'A noteworthy
work produced under the French influence in England was Layamon''s
voluminous poem of about 30,000 lines, named Brut. What is this book
about?', N'It is a legendary history of Britain', N'It is the story of
Brutus', N'It is King Arthur''s quest', N'It is a long pastoral poem',
N'Option 3', 1, N'B
',
N'english subset 2')
SET IDENTITY_INSERT [dbo].[oe_questions] OFF
/****** Object: Table [dbo].[oe_members]
Script Date: 03/28/2014
16:53:59 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[oe_members](
[mid] [int] NOT NULL,
[lname] [varchar](10) NULL,
[pwd] [varchar](10) NOT NULL,
[fullname] [varchar](50) NOT NULL,
[email] [varchar](50) NOT NULL,
[dlv] [datetime] NULL,
[dr] [datetime] NULL,
PRIMARY KEY CLUSTERED
(
[mid] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY =
OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
UNIQUE NONCLUSTERED
(
[lname] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY =
OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
UNIQUE NONCLUSTERED
(
[email] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY =
OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO

INSERT [dbo].[oe_members] ([mid], [lname], [pwd], [fullname], [email],


[dlv], [dr]) VALUES (1, N'a', N'a', N'ABC', N'abc@classroom.com',
CAST(0x0000A2380107250F AS DateTime), CAST(0x0000A23700CD9342 AS DateTime))
INSERT [dbo].[oe_members] ([mid], [lname], [pwd], [fullname], [email],
[dlv], [dr]) VALUES (2, N'b', N'b', N'XYZ', N'xyz@classroom.com', NULL,
CAST(0x0000A23700CD9343 AS DateTime))
INSERT [dbo].[oe_members] ([mid], [lname], [pwd], [fullname], [email],
[dlv], [dr]) VALUES (3, N'demo', N'demo', N'ashish kaushik',
N'akaushik855@gmail.com', CAST(0x0000A2FC00D2F4AC AS DateTime),
CAST(0x0000A23700F21071 AS DateTime))
/****** Object: Table [dbo].[Exam_type]
Script Date: 03/28/2014
16:53:59 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Exam_type](
[catid] [int] IDENTITY(1,1) NOT NULL,
[sid] [int] NOT NULL,
[ExamType] [nvarchar](100) NULL,
CONSTRAINT [PK_Exam_type] PRIMARY KEY CLUSTERED
(
[catid] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY =
OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET IDENTITY_INSERT [dbo].[Exam_type] ON
INSERT [dbo].[Exam_type] ([catid], [sid], [ExamType]) VALUES (3, 3,
N'Junior Secondary School')
INSERT [dbo].[Exam_type] ([catid], [sid], [ExamType]) VALUES (6, 1,
N'Primary School')
INSERT [dbo].[Exam_type] ([catid], [sid], [ExamType]) VALUES (7, 2,
N'Senior Secondary School')
INSERT [dbo].[Exam_type] ([catid], [sid], [ExamType]) VALUES (8, 4,
N'Institution')
INSERT [dbo].[Exam_type] ([catid], [sid], [ExamType]) VALUES (9, 5,
N'Recruitment')
SET IDENTITY_INSERT [dbo].[Exam_type] OFF
/****** Object: Table [dbo].[category]
Script Date: 03/28/2014 16:53:59
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[category](
[catid] [int] IDENTITY(1,1) NOT NULL,
[cat_name] [nvarchar](50) NOT NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[subset]
Script Date: 03/28/2014 16:53:59
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[subset](
[ssid] [int] IDENTITY(1,1) NOT NULL,
[SubsetName] [nvarchar](50) NULL
) ON [PRIMARY]
GO

/****** Object: StoredProcedure [dbo].[SubmitQuestion]


03/28/2014 16:55:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create proc [dbo].[SubmitQuestion]
(
@question nvarchar(2000),
@ans1 nvarchar(1000),
@ans2 nvarchar(1000) ,
@ans3 nvarchar(1000),
@ans4 nvarchar(1000),
@cans nvarchar(50),
@sid int,
@category char(50),
@subset nvarchar(100)
)

Script Date:

as begin
insert into oe_questions([question],[ans1],[ans2],[ans3],[ans4],
[cans],[sid],[category],[subset]) values
(@question,@ans1,@ans2,@ans3,@ans4,@cans,@sid,@category,@subset)

end
GO
/****** Object: Table [dbo].[oe_exams]
Script Date: 03/28/2014 16:55:00
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[oe_exams](
[examid] [int] NOT NULL,
[mid] [int] NULL,
[sid] [int] NULL,
[noq] [int] NULL,
[nocans] [int] NULL,
[stdate] [datetime] NULL,
[enddate] [datetime] NULL,
PRIMARY KEY CLUSTERED
(
[examid] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY =
OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: StoredProcedure [dbo].[GetQuestionPageWise]
Script
Date: 03/28/2014 16:55:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
CREATE PROCEDURE [dbo].[GetQuestionPageWise]
@PageIndex INT = 1
,@PageSize INT = 10
,@RecordCount INT OUTPUT

AS
BEGIN
SET NOCOUNT ON;
SELECT ROW_NUMBER() OVER
(
ORDER BY [qid] ASC
)AS RowNumber
,[qid]
,[question]
,[ans1]
,[ans2]
,[ans3]
,[ans4]
,[cans]
,[sid]
,[category]
,[subset]
INTO #Results
FROM [oe_questions]
SELECT @RecordCount = COUNT(*)
FROM #Results
SELECT * FROM #Results
WHERE RowNumber BETWEEN(@PageIndex -1) * @PageSize + 1
AND(((@PageIndex -1) * @PageSize + 1) + @PageSize) - 1
DROP TABLE #Results
END
GO
/****** Object: ForeignKey [FK_Exam_type_Exam_type]
Script Date:
03/28/2014 16:53:59 ******/
ALTER TABLE [dbo].[Exam_type] WITH CHECK ADD CONSTRAINT
[FK_Exam_type_Exam_type] FOREIGN KEY([catid])
REFERENCES [dbo].[Exam_type] ([catid])
GO
ALTER TABLE [dbo].[Exam_type] CHECK CONSTRAINT [FK_Exam_type_Exam_type]
GO
/****** Object: ForeignKey [FK__oe_exams__mid__35BCFE0A]
Script Date:
03/28/2014 16:55:01 ******/
ALTER TABLE [dbo].[oe_exams] WITH CHECK ADD FOREIGN KEY([mid])
REFERENCES [dbo].[oe_members] ([mid])
GO

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"


Inherits="adminlog_Default" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Login ::</title>
</head>
<body>
<form id="form1" runat="server">
<center>
<div>
<br />
<h3>
Admin Login</h3>
<br />
<br />
<table bgcolor= "#eeeeee">
<tr>
<td>Login Name :</td>
<td><asp:TextBox ID="txtLname" runat="server"
Width="150px"></asp:TextBox>
<asp:RequiredFieldValidator
ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtLname"
ErrorMessage="Llogin name is missing!" FontBold="True">*</asp:RequiredFieldValidator></td>
</tr>
<tr>
<td>Password :</td>
<td><asp:TextBox ID="txtPwd" runat="server"
TextMode="Password" Width="150px"></asp:TextBox>
<asp:RequiredFieldValidator
ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtPwd"
ErrorMessage="Password is missing!" FontBold="True">*</asp:RequiredFieldValidator></td>
</tr>
<tr>
<td colspan="2">
</td>
</tr>
</table>
<br />
<asp:Button ID="btnLogin" runat="server" Text="Login" Width="116px"
OnClick="btnLogin_Click" /><br />
<br />
<asp:Label ID="lblMsg" runat="server"></asp:Label>
<p>
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
HeaderText="Please correct the following errors:" Font-Bold="True" />
<p/>
&nbsp; &nbsp;
<br />
<br />
<br />

<br />

</div>
</center>
</form>
</body>
</html>

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;
public partial class adminlog_Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnLogin_Click(object sender, EventArgs e)
{
// check whether credentials are valid
SqlConnection con = new SqlConnection(DBUtil.ConnectionString);
try
{
con.Open();
SqlCommand cmd = new SqlCommand("select * from oe_members where
lname = @lname and pwd = @pwd", con);
cmd.Parameters.Add("@lname", SqlDbType.VarChar, 10).Value =
txtLname.Text;
cmd.Parameters.Add("@pwd", SqlDbType.VarChar, 10).Value =
txtPwd.Text;
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
Session.Add("mid", dr["mid"]);
Session.Add("fullname", dr["fullname"]);
Session.Add("dlv", dr["dlv"]);
// update MEMBERS table for DLV
dr.Close();

cmd.CommandText = "update oe_members set dlv = getdate()


where lname = @lname";
cmd.ExecuteNonQuery();
Response.Redirect("home.aspx?pn=dash");
}
else
{
lblMsg.Text = "Invalid Login!";
dr.Close();
}
}
catch (Exception ex)
{
lblMsg.Text = "Error --> " + ex.Message;
}
finally
{
con.Close();
}
}

<%@ Page Title="" Language="C#"


MasterPageFile="~/adminlog/MasterPage.master"
MaintainScrollPositionOnPostback="true" AutoEventWireup="true"
CodeFile="home.aspx.cs" Inherits="adminlog_placeholder" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<div style="background-color:#ffffff;padding:15px;">
<asp:PlaceHolder ID="plcContentForm" EnableViewState="true"
runat="server"></asp:PlaceHolder>
</div>

</asp:Content>

using
using
using
using
using
using

System;
System.Collections.Generic;
System.Linq;
System.Web;
System.Web.UI;
System.Web.UI.WebControls;

public partial class adminlog_placeholder : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{
string pagename = "";
if (!string.IsNullOrEmpty(Request.QueryString["pn"]))
{
pagename = Request.QueryString["pn"].ToString();
}
else
{
pagename = "dash";
}
switch (pagename)
{
//--------------------------------------------------------------------------------case "dash":
this.plcContentForm.Controls.Add(LoadControl("pages/dashboard.ascx"));
break;
case "students":
this.plcContentForm.Controls.Add(LoadControl("pages/addstudents.ascx"));
break;
case "subject":
this.plcContentForm.Controls.Add(LoadControl("pages/addsubjects.ascx"));
break;
case "question":
this.plcContentForm.Controls.Add(LoadControl("pages/addquestions.ascx"));
break;

}
}
}

<%@ Master Language="C#" AutoEventWireup="true"


CodeFile="MasterPage.master.cs" Inherits="adminlog_MasterPage" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Admin Panel ::</title>
<link href="css/Site.css" rel="stylesheet" />
</head>
<body>
<form runat=server>
<table height="100%" width="100%">
<tr style="height:200 px">
<td colspan="2" style="height:10px">
<h1>Admin Panel</h1>
</td>
</tr>
<tr>
<td width="20%" bgcolor="#dddddd" valign="top">
<a href="home.aspx?pn=students">Import Student Details</a>
<p />
<a href="home.aspx?pn=subject">Create Subjects</a>
<p />
<p />
<a href="home.aspx?pn=question">Create Questions</a>
<p />
<a href="#"></a>
<p>
<asp:LinkButton ID="btnLogout" runat="server"
CausesValidation="False">Logout</asp:LinkButton>
</p>
</td>
<td valign="top">
<asp:ContentPlaceHolder id="ContentPlaceHolder1"
runat="server">
</asp:ContentPlaceHolder>
</td>
</tr>
</table>
</form>
</body>
</html>

using
using
using
using
using
using

System;
System.Collections.Generic;
System.Linq;
System.Web;
System.Web.UI;
System.Web.UI.WebControls;

public partial class adminlog_MasterPage : System.Web.UI.MasterPage

protected void Page_Load(object sender, EventArgs e)


{
}

<%@ Page Language="C#" MasterPageFile="~/all/all.master" Title="Untitled


Page" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Net.Mail" %>
<script runat="server">
protected void btnCancel_Click(object sender, EventArgs e)
{
Response.Redirect("../login.aspx");
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
// Check email address
SqlConnection con = new SqlConnection(DBUtil.ConnectionString );
try
{
con.Open();
// check whether email address is preset
SqlCommand cmd = new SqlCommand("select * from oe_members where
email = @email", con);
cmd.Parameters.Add("@email", SqlDbType.VarChar, 50).Value =
txtEmail.Text;
SqlDataReader dr = cmd.ExecuteReader();
if (!dr.Read())
{
lblMsg.Text = "Sorry! Email address is not found!";
return;
}
// send mail
MailAddress from = new MailAddress("admin@classroom");
MailAddress to = new MailAddress(txtEmail.Text);
MailMessage msg = new MailMessage(from , to);
msg.Subject = "Password Reminder";
msg.IsBodyHtml = true;
msg.Body = "Dear Subscriber <p>Please use the following details
to login.<p>Login name : " + dr["lname"] + "<br>Password : " + dr["pwd"] +
"<p>WebMaster<br>Talent4Exam";
SmtpClient client = new SmtpClient("localhost");
client.Send(msg);
lblMsg.Text = "Details of your account are sent to your email
address. Please use them to login!";
}
catch (Exception ex)
{
lblMsg.Text = "Error --> " + ex.Message;
}
finally
{

con.Close();

}
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<h2>
Password Reminder</h2>
Enter email address :
<asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="txtEmail"
ErrorMessage="Email address is
required!"></asp:RequiredFieldValidator><br />
<br />
<asp:Button ID="btnSubmit" runat="server" Text="Submit"
OnClick="btnSubmit_Click" />&nbsp;<asp:Button ID="btnCancel"
runat="server" CausesValidation="False" OnClick="btnCancel_Click"
Text="Cancel" /><br />
<br />
<asp:Label ID="lblMsg" runat="server"></asp:Label>
</asp:Content>

<%@ Page Language="C#" MasterPageFile="~/all/all.master" Title="Untitled


Page" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Data" %>
<script runat="server">
protected void btnCancel_Click(object sender, EventArgs e)
{
Response.Redirect("../login.aspx");
}
protected void btnRegister_Click(object sender, EventArgs e)
{
// register
SqlConnection con = new SqlConnection(DBUtil.ConnectionString);
try
{
con.Open();
// check whether login name is unique
SqlCommand cmd = new SqlCommand("select * from oe_members where
lname = @lname", con);
cmd.Parameters.Add("@lname", SqlDbType.VarChar, 10).Value =
txtLname.Text;
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
lblMsg.Text = "Login name is not unqiue. Plase enter a
different login name!";
return;
}
dr.Close();

@email";

// check whether email address is unique


cmd.Parameters.Clear();
cmd.CommandText = "select * from oe_members where email =

cmd.Parameters.Add("@email", SqlDbType.VarChar, 50).Value =


txtEmail.Text;
dr = cmd.ExecuteReader();
if (dr.Read())
{
lblMsg.Text = "Email address is not unqiue!";
return;
}
dr.Close();
// get next MID
cmd.CommandText = "select

oe_members";

isnull(max(mid),0) + 1 from

int mid = (Int32) cmd.ExecuteScalar ();


// insert row into OE_MEMEBERS
cmd.Parameters.Clear ();
cmd.CommandText = "insert into oe_members
values(@mid,@lname,@pwd,@fullname,@email,null,getdate())";
cmd.Parameters.Add("@mid", SqlDbType.Int).Value = mid;
cmd.Parameters.Add("@lname", SqlDbType.VarChar,10).Value =
txtLname.Text;
cmd.Parameters.Add("@pwd", SqlDbType.VarChar,10).Value =
txtPwd.Text;
cmd.Parameters.Add("@fullname", SqlDbType.VarChar,30).Value =
txtFname.Text;
cmd.Parameters.Add("@email", SqlDbType.VarChar,30).Value =
txtEmail.Text;
if ( cmd.ExecuteNonQuery () > 0 )
lblMsg.Text = "Registration is successful. Please click
<a href=../login.aspx>here</a> to login!";
else
lblMsg.Text = "Sorry! Some error occured during
registration!";
}
catch (Exception ex)
{
lblMsg.Text = "Error --> " + ex.Message;
}
finally
{
con.Close();
}
} // end of Registration
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<h2>
New User Registration
</h2>
<table>
<tr>
<td>
Login name :</td>
<td >
<asp:TextBox ID="txtLname" runat="server"></asp:TextBox>

<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server" ControlToValidate="txtLname"
ErrorMessage="Login Name
Required!"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td >
Password :
</td>
<td >
<asp:TextBox ID="txtPwd" runat="server" TextMode="Password"
Width="149px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2"
runat="server" ControlToValidate="txtPwd"
ErrorMessage="Password is
required!"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td >
Confirm Password :</td>
<td >
<asp:TextBox ID="txtCpwd" runat="server"
TextMode="Password" Width="149px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3"
runat="server" ControlToValidate="txtCpwd"
ErrorMessage="Confirm password
required!"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidator1" runat="server"
ControlToCompare="txtPwd"
ControlToValidate="txtCpwd" ErrorMessage="Passwords do
not match!"></asp:CompareValidator></td>
</tr>
<tr>
<td >
Fullname :</td>
<td >
<asp:TextBox ID="txtFname" runat="server"
Width="243px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4"
runat="server" ControlToValidate="txtFname"
ErrorMessage="Fullname is
required!"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td >
Email Address :</td>
<td >
<asp:TextBox ID="txtEmail" runat="server"
Width="240px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator5"
runat="server" ControlToValidate="txtEmail"
ErrorMessage="Email address is
required!"></asp:RequiredFieldValidator></td>
</tr>
</table>
<br />
<asp:Button ID="btnRegister" runat="server" Text="Register"
OnClick="btnRegister_Click" />
<asp:Button ID="btnCancel" runat="server" Text="Cancel"
OnClick="btnCancel_Click" CausesValidation="False" /><br />
<br />

<asp:Label ID="lblMsg" runat="server"></asp:Label><br />


</asp:Content>
<%@ Page Language="C#" MasterPageFile="~/main.master" Title="Online
Examination System" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Web.Configuration" %>
<script runat="server">
protected void Button1_Click(object sender, EventArgs e)
{
// get connection
SqlConnection con = new SqlConnection ( DBUtil.ConnectionString);
try{
con.Open();
SqlCommand cmd = new SqlCommand("update oe_members set pwd =
@pwd where mid = @mid and pwd = @oldpwd", con);
cmd.Parameters.Add("@pwd", SqlDbType.VarChar,10).Value =
txtNewpwd.Text;
cmd.Parameters.Add("@mid", SqlDbType.Int).Value = Int32.Parse(
Session["mid"].ToString());
cmd.Parameters.Add("@oldpwd", SqlDbType.VarChar,10).Value =
txtOldpwd.Text;
if ( cmd.ExecuteNonQuery() > 0 )
lblMsg.Text = "Password has been changed succesfully!";
else
lblMsg.Text = "Sorry! Could not change password!";

}
catch(Exception ex)
{
lblMsg.Text = "Error --> " + ex.Message ;
}
finally{
con.Close();
}
}
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<h2>Change Password</h2>
<table bgcolor="#eeeeee">
<tr>
<td >
Old Password</td>
<td >
<asp:TextBox ID="txtOldpwd" runat="server"
TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server" ControlToValidate="txtOldpwd"
ErrorMessage="Old passsword is
required!">*</asp:RequiredFieldValidator></td>
</tr>

<tr>

<td>New Password</td>
<td >
<asp:TextBox ID="txtNewpwd" runat="server"
TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2"
runat="server" ControlToValidate="txtNewpwd"
ErrorMessage="New password is
required!">*</asp:RequiredFieldValidator></td>
</tr>
<tr>
<td>Reenter New Password</td>
<td >
<asp:TextBox ID="txtConfirmpwd" runat="server"
TextMode="Password"></asp:TextBox>
<asp:CompareValidator ID="CompareValidator1" runat="server"
ControlToCompare="txtNewpwd"
ControlToValidate="txtConfirmpwd" ErrorMessage="New and
confirm password do not match!">*</asp:CompareValidator></td>
</tr>
</table>
<br />
<asp:Button ID="Button1" runat="server" Text="Change Password"
OnClick="Button1_Click" /><br />
<br />
<asp:Label ID="lblMsg" runat="server"></asp:Label><br />
<br />
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
HeaderText="Correct The Following Errors:" />
<br />
<br />
</asp:Content>
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="examination.aspx.cs" Inherits="examination" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<h2>Examination</h2>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<table width="100%" bgcolor="#dddddd">
<tr>
<td>
Subject :
<asp:Label ID="lblSubject" runat="server" Width="154px" FontBold="True" Font-Names="Verdana" ForeColor="Red"></asp:Label></td>
<td>
Question :
<asp:Label ID="lblQno" runat="server" Font-Bold="True" FontNames="Verdana" ForeColor="Red"></asp:Label></td>
</tr>
<tr>
<td>
Started At :

<asp:Label ID="lblStime" runat="server" Font-Bold="True" FontNames="Verdana" ForeColor="Red"></asp:Label></td>


<td style="height: 22px">
Current Time :<asp:Label ID="lblCtime" runat="server" FontBold="True" Font-Names="Verdana" ForeColor="Red"></asp:Label></td>
</tr>

</table>
<p />
<b>Question</b>
<br />
<b><pre runat=server id="question" style="backgroundcolor:#eeeeee">question</pre> </b>
<p></p>
<table>
<tr>
<td>
<asp:RadioButton ID="rbAns1" runat="server" GroupName="answer" />
</td>
<td style="width: 3px">
<pre runat=server id="ans1"></pre>
</td>
</tr>
<tr>
<td>
<asp:RadioButton ID="rbAns2" runat="server" GroupName="answer" />
</td>
<td style="width: 3px">
<pre runat=server id="ans2"></pre>
</td>
</tr>
<tr>
<td>
<asp:RadioButton ID="rbAns3" runat="server" GroupName="answer" />
</td>
<td style="width: 3px">
<pre runat=server id="ans3"></pre>
</td>
</tr>
<tr>
<td>
<asp:RadioButton ID="rbAns4" runat="server" GroupName="answer" />
</td>
<td style="width: 3px">
<pre runat=server id="ans4"></pre>
</td>
</tr>
</table>
<br />
<asp:Button ID="btnPrev" runat="server" Text="Previous"
OnClick="btnPrev_Click" />&nbsp;<asp:Button ID="btnNext"
runat="server" Text="Next" Width="75px" OnClick="btnNext_Click"
/>

<asp:Button ID="btnCancel" runat="server" Text="Cancel Exam"


Width="115px" OnClick="btnCancel_Click" />
</form>
</body>
</html>
using
using
using
using
using
using

System;
System.Collections.Generic;
System.Linq;
System.Web;
System.Web.UI;
System.Web.UI.WebControls;

public partial class examination : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
DisplayQuestion();
}
public void DisplayQuestion()
{
try
{
// get data from session object
Examination e = (Examination)Session["questions"];
// display data
lblSubject.Text = Examination.GetSubjectName(e.subjectID);
lblQno.Text = e.curpos + 1 + "/" + e.SIZE;
lblCtime.Text = DateTime.Now.ToShortTimeString();
lblStime.Text = e.StartTime.ToShortTimeString();
Question q = e.questions[e.curpos];
// display details of question
question.InnerHtml = q.question;
ans1.InnerHtml = q.ans1;
ans2.InnerHtml = q.ans2;
ans3.InnerHtml = q.ans3;
ans4.InnerHtml = q.ans4;
// reset all radio buttons
rbAns1.Checked = false;
rbAns2.Checked = false;
rbAns3.Checked = false;
rbAns4.Checked = false;
// disable and enable buttons
if (e.curpos == 0)
btnPrev.Enabled = false;
else
btnPrev.Enabled = true;
if (e.curpos == e.SIZE - 1)
btnNext.Text = "Finish";
else

btnNext.Text = "Next";
}
catch (Exception ex)
{
}

public void ProcessQuestion()


{
Examination exam = (Examination)Session["questions"];
Question q = exam.questions[exam.curpos];
String answer;
// find out the answer and assign it to
if (rbAns1.Checked)
answer = "Option 1";
else
if (rbAns2.Checked)
answer = "Option 2";
else
if (rbAns3.Checked)
answer = "Option 3";
else
if (rbAns4.Checked)
answer = "Option 4";
else
answer = "0"; // error
q.answer = answer;
exam.questions[exam.curpos] = q;
Session.Add("questions", exam);
}
protected void btnNext_Click(object sender, EventArgs e)
{
ProcessQuestion();
Examination exam = (Examination)Session["questions"];
if (exam.curpos == exam.SIZE - 1)
Response.Redirect("showresult.aspx");
else
{
exam.curpos++;
Session.Add("questions", exam);
DisplayQuestion();
}
}
protected void btnPrev_Click(object sender, EventArgs e)
{
// ProcessQuestion();
Examination exam = (Examination)Session["questions"];
exam.curpos--;
Session.Add("questions", exam);
DisplayQuestion();
}
protected void btnCancel_Click(object sender, EventArgs e)
{
// Examination exam = (Examination)Session["questions"];
Session.Remove("questions");
//exam = null;
Response.Redirect("default.aspx");

}
}

<%@ Page Language="C#" Theme="all" %>


<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Data" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void btnLogin_Click(object sender, EventArgs e)
{
// check whether credentials are valid
SqlConnection con = new SqlConnection(DBUtil.ConnectionString );
try
{
con.Open();
SqlCommand cmd = new SqlCommand("select * from student where
regid = @regid and dob = @dob",con);
cmd.Parameters.Add("@regid", SqlDbType.NVarChar, 50).Value =
txtLname.Text;
cmd.Parameters.Add("@dob", SqlDbType.NVarChar, 50).Value =
txtPwd.Text;
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
Session.Add("mid", dr["studentId"]);
Session.Add("fullname", dr["fname"] + " " + dr["Lname"]);
Session.Add("category", dr["Category"]);
//Session.Add("dlv",
System.DateTime.Now.ToShortDateString());
// update MEMBERS table for DLV
dr.Close();
//cmd.CommandText = "update oe_members set dlv = getdate()
where lname = @lname";
//cmd.ExecuteNonQuery();
Response.Redirect("default.aspx");
}
else
{
lblMsg.Text = "Invalid Login!";
dr.Close();
}
}
catch (Exception ex)
{
lblMsg.Text = "Error --> " + ex.Message;
}
finally
{
con.Close();
}
}

</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Online Examination System</title>
</head>
<body>
<center>
<form id="form1" runat="server">
<div>
<h1>
Online Examination System</h1>
<br />
<h3>
Welcome To Online Examination System</h3>
<br />
<h4>Login</h4>
<br />
<table bgcolor= "#eeeeee">
<tr>
<td>Login Name :</td>
<td><asp:TextBox ID="txtLname" runat="server"
Width="150px"></asp:TextBox>
<asp:RequiredFieldValidator
ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtLname"
ErrorMessage="Llogin name is missing!" FontBold="True">*</asp:RequiredFieldValidator></td>
</tr>
<tr>
<td>Password :</td>
<td><asp:TextBox ID="txtPwd" runat="server"
TextMode="Password" Width="150px"></asp:TextBox>
<asp:RequiredFieldValidator
ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtPwd"
ErrorMessage="Password is missing!" FontBold="True">*</asp:RequiredFieldValidator></td>
</tr>
<tr>
<td colspan="2">
<asp:CheckBox ID="chkRemember" runat="server" Text="Remember
Me" /></td>
</tr>
</table>
<br />
<asp:Button ID="btnLogin" runat="server" Text="Login" Width="116px"
OnClick="btnLogin_Click" /><br />
<br />
<asp:Label ID="lblMsg" runat="server"></asp:Label>
<p>
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
HeaderText="Please correct the following errors:" Font-Bold="True" />
<p/>
<a href="all/newuser.aspx">New User?</a>
&nbsp; &nbsp;
<a href="all/forgotpassword.aspx">Forgot Password?</a>
<br />
<br />
<br />

<br />
<asp:SqlDataSource ID="dsLogin" runat="server" ConnectionString="<%
$ ConnectionStrings:examConnectionString %>"
SelectCommand="select * from student where RegID = @regid and
dob = @dob">
<SelectParameters>
<asp:Parameter Name="regid" />
<asp:Parameter Name="dob" />
</SelectParameters>
</asp:SqlDataSource>
</div>
</form>
</center>
</body>
</html>

<%@ Page Language="C#" MasterPageFile="~/main.master" Title="Untitled Page"


%>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
// Response.Write(" Value = " + Session["mid"]);
}
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<h2>
Test History</h2>
<asp:GridView ID="GridView1" runat="server"
DataSourceID="SqlDataSource1"
PageSize="3" BorderColor="Black" CellPadding="3" CellSpacing="2"
Width="100%" AllowPaging="True">
<RowStyle Font-Names="Verdana" Font-Size="10pt" />
<HeaderStyle BackColor="#0000C0" Font-Bold="True" FontNames="Verdana" Font-Size="10pt"
ForeColor="White" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:examConnectionString %>"
SelectCommand="SELECT sname, e.noq , nocans, e.noq - nocans nwans,
std=convert(varchar(10),stdate,103),&#13;&#10;nomin =

datediff(mi,stdate,enddate)
FROM oe_exams e, oe_subjects
s&#13;&#10;where e.sid = s.sid and
mid = @mid&#13;&#10;order by
desc">
<SelectParameters>
<asp:SessionParameter Name="mid" SessionField="mid"
Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
</asp:Content>

stdate

<%@ Page Language="C#" MasterPageFile="~/main.master" Title="Untitled Page"


%>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (Session["questions"] != null)
{
Examination exam = (Examination)Session["questions"];
DataList1.DataSource = exam.questions;
DataList1.DataBind();
}
else { Response.Redirect("login.aspx"); }
}
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<asp:DataList ID="DataList1" runat="server" Width="750px">
<HeaderTemplate>
<a href="showresult.aspx">Show Result</a>
<h2>Review Questions</h2>
<hr size=5 style="color:red" />
</HeaderTemplate>
<ItemTemplate>
<pre style="color:Red;background-color:#eeeeee"><%#
DataBinder.Eval( Container.DataItem,"QuestionText")%></pre>
<pre>1.<%# DataBinder.Eval( Container.DataItem,"Answer1")
<pre>2.<%# DataBinder.Eval( Container.DataItem,"Answer2")
<pre>3.<%# DataBinder.Eval( Container.DataItem,"Answer3")
<pre>4.<%# DataBinder.Eval( Container.DataItem,"Answer4")
<pre>Correct Answer :<%#
DataBinder.Eval( Container.DataItem,"CorrectAnswer") %></pre>
<pre>Your Answer
:<%#
DataBinder.Eval( Container.DataItem,"YourAnswer") %></pre>
</ItemTemplate>
<SeparatorTemplate>
<hr size="2" style="color:Red" />
</SeparatorTemplate>

<FooterTemplate>

%></pre>
%></pre>
%></pre>
%></pre>

<hr size=5 style="color:red" />


<a href="showresult.aspx">Show Result</a>
</FooterTemplate>
</asp:DataList>
</asp:Content>
<%@ Page Title="" Language="C#" MasterPageFile="~/main.master"
AutoEventWireup="true" CodeFile="showresult.aspx.cs" Inherits="showresult"
%>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<br />
<h2>
Test Result</h2>
&nbsp;
<br />
<table bgcolor="#eeeeee" border=1>
<tr>
<td>
Subject:
</td>
<td>
<asp:Label ID="lblSubject" runat="server"
Text="Label"></asp:Label></td>
</tr>
<tr>
<td>
Starting Time :
</td>
<td>
<asp:Label ID="lblStime" runat="server"
Text="Label"></asp:Label></td>
</tr>
<tr>

<td>

Time Taken In Minutes :


</td>
<td>
<asp:Label ID="lblMin" runat="server"
Text="Label"></asp:Label></td>
</tr>
<tr>
<td>
No. of Questions :
</td>
<td>
<asp:Label ID="lblNquestions"
runat="server"></asp:Label></td>
</tr>
<tr>

<td>

No. of correct answers :


</td>
<td>
<asp:Label ID="lblNcans" runat="server"
Text="Label"></asp:Label></td>
</tr>

<tr>
<td>

Grade :
</td>
<td>
<asp:Label ID="lblGrade" runat="server"
Text="Label"></asp:Label></td>
</tr>
</table>
<br />
<a href="reviewquestions.aspx">Review Questions</a>
<asp:LinkButton ID="lbRank" runat="server" OnClick="lbRank_Click">Rank
The Result</asp:LinkButton><br />
<br />
<asp:Label ID="lblRank" runat="server"></asp:Label><br />
</asp:Content>

<%@ Page Title="" Language="C#" MasterPageFile="~/main.master"


AutoEventWireup="true" CodeFile="takeexam.aspx.cs" Inherits="takeexam" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<h2>
Take Examination</h2>
<table>
<tr>

<td> Select Subject :</td>


<td><asp:DropDownList ID="ddlSubject"
runat="server"></asp:DropDownList></td>
</tr>
</table>

<br /><br />


<asp:Button ID="btnStart" runat="server" Text="Start Exam"
OnClick="btnStart_Click" />&nbsp;&nbsp;<asp:Label
ID="lblmsg" runat="server" Text="" ForeColor="Red" ></asp:Label><br
/>
<p/>
<b>Note</b>
<ul>
<li>Each exam contains 5 question.</li><li>Use Next and Previous
buttons to navigate between questions</li><li>Result is displayed after the
last questions is answered</li><li>CANCEL button can be used to cancel the
exam</li><li>No time limitation. However the time taken is stored in
database</li></ul>
</asp:Content>

<?xml version="1.0"?>
<!-Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<configSections>
<sectionGroup name="system.web.extensions"
type="System.Web.Configuration.SystemWebExtensionsSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting"
type="System.Web.Configuration.ScriptingSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler"
type="System.Web.Configuration.ScriptingScriptResourceHandlerSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices"
type="System.Web.Configuration.ScriptingWebServicesSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization"
type="System.Web.Configuration.ScriptingJsonSerializationSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="Everywhere"/>
<section name="profileService"
type="System.Web.Configuration.ScriptingProfileServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication"/>
<section name="authenticationService"
type="System.Web.Configuration.ScriptingAuthenticationServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication"/>
<section name="roleService"
type="System.Web.Configuration.ScriptingRoleServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<appSettings/>
<connectionStrings>

<add name="examConnectionString" connectionString="Data


Source=.;Initial Catalog=examNw;Persist Security Info=True;Integrated
Security=true" providerName="System.Data.SqlClient"/>
<!--<add name="examConnectionString" connectionString="Data
Source=74.63.225.122;Initial Catalog=exam;Persist Security Info=True;user
id=exmusr;password=T9.s#PL67#y" providerName="System.Data.SqlClient"/>-->
</connectionStrings>
<system.web>
<pages theme="dark">
<controls>
<add tagPrefix="asp" namespace="System.Web.UI"
assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls"
assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
</controls>
</pages>
<!-Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
<!-The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Forms"/>
<!-The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
-->
<customErrors mode="Off"/>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false"
type="System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false"
type="System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>

<add verb="GET,HEAD" path="ScriptResource.axd" validate="false"


type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
</httpModules>
</system.web>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs"
type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="OptionInfer" value="true"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule"/>
<add name="ScriptModule" preCondition="managedHandler"
type="System.Web.Handlers.ScriptModule, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory"/>
<remove name="ScriptHandlerFactoryAppServices"/>
<remove name="ScriptResource"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx"
preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*"
path="*_AppService.axd" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd"
preCondition="integratedMode"
type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</handlers>
</system.webServer>
<runtime>
<assemblyBinding appliesTo="v2.0.50727" xmlns="urn:schemas-microsoftcom:asm.v1">
<dependentAssembly>

<assemblyIdentity name="System.Web.Extensions"
publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0"
newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design"
publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0"
newVersion="3.5.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

using
using
using
using
using
using

System;
System.Collections.Generic;
System.Linq;
System.Web;
System.Data;
System.Data.SqlClient;

using System.Configuration;
/// <summary>
/// Summary description for DAL
/// </summary>
public class DAL
{
SqlClass con = new SqlClass();
SqlConnection objConnection;
SqlCommand objCommand;
SqlDataReader dataReader;
string con_str =
ConfigurationManager.ConnectionStrings["examConnectionString"].ConnectionSt
ring;
public DAL()
{
}
public void DeleteRecordByID(int qID)
{
objConnection = new SqlConnection();
objConnection.ConnectionString = con_str;
objConnection.Open();
objCommand = new SqlCommand();
objCommand.CommandType = CommandType.Text;
objCommand.CommandText = "delete from oe_questions where qid="+qID;
objCommand.Connection = objConnection;
objCommand.ExecuteNonQuery();
objCommand = null;
objConnection.Close();
objConnection = null;
}

// Delete the record


public void SubmitQuestion(string question, string ans1, string ans2,
string ans3, string ans4, string cans, string sid, string category, string
subset)
{
objConnection = new SqlConnection();
objConnection.ConnectionString = con_str;
objConnection.Open();
objCommand = new SqlCommand();
objCommand.CommandType = CommandType.StoredProcedure;
objCommand.CommandText = "SubmitQuestion";
objCommand.Connection = objConnection;
objCommand.Parameters.Add("@question",
SqlDbType.NVarChar,2000).Value = question;
objCommand.Parameters.Add("@ans1", SqlDbType.NVarChar,1000).Value =
ans1;
objCommand.Parameters.Add("@ans2", SqlDbType.NVarChar,1000).Value =
ans2;
objCommand.Parameters.Add("@ans3", SqlDbType.NVarChar,1000).Value =
ans3;
objCommand.Parameters.Add("@ans4", SqlDbType.NVarChar,1000).Value =
ans4;
objCommand.Parameters.Add("@cans", SqlDbType.NVarChar,50).Value =
cans;
objCommand.Parameters.Add("@sid", SqlDbType.Int).Value = sid;
objCommand.Parameters.Add("@category", SqlDbType.Char,50).Value =
category;
objCommand.Parameters.Add("@subset", SqlDbType.NVarChar, 100).Value
= subset;

objCommand.ExecuteNonQuery();
objCommand = null;
objConnection.Close();
objConnection = null;
}
}

using
using
using
using

System;
System.Web;
System.Configuration;
System.Web.Configuration;

/// <summary>
/// Summary description for DBUtil
/// </summary>
public class DBUtil
{
public static String ConnectionString
{
get
{
ConnectionStringSettings constr =
WebConfigurationManager.ConnectionStrings["examConnectionString"];
return constr.ConnectionString;
}
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
/// <summary>
/// Summary description for ExamDB
/// </summary>
public class ExamDB
{
public ExamDB()
{
//
// TODO: Add constructor logic here
//
}
private const string EXAM_CACHE_KEY = "EXAM_DATA";
private const string EXAMCOUNT_CACHE_KEY = "EXAM_COUNT";
public static DataTable GetQuestionSortedPage(int maximumRows, int
startRowIndex, string sortExpression, string searchCriteria)
{
if (string.IsNullOrEmpty(sortExpression))
sortExpression = "qid";
try
{
if (ExamDBCache.isRecordsCached(EXAM_CACHE_KEY))
return ExamDBCache.GetData(EXAM_CACHE_KEY, startRowIndex +
1, maximumRows, sortExpression, searchCriteria);

SqlConnection dbConnection = new


SqlConnection(ConfigurationManager.ConnectionStrings["examConnectionString"
].ToString());
string sql = "select * from oe_questions";
SqlCommand custCommand = new SqlCommand(sql, dbConnection);
custCommand.CommandType = CommandType.Text;
SqlDataAdapter ad = new SqlDataAdapter(custCommand);
DataTable dtresults = new DataTable();
ad.Fill(dtresults);
dbConnection.Close();
//Cache records
ExamDBCache.Add(EXAM_CACHE_KEY, dtresults);
}
catch (Exception e)
{
throw;
}
return ExamDBCache.GetData(EXAM_CACHE_KEY, startRowIndex + 1,
maximumRows, sortExpression, null);
}
public static int GetQuestionCount(string searchCriteria)
{
int custCount = 0;
try
{
SqlConnection dbConnection = new
SqlConnection(ConfigurationManager.ConnectionStrings["examConnectionString"
].ToString());
string sql = "select count(*) from oe_questions ";
if (!string.IsNullOrEmpty(searchCriteria))
sql = sql + " where " + searchCriteria;
SqlCommand sqlCommand = new SqlCommand(sql, dbConnection);
sqlCommand.Connection = dbConnection;
dbConnection.Open();
sqlCommand.CommandType = CommandType.Text;
custCount = Convert.ToInt32(sqlCommand.ExecuteScalar());
dbConnection.Close();
if (ExamDBCache.Get(EXAM_CACHE_KEY) != null)
{
// remove customers data if customers count has changed
since first cache
int val =
Convert.ToInt32(ExamDBCache.Get(EXAMCOUNT_CACHE_KEY));
if (Convert.ToInt32(ExamDBCache.Get(EXAMCOUNT_CACHE_KEY)) !
= custCount && string.IsNullOrEmpty(searchCriteria))
{
ExamDBCache.Remove(EXAM_CACHE_KEY);
}
}
if (string.IsNullOrEmpty(searchCriteria))

ExamDBCache.Add(EXAMCOUNT_CACHE_KEY, custCount);
}
catch (Exception e)
{
throw;
}
return custCount;
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Caching;
using System.Data.SqlClient;
using System.Data;
/// <summary>
/// Summary description for ExamDBCache
/// </summary>
public class ExamDBCache
{
public ExamDBCache()
{
}
public static bool isRecordsCached(string cacheKey)
{
Cache dbCache = HttpContext.Current.Cache;
if (dbCache[cacheKey] == null)
return false;
return true;
}
public static void Add(string key, object value)
{
Cache dbCache = HttpContext.Current.Cache;
dbCache.Add(key, value, null, Cache.NoAbsoluteExpiration,
Cache.NoSlidingExpiration, CacheItemPriority.Default, null);
}
public static object Get(string key)
{
Cache dbCache = HttpContext.Current.Cache;
}

return dbCache[key];

public static object Remove(string key)


{
Cache dbCache = HttpContext.Current.Cache;

return dbCache.Remove(key);
}
public static DataTable GetData(string cacheKey, int startRowIndex, int
maximumRowNumber, string sortExpression, string searchCriteria)
{
Cache dbCache = HttpContext.Current.Cache;
if (dbCache[cacheKey] != null)
{
DataTable dtble = new DataTable();
DataTable dtblNew = new DataTable();
dtble = dbCache[cacheKey] as DataTable;
if(dtble ==null)
{
return null;
}
else
{
dtblNew = dtble.Clone();
}
DataRow[] rows = dtble.Select(searchCriteria, sortExpression);
if (rows != null)
{
if (rows.Count() > 0)
{
if (startRowIndex > rows.Count())
{
startRowIndex = rows.Count() - maximumRowNumber;

if (startRowIndex < 0)
{
startRowIndex = 1;
maximumRowNumber = rows.Count();
}

for (int i = startRowIndex - 1; i < (startRowIndex +


maximumRowNumber - 1); i++)
{
if (i < rows.Count())
dtblNew.ImportRow(rows[i]);
}
return dtblNew;

}
}

return dtblNew;
}
}
}

return null;

using
using
using
using

System;
System.Data;
System.Data.SqlClient;
System.Collections.Generic;

public class Examination


{
public int SIZE = 5;
public int studentID;
public int subjectID;
public String category;
public int ncans;
public List<Question> questions;
public DateTime StartTime;
public int curpos = 0;
public Examination(int stuid, int subid, String category)
{
this.studentID = stuid;
this.subjectID = subid;
this.category = category;
StartTime = DateTime.Now;
}
public static string GetSubjectName(int id)
{
SqlConnection con = new SqlConnection(DBUtil.ConnectionString);
SqlDataAdapter da = new SqlDataAdapter("select sname FROM
oe_subjects where sid="+id, con);
DataSet ds = new DataSet();
da.Fill(ds, "subject");
string subject = ds.Tables[0].Rows[0][0].ToString();
return subject;
}
public string GetSubset()
{
SqlConnection con = new SqlConnection(DBUtil.ConnectionString);
SqlDataAdapter da = new SqlDataAdapter("select distinct subset FROM
oe_questions", con);
DataSet ds = new DataSet();
da.Fill(ds, "subset");
int subsets = ds.Tables[0].Rows.Count;
// get N no. of random number
Random rn = new Random();
int row = rn.Next(subsets);
string subset = ds.Tables[0].Rows[row][0].ToString();
return subset;
}
public void GetQuestions()
{
//get random subset
string subset = GetSubset();

// get questions from OE_QUESTIONS table


SqlConnection con = new SqlConnection(DBUtil.ConnectionString);
SqlDataAdapter da = new SqlDataAdapter("select
question,ans1,ans2,ans3,ans4,cans from oe_questions where sid = " +
subjectID + " And Category='" + category + "' And subset='" + subset +
"'",con);
DataSet ds = new DataSet();
da.Fill(ds, "questions");
int nquestions = ds.Tables[0].Rows.Count;
// get N no. of random number
Random r = new Random();
int[] positions = new int[SIZE];
int num;
for (int pos = 0; pos < SIZE; )
{
num = Math.Abs(r.Next(nquestions));
// check whether the number is already in the array
bool found = false;
for( int i = 0; i < pos ; i ++)
if (num == positions[i]) { found = true; break; }
if (!found)
{
positions[pos] = num;
pos++;
}
} // end of for
// load data from DataSet into Question Objects
questions = new List<Question>();
DataRow dr;
Question q;
foreach (int pos in positions)
{
dr = ds.Tables[0].Rows[pos];
q = new Question(dr["question"].ToString(),
dr["ans1"].ToString(), dr["ans2"].ToString(), dr["ans3"].ToString(),
dr["ans4"].ToString(), dr["cans"].ToString());
questions.Add(q);
}
} // end of GetQuestions()
} // end of Class

using System;
public class Question
{
public String question;
public String ans1, ans2, ans3, ans4, cans, answer;
public String QuestionText
{
get { return question; }
}

public String Answer1


{
get { return ans1; }
}
public String Answer2
{
get { return ans2; }
}
public String Answer3
{
get { return ans3; }
}
public String Answer4
{
get { return ans4; }
}
public String CorrectAnswer
{
get { return cans; }
}
public String YourAnswer
{
get { return answer; }
}

public Question(String question, String ans1, String ans2, String ans3,


String ans4, String cans)
{
this.question = question;
this.ans1 = ans1;
this.ans2 = ans2;
this.ans3 = ans3;
this.ans4 = ans4;
this.cans = cans;
}
public bool IsCorrect()
{
return answer.Equals(cans);
}
}

using
using
using
using
using
using
using
using
using
using
using
using

System;
System.Collections;
System.ComponentModel;
System.Data;
System.Configuration;
System.Data.SqlClient;
System.Drawing;
System.Web;
System.Web.SessionState;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.HtmlControls;

public class SqlClass


{
public SqlClass()
{
}
private SqlConnection _objCon = null;
private SqlCommand _objCmd;
private SqlDataReader _objReader;
public string _strQueryText = null, _strQuery=null;
/// <summary>
/// Open a Sql connection based on connection string in web.conf file
/// </summary>
/// <returns>boolean true or false</returns>
public bool OpenConnection()
{
if (this._objCon != null)
{
this._objCon.Close();
}
this._objCon = new SqlConnection();
try
{
this._objCon.ConnectionString =
ConfigurationManager.ConnectionStrings["examConnectionString"].ConnectionSt
ring;
this._objCon.Open();
this._objCmd = _objCon.CreateCommand();
}
catch (Exception ex)
{
if (this._objCon.State != ConnectionState.Closed)
{
this._objCon.Close();
this._objCon.Open();
this._objCmd = this._objCon.CreateCommand();
}
string ss = ex.Message.ToString();
return false;
}
return true;
}
/// <summary>
/// Executes a SqlDataReader
/// </summary>
/// <param name="sSQL">string query text</param>
/// <returns>Reader</returns>
public SqlDataReader ExecReader(string sSQL)

this._objCmd.CommandType = CommandType.Text;
this._objCmd.CommandText = sSQL;
this._objReader = this._objCmd.ExecuteReader();
return this._objReader;

}
/// <summary>
/// Executes a Scalar
/// </summary>
/// <param name="sSQL">string sql text</param>
/// <returns>string returned value of query</returns>
public string ExecScalar(string sSQL)
{
string temp;
this._objCmd.CommandType = CommandType.Text;
this._objCmd.CommandText = sSQL;
try
{
temp = this._objCmd.ExecuteScalar().ToString();
if (temp == "")
return "0";
else
return temp;
}
catch (SqlException ex)
{
string err = ex.Message;
return "0";
}
}
/// <summary>
/// Execute a nonquery
/// </summary>
/// <param name="sSQL">string sql text</param>
public void ExecuteCommand(string sSQL)
{
this._objCmd.CommandType = CommandType.Text;
this._objCmd.CommandText = sSQL;
this._objCmd.ExecuteNonQuery();
}
/// <summary>
/// close the connection
/// </summary>
///
/// <summary>
/// Execute a nonquery
/// </summary>
/// <param name="sSQL">string sql text</param>
public void ExecuteProcedure(string sSQL)
{
this._objCmd.CommandType = CommandType.StoredProcedure;
this._objCmd.CommandText = sSQL;
this._objCmd.ExecuteNonQuery();
}
/// <summary>
/// close the connection
/// </summary>
public void CloseConnection()
{

if (this._objCon != null)
{
this._objCon.Close();
this._objCon.Dispose();
}

}
/// <summary>
/// Get the maximum number in a integer colum in a teble
/// </summary>
/// <param name="sSQL">query text</param>
/// <returns>int newcode</returns>
public int GetNewCode(string sSQL)
{
SqlCommand _objCmd = new SqlCommand(sSQL, this._objCon);
this._objReader = _objCmd.ExecuteReader();
int iNewCode;
this._objReader.Read();
if (this._objReader.IsDBNull(0) == true)
iNewCode = 1;
else
iNewCode = Convert.ToInt32(this._objReader[0]) + 1;
this._objReader.Close();
return iNewCode;
}
/// <summary>
/// Executes a query and return a dataset
/// </summary>
/// <param name="sSQL">string query text</param>
/// <returns>dataset</returns>
public SqlDataAdapter ExecuteDataSet(string sSQL)
{
this._objCmd.CommandType = CommandType.Text;
SqlDataAdapter da = new SqlDataAdapter(sSQL, this._objCon);
return da;
}
/// <summary>
/// Remaves the time field from datetime and returns the specified
format date
/// </summary>
/// <param name="date"></param>
/// <param name="format">0 for US format(mm/dd/yyyy) and 1 for UK
format dd/mm/yyyy</param>
/// <returns></returns>
public string FormatDate(string date,int format)
{
string _strTempDate = null;
if (format == 1)
{
string[] temp = date.Substring(0, date.IndexOf("
")).Split('/');
_strTempDate = temp[1] + "/" + temp[0] + "/" + temp[2];
}
if (format == 0)
{
_strTempDate = date.Substring(0, date.IndexOf(" "));
}
return _strTempDate;
}
}

Das könnte Ihnen auch gefallen