Sei sulla pagina 1di 49

CGPU MS 1

ABSTRACT

This project is aimed at developing a web-based and central recruitment Process

system for the HR Group for a company. Some features of this system will be creating

vacancies, storing application data, and Interview process initiation, Scheduling

interviews, storing Interview results for the applicant and finally Hiring of the applicant.

Reports may be required to be generated for the use of the HR group.

This project ‘Online Carrier Guidance and Placement Unit’ is an online

website in which jobseekers can register themselves and then attend the exam. Based on

the outcome of the exam the jobseekers will be short listed. For fresher, the exam will be

conducted at some venue after short listing of the preliminary Aptitude Test. The details

of the examination, venue & Date of the examination will be made available to them

through the website. The Modules in this project are:

1. Administrator: Administrator has the full authority over the website. He can

view all the registered users and have the power to delete them. He can edit the web

pages and update them. He can view all the company details also.

2. Jobseeker: A jobseeker can register himself. After registration, he will be

directed to his homepage. Here he can update his profile, change password and see the

examination details and all.


CGPU MS 2
3. Company: A company can register itself, conduct online examination, approve

or disapprove candidates attending examination and provides results about the selected

candidates.

PROBLEM DESCRIPTION

A System analysis is the detailed study of the various operations performed by the

system and their relationships within and outside the system. Analysis is the process of

breaking something into its parts so that the whole may be understood. System Analysis

is concerned with becoming aware of the problem, identifying the relevant and most

decisional variables, analyzing and synthesizing the various factors and determining an

optimal or at least a satisfactory solution. During this a problem is identified, alternate

system solutions are studied and recommendations are made about committing the

resources used to design the system.


CGPU MS 3

SYSTEM SPECIFICATION

Hardware Specification

CPU : PENTIUM IV

PROCESSOR SPEED : 2 GHz

COPROCESSOR : BUILT IN

TOTAL RAM : 128 MB

DISKETTE A : 1.44 MB FLOPPY 3.5”

HARD DISK : 40 GB

KEYBOARD : 105 KEYS

MOUSE : LOGITECH MOUSE

DISPLAY : SGVA COLOR

PRINTER : HP DESK JET

Software Specification

FRONT END : ASP

BACK END : SQL SERVER

OPERATING SYSTEM : WINDOWS XP

SYSTEM STUDY
CGPU MS 4

EXISTING SYSTEM

Presently recruitment is done manually. That is if a company or organization needs

employees they make an announcement through newspaper. People who are eligible send

application to the organization or company. From these applications they are called for

interviews or tests. After tests company has to do short listing manually. From these

shortlisted candidates, they are called for interviews. After interview short listed

candidates are employed. So it’s all a time consuming procedure.

LIMITATIONS OF EXISTING SYSTEM

Recruitment is done manually. These tasks are time consuming. It may take one

month or long. People around the world cannot apply. Online CGPU system is very

convenient because in the manual system there are lots of difficulties in conducting and

managing a recruitment exam, short listing, maintaining staff etc.

PROPOSED SYSTEM

Online CGPU is aimed at developing a web-based and central recruitment process

system for the HR Group for a company. Some features of this system will be creating

vacancies, storing application data, and Interview process initiation, Scheduling

Interviews, Storing Interview results for the applicant and finally hiring of the applicant.

This project Online CGPU is an online website in which jobseekers can register

themselves and then attend the exam. Based on the outcome of the exam the jobseekers

will be shortlisted. The details of the examination & Date of the examination will be

made available to them through the website. People all around the world can apply and

register. It has made all the process easy.


CGPU MS 5

ADVANTAGES OF PROPOSED SYSTEM

Online CGPU enables the users to have the typical examination facilities and

features at their disposal. It resolves typical issues of manual examination processes and

activities into a controlled and closely monitored work flow in the architecture of the

application. This multi platform solution brings in by default, the basic intelligence and

immense possibilities for further extension of the application as required by the user. The

system makes it friendly to distribute, share and manage the examination entities with

higher efficiency and easiness. It is a comprehensive resource for finding a job online.

DATA FLOW DIAGRAM

A Data Flow Diagram (DFD) is a diagram that describes the flow of data and

the processes that change or transform data throughout a system. It’s a structured analysis

and design tool that can be used for flowcharting in place of, or in association with,
CGPU MS 6
information oriented and process oriented system flowcharts. When analysts prepare the

Data Flow Diagram, they specify the user needs at a level of detail that virtually

determines the information flow into and out of the system and the required data

resources. This network is constructed by using a set of symbols that do not imply a

physical implementation. The Data Flow Diagram reviews the current physical system,

prepares input and output specification, specifies the implementation plan etc.

Four basic symbols are used to construct data flow diagrams. They are symbols that

represent data source, data flows, and data transformations and data storage. The points at

which data are transformed are represented by enclosed figures, usually circles, which are

called nodes.

Data Flow Diagram Symbols:-

_ Source or

Destination of data

_ Data Flow

_ Process

_ Storage

Data Flow Diagram

Context Diagram
CGPU MS 7

Administrator

Online
Company Candidate
CGPU

Database
CGPU MS 8

Data Flow Diagram


Level 1.1: Admin

If authenticated user
Admin
Login Tbl Login

Username, Password

Compa
ny
Manage
ment
System
1.1.1

User Data
Manage store
ment
1.1.2

Short
listing
of
Candid
ates
CGPU MS 9

Level 1.1.1: Company Management

Update user
Validate Tbl Login
Compan
y Status

Admin

View Tbl Company


Details
CGPU MS 1
0
Level 1.1.2: User Management

Update
Validate Tbl Login
user

Resume of

Admin View
Resume Tbl Candidate
Registered users

User details

View
Details
CGPU MS 1
1

SOFTWARE DESCRIPTION

Microsoft Visual Studio 2005

Microsoft Visual Studio is Microsoft’s flagship software development product for

computer programmers. It centers on an integrated distribution environment which lets

programmers create standalone, websites, web applications, and web services that run on

any platforms supported by Microsoft’s .Net Framework(for all versions after 6).

Supported platforms include Microsoft windows, servers and workstations, Pocket PC,

Smart Phones and World Wide Web browsers not Java Virtual Machine that all other

Java tools target.

VISUAL STUDIO 2005

The most important language feature added in this version was the introduction of

generics, which are similar in many aspects to C++ templates. This potentially increases

the number of bugs caught at compile time instead of run time by encouraging the use of

strict type checking in areas where it was not possible before. C++ also got a similar

upgrade with the addition of C++/CLI which is slated to replace the use of Managed C++.

Other new features of Visual Studio 2005 include the “Development Designer” which

allows application designs to be validated before deployments, an improved environment

for web publishing when combined with ASP.NET 2.0 and load testing to see application

performance under various sorts of user loads.


CGPU MS 1
2

.NET FRAMEWORK SDK

The .NET framework is an integral windows component that supports building and

running the next generation of applications and XML web services. The key component

of the .NET framework are the common language runtime and the .NET frame work

library, which includes ADO.NET, ASP.NET, and windows forms. The .NET framework

provides a managed execution environment simplified development and deployment and

integration with a wide variety of programming languages.

This framework is made up of the following parts:

• The common language runtime(CLR)

• The base class libraries.

• Object Oriented internet development with ASP.NET

• Rich client user interface using windows forms

• RAD for the internet using web forms

OVERVIEW OF THE .NET FRAME WORK

The .NET framework is a new computing platform that simplifies application

development in the highly distributed environment of the internet. The .NET

framework is designed to fulfill following objectives:


CGPU MS 1
3
• To provide a consistent object oriented programming environment whether

object code is stored and executed locally but internet_ distributed, or

executed remotely.

• To provide a code execution environment that guarantees safe execution of

code, including code created by an unknown or semi trusted third party.

• To provide a code execution environment that eliminates the performance

problem of scripted or interpreted environments.

• To make developer experience consistent across widely varying types of

application, such as windows based applications and web based

application.

• To build all communication on industry standards to ensure that code

based on the.NET framework can integrate with any other code.

The .NET framework has two main components: the common language

runtime and the .NET framework class library. The common language runtime

is the foundation of the .Net framework. You can think of the runtime as an

agent that manages code at execution time, remoting while also enforcing

strict type safely and other forms of code accuracy that ensure security and

robustness. In fact the concept of code management is a fundamental principle

of the runtime.
CGPU MS 1
4
Code that targets the runtime is known as managed code, while code that does

not target the runtime is known as unmanaged code. The class library, the

other main component of the .NET frameworks is a comprehensive, object

oriented collection reusable types that you can use to develop applications

ranging from traditional command line or graphical user interface(GUI)

applications to application based on the latest innovations provided by

ASP.NET, such as web forms and XML web services.

The .NET framework can be hosted by unmanaged component that load the

CLR into their processes and initiate the execution of managed code.

ASP.NET works directly with the runtime to enable ASP.NET application and

XML web services, both of which are discussed later in this topic.

Internet explorer is an unmanaged application that hosts the runtime (in the

form of a MIME type extension) using internet explorer to the host runtime

enables you to embed managed components or windows forms controls in

HTML documents. Hosting the runtime in this way makes mobile code

possible, but with significant improvement that only managed code can offer,

such as semi-trusted execution and secure isolated file storage.

The following illustration shows the relationship of the common language

runtime and the class library to your application and to the overall system. The

illustration also shows how managed code operates with in a larger

architecture.

We can use the .NET framework to develop the following types of application

and services:
CGPU MS 1
5
 Console applications

 Windows GUI application(Windows forms)Asp.NET applications

 XML Web services

 Windows services

COMMON LANGUAGE RUNTIME (CLR)

The common language runtime (CLR) is responsible for runtime services

such as language integration; security enforcement; and memory process

and thread management. In addition, it has a roll at development time

when features such as life cycle management strong type naming, cross

language exception handling, dynamic binding and so on, reduce the

amount of code that a developer must write to turn the business logic the

reusable component. The runtime can be hosted by high performance,

server side applications, such as Microsoft Internet Information Services

(IIS) for building web applications with ASP.Net and the next release of

Microsoft SQL Server .This infrastructure enables you to use code

”managed” by the .NET framework to write your business logic, while still

enjoying the superior performance of the industry’s best enterprises

servers that support runtime hosting.

ASP.NET

ASP.Net is a set of Microsoft .NET framework technologies used for

building web applications and XML Web services.ASP.NET pages

execute on the server and generate mark up such as HTML, WML, or


CGPU MS 1
6
XML that is sent to the desktop or mobile browser.ASP.NET pages use a

compiled, event-driven programming model that improve performance and

enables the separation of application logic and user interface. Both

ASP.NET pages and ASP.NET web services files contain server-side (as

opposed to client side logic) written in Visual basic .NET,C# .Net or

any .NET compatible language.

Web applications and XML Web Services take advantage of the features

of common language runtime, such as type safely, inheritance, language,

interoperability, versioning, and integrated security.

IIS

Microsoft Internet Information Services (IIS; formerly called Server) is a

set of Internet based services for servers using Microsoft Windows. It is

the world’s second most popular web server in terms of overall websites.

As of September2007 it served 34.94% of all websites and 36.63% of all

active websites according to Netcraft. The servers currently include

FTP,SMTP,NNTP, and HTTP/HTTPS.

ADO.NET

ADO.NET provides consistent access to data sources such as Microsoft

SQL Server and XML, as well as to data sources exposed through OLE

DB and ODBC. Data-sharing consumer applications can use ADO.NET to

connect to these data sources and retrieve, manipulate, and update the data

that they contain.

ADO.NET separates data access from data manipulation into

discrete components that can be used separately or in tandem.ADO.NET


CGPU MS 1
7
includes .NET framework data providers for connecting to a database,

executing commands, and retrieving result. Those results are either

processed directly placed in an ADO.NET DataSet object in order to be

exposed to a the user in an ad hoc manner, combined with data from

multiple sources or remoted between tiers. The ADO.NET DataSet object

can also be used independently of a .NET framework data provider to

manage data local to the application or sourced from XML.

ADO.NET classes are found in System.Data.dll, and are integrated

with the XML classes found in System.Xml.ddl. When compiling code

that uses the System.Data.namespace, reference both System.Data.ddl and

System.Xml.ddl.

ADO.NET provides functionality to developers writing managed

code similar to the functionality provided to native component object

model(COM) developers by ActiveX Data Objects(ADO).

ADO.NET Components

There are two components of ADO.NET that you can use to access and

manipulate data:

 .NET Framework data Providers

 The DataSet

.NET Framework Data Providers

The .Net framework Data Providers are components that have been

explicitly designed for data manipulation and fast, forward-only, read-only

access to data. The Connection object provides connectivity to a data


CGPU MS 1
8
source. The Command object enables access to database commands to

return data, modify data, run stored procedures, and send or retrieve

parameter information. The DataReader provides a high performance

stream of data from the data source. Finally the Data Adapter provides the

bridge between the DataSet object and the data source. The Data Adapter

object uses the command object to execute SQL Commands at the data

source to both load the DataSet with data, and reconcile changes made to

the data in the DataSet back to the datasource.

The DataSet

The ADO.NET DataSet is explicitly designed for data access independent

of any data source.As a result, it can be used with multiple and differing

data sources, used with XML data, or used to manage data local to the

application. The DataSet contains a collection of one or more DataTable

objects made uop of rows and columns of data, as well as primary key,

foreign key, constraint, and relation information about the data in the

DataTable objects.

Benefits of ADO.NET

ADO.NET offers several advantages over previous versions of ADO and over

other data access components.These benefits fall into the following categories:

1. Interoperability
CGPU MS 1
9
2. Maintainability

3. Programmability

4. Scalability

DATABASE DESIGN

TABLES USED

Table Name: tblExamDetails

Fieldname Data Type Size Key


CompanyName varchar 50 _
CompanyCode varchar 20 _
ExamCode varchar 20 Primary key
CGPU MS 2
0
ExamDate datetime 10 _
Subject varchar 50 _

Table Name: tblQuestions

Fieldname Data Type Size Key


CompanyID varchar 20 _
Subject varchar 50 _
ExamID varchar 20 _
QstNo int 5 _
Question varchar 150 _
Choice1 varchar 50 _
Choice2 varchar 50 _
Choice3 varchar 50 _
Choice4 Varchar 50 _
Answer varchar 50 _

Table Name: tblCompany

Fieldname Data Type Size Key


Name varchar 50 _
Address varchar 50 _
Post varchar 50 _
Criteria varchar 50 _
Username varchar 50 Primary key
Phone nchar 10 _
Email varchar 20 _

Table Name: tblLogin

Fieldname Data Type Size Key


Username varchar 20 Primary key
Password varchar 10 _
Status text 10 _
CGPU MS 2
1
Table Name: tblStudent

Fieldname Data Type Size Key


Name varchar 30 _
Gender text _ _
DOB nchar 15 _
CollegeName varchar 30 _
CollegePhone numeric 18,0 _
CollegeEmail varchar 30 _
Degree varchar 20 _
Branch varchar 20 _
Mark int _ _
Username varchar 20 Primary key
Email varchar 20 _
Contactno decimal 18,0 _
Address varchar 50 _
State varchar 20 _
Pincode int 10 _

Table Name: tbl_result

Fieldname Data Type Size Key


Exam Id varchar 50 _
StudentId varchar 50 Primary key

CODING

Db connection
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
CGPU MS 2
2
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
/// <summary>
/// Summary description for dbConnection
/// </summary>
public class dbConnection
{
SqlConnection con;
SqlCommand cmd;
public static string cns = "Data
Source=.\\SQLEXPRESS;AttachDbFilename=|
DataDirectory|\\CGPU.mdf;Integrated Security=True;User Instance=True";

public static SqlConnection OpenConnection()


{
SqlConnection conn = new SqlConnection(cns);
conn.Open();
return conn;
}
public static void CloseConnection(SqlConnection conn)
{
if (conn.State == ConnectionState.Open)
conn.Close();
}
public dbConnection()
{
}

}
Bussiness Layer
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;
//*****************

using System.Collections;

/// <summary>
/// Summary description for BussinessLayer
/// </summary>
public class BussinessLayer
{
public BussinessLayer()
{
CGPU MS 2
3
//
// TODO: Add constructor logic here
//
}
public static DataTable GetData(string query)
{
SqlConnection conn = dbConnection.OpenConnection();
SqlDataAdapter da = new SqlDataAdapter(query, conn);
DataTable dt = new DataTable();
da.Fill(dt);
dbConnection.CloseConnection(conn);
return dt;
}
public static SqlDataReader getReaderData(String sql)
{
SqlConnection conn = dbConnection.OpenConnection();
SqlCommand cmd = new SqlCommand(sql, conn);
return cmd.ExecuteReader();
}
public static bool PutData(string query)
{
try
{
SqlConnection conn = dbConnection.OpenConnection();
SqlCommand cmd = new SqlCommand(query, conn);
int i = cmd.ExecuteNonQuery();
dbConnection.CloseConnection(conn);
if (i > 0)
return true;
else
return false;
}
catch (Exception ex)
{
return false;

}
public static string GetSingleData(string query)
{
SqlConnection conn = dbConnection.OpenConnection();
SqlCommand cmd = new SqlCommand(query, conn);
object o = cmd.ExecuteScalar();
String s = o.ToString();
dbConnection.CloseConnection(conn);
return s;
}

public static DataTable GetExamData(string CompanyId, string


Subject, string ExamId)
{
DataTable dt = GetData("SELECT * FROM Questions WHERE
CompanyID='" + CompanyId + "' AND Subject='" + Subject + "' AND
ExamID='" + ExamId + "'");
return dt;
}
CGPU MS 2
4
}

Add question
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 addquestions : System.Web.UI.Page


{
String cid, subject,examid;
protected void Page_Load(object sender, EventArgs e)
{
//if (!IsPostBack)
//{
cid = Request.QueryString["cid"];
subject = Request.QueryString["sub"];
examid = Request.QueryString["eid"];
//}

}
protected void btnSave_Click(object sender, EventArgs e)
{
int qno=1;
String qst, ch1, ch2, ch3, ch4, ans;
qst = txtQstn.Text;
ch1 = txtCh1.Text;
ch2 = txtCh2.Text;
ch3 = txtCh3.Text;
ch4 = txtCh4.Text;
ans = txtAns.Text;

if (ch1 == ch2 || ch1 == ch3 || ch1 == ch4 || ch2 == ch3 || ch2


== ch4 || ch3 == ch4)
{
lblMsg.Text = "Choice are same,Please change it.";
}
else
{

if (qst == "" || ch1 == "" || ch2 == "" || ch3 == "" || ch4


== "" || ans == "")
{
lblMsg.Text = "Required fields are missing, Insertion
failed";
return;
CGPU MS 2
5
}
if (ch1 != ans && ch2 != ans && ch3 != ans && ch4 != ans)
{
lblMsg.Text = "Answer is not in the choice list,
Insertion failed";
return;
}
String sql = "Select Count(*) from Questions Where
CompanyID='" + cid + "' and Subject='" +
subject + "' and ExamID='" + examid + "'";
SqlDataReader dr = BussinessLayer.getReaderData(sql);
if (dr.Read())
{
qno = dr.GetInt32(0);
qno++;
}
dr.Close();
sql = "Insert into Questions values('" + cid + "','" +
subject + "','" + examid + "'," + qno + ",'" + qst + "','" +
ch1 + "','" + ch2 + "','" + ch3 + "','" + ch4 + "','" +
ans + "')";
Boolean b = BussinessLayer.PutData(sql);
if (b == true)
{
lblMsg.Text = "Question added successfully";
txtQstn.Text = "";
txtCh1.Text = "";
txtCh2.Text = "";
txtCh3.Text = "";
txtCh4.Text = "";
txtAns.Text = "";
txtQstn.Focus();
}
else
{
lblMsg.Text = "Insertion failed";
}
}
}
}

Admincanview
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;
CGPU MS 2
6
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session.Count == 0)
{
Response.Redirect("home.aspx");
}
}
}

Adminchangepass
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;

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


{
protected void Page_Load(object sender, EventArgs e)
{
if (Session.Count == 0)
{
Response.Redirect("home.aspx");
}
txtuser.Text = Session["uname"].ToString();
txtoldpass.Text = Session["pass"].ToString();
}
protected void btnOk_Click(object sender, EventArgs e)
{
if (txtnewpass.Text.Equals(txtrepass.Text))
{

Label1.Visible = true;
Label1.Text = "Successfully changed";
//Response.Write("<script>alert('Success')</script>");

bool Insert1 = BussinessLayer.PutData("Update tblLogin set


Password='" + txtnewpass.Text + "'where Username='" + txtuser.Text +
"'");
}
CGPU MS 2
7
}
}
Caneditprofile
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;

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


{
String x;
protected void Page_Load(object sender, EventArgs e)
{

if (Session.Count == 0)
{
Response.Redirect("home.aspx");
}
x = Session["uname"].ToString();
if (!IsPostBack)
{

DataTable dtb = BussinessLayer.GetData("select * from


tblStudent where Username='" + x + "'");

if (dtb.Rows.Count == 0)
{

}
else
{

txtName.Text = dtb.Rows[0]["Name"].ToString();
txtColname.Text = dtb.Rows[0]
["CollegeName"].ToString();
txtColph.Text = dtb.Rows[0]["CollegePhone"].ToString();
txtColemail.Text = dtb.Rows[0]
["CollegeEmail"].ToString();
ddlDegree.SelectedValue = dtb.Rows[0]
["Degree"].ToString();
ddlBranch.SelectedValue = dtb.Rows[0]
["Branch"].ToString();
txtmark.Text = dtb.Rows[0]["Mark"].ToString();
txtemail.Text = dtb.Rows[0]["Email"].ToString();
txtContact.Text = dtb.Rows[0]["Contactno"].ToString();
txtHomeadd.Text = dtb.Rows[0]["Address"].ToString();
CGPU MS 2
8
ddlState.SelectedValue = dtb.Rows[0]
["State"].ToString();
txtPin.Text = dtb.Rows[0]["pincode"].ToString();
}
}

}
protected void btnSubmit_Click(object sender, EventArgs e)
{
String cname = txtName.Text;
String Colname = txtColname.Text;
String ph = txtColph.Text;
String Colemail = txtColemail.Text;
String degree = ddlDegree.SelectedValue;
String branch = ddlBranch.SelectedValue;
String mark = txtmark.Text;
String add = txtHomeadd.Text;
String email = txtemail.Text;
String contact = txtContact.Text;
String state = ddlState.SelectedValue;
String pin = txtPin.Text;

try
{
String sql1 = "update tblStudent set Name='" + cname +
"', Address='" + add + "',CollegeName='" + Colname +
"',CollegePhone='" + ph + "', CollegeEmail='" + Colemail
+
"',Degree='" + degree + "',Branch='" + branch +
"',Mark='" + mark +
"',Email='" + email + "',Contactno='" + contact +
"',State='" + state + "',pincode='" + pin + "' where
Username='" + x + "'";
bool Insert1 = BussinessLayer.PutData(sql1);
if (Insert1)
{
lblmsg.Text = "Details successfully updated";
}
}
catch (Exception ex)
{
Response.Write(ex.ToString());
}
}
}

Companycreateexam
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
CGPU MS 2
9
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 Default4 : System.Web.UI.Page


{

protected void Page_Load(object sender, EventArgs e)


{
if (Session.Count == 0)
{
Response.Redirect("home.aspx");
}
if (!IsPostBack)
{
String uname = Session["uname"].ToString();
SqlDataReader dr = BussinessLayer.getReaderData("SELECT Name
FROM tblCompany WHERE Username='" + uname + "'");

if (dr.Read())
{
txtCname.Text = dr.GetString(0);
}
dr.Close();
}
}
protected void btndot_Click(object sender, EventArgs e)
{
Calendar1.Visible = true;
}
protected void Calendar1_SelectionChanged(object sender, EventArgs
e)
{
txtdate.Text = Calendar1.SelectedDate.ToShortDateString();

Calendar1.Visible = false;
}
protected void btnCreate_Click(object sender, EventArgs e)
{
if (txtdate.Text == "")
{
Response.Write("<scriptalert('Select a date');</script>");
return;
}
String cname,edate,sub,cid;
cname=txtCname.Text;
edate=txtdate.Text;
sub=DDL.Text;
cid=Session["uname"].ToString();

String tmp_cname = cname.Substring(0, 3).ToUpper();


String tmp_date = Calendar1.SelectedDate.Day + "/" +
Calendar1.SelectedDate.Month + "/" + Calendar1.SelectedDate.Year;
string tmp_sub;
CGPU MS 3
0
if (sub.Length > 3)
tmp_sub = sub.Substring(0, 4);
else
tmp_sub = sub;
String examid = tmp_cname + tmp_date + tmp_sub;

String sql="insert into ExamDetails values('" + cname + "','" +


cid + "','" + examid + "','" + edate + "','" + sub + "')";
Boolean b= BussinessLayer.PutData(sql);
if (b == true)
Response.Redirect("addquestions.aspx?cid=" + cid + "&sub=" +
sub + "&eid=" + examid );
else
lblmsg.Text = "Exam creation failed";
}
}

Comreg
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;

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


{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void btnSubmit_Click(object sender, EventArgs e)
{
if (txtcomadd.Text == "" || txtcomcontact.Text == "" ||
txtcomemail.Text == "" || txtcomname.Text == "" || txtcompassword.Text
== "" || txtcompost.Text == "" || txtcomusername.Text == "")
{
Response.Write("<script>alert('Missing Fields! Please fillup
all the fields')</script>");

}
else
{
String Status = "c";
String sql1 = "insert into tblLogin
(Username,Password,Status) values('" +
txtcomusername.Text + "','" + txtcompassword.Text +
"','" + Status + "')";
CGPU MS 3
1
String sql2 = "insert into tblCompany
(Name,Address,Post,Criteria,Username,Phone,Email) values('" +
txtcomname.Text + "','" + txtcomadd.Text + "','" + txtcompost.Text +
"','" + txtcomcriteria.Text + "','" + txtcomusername.Text + "','" +
txtcomcontact.Text + "','" + txtcomemail.Text + "')";
bool Insert1 = BussinessLayer.PutData(sql1);
bool Insert2 = BussinessLayer.PutData(sql2);

if (Insert1 && Insert2)


{
lblmsg.Visible = true;
lblmsg.Text = "User details submitted successfully.You
will be activated soon";
}
else
{
lblmsg.Visible = true;
lblmsg.Text = "Error on inserting record";
}
}
}
protected void btnClear_Click(object sender, EventArgs e)
{
lblmsg.Text = "";
txtcomname.Text = "";
txtcomadd.Text = "";
txtcompost.Text = "";
txtcomcriteria.Text = "";
txtcomusername.Text = "";
txtcompassword.Text = "";
txtcomemail.Text = "";
txtcomcontact.Text = "";
lblAvail.Text = "";
}
protected void btnCheckAvail_Click(object sender, EventArgs e)
{
DataTable dtb = BussinessLayer.GetData("select * from tblLogin
where username='"+ txtcomusername.Text +"'");
if (dtb.Rows.Count == 0)
{
Session["user"] = txtcomusername.Text;
lblAvail.Text = "Proceed with this Username";
}
else
{
Session["user"] = "null";
lblAvail.Text = "Try another";

}
}
}

Exam1
using System;
CGPU MS 3
2
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 exam1 : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
String sql="Select DISTINCT CompanyName, CompanyCode From
ExamDetails";
//SqlDataReader dr = BussinessLayer.getReaderData(sql);

//while (dr.Read())
//{
// ddlCompany.Items.Add(dr.GetString(0));
//}
//dr.Close();

ddlCompany.DataSource = BussinessLayer.GetData(sql);
ddlCompany.DataTextField = "CompanyName";
ddlCompany.DataValueField = "CompanyCode";
ddlCompany.DataBind();
ddlCompany.Items.Insert(0,new ListItem("<Select Company>",
"0"));

//ddlSubject.Items.Add("<Select Subject>");
//ddlExamID.Items.Add("<Select ExamId>");
}
}
protected void ddlCompany_SelectedIndexChanged(object sender,
EventArgs e)
{
String sql = "Select DISTINCT Subject From ExamDetails WHERE
CompanyCode='" + ddlCompany.SelectedValue + "'";

ddlSubject.DataSource = BussinessLayer.GetData(sql);
ddlSubject.DataTextField = "Subject";
ddlSubject.DataValueField = "Subject";
ddlSubject.DataBind();
ddlSubject.Items.Insert(0, new ListItem("<Select Subject>",
"0"));
}
protected void ddlSubject_SelectedIndexChanged(object sender,
EventArgs e)
{
String sql = "Select DISTINCT ExamCode From ExamDetails WHERE
CompanyCode='" + ddlCompany.SelectedValue + "' AND Subject='" +
ddlSubject.SelectedValue + "'";
CGPU MS 3
3
ddlExamID.DataSource = BussinessLayer.GetData(sql);
ddlExamID.DataTextField = "ExamCode";
ddlExamID.DataValueField = "ExamCode";
ddlExamID.DataBind();
ddlExamID.Items.Insert(0, new ListItem("<Select ExamId>", "0"));
}
protected void Button1_Click(object sender, EventArgs e)
{
Session.Add("Company", ddlCompany.SelectedValue);
Session.Add("Subject", ddlSubject.SelectedValue);
Session.Add("ExamId", ddlExamID.SelectedValue);

Response.Redirect("~/perform_test.aspx");
}
}

Perform_test
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;

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


{
public int[] getRandomNumbers(int required, int max)
{
int[] tmp = new int[required];
Random x = new Random();
bool b;
for (int i = 0; i < tmp.Length; )
{
b = true;
int p = (int)(x.NextDouble() * max);
//Response.Write(p + "<br>");
//i++;
if (i == 0)
{
tmp[i] = p;
i++;
}
else
{
for (int j = 0; j < i; j++)
{
if (tmp[j] == p || p == 0)
CGPU MS 3
4
{
b = false;
break;
}
}//for closed
if (b == true)
{
tmp[i] = p;
i++;
}
}//else closed

}//outer for closed


return tmp;
}

public int CurrentPage


{
get
{
object o = this.ViewState["_CurrentPage"];
if (o == null)
return 0;
else
return (int)o;
}

set
{
this.ViewState["_CurrentPage"] = value;
}
}

protected void Page_Load(object sender, EventArgs e)


{

//Response.Write(Session["Company"]);
if (!Page.IsPostBack)
{
Session.Add("CorrectAnswers", 0);
Session.Add("Questions", getRandomNumbers(3, 5));
Session.Add("Answer", "");

}
if (repeat_exam_data.Controls.Count > 0)
{
for (int i = 1; i <= 4; i++)
{
RadioButton rad =
repeat_exam_data.Controls[0].FindControl("Choice" + i.ToString()) as
RadioButton;
if (rad.Checked)
{
Session["Answer"] = rad.Text;
break;
}
CGPU MS 3
5
}
}

GetPage();
}

protected void GetPage()


{
DataTable exam_data = new DataTable();

exam_data =
BussinessLayer.GetExamData(Session["Company"].ToString(),
Session["Subject"].ToString(), Session["ExamId"].ToString());
PagedDataSource pgds = new PagedDataSource();
pgds.DataSource = exam_data.DefaultView;
pgds.AllowPaging = true;
pgds.PageSize = 1;

pgds.CurrentPageIndex = CurrentPage;

repeat_exam_data.DataSource = pgds;
repeat_exam_data.DataBind();

Cmd_Next.Enabled = !pgds.IsLastPage;
Cmd_Finish.Enabled = pgds.IsLastPage;
lblQno.Text = Convert.ToString((CurrentPage + 1));
lblCorrectAnswers.Text = Session["CorrectAnswers"].ToString();
}
protected void Cmd_Next_Click(object sender, EventArgs e)
{

CalculateMark();

CurrentPage += 1;
GetPage();
}
protected void Cmd_Finish_Click(object sender, EventArgs e)
{
CalculateMark();

string strSql = "INSERT INTO tbl_result(ExamId,StudentId,Mark)


VALUES('" + Session["ExamId"] + "','" + Session["uname"] + "','" +
Session["CorrectAnswers"] + "')";
BussinessLayer.PutData(strSql);
Response.Redirect("~/canexamresult.aspx");
}

private void CalculateMark()


{
HiddenField ans =
repeat_exam_data.Controls[0].FindControl("Answer") as HiddenField;
if (Session["Answer"].ToString() == ans.Value)
Session["CorrectAnswers"] = (int)Session["CorrectAnswers"] +
1;

}
}
CGPU MS 3
6

Regform
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 Default4 : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{

if (!IsPostBack)
{
for (int i = 1950; i <= 2000; i++)
{
ddlYear.Items.Add(i.ToString());
}
}
}

protected void ddlMonth_SelectedIndexChanged(object sender, EventArgs e)


{

if (ddlMonth.SelectedIndex == 1)
{
ddlDate.Items.Clear();
for (int i = 1; i < 29; i++)
{
ddlDate.Items.Add(i.ToString());
}
/* if (int.Parse(ddlYear.SelectedItem.ToString()) % 4 ==
0)
{
ddlDate.Items.Add("29");
}*/
}
else if (ddlMonth.SelectedIndex == 4 ||
ddlMonth.SelectedIndex == 6 || ddlMonth.SelectedIndex == 9 ||
ddlMonth.SelectedIndex == 11)
{
ddlDate.Items.Clear();
for (int i = 1; i < 31; i++)
{
ddlDate.Items.Add(i.ToString());
CGPU MS 3
7
}
}
else
{
ddlDate.Items.Clear();
for (int i = 1; i < 32; i++)
{
ddlDate.Items.Add(i.ToString());
}

protected void btnSubmit_Click(object sender, EventArgs e)


{

string sex;
string dt;
if (rdbMale.Checked == true)
sex = "Male";
else
sex = "Female";
dt=ddlDate.Text + "/" + ddlMonth.Text + "/" + ddlYear.Text ;

String Status="s";
if (txtColemail.Text == "" || txtColname.Text == "" ||
txtColph.Text == "" || txtContact.Text == "" || txtDegreemark.Text == ""
|| txtemail.Text == "" || txtHomeadd.Text == "" || txtMarkX.Text == ""
|| txtMarkXII.Text == "" || txtName.Text == "" || txtPassword.Text == ""
|| txtPin.Text == "" || txtUsername.Text == "")
{
lblmsg.Visible = true;
lblmsg.Text = "Missing Fields";
}
else
{

bool Insert1 = BussinessLayer.PutData("insert into tblLogin


(Username,Password,Status) values('" +
txtUsername.Text + "','" + txtPassword.Text + "','" +
Status + "')");

bool Insert2 = BussinessLayer.PutData("insert into


tblStudent(Name,Gender,DOB,CollegeName,CollegePhone" +
",CollegeEmail,Degree,Branch,Mark,Username,Email,Contact
no,Address,State,Pincode)values('" +
txtName.Text + "','" + sex + "','" + dt + "','" +
txtColname.Text + "','" + txtColph.Text +
"','" + txtColemail.Text + "','" + ddlDegree.Text +
"','" + ddlBranch.Text + "','" +
txtDegreemark.Text + "','" + txtUsername.Text + "','" +
txtemail.Text + "','" +
txtContact.Text + "','" + txtHomeadd.Text + "','" +
ddlState.Text + "','" + txtPin.Text + "')");
CGPU MS 3
8
//bool Insert3 = BussinessLayer.PutData("insert into
tblExperience(Username,ExpYears,Designation,Company,Salary,CompanyAddres
s)values('" + txtUsername.Text + "','" + txtExpYears.Text + "','" +
txtdesignation.Text + "','" + txtCompany.Text + "','" + txtSalary.Text +
"','" + txtCompanyAdd.Text + "')");

if (Insert1 && Insert2)


{
lblmsg.Visible = true;
lblmsg.Text = "User details submitted successfully.You
will be activated soon";
}
else
{
lblmsg.Visible = true;
lblmsg.Text = "Registration failed!! Try again";
}
}

protected void btnclear_Click(object sender, EventArgs e)


{
lblmsg.Text="";
txtName.Text = "";
txtColname.Text = "";
txtColph.Text = "";
txtColemail.Text = "";
txtContact.Text = "";
txtDegreemark.Text = "";
txtemail.Text = "";
txtHomeadd.Text = "";
txtMarkX.Text = "";
txtMarkXII.Text = "";
txtPin.Text = "";
txtUsername.Text = "";
lblAvail.Text = "";

protected void btnchkavail_Click(object sender, EventArgs e)


{
DataTable dtb = BussinessLayer.GetData("select * from tblLogin
where username='" + txtUsername.Text + "'");
if (dtb.Rows.Count == 0)
{
Session["user"] = txtUsername.Text;
lblAvail.Text = "Proceed with this Username";
}
else
{
Session["user"] = "null";
lblAvail.Text = "Try another";

}
}
CGPU MS 3
9
/* protected void ddlcategory_SelectedIndexChanged(object sender,
EventArgs e)
{
if (ddlcategory.Text == "Fresher")
{
txtExpYears.Enabled = false;
txtCompanyAdd.Enabled = false;
txtCompany.Enabled = false;
txtdesignation.Enabled = false;
txtSalary.Enabled = false;
}
else
{
txtExpYears.Enabled = true;
txtCompanyAdd.Enabled = true;
txtCompany.Enabled = true;
txtdesignation.Enabled = true;
txtSalary.Enabled = true;

}
}*/

}
CGPU MS 4
0

ER Diagram

Company
Code
Company
Name Exam
Subject
Code

Exam
Date ExamDetails

Exam
Company ID
ID
Qst No Subject

Question
Choice
Question
1
Choice
2 Answer

Choice 3
Choice 4
CGPU MS 4
1

User
Address name

Post

Company
DO
College
Criteria B
Name Gend
Addre
er
Email
ss Mark
Name Phone
Userna
College
Student me
Phone
College
Email Email
Usernam
Degree Contact
e Status
Passwor no
Branch
d State
Pin
Login
code

Exam Student
ID ID

Result
CGPU MS 4
2

SCREENSHOTS

Screen: 1
CGPU MS 4
3

Screen: 2
CGPU MS 4
4

Screen3
CGPU MS 4
5

Screen4
CGPU MS 4
6

CONCLUSION AND FUTURE ENHANCEMENT

Now a day’s manual process of searching a job of the appropriate choice

and searching the appropriate candidate for a specific job has become a huge task. And so

for realizing the need of easy management of this process the site has been developed. It’s

very easy to update and maintain information through this site. The main features of this

site includes flexibility, easy to manipulate information’s easy access searching, storage,

reduce manual work in an efficient manner , a quick, convenient, reliable, timely and

effective way to reach recruiting, search and employment professionals worldwide and

most economical. The project could very well be enhanced further as per the

requirements.

Online recruiting and online recruitment systems, with its emphasis on a

more strategic decision making process is fast gaining ground as a popular outsourced

function. Most Online Recruiting sites deliver easy-to-use search capabilities, customer

service and convenience. The immense power of web enabling crucial recruitment

processes to covert them into online recruitment systems is a key factor in easing out the

recruitment processes. Recruiting and staffing software makes data collection easier and

tasks get completed quicker. The return on investment is immediate, simply because of

the reduced time and increased ease of recruitment processes. E-Recruiting technology is
CGPU MS 4
7
skill-based with automated pre-screening features which is the next step in the evolution

of online recruiting.

Corporate expenditures for these Online-recruiting services are anticipated to

increase dramatically in the next few years as corporate end users upgrade their hiring

methodologies, strategies and technologies for finding talent.

The three macro economics trends that are seen as fuelling the growth of this

industry are:

• Shorter employment tenures

• Shrinking labour pools

• Need for technology workers

In wake of the new and related trends, it is imperative for frequent upgrades to a

company’s software or web applications to make it easier for clients and employees to

address new business needs.


CGPU MS 4
8

BIBLIOGRAPHY

Book Referred:

 Windows programming Charles Petzoid

 ASP.NET Unleashed Stephen Walther(Second

edition)

 Visual Basic.NET Black Book Steven Holzer

 Professional ASP.NET Web services Alex Homer, Dave Sussman

 SQL Server Essential Reference Sharon Dooley

 MY SQL Server 7for Dummies Anthony T Mann

Site Referred:

www.google.com

www.w3schools.com
CGPU MS 4
9
www.yahoo.com

Potrebbero piacerti anche