+ All Categories
Home > Documents > Job Portal Project Report by Alim

Job Portal Project Report by Alim

Date post: 26-Oct-2014
Category:
Upload: abdul-ghulam-mustafa
View: 963 times
Download: 7 times
Share this document with a friend
Popular Tags:
113
A Project Report Submitted to T. D. B. COLLEGE, RANIGANJ By MD ALIM ANSARI REG. NO: 689449 Under the Guidance of ……………………………………… In partial fulfilment for the award of the degree of DOEACC ‘A’ LEVEL JOB PORTAL8/7/2012
Transcript
Page 1: Job Portal Project Report by Alim

A Project Report

Submitted to

T. D. B. COLLEGE, RANIGANJ

By

MD ALIM ANSARI

REG. NO: 689449

Under the Guidance of

………………………………………

In partial fulfilment for the award of the degree

of

DOEACC ‘A’ LEVEL

“JOB PORTAL”

8/7/2012

1

Page 2: Job Portal Project Report by Alim

1

DECLARATION

I hereby declare that the project entitled “JOB PORTAL” submitted in partial

fulfillment of the requirements for the degree of DOEACC SOCIETY ‘A’ LEVEL, is

my original work and not submitted for the award of any other degree, diploma,

fellowship or any other similar title or prizes.

Place : KULTI

Date : 08-07-2012 MD ALIM ANSARI

Page 3: Job Portal Project Report by Alim

2

CERTIFICATE BY GUIDE

This to certify that the report of the project submitted is the outcome of the project

work entitled “JOB PORTAL” carried out by MD ALIM ANSARI bearing Registration

No.: 689449 carried by under my guidance and supervision for the award of Degree

in DOEACC SOCIETY ‘A’ LEVEL.

To the best of the my knowledge the report

Embodies the work of the candidate him/herself,

Has duly been completed,

Fulfils the requirement of the ordinance relating to the MBA degree of the

University and

Is up to the desired standard for the purpose of which is submitted.

(Signature of the Guide)

Name:

Designation:

Department:

Name & Address of the Institute

The project work as mentioned above is hereby being recommended and forwarded

for examination and evaluation.

Page 4: Job Portal Project Report by Alim

3

ACKNOWLEDGEMENT

This project has been made possible through the direct and indirect cooperation of

various respected persons.

First and foremost I would like to acknowledge with deep gratitude the guidance

and support of Mr.…………………………………………

My sincere thanks to all the faculty members of my institute for providing us their

valuable support and cooperation which were necessary to carry out my project

work.

Finally, I would like to express my deepest gratitude and reverence to my parents

and friends for their continuous supports.

Page 5: Job Portal Project Report by Alim

4

Table of Contents

1. Introduction……………………………………………………….6

2. Objective Of The Project………………………………………..7

3. Scope Of The Project…………………………………………....8

4. System Analysis………………………………………………….9

4.1 Identification of Need……………………………………..9

4.2 Preliminary Investigations…………………………..…...9

5. System Design…………………………………………………...10

6. Feasibility Study………………………………………………....11

6.1 Technical Feasibility………………….……………….….11

6.2 Operational Feasibility………………………….………..11

6.3 Economic Feasibility………………………………….….12

7. Project Planning And Scheduling……………………….…..13

7.1 Work Breakdown Structure……………………………..13

7.2 Pert Chart…………………………………………………..14-15

8. S/E Paradigm………………………………………………...….16

9. E-R Diagram…………………………………………………….17

9.1 ERD of JobSeeker………………………………………..17

9.2 ERD of Employer…………………………………………18

10. Context Level Or “0”-Level DFD…………………………..19

11. Relationship…………………………………………………….21

Page 6: Job Portal Project Report by Alim

5

12. Schema………………………………………………………….22

12.1 Members…………………………………………………..22

12.2 JobsDb_Companies……………………………………..23

12.3 JobsDb_JobPostings……………………………………24

12.4 JobsDb_Resumes………………………………………..25

12.5 JobsDb_MyJobs……………………………………….....25

13. Requirement Specifications…………………………………26-27

14. Tools for Hardware and Software………………………..….28

15. Validation Checks………………………………………….….29

16. Testing…………………………………………………………...30

16.1 Testing Objectives………………………………….….31

16.2 Testing Principle……………………………………..…31

16.3 Testability………………………………………………..32

16.4 Operatibility……………………………………………..32

16.5 Observability……………………………………………32

16.6 Controllability…………………………………………..33

16.7 Decomposability……………………………………….33

16.8 Simplicity………………………………………………..33

16.9 Stability………………………………………………….34

16.10 Understandability……………………………………..34

17. Sample Output………………………………………………..35-40

18. Project Code…………………………………………………..41-110

19. Conclusion……………………………………………………..111

20. Reference……………………………………………………….112

Page 7: Job Portal Project Report by Alim

6

1. Introduction

People often compare the growth of the internet to the historic growth of other technologies, sometimes to suggest that the internet is just the latest technological advancement and may not signify as a revolutionary change. However, there is a difference between the birth of the Internet and the technologies that preceded it. Today the virtual world has al l but taken over the real world. Our society is increasingly relying on new information technologies and the Internet to conduct business, manage industrial activi ties, engage in personal communication and even perform scienti fic research. E -business and e -commerce are the new mantras and electronic transactions dominate the overal l business paradigm. This project is mainly an effort to continuously shape the Indian Internet revolution by building the largest and the number one online profitable person-to-person trading community in the country. We will try do so in the future by offering, the best consumer experience in an environment driven by high performance, constant innovation, teamwork and opportunity for wealth creation. The main objective and inspiration for this project is to provide a online job search so that the job seeker can apply and do their job hunting from their home with ease. The site (Job Portal) is only a venue where users may meet and interact with the employer for the jobs. Job Portal on the Net is a job searching on the Internet where the company can place their requirement and the user(Student/Professional) can view the company requirement and place their resume. Job Portal on the Net will have numerous registered users who will search for the job listed and place their resume and get message from the company. The register user can also be the employer who can place their requirement of the person and can select the resume posted by the user and can also send them the message as reply .

Page 8: Job Portal Project Report by Alim

7

2. Objective Of The Project

Job Portal shows i ts members jobs from every employer website. It

can find in the India and United States and throughout the world. It is

going to be most powerful job -search engine in existence and powers

several job boards.

Recruiters use Job Portal to track down potential jobs for their clients .

Why Use Job Portal?

Most job openings are posted on employer websites and not

commercial job boards. Job Portal lists unadvertised job listings from

employer websites which receive hardly any appl ications because

people do not know about them. Job Portal does not al low any

advertisers and is unfettered by any third party other than employers

themselves. We only l ist jobs direct from employer websites.

As a recruiter, we can get an edge over other competi tors by creating

Job Portal and dramatical ly increase our recruiting income.

Job Portal is the direct route to career success. Become a member

of the world's largest job -search engine now!

Page 9: Job Portal Project Report by Alim

8

3. Scope Of The Project

This software is very useful for mainly for Job Seekers. They can search and collect information about job. List of all existing jobs is also available for candidate. Total information of any employer will be available for candidate. The users can apply all the job which is posted. Even the candidate create his resume. The completed resume will appear on candidate’s account information page and be available for sending to an employer when he feels a job opportunity matches his interests. Direct messaging on JobBase site allows a candidate to communicate with prospective employer. This software is also very useful for employer. They can search and collect suitable candidate for his company from applying job. He can post his company profile publicly. He can add some candidate to his favorite list by this utility and contact them when he needs. Direct messaging on JobBase site allows a employer to communicate with prospective candidate. Even he can view the Job product offered by JobBase and he can view his data and his purchasing history.

Page 10: Job Portal Project Report by Alim

9

4. System Analysis

Today more and more people around the world experience the draw of the web.

4.1 Identification of Need

At the outset of any task, it is of importance to determine it’s objective or the aim behind performing the task. Once the aim or the need is identified half the battle is won. Then, there only remains the task to determine the right approach to achieve the task in the best possible manner. During the development of this project we followed the same mantra. Before beginning to develop the project we did a detailed analysis to have a clear picture of the aim of this project, how this project would benefit others etc. With this as

base we started our preliminary investigations…

4.2 Preliminary Investigations

Preliminary investigation involves collecting information that helps to evaluate the merits of a project and make an informed judgment about the feasibility of the proposed project. When this project was being conceptualized one of the prime consideration was the capability that technology has to offer to the present day solution designers. What was beyond the realms of possibility even a decade back is today very much within the reach of the solution designers. One of the first things that the designer needs to consider pertains to the target user group and their profile. Some of the questions that need to be considered at this stage are Who will be the possible client for my solution? What will be the target profile of my client? What kind of strategic age group am I looking at? What is my client’s expectation vis-à-vis this kind of service? Some of the other areas, which are looked into, could be The kind of site (whether commercial, educational, entertainment etc.) Cost of failure Sophistication levels User interaction level While planning Job Portal on the Net a lot of consideration was given to all these

issues. .

Page 11: Job Portal Project Report by Alim

10

5. System Design

Every stakeholder in a system must be well identified and the relationships between them

precisely defined.

To design a well behaved and satisfactory system it is of utmost importance that

the user’s requirements be minutely scrutinized. This may even necessitate an iterative effort of questions, clarifications and modeling of the suggested solution space time and again. In the design and conceptualization stages of the Job Portal on the Net system an extensive reliance was made on Data Flow Diagrams which were then exploded into more and more microscopic level designs. Once the design looked reasonably on the mark it was a matter of refining it further to get the optimum results. In the process the Entities also stood out and the relationships between them became easier to define. The design step of Job Portal produces a data design , architectural design , an interface design , and a procedural design. The data design transforms the information domain model created during analysis into the data structures that will be required to implement the software. The architectural design defines the relationship among major structural elements of the program. The interface design describes how the software communicates within itself, to systems that interoperate with it, and with humans who use it. An interface implies a flow of information. The procedural design transforms structural elements of the program architectures into procedural description of software components. During design we make decisions that will ultimately affect the success of the software construction, and the ease with which the software is maintained. Design is the only way that we can accurately translate a customer’s requirements into finished software product or system.

Page 12: Job Portal Project Report by Alim

11

6. Feasibility Study

A feasibility study is made to see whether a project can be successfully developed and deployed within the given time frame and the available resources. It looks for possible areas of risk and whether the risks are acceptable, whether the final outcome of the project would justify the cost involved and makes a study of the function, performance and constraints involved that may affect the ability to

achieve an acceptable system.

6.1 Technical Feasibility

This project has been taken up as a Web Based project, which will entail the design and development of an Job site to be hosted on a server available on the Internet. Thus, the technologies and languages involved in developing this project are .NET Sqlserver has been used as the RDBMS, which stores all the required data and ensures support for multiple transactions and concurrent usage, which is a prime requirement for this project.

6.2 Operational Feasibility

This test of feasibility analyses whether a project will work once it is developed and deployed. The main question this test tries to answer is whether there is enough support from the management and users to develop the project and whether the service provided after the deployment of the project will be good enough to draw users. This project aims to provide a digital job search for candidate/job seeker where they can check out the listed job and choices at an extremely competitive environment and do their Job search, all from the comfort of their home at the best possible ease. The project is seen to have all the necessary elements to draw users and provide them with the kind of services, which will be of interest to the users. The project as such meets all the required criteria to declare the project operationally feasible.

Page 13: Job Portal Project Report by Alim

12

6.3 Economic Feasibility

Every project is developed keeping in mind that execution of the project should provide a financial gain of at least equal or above the amount invested in the complete execution of the project. The major advantage of Job Site lies in the fact that the initial investment required is radically less than implementing the same in the “Physical” environment. This project, which is essentially a web based project using Internet as it’s primary medium for any interaction, does not involve any huge investment scopes. However, keeping in mind the services being offered through this project and the business model adopted, the project has excellent return on investment scope for it’s implementer. Thus, if given that the project is technically and operationally feasible the economic feasibility of the project is easily supported.

Page 14: Job Portal Project Report by Alim

13

7. Project Planning and Scheduling

Schedul ing is an important activi ty of any project management.

Schedul ing a software project involves fi rst breaking down an entire

problem into a logical set of tasks which would be assigned to

developers.

In order to Schedule the project Job Portal we have to do the

fol lowing:

1. Identi fy the tasks needed to complete the project.

2. Determine the dependency among different tasks.

3. Establ ish the most l ikely estimates for the duration of the

identi fied tasks.

4. Plan the starting and ending dates for various tasks.

5. Determine the cri tical path i .e. t he chain of tasks that determine

the duration of the project.

7.1 Work Breakdown Structure

Work Breakdown Structure (WBS) provides a notation for

representing the major tasks needed to be carried out in order to

solve a problem. We represent the major ac tivi ties needed to solve

the problem as nodes of a tree. The root of the tree is labeled by the

problem name. Each node of the tree is broken down into smaller

components that are designated as the chi ldren of the node."

Page 15: Job Portal Project Report by Alim

14

7.2 PERT CHART

(Program evaluation review technique) :

A PERT charts consists of a network of boxes and arrows. It is

organized by events & activi ties or tasks. The boxes represent

activi ties and the arrows represent task dependencies.

The boxes of PERT charts are usual ly annotated with the pessimistic,

likely, and optimistic estimates for every task. It is a schedul ing

device that showed us graphical ly which tasks must be completed

before others were begun. PERT control led time and costs during the

project and also faci l i tated us in find ing the right balance between

completing our project on time and completing i t within the budget.

PERT recognized that project was complex, that some tasks must be

completed before others could be started, and that the appropriate

way to manage the project was to define and control each task.

Because projects often fal l behind schedule, PERT was designed to

faci li tate getting our project back on schedule. To bui ld a PERT chart

for our project, we first l isted al l the activi ties required for the

completion of the project and estimated how long each wil l take.

Then we determined the dependence of the activi ties on each other.

The PERT chart gave us a graphical representation of this

information, This technique did not help in deciding which activi ties

were necessary or how long each would take, but i t did force the

administrator to take the necessary planning steps for answer these

questions.

Page 16: Job Portal Project Report by Alim

15

Figure below shows a PERT chart of our project. The arrows show

the new information that was not avai lable in the work breakdown

structure. The chart shows clearly that the project consist of the

activi ties of analysis" design, coding and testing phases. The figure

shows that the project was started on 1st Jan,2009 . System

analysis work wi ll be started on 15th Jan, 2009 fol lowed by system

designing work started on 15th Feb,2009. Since the design activi ty

was estimated to take 31 days, any activi ty that fol lowed the design

started on 15th March, 2009 at the earl iest. The dependency arrows

helped us compute these earl iest start dates based on our estimates

of the duration of each activi ty. This dates are shown in the figure.

The chart shows that the path through the project that consist of the

analysis, design, coding and integration and testing activi ties is the

cri tical path for the project. Any delay in any activi ty in this path

would have caused a delay in the entire project. The administrator

monitored the cri tical path regularly in order to complete the project

within the time frame.

Start

Analysis Design Coding Integration &

testing

Maintenance /

finish

Page 17: Job Portal Project Report by Alim

16

8. S/E Paradigm

Software is engineered by applying three distinct phases focusing on definition, development and support

To solve actual problems in an industry setting a software or a team engineers

must incorporate a development strategy that encompasses the process methods and tool layers and the generic phases. This strategy is often called Software Engineering paradigm. A process model for software engineering is chosen based on nature of the project and application, the methods and tools to be used and controls and deliverables that are required. Software engineering is a layered technology. Any engineering approach must rest on an organizational commitment to quality. Total quality management and similar philosophies faster a continuous process improvement culture, and this culture ultimately leads to the development of increasingly more nature approaches of the software. The foundation of software engineering is a process layer. Software engineering process is the glue that holds technology layers together and enables rational and timely development of computer software. Process defines a framework for a set of key process areas that must be established for effective delivery of software engineering technology. The key process areas forms the basis of management control of software projects and establish the context in which technical methods are applied, work Jobs are produced, milestones are established, quality is ensured and change is properly managed. Software engineering methods provides a technical how-to’s for building software. Methods encompass a broad array of tasks that include requirement Analysis, design, program construction, testing and support. Software engineering rely on basic principles that govern each area of technology and include modeling activities and other descriptive techniques. Software engineering tools provide automated and semi-automated support for the process and methods when tools are integrated so that the information created by one tool can be used by the another, a system for the support of software development called computer aided software engineering is established.

Page 18: Job Portal Project Report by Alim

17

9. E-R Diagram

Job seeker hav

e

Job

pos

t

Resume

hav

e

ResumeJob Send Employer

mesage

Send Job Seeker

mesage

1 M

M

M

1 M

M

1

9.1 ERD of Job Seeker

Page 19: Job Portal Project Report by Alim

18

Employer hav

e

Member

pos

t

Job_details

hav

e

Job Seeker Post Resume

1 1

M

M

1 M

Maintain

Company

Profile

1

M

1

Send/r

eceive

Job seeker message

9.2 ERD of Employer

Page 20: Job Portal Project Report by Alim

19

10. CONTEXT LEVEL OR “0”- LEVEL DFD -

Online

HotJob

JOB SEEKER

EMPLOYER

MEMBER

Page 21: Job Portal Project Report by Alim

20

Verify authenticate user login request for creating new a/c post vacancy

Authenticate user

favourite request for job info return job seeker biodata message for update

see job request to see

info request job seeker message or

to see favourite job send message

job seeker resume post add resume

update job

update all

job info of employer

1

Login

verificatio

2

Create new

member

3

Post job

EMPLOYER

4

View job

5

View

jobseeker

7

Add to

favourite

6

Receive /send

message

Get report

Job employer

favourite Resume

Send message

to job seeker

Job seeker

message

Receive message

from job seeker

Emp message

Page 22: Job Portal Project Report by Alim

21

11. Relationship

Page 23: Job Portal Project Report by Alim

22

12. Schema

12.1 Members

Page 24: Job Portal Project Report by Alim

23

12.2 JobsDb_Companies

Page 25: Job Portal Project Report by Alim

24

12.3 JobsDb_JobPostings

Page 26: Job Portal Project Report by Alim

25

12.4 JobsDb_Resumes

12.5 JobsDb_MyJobs

Page 27: Job Portal Project Report by Alim

26

13. Requirement Specifications

The software requirement specifications is produced at the

culmination of the analysis task. The function and performance

al located to software as part of system engineering are refined

by establ ishing a complete description, a detai led functional

description, a representation of system behavior, an indication of

performance requirements and design constraints, appropriate

val idation cri teria and other information requirements.

The Introduction of software requirements specification states

the goals and objectives of the software, describe i t in context

of the computer based system. Actual ly the information may be

nothing more than the software scope planning document. Here

in this project the introduction is described as fol lows : -

The information description provides a detai led description of

the problem that the software must solve.

Information content, flow, and structure are documented.

Hardware and software and human interfaces are described for

external system elements and internal software functions.

A description of each function required to solve the problem is

present in functional description. A processing narrative is

provided for each function, design constraint are stated and

justi fied performance characteristic are stated and one or more

diagrams are included to graphical ly represent the overal l

structure of the software and interplay among other software

inactions and other system elements .

Page 28: Job Portal Project Report by Alim

27

The software Behavioral description sections of the

Specification examines the operations of the software as a

consequence of external events and internal ly generated control

characteristics.

Validation cri teria is probably the most important and, ironical ly

the most neglected selection of software requirement

specification. Specification of Val idation cri teria acts as impl ici t

review of al l requirements.

Final ly, the specification includes a Bibl iography and

Appendix. The Bibl iography contains reference to al l documents

that relate to the software. These include other software

engineering documentation, technical references , vendor l i terature

and standards. The Appendix contains information that

supplements the specification. Tabular data, detai led description

of algori thms, charts, graphs and other material are represented

as appendix.

In many cases the software requirement specification may

be accompanied by an executable prototype, a paper prototype

or a prel iminary user ’s manual. The prel iminary user ’s manual

presents the software manual as black box. That is heavy

emphasis is placed on user input and the resultant output. The

manual can serve as a valuable tool for uncovering problems

at the human/machine interface .

Page 29: Job Portal Project Report by Alim

28

14. Tools/Platform for Hardware And Software

Requirement Specification

HARDWARE

PROCESSOR : PENTIUM IV

RAM : 256MB DDR RAM

HARD DISK : 40GB

CD ROM DRIVE : 52X

CACHE MEMORY : 512 KB

MONITOR : 17” COLOR

SOFTWARE

OPERATING SYSTEM : WINDOWS XP/2000

RDBMS : MS-SQL SERVER 2008

SERVER : IIS SERVER

LANGUAGE : ASP.NET

Page 30: Job Portal Project Report by Alim

29

15. Validation Checks

Validation is an integral part of project development. It includes a wide range of

SQL activities that include formal technical reviews, quality and configuration audits, performance monitoring simulation, feasibility study, documentation review, database review, algorithm analysis, development testing, qualification testing and installation testing. Validation was done at various phases during the development of this project to ensure that the project was meeting all the requirements adequately and with in the quality and time specifications decided upon. Another aspect of validation check refers to putting checks on the user search input to ensure that the system receives the expected search item from the user. Implementation of the above kind of checks is done through coding, where in, incase of wrong input, the user is either shown a warning or given an error message. Validation checks is also done when user login in the site. If the username or password is invalid then he will be asked to login again. Unregistered users will not be allowed either for placing the resume for the selected job and other facilities. He will only be allowed to have a view the listed job . Validation checks put checking on the site that a Employer can put his job details into the site after registering himself. A employer with a bad reputation may not be allowed in the future for listing his jobs in the Job Portal on the Net .For that the site provides various customer care and helpdesk services offline. Any grievances regarding user or employer will be registered there. Job Portal will take necessary actions regarding breaking rules and regulations of the site.

Page 31: Job Portal Project Report by Alim

30

16. Testing

After development of the system , comes the integration and test ing

phase i .e., studying the potential Candidate employer , doing the

SRS , designing the system ,designing the database,and writing the

code for the database access and designing the user interface,now

system is to be tested.

First the database is loaded on the server. The .net sqldbcl ient

connections are set. Then the various pages are loaded the server.

The server machine has Windows 2000 O/S with sqlserver and .net

framework 3.5. The pages are then connected with the databases

through the .NET connections . Junk data are then entered through

the pages . Then the databases are tested to find out i f the data is

entered properly .The data are then accessed through the pages

.The search queries are run to find out i f they are being generated

properly .The corrections are made as and when necessary. It is also

tested i f the simultaneous access of the database by more than one

user, cause any kind of error in the database. The locking procedure

worked right.

Initially few arbitrary listing was created to test if the system was working from the front end as it was supposed to. Then the same HTML page was being running on different browsers. Some small flaws was being corrected while testing at the client side . Initially there was some flaws while connecting to the database but it was rectified gradually. In the server side there is our analyst constantly monitoring the server side working. Since the project is in its initial phase of launching it may have many hidden bugs which is not possible to uncover at this time. But in the future it will definitely provide the user better service and will have ample choice to the candidate to search job around in the Job Portal on the Net .

Page 32: Job Portal Project Report by Alim

31

16.1 Testing objectives

Testing is a process of executing a program with the intent of finding an error. A good test is one that has a high probability of finding an as-yet-undiscovered error .A successful test is one that uncovers an as-yet-undiscovered error. These objectives imply a dramatic changes in view point. They move counter to the commonly held view that a successful test is one in which no errors found. Our objectives is to design test that systematically covers different class of

errors and to do so with a minimum amount of time and effort. If testing is conducted successfully it will uncovers all the errors in the software.

16.2 Testing principles

All tests should be traceable to customers’ requirements.

Tests should be planned long before test begins.

The parreto principle applies to software testing.

Testing should begin “in small” and progress toward testing “in the

large”.

Exhaustive testing is not possible.

To be most effective testing should be conducted by an independent

third party.

16.3 Testability

Page 33: Job Portal Project Report by Alim

32

Software testability is simply how easily a computer program can be tested.

16.4 Operability

“The better it works, the more efficiently it can be tested ”.

The system has few bugs (bugs add analysis and reporting overhead

to the test process).

No bugs block the execution of tests.

16.5 Observability

“ What we see is what you test”.

Distinct output is generated for each input.

System states and variables are visible or querible during execution.

Past system states and variables are visible or querable.

All factors affecting outputs are visible.

Incorrect output is easily identified.

Internal errors are automatically detected through self-testing mechanisms.

Internal errors are automatically reported.

Source code is accessible.

Page 34: Job Portal Project Report by Alim

33

16.6 Controllability

All possible outputs can be generated through the combination of

input.

All code is executable through some combination of input.

Software and hardware states and variables can be directly controlled

by test engineer.

Input and output formats are consistent and structured.

Tests can be conveniently specified and reviewed.

16.7 Decomposability

The software system is built from independent modules.

The software modules can be tested independently.

16.8 Simplicity

“The less is there to test the more quickly we can test it”. Functional simplicity : The requirements in this project for post office management system is account number, amounts, date of deposits, date of withdrawl, which we can get from recurring table. Stuctural simplicity : This project architecture is modularized to limit the propogation of faults. Code simplicity : Coding structure is adopted for ease of inspection and maintanence.

Page 35: Job Portal Project Report by Alim

34

16.9 Stability

“The fewer the changes the fewer the disruptions to testing”.

Changes to the software are infrequent.

Changes to the software are controlled.

Changes to the software do not invalidiate existing tests.

The software recovers well from failures.

16.10 Understandability

“The more information we have the smarter we will test”.

The design is well understood.

Dependencies between internal, external and shared components are

well understood.

Changes to the design are communicated.

Technical documentations is instantly accessible.

Technical documentations are well organized.

Technical documentation is specific and detailed.

Technical documentation is accurate.

Page 36: Job Portal Project Report by Alim

35

17. Sample Output

Fig:17.1 :Welcome Page

Page 37: Job Portal Project Report by Alim

36

Fig: 17.2 :Register Page

Fig: 17.3 :Sign Up For New Account In Case Of Job Seekers

Page 38: Job Portal Project Report by Alim

37

Fig: 17.4 :Register As Job Seeker

Fig: 17.5 :Page For Post Resume

Page 39: Job Portal Project Report by Alim

38

Fig: 17.6: Page For Search Jobs

Fig: 17.7 : Page for My Favourites

Page 40: Job Portal Project Report by Alim

39

Fig:17.8 : View Job Posting

Fig: 17.9 :ADD/EDIT Job Posting

Page 41: Job Portal Project Report by Alim

40

Fig:17.10 :Modify Company Profile

Fig: 17.11 :Search Resume Database

Page 42: Job Portal Project Report by Alim

41

Fig: 17.12 :View Resume

18. Project Code

18.1 Example of jobsearch.aspx (UI Code) for Jobseekers

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

CodeFile="jobsearch.aspx.cs"

Inherits="jobsearch_aspx" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

runat="server">

<div align="center">

<asp:Label ID="Label14" runat="server" Text="Search Jobs!!!"

SkinID="FormHeading"></asp:Label>

<br />

Page 43: Job Portal Project Report by Alim

42

<asp:Label ID="lblJobCount" runat="server"

SkinID="Slogan"></asp:Label><br />

<br />

</div>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

<ContentTemplate>

<table style="width: 100%">

<tr>

<td align="right" valign="top">

<asp:Label ID="Label1" runat="server" Text="Skills :"

SkinID="FormLabel"></asp:Label>

</td>

<td align="left">

<asp:TextBox ID="txtSkills"

runat="server"></asp:TextBox>

<asp:RequiredFieldValidator

ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtSkills"

Display="Dynamic" ErrorMessage="Please enter

skills to search for"> *</asp:RequiredFieldValidator>

</td>

</tr>

<tr>

<td align="right" valign="top">

<asp:Label ID="Label3" runat="server" Text="Country

:" SkinID="FormLabel"></asp:Label>

</td>

<td align="left">

<asp:DropDownList ID="ddlCountry" runat="server"

AutoPostBack="True" OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged">

</asp:DropDownList>

</td>

</tr>

<tr>

<td align="right" valign="top">

<asp:Label ID="Label4" runat="server" Text="State :"

SkinID="FormLabel"></asp:Label>

</td>

<td align="left">

Page 44: Job Portal Project Report by Alim

43

<asp:DropDownList ID="ddlState" runat="server"

AutoPostBack="True" OnSelectedIndexChanged="ddlState_SelectedIndexChanged">

</asp:DropDownList>

</td>

</tr>

<tr>

<td align="right" valign="top">

<asp:Label ID="Label2" runat="server" Text="City :"

SkinID="FormLabel"></asp:Label>

</td>

<td align="left">

<asp:TextBox ID="txtCity" runat="server"

Enabled="False"></asp:TextBox>

</td>

</tr>

<tr>

<td align="center" colspan="2" valign="top">

<asp:ImageButton ID="ImageButton1" runat="server"

ImageUrl="~/Images/SearchButton.gif"

OnClick="ImageButton1_Click" />

&nbsp;<asp:ImageButton ID="ImageButton3"

runat="server" ImageUrl="~/Images/MyFavorite.gif"

OnClick="ImageButton3_Click" />

</td>

</tr>

<tr>

<td align="center" colspan="2" valign="top">

<asp:Label ID="lblMsg" runat="server"

SkinID="FormLabel"></asp:Label>

</td>

</tr>

<tr>

<td align="left" colspan="2" valign="top">

<asp:ValidationSummary ID="ValidationSummary1"

runat="server" />

</td>

</tr>

</table>

Page 45: Job Portal Project Report by Alim

44

</ContentTemplate>

</asp:UpdatePanel>

<asp:UpdateProgress ID="UpdateProgress1" runat="server"

AssociatedUpdatePanelID="UpdatePanel1">

<ProgressTemplate>

<center>

<asp:Image ID="Image1" runat="server"

ImageUrl="~/images/progress.gif" />

</center>

</ProgressTemplate>

</asp:UpdateProgress>

<asp:UpdatePanel ID="UpdatePanel2" runat="server"

UpdateMode="Conditional">

<ContentTemplate>

<asp:GridView ID="GridView1" runat="server" AllowPaging="True"

AutoGenerateColumns="False"

DataKeyNames="PostingID"

OnPageIndexChanging="GridView1_PageIndexChanging"

OnRowCommand="GridView1_RowCommand"

OnRowDataBound="GridView1_RowDataBound" PageSize="3"

Width="100%">

<Columns>

<asp:TemplateField HeaderText="Date">

<EditItemTemplate>

<asp:TextBox ID="TextBox1" runat="server"

Text='<%# Bind("PostingDate") %>'>

</asp:TextBox>

</EditItemTemplate>

<ItemTemplate>

<asp:Label ID="Label1" runat="server" Text='<%#

Bind("PostingDate", "{0:MM/dd/yyyy}") %>'></asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:BoundField DataField="Title" HeaderText="Title"

SortExpression="title"></asp:BoundField>

<asp:BoundField DataField="City" HeaderText="Location"

SortExpression="city"></asp:BoundField>

Page 46: Job Portal Project Report by Alim

45

<asp:BoundField DataField="companyname"

HeaderText="Company" ShowHeader="False" SortExpression="companyname">

</asp:BoundField>

<asp:ButtonField CommandName="viewdetails"

ButtonType="Image" ImageUrl="~/Images/ShowDetails.gif">

<ItemStyle Wrap="False" />

</asp:ButtonField>

</Columns>

</asp:GridView>

</ContentTemplate>

</asp:UpdatePanel>

<br />

</asp:Content>

18.2 Example of jobsearch.aspx (Code Behind) for Jobseekers

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 JobSiteStarterKit.BOL;

public partial class jobsearch_aspx : Page

{

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs

e)

{

if (e.Row.RowType == DataControlRowType.DataRow)

{

ImageButton b = (ImageButton)e.Row.Cells[4].Controls[0];

b.CommandName = "viewdetails";

Page 47: Job Portal Project Report by Alim

46

b.CommandArgument =

GridView1.DataKeys[e.Row.RowIndex].Value.ToString();

}

}

protected void GridView1_RowCommand(object sender,

GridViewCommandEventArgs e)

{

if (e.CommandName == "viewdetails")

{

Response.Redirect("~/jobseeker/viewjobposting.aspx?id=" +

e.CommandArgument);

}

}

protected void Page_Load(object sender, EventArgs e)

{

if

(!Roles.IsUserInRole(ConfigurationManager.AppSettings["jobseekerrolename"]))

{

Response.Redirect("~/customerrorpages/NotAuthorized.aspx");

}

if (!Page.IsPostBack)

{

FillCountries();

FillStates();

lblJobCount.Text = "(Currently we have " +

JobPosting.GetJobPostingCount() + " jobs!!!)";

if (Request.QueryString["mysearchid"] != null)

{

MySearch s =

MySearch.GetMySearch(int.Parse(Request.QueryString["mysearchid"]));

txtSkills.Text = s.Criteria;

txtCity.Text = s.City;

ddlCountry.SelectedIndex = s.CountryID;

FillStates();

Page 48: Job Portal Project Report by Alim

47

ListItem li =

ddlState.Items.FindByValue(s.StateID.ToString());

if (li != null)

{

ddlState.ClearSelection();

li.Selected = true;

}

}

}

}

private void FillCountries()

{

ddlCountry.DataSource = Country.GetCountries();

ddlCountry.DataTextField = "CountryName";

ddlCountry.DataValueField = "CountryID";

ddlCountry.DataBind();

}

private void FillStates()

{

ddlState.DataSource =

State.GetStates(int.Parse(ddlCountry.SelectedValue));

ddlState.DataTextField = "StateName";

ddlState.DataValueField = "StateID";

ddlState.DataBind();

}

protected void ddlCountry_SelectedIndexChanged(object sender, EventArgs

e)

{

FillStates();

txtCity.Enabled = false;

}

private void BindGrid()

{

Page 49: Job Portal Project Report by Alim

48

int countryid = -1, stateid = -1;

if (ddlCountry.SelectedItem != null)

countryid = int.Parse(ddlCountry.SelectedValue);

if (ddlState.SelectedItem != null)

stateid = int.Parse(ddlState.SelectedValue);

DataSet ds = JobPosting.SearchJobs(txtSkills.Text, countryid,

stateid, txtCity.Text);

GridView1.DataSource = ds;

GridView1.DataBind();

if (GridView1.Rows.Count <= 0)

{

lblMsg.Text = "No records found!";

}

else

{

lblMsg.Text = "";

}

UpdatePanel2.Update();

}

protected void GridView1_PageIndexChanging(object sender,

GridViewPageEventArgs e)

{

GridView1.PageIndex = e.NewPageIndex;

BindGrid();

}

protected void ddlState_SelectedIndexChanged(object sender, EventArgs e)

{

if (ddlState.SelectedIndex > 0)

{

txtCity.Enabled = true;

}

else

{

txtCity.Enabled = false;

Page 50: Job Portal Project Report by Alim

49

}

}

protected void ImageButton1_Click(object sender, ImageClickEventArgs e)

{

BindGrid();

}

protected void ImageButton3_Click(object sender, ImageClickEventArgs e)

{

MySearch s = new MySearch();

s.Criteria = txtSkills.Text;

s.CountryID = int.Parse(ddlCountry.SelectedValue);

s.StateID = int.Parse(ddlState.SelectedValue);

s.City = txtCity.Text;

s.UserName = Profile.UserName;

MySearch.Insert(s);

}

}

18.3 Example of MyFavorites.aspx (UI Code) for Jobseekers

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

AutoEventWireup="true"

CodeFile="MyFavorites.aspx.cs" Inherits="MyFavorites_aspx"

Title="Untitled Page" %>

<%@ Register Src="../UserControls/DisplayModeController.ascx"

TagName="DisplayModeController"

TagPrefix="uc3" %>

<%@ Register Src="../UserControls/MyJobs.ascx" TagName="MyJobs"

TagPrefix="uc1" %>

Page 51: Job Portal Project Report by Alim

50

<%@ Register Src="../UserControls/MySearches.ascx" TagName="MySearches"

TagPrefix="uc2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

runat="Server">

<div align="center">

<asp:Label ID="Label14" runat="server" Text="My Favorites"

SkinID="FormHeading"></asp:Label>

<br />

<br />

<asp:WebPartManager ID="WebPartManager1" runat="server">

</asp:WebPartManager>

<uc3:DisplayModeController ID="DisplayModeController1" runat="server"

/>

<br />

<asp:CatalogZone ID="CatalogZone1" runat="server" HeaderText=""

VerbButtonType="Link">

<ZoneTemplate>

<asp:PageCatalogPart ID="PageCatalogPart1" runat="server"

Title="Available Web Parts" />

</ZoneTemplate>

</asp:CatalogZone>

</div>

<br />

<table style="width: 100%" align="center">

<tr>

<td style="width: 100%">

<asp:WebPartZone ID="WebPartZone1" runat="server"

BorderStyle="NotSet" WebPartVerbRenderMode="TitleBar"

Width="100%">

<MinimizeVerb Text="Collapse"

ImageUrl="~/Images/CollapseButton.gif" />

<RestoreVerb Text="Expand"

ImageUrl="~/Images/ExpandButton.gif" />

<CloseVerb ImageUrl="~/Images/CloseButton.gif" />

<ZoneTemplate>

<uc1:MyJobs ID="MyJobs1" runat="server" Title="My

Jobs" />

</ZoneTemplate>

Page 52: Job Portal Project Report by Alim

51

</asp:WebPartZone>

</td>

</tr>

<tr>

<td style="width: 100%">

<asp:WebPartZone ID="WebPartZone2" runat="server"

BorderStyle="NotSet" WebPartVerbRenderMode="TitleBar"

Width="100%">

<MinimizeVerb Text="Collapse"

ImageUrl="~/Images/CollapseButton.gif" />

<RestoreVerb Text="Expand"

ImageUrl="~/Images/ExpandButton.gif" />

<CloseVerb ImageUrl="~/Images/CloseButton.gif" />

<ZoneTemplate>

<uc2:MySearches ID="MySearches1" runat="server"

Title="My Searches" width="100%" />

</ZoneTemplate>

</asp:WebPartZone>

</td>

</tr>

</table>

</asp:Content>

Page 53: Job Portal Project Report by Alim

52

18.4 Example of MyFavorites.aspx.cs (Code Behind) for Jobseekers

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

{

// Page events are wired up automatically to methods

// with the following names:

// Page_Load, Page_AbortTransaction, Page_CommitTransaction,

// Page_DataBinding, Page_Disposed, Page_Error, Page_Init,

// Page_Init Complete, Page_Load, Page_LoadComplete, Page_PreInit

// Page_PreLoad, Page_PreRender, Page_PreRenderComplete,

// Page_SaveStateComplete, Page_Unload

protected void Page_Load(object sender, EventArgs e)

{

if

(!Roles.IsUserInRole(ConfigurationManager.AppSettings["jobseekerrolename"]))

{

Response.Redirect("~/customerrorpages/NotAuthorized.aspx");

}

}

}

Page 54: Job Portal Project Report by Alim

53

18.5 Example of postresume.aspx (UI Code) for Jobseekers

<%@ Page Language="C#" CodeFile="postresume.aspx.cs"

Inherits="postresume_aspx" MasterPageFile="~/MasterPage.master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

runat="server">

<div align="center">

<asp:Label ID="Label14" runat="server" Text="Post Your Resume"

SkinID="FormHeading"></asp:Label>

</div>

<br />

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

<ContentTemplate>

<table width="100%" cellpadding="3">

<tr>

<td align="left" colspan="2"

class="dataentryformlabelbig">

<asp:Label ID="Label15" runat="server"

SkinID="FormGroupLabel" Text="Job Details"></asp:Label>

</td>

</tr>

<tr>

<td align="right" nowrap width="10%">

<asp:Label ID="Label1" runat="server" Text="Job Title

:"></asp:Label>

</td>

<td align="left">

<asp:TextBox ID="txtJobTitle"

runat="server"></asp:TextBox>

<asp:RequiredFieldValidator

ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtJobTitle"

Display="Dynamic" ErrorMessage="Please enter job

title"> *</asp:RequiredFieldValidator>

</td>

Page 55: Job Portal Project Report by Alim

54

</tr>

<tr>

<td align="right" nowrap width="10%">

<asp:Label ID="Label6" runat="server" Text="Desired

Job Type :"></asp:Label>

</td>

<td align="left">

<asp:DropDownList ID="ddlJobType" runat="server">

</asp:DropDownList>

</td>

</tr>

<tr>

<td align="left" colspan="2"

class="dataentryformlabelbig">

<asp:Label ID="Label16" runat="server"

SkinID="FormGroupLabel" Text="Location"></asp:Label>

</td>

</tr>

<tr>

<td align="right" nowrap width="10%">

<asp:Label ID="Label2" runat="server" Text="Target

City :"></asp:Label>

</td>

<td align="left">

<asp:TextBox ID="txtCity"

runat="server"></asp:TextBox>

</td>

</tr>

<tr>

<td align="right" nowrap width="10%">

<asp:Label ID="Label3" runat="server" Text="Target

Country :"></asp:Label>

</td>

<td align="left">

<asp:DropDownList ID="ddlCountry" runat="server"

AutoPostBack="True" OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged">

</asp:DropDownList>

</td>

Page 56: Job Portal Project Report by Alim

55

</tr>

<tr>

<td align="right" nowrap width="10%">

<asp:Label ID="Label4" runat="server" Text="Target

State :"></asp:Label>

</td>

<td align="left">

<asp:DropDownList ID="ddlState" runat="server">

</asp:DropDownList>

</td>

</tr>

<tr>

<td align="right" nowrap width="10%">

<asp:Label ID="Label5" runat="server"

Text="Acceptable Relocation :"></asp:Label>

</td>

<td align="left">

<asp:DropDownList ID="ddlRelocationCountry"

runat="server">

</asp:DropDownList>

</td>

</tr>

<tr>

<td align="left" colspan="2"

class="dataentryformlabelbig">

<asp:Label ID="Label17" runat="server"

SkinID="FormGroupLabel" Text="Education and Experience"></asp:Label>

&nbsp;&nbsp;

</td>

</tr>

<tr>

<td align="right" nowrap width="10%">

<asp:Label ID="Label7" runat="server" Text="Education

Level :"></asp:Label>

</td>

<td align="left">

<asp:DropDownList ID="ddlEduLevel" runat="server">

</asp:DropDownList>

Page 57: Job Portal Project Report by Alim

56

</td>

</tr>

<tr>

<td align="right" nowrap width="10%">

<asp:Label ID="Label8" runat="server"

Text="Experience Level :"></asp:Label>

</td>

<td align="left">

<asp:DropDownList ID="ddlExpLevel" runat="server">

</asp:DropDownList>

</td>

</tr>

<tr>

<td align="left" colspan="2"

class="dataentryformlabelbig">

<asp:Label ID="Label9" runat="server"

SkinID="FormGroupLabel" Text="Resume :"></asp:Label>

</td>

</tr>

<tr>

<td align="right" colspan="2" valign="top">

&nbsp;<asp:TextBox ID="txtResume" runat="server"

Rows="15" TextMode="MultiLine" Width="98%"></asp:TextBox>

<br />

<asp:RequiredFieldValidator

ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtResume"

Display="Dynamic" ErrorMessage="Please enter

resume"> *</asp:RequiredFieldValidator>

</td>

</tr>

<tr>

<td align="left" colspan="2" valign="top"

class="dataentryformlabelbig">

<asp:Label ID="Label10" runat="server"

SkinID="FormGroupLabel" Text="Covering Letter Template :"></asp:Label>

</td>

</tr>

<tr>

Page 58: Job Portal Project Report by Alim

57

<td align="right" colspan="2" valign="top">

&nbsp;<asp:TextBox ID="txtCoveringLetter"

runat="server" Rows="15" TextMode="MultiLine"

Width="98%"></asp:TextBox>

</td>

</tr>

<tr>

<td align="center" colspan="2" width="10%">

<asp:ImageButton ID="ImageButton1" runat="server"

ImageUrl="~/Images/SaveButton.gif"

OnClick="ImageButton1_Click" />

&nbsp;<asp:ImageButton ID="ImageButton2"

runat="server" ImageUrl="~/Images/CancelButton.gif"

OnClick="ImageButton2_Click" />

&nbsp;

</td>

</tr>

<tr>

<td align="center" colspan="2" width="10%">

<asp:Label ID="lblMsg" runat="server"

SkinID="FormLabel"></asp:Label>

</td>

</tr>

<tr>

<td align="center" colspan="2" width="10%">

<asp:ValidationSummary ID="ValidationSummary1"

runat="server" />

</td>

</tr>

</table>

</ContentTemplate>

</asp:UpdatePanel>

<asp:UpdateProgress ID="UpdateProgress1" runat="server"

AssociatedUpdatePanelID="UpdatePanel1">

<ProgressTemplate>

<center>

<asp:Image ID="Image1" runat="server"

ImageUrl="~/images/progress.gif" />

Page 59: Job Portal Project Report by Alim

58

</center>

</ProgressTemplate>

</asp:UpdateProgress>

<br />

&nbsp;<br />

&nbsp;</asp:Content>

Page 60: Job Portal Project Report by Alim

59

18.6 Example of postresume.aspx.cs (Code Behind) for Jobseekers

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 JobSiteStarterKit.BOL;

public partial class postresume_aspx : Page

{

private Resume r;

protected void Page_Load(object sender, EventArgs e)

{

if

(!Roles.IsUserInRole(ConfigurationManager.AppSettings["jobseekerrolename"]))

{

Response.Redirect("~/customerrorpages/NotAuthorized.aspx");

}

if (!Page.IsPostBack)

{

if (Profile.JobSeeker.ResumeID != -1)

{

r = Resume.GetResume(Profile.UserName);

txtJobTitle.Text = r.JobTitle;

txtCity.Text = r.City;

txtResume.Text = r.ResumeText;

txtCoveringLetter.Text = r.CoveringLetterText;

}

Page 61: Job Portal Project Report by Alim

60

FillCountries();

FillEduLevels();

FillExpLevels();

FillJobTypes();

FillStates();

}

}

private void FillCountries()

{

ddlCountry.DataSource = Country.GetCountries();

ddlCountry.DataTextField = "CountryName";

ddlCountry.DataValueField = "CountryID";

ddlCountry.DataBind();

ddlRelocationCountry.DataSource = Country.GetCountries();

ddlRelocationCountry.DataTextField = "CountryName";

ddlRelocationCountry.DataValueField = "CountryID";

ddlRelocationCountry.DataBind();

if (Profile.JobSeeker.ResumeID != -1)

{

ListItem li;

li = ddlCountry.Items.FindByValue(r.CountryID.ToString());

if (li != null)

{

ddlCountry.ClearSelection();

li.Selected = true;

}

li =

ddlRelocationCountry.Items.FindByValue(r.RelocationCountryID.ToString());

if (li != null)

{

ddlRelocationCountry.ClearSelection();

li.Selected = true;

}

}

Page 62: Job Portal Project Report by Alim

61

}

private void FillStates()

{

r = Resume.GetResume(Profile.UserName);

ddlState.DataSource =

State.GetStates(int.Parse(ddlCountry.SelectedValue));

ddlState.DataTextField = "StateName";

ddlState.DataValueField = "StateID";

ddlState.DataBind();

if (Profile.JobSeeker.ResumeID != -1)

{

ListItem li;

li = ddlState.Items.FindByValue(r.StateID.ToString());

if (li != null)

{

ddlState.ClearSelection();

li.Selected = true;

}

}

}

private void FillJobTypes()

{

ddlJobType.DataSource = JobType.GetJobTypes();

ddlJobType.DataTextField = "JobTypeName";

ddlJobType.DataValueField = "JobTypeID";

ddlJobType.DataBind();

if (Profile.JobSeeker.ResumeID != -1)

{

ListItem li;

li = ddlJobType.Items.FindByValue(r.JobTypeID.ToString());

if (li != null)

{

Page 63: Job Portal Project Report by Alim

62

ddlJobType.ClearSelection();

li.Selected = true;

}

}

}

private void FillEduLevels()

{

ddlEduLevel.DataSource = EducationLevel.GetEducationLevels();

ddlEduLevel.DataTextField = "EducationLevelName";

ddlEduLevel.DataValueField = "EducationLevelID";

ddlEduLevel.DataBind();

if (Profile.JobSeeker.ResumeID != -1)

{

ListItem li;

li =

ddlEduLevel.Items.FindByValue(r.EducationLevelID.ToString());

if (li != null)

{

ddlEduLevel.ClearSelection();

li.Selected = true;

}

}

}

private void FillExpLevels()

{

ddlExpLevel.DataSource = ExperienceLevel.GetExperienceLevels();

ddlExpLevel.DataTextField = "ExperienceLevelName";

ddlExpLevel.DataValueField = "ExperienceLevelID";

ddlExpLevel.DataBind();

if (Profile.JobSeeker.ResumeID != -1)

{

ListItem li;

li =

ddlExpLevel.Items.FindByValue(r.ExperienceLevelID.ToString());

Page 64: Job Portal Project Report by Alim

63

if (li != null)

{

ddlExpLevel.ClearSelection();

li.Selected = true;

}

}

}

protected void ddlCountry_SelectedIndexChanged(object sender, EventArgs

e)

{

FillStates();

}

protected void ImageButton1_Click(object sender, ImageClickEventArgs e)

{

Resume r = new Resume();

r.City = txtCity.Text;

r.CountryID = int.Parse(ddlCountry.SelectedValue);

r.CoveringLetterText = txtCoveringLetter.Text;

r.EducationLevelID = int.Parse(ddlEduLevel.SelectedValue);

r.ExperienceLevelID = int.Parse(ddlExpLevel.SelectedValue);

r.JobTitle = txtJobTitle.Text;

r.JobTypeID = int.Parse(ddlJobType.SelectedValue);

r.RelocationCountryID =

int.Parse(ddlRelocationCountry.SelectedValue);

r.ResumeText = txtResume.Text;

r.StateID = int.Parse(ddlState.SelectedValue);

r.UserName = Profile.UserName;

r.PostedDate = DateTime.Now;

if (Profile.JobSeeker.ResumeID != -1)

{

r.ResumeID = Profile.JobSeeker.ResumeID;

Resume.Update(r);

}

else

{

Page 65: Job Portal Project Report by Alim

64

int retval = Resume.Insert(r);

Profile.JobSeeker.ResumeID = retval;

}

lblMsg.Text = "Your resume is successfully updated!";

}

protected void ImageButton2_Click(object sender, ImageClickEventArgs e)

{

Response.Redirect("~/default.aspx");

}

}

Page 66: Job Portal Project Report by Alim

65

18.7 Example of viewjobposting.aspx (UI Code) for Jobseekers

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

CodeFile="viewjobposting.aspx.cs"

Inherits="viewjobposting_aspx" Title="Untitled Page" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"

TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

runat="server">

<div style="text-align: center">

<div align="center">

<asp:Label ID="Label14" runat="server" Text="View Job Posting"

SkinID="FormHeading"></asp:Label>

</div>

<br />

<table style="width: 100%" cellpadding="3">

<tr>

<td align="left" width="20%" colspan="2"

class="dataentryformlabelbig">

<asp:Label ID="Label16" runat="server" Text="Contact

Details" SkinID="FormGroupLabel"></asp:Label>

</td>

</tr>

<tr>

<td align="right" width="20%" nowrap>

<asp:Label ID="Label1" runat="server" Text="Company :"

SkinID="FormLabel"></asp:Label>

</td>

<td align="left">

<asp:Label ID="lblCompany" runat="server"

Text="Label"></asp:Label>

<asp:LinkButton ID="btnViewProfile" runat="server">[View

Profile]</asp:LinkButton>

</td>

Page 67: Job Portal Project Report by Alim

66

</tr>

<tr>

<td align="right" width="20%" nowrap>

<asp:Label ID="Label2" runat="server" Text="Contact

Person :" SkinID="FormLabel"></asp:Label>

</td>

<td align="left">

<asp:Label ID="lblContactPerson" runat="server"

Text="Label"></asp:Label>

</td>

</tr>

<tr>

<td align="left" width="20%" colspan="2"

class="dataentryformlabelbig">

<asp:Label ID="Label17" runat="server" Text="Job Details"

SkinID="FormGroupLabel"></asp:Label>

</td>

</tr>

<tr>

<td align="right" width="20%" nowrap>

<asp:Label ID="Label3" runat="server" Text="Job Title :"

SkinID="FormLabel"></asp:Label>

</td>

<td align="left">

<asp:Label ID="lblTitle" runat="server"

Text="Label"></asp:Label>

</td>

</tr>

<tr>

<td align="right" width="20%" nowrap valign="top">

<asp:Label ID="Label13" runat="server" Text="Description

:" SkinID="FormLabel"></asp:Label>

</td>

<td align="left">

<asp:Label ID="lblDesc" runat="server"

Text="Label"></asp:Label>

</td>

</tr>

Page 68: Job Portal Project Report by Alim

67

<tr>

<td align="right" width="20%" nowrap>

<asp:Label ID="Label9" runat="server" Text="Job Type :"

SkinID="FormLabel"></asp:Label>

</td>

<td align="left">

<asp:Label ID="lblJobType" runat="server"

Text="Label"></asp:Label>

</td>

</tr>

<tr>

<td align="right" width="20%" nowrap>

<asp:Label ID="Label4" runat="server" Text="Department :"

SkinID="FormLabel"></asp:Label>

</td>

<td align="left">

<asp:Label ID="lblDept" runat="server"

Text="Label"></asp:Label>

</td>

</tr>

<tr>

<td align="right" width="20%" nowrap>

<asp:Label ID="Label5" runat="server" Text="Job Code :"

SkinID="FormLabel"></asp:Label>

</td>

<td align="left">

<asp:Label ID="lblJobCode" runat="server"

Text="Label"></asp:Label>

</td>

</tr>

<tr>

<td align="right" width="20%" nowrap>

<asp:Label ID="Label10" runat="server" Text="Education

Level :" SkinID="FormLabel"></asp:Label>

</td>

<td align="left">

<asp:Label ID="lblEduLevel" runat="server"

Text="Label"></asp:Label>

Page 69: Job Portal Project Report by Alim

68

</td>

</tr>

<tr>

<td align="left" width="20%" colspan="2"

class="dataentryformlabelbig">

<asp:Label ID="Label18" runat="server" Text="Location"

SkinID="FormGroupLabel"></asp:Label>

</td>

</tr>

<tr>

<td align="right" width="20%" nowrap>

<asp:Label ID="Label6" runat="server" Text="City :"

SkinID="FormLabel"></asp:Label>

</td>

<td align="left">

<asp:Label ID="lblCity" runat="server"

Text="Label"></asp:Label>

</td>

</tr>

<tr>

<td align="right" width="20%" nowrap>

<asp:Label ID="Label7" runat="server" Text="State :"

SkinID="FormLabel"></asp:Label>

</td>

<td align="left">

<asp:Label ID="lblState" runat="server"

Text="Label"></asp:Label>

</td>

</tr>

<tr>

<td align="right" width="20%" nowrap>

<asp:Label ID="Label8" runat="server" Text="Country :"

SkinID="FormLabel"></asp:Label>

</td>

<td align="left">

<asp:Label ID="lblCountry" runat="server"

Text="Label"></asp:Label>

</td>

Page 70: Job Portal Project Report by Alim

69

</tr>

<tr>

<td align="left" width="20%" colspan="2"

class="dataentryformlabelbig">

<asp:Label ID="Label19" runat="server" Text="Salary

Details" SkinID="FormGroupLabel"></asp:Label>

</td>

</tr>

<tr>

<td align="right" width="20%" nowrap>

<asp:Label ID="Label11" runat="server" Text="Min. Salary

:" SkinID="FormLabel"></asp:Label>

</td>

<td align="left">

<asp:Label ID="lblMinSal" runat="server"

Text="Label"></asp:Label>

</td>

</tr>

<tr>

<td align="right" width="20%" nowrap>

<asp:Label ID="Label12" runat="server" Text="Max. Salary

:" SkinID="FormLabel"></asp:Label>

</td>

<td align="left">

<asp:Label ID="lblMaxSal" runat="server"

Text="Label"></asp:Label>

</td>

</tr>

<tr>

<td align="right" width="20%">

</td>

<td align="left">

</td>

</tr>

<tr>

<td align="right" width="20%" nowrap>

<asp:Label ID="Label15" runat="server" Text="Posting Date

:" SkinID="FormLabel"></asp:Label>

Page 71: Job Portal Project Report by Alim

70

</td>

<td align="left">

<asp:Label ID="lblPostDt" runat="server"

Text="Label"></asp:Label>

</td>

</tr>

<tr>

<td align="center" width="20%" nowrap colspan="2">

<asp:ImageButton ID="ImageButton1" runat="server"

ImageUrl="~/Images/BackButton.gif"

OnClick="ImageButton1_Click" />

&nbsp;&nbsp;<asp:ImageButton ID="ImageButton2"

runat="server" ImageUrl="~/Images/MyFavorite.gif"

OnClick="ImageButton2_Click" />

</td>

</tr>

</table>

<br />

<br />

<br />

<div align="left">

<asp:Panel ID="Panel1" runat="server"

SkinID="CompanyProfilePanel">

<asp:Label ID="Label20" runat="server" Text=""></asp:Label>

<br />

<div align="right" width="100%">

<asp:LinkButton ID="LinkButton1" runat="server" Font-

Bold="True">Close</asp:LinkButton>

</div>

</asp:Panel>

</div>

<br />

<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server"

TargetControlID="btnViewProfile"

PopupControlID="Panel1" DynamicControlID="Label20"

DynamicServicePath='<%# Page.ResolveClientUrl("~/WebService.asmx") %>'

DynamicServiceMethod="GetCompanyProfile"

OkControlID="LinkButton1">

Page 72: Job Portal Project Report by Alim

71

</cc1:ModalPopupExtender>

<br />

<br />

</div>

</asp:Content>

Page 73: Job Portal Project Report by Alim

72

18.8 Example of viewjobposting.aspx.cs (Code Behind) for Jobseekers

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 JobSiteStarterKit.BOL;

public partial class viewjobposting_aspx : Page

{

protected void Page_Load(object sender, EventArgs e)

{

if

(!Roles.IsUserInRole(ConfigurationManager.AppSettings["jobseekerrolename"]))

{

Response.Redirect("~/customerrorpages/NotAuthorized.aspx");

}

if (!Page.IsPostBack)

{

int postingid;

postingid = int.Parse(Request.QueryString["id"]);

JobPosting p = JobPosting.GetPosting(postingid);

lblCity.Text = p.City;

lblCompany.Text = Company.GetCompanyName(p.CompanyID);

btnViewProfile.CommandArgument = p.CompanyID.ToString();

ModalPopupExtender1.DynamicContextKey = p.CompanyID.ToString();

lblContactPerson.Text = p.ContactPerson;

Page 74: Job Portal Project Report by Alim

73

lblCountry.Text = Country.GetCountryName(p.CountryID);

lblDept.Text = p.Department;

lblDesc.Text = p.Description.Replace("\r\n", "<br>");

lblEduLevel.Text =

EducationLevel.GetEducationLevelName(p.EducationLevelID);

lblJobCode.Text = p.JobCode;

lblJobType.Text = JobType.GetJobTypeName(p.JobTypeID);

lblMaxSal.Text = p.MaxSalary.ToString("C");

lblMinSal.Text = p.MinSalary.ToString("C");

lblPostDt.Text = p.PostingDate.ToShortDateString();

lblState.Text = State.GetStateName(p.StateID);

lblTitle.Text = p.Title;

}

Page.DataBind();

}

protected void ImageButton1_Click(object sender, ImageClickEventArgs e)

{

Response.Redirect("~/jobseeker/jobsearch.aspx");

}

protected void ImageButton2_Click(object sender, ImageClickEventArgs e)

{

MyJob j = new MyJob();

j.PostingID = int.Parse(Request.QueryString["id"]);

j.UserName = Profile.UserName;

MyJob.Insert(j);

}

}

18.9 Example of AddEditPosting.aspx (UI Code) for Employer

<%@ Page Language="C#" CodeFile="AddEditPosting.aspx.cs"

Inherits="AddEditPosting_aspx"

Page 75: Job Portal Project Report by Alim

74

MasterPageFile="~/MasterPage.master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

runat="server">

<div style="text-align: center">

<div align="center">

<asp:Label ID="Label14" runat="server" Text="Add / Edit Job

Posting" SkinID="FormHeading"></asp:Label>

</div>

<br />

<asp:HyperLink ID="HyperLink2" runat="server"

NavigateUrl="~/employer/jobpostings.aspx"

ImageUrl="~/Images/JobPostings.gif"></asp:HyperLink><br />

<asp:Label ID="Label6" runat="server" Text="(All the fields are

mandatory)"></asp:Label>

<br />

<br />

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

<ContentTemplate>

<asp:DetailsView ID="DetailsView1" runat="server"

AutoGenerateRows="False" CellPadding="5"

DataKeyNames="JobPostingID"

DataSourceID="ObjectDataSource1" GridLines="None"

HorizontalAlign="Center"

OnDataBound="DetailsView1_DataBound" OnItemDeleted="DetailsView1_ItemDeleted"

OnItemInserting="DetailsView1_ItemInserting"

OnItemUpdating="DetailsView1_ItemUpdating"

Width="100%">

<RowStyle HorizontalAlign="Left" />

<FieldHeaderStyle HorizontalAlign="Right" Wrap="false" />

<Fields>

<asp:BoundField DataField="JobPostingID"

HeaderText="Job Posting ID :" InsertVisible="False"

ReadOnly="True" SortExpression="JobPostingID">

<HeaderStyle CssClass="dataentryformlabel"

Wrap="False" />

<ItemStyle CssClass="dataentryformlabel"

Wrap="False" />

Page 76: Job Portal Project Report by Alim

75

</asp:BoundField>

<asp:BoundField DataField="Title" HeaderText="Title

:" SortExpression="Title">

<HeaderStyle CssClass="dataentryformlabel" />

</asp:BoundField>

<asp:TemplateField HeaderText="Contact Person :"

SortExpression="ContactPerson">

<EditItemTemplate>

<asp:TextBox ID="TextBox2" runat="server"

Text='<%# Bind("ContactPerson") %>'> </asp:TextBox></EditItemTemplate>

<InsertItemTemplate>

<asp:TextBox ID="TextBox2" runat="server"

Text='<%# Bind("ContactPerson") %>'> </asp:TextBox></InsertItemTemplate>

<ItemTemplate>

<asp:Label ID="Label6" runat="server"

Text='<%# Bind("ContactPerson") %>'></asp:Label></ItemTemplate>

<HeaderStyle CssClass="dataentryformlabel"

Wrap="False" />

<ItemStyle Wrap="False" />

</asp:TemplateField>

<asp:BoundField DataField="Department"

HeaderText="Department :" SortExpression="Department">

<HeaderStyle CssClass="dataentryformlabel" />

</asp:BoundField>

<asp:BoundField DataField="JobCode" HeaderText="Job

Code :" SortExpression="JobCode">

<HeaderStyle CssClass="dataentryformlabel" />

</asp:BoundField>

<asp:TemplateField HeaderText="Country :"

SortExpression="CountryID">

<EditItemTemplate>

&nbsp;<asp:DropDownList ID="ddlCountryUpdate"

runat="server" AutoPostBack="True"

DataSourceID="ObjectDataSource3"

DataTextField="CountryName" DataValueField="CountryID"

OnSelectedIndexChanged="ddlCountryUpdate_SelectedIndexChanged"

SelectedValue='<%# Bind("CountryID") %>'>

Page 77: Job Portal Project Report by Alim

76

</asp:DropDownList>

</EditItemTemplate>

<InsertItemTemplate>

&nbsp;<asp:DropDownList ID="ddlCountryInsert"

runat="server" AutoPostBack="True"

DataSourceID="ObjectDataSource3"

DataTextField="CountryName" DataValueField="CountryID"

OnSelectedIndexChanged="ddlCountryInsert_SelectedIndexChanged"

SelectedValue='<%# Bind("CountryID") %>'>

</asp:DropDownList>

</InsertItemTemplate>

<ItemTemplate>

<asp:Label ID="Label2" runat="server"

Text='<%#

JobSiteStarterKit.BOL.Country.GetCountryName((int)Eval("CountryID")) %>'>

</asp:Label></ItemTemplate>

<HeaderStyle CssClass="dataentryformlabel" />

</asp:TemplateField>

<asp:TemplateField HeaderText="State :"

SortExpression="StateID">

<EditItemTemplate>

<asp:DropDownList ID="ddlStateUpdate"

runat="server" DataSourceID="ObjectDataSource2"

DataTextField="StateName"

DataValueField="StateID">

</asp:DropDownList>

</EditItemTemplate>

<InsertItemTemplate>

<asp:DropDownList ID="ddlStateInsert"

runat="server" DataSourceID="ObjectDataSource2"

DataTextField="StateName"

DataValueField="StateID">

</asp:DropDownList>

</InsertItemTemplate>

<ItemTemplate>

Page 78: Job Portal Project Report by Alim

77

<asp:Label ID="Label1" runat="server"

Text='<%# JobSiteStarterKit.BOL.State.GetStateName((int)Eval("StateID")) %>'>

</asp:Label></ItemTemplate>

<HeaderStyle CssClass="dataentryformlabel" />

</asp:TemplateField>

<asp:BoundField DataField="City" HeaderText="City :"

SortExpression="City">

<HeaderStyle CssClass="dataentryformlabel" />

</asp:BoundField>

<asp:TemplateField HeaderText="Education Level :"

SortExpression="EducationLevelID">

<EditItemTemplate>

&nbsp;<asp:DropDownList

ID="ddlEduLevelUpdate" runat="server" DataSourceID="ObjectDataSource4"

DataTextField="EducationLevelName"

DataValueField="EducationLevelID" SelectedValue='<%# Bind("EducationLevelID")

%>'>

</asp:DropDownList>

</EditItemTemplate>

<InsertItemTemplate>

&nbsp;<asp:DropDownList

ID="ddlEduLevelInsert" runat="server" DataSourceID="ObjectDataSource4"

DataTextField="EducationLevelName"

DataValueField="EducationLevelID" SelectedValue='<%# Bind("EducationLevelID")

%>'>

</asp:DropDownList>

</InsertItemTemplate>

<ItemTemplate>

<asp:Label ID="Label3" runat="server"

Text='<%#

JobSiteStarterKit.BOL.EducationLevel.GetEducationLevelName((int)Eval("Educati

onLevelID")) %>'> </asp:Label></ItemTemplate>

<HeaderStyle CssClass="dataentryformlabel"

Wrap="False" />

<ItemStyle Wrap="False" />

</asp:TemplateField>

<asp:TemplateField HeaderText="Job Type :"

SortExpression="JobTypeID">

Page 79: Job Portal Project Report by Alim

78

<EditItemTemplate>

&nbsp;<asp:DropDownList ID="ddlJobTypeUpdate"

runat="server" DataSourceID="ObjectDataSource5"

DataTextField="JobTypeName"

DataValueField="JobTypeID" SelectedValue='<%# Bind("JobTypeID") %>'>

</asp:DropDownList>

</EditItemTemplate>

<InsertItemTemplate>

&nbsp;<asp:DropDownList ID="ddlJobTypeInsert"

runat="server" DataSourceID="ObjectDataSource5"

DataTextField="JobTypeName"

DataValueField="JobTypeID" SelectedValue='<%# Bind("JobTypeID") %>'>

</asp:DropDownList>

</InsertItemTemplate>

<ItemTemplate>

<asp:Label ID="Label4" runat="server"

Text='<%#

JobSiteStarterKit.BOL.JobType.GetJobTypeName((int)Eval("JobTypeID")) %>'>

</asp:Label></ItemTemplate>

<HeaderStyle CssClass="dataentryformlabel" />

</asp:TemplateField>

<asp:BoundField DataField="MinSalary" HeaderText="Min

Salary :" SortExpression="MinSalary">

<HeaderStyle CssClass="dataentryformlabel" />

</asp:BoundField>

<asp:BoundField DataField="MaxSalary" HeaderText="Max

Salary :" SortExpression="MaxSalary">

<HeaderStyle CssClass="dataentryformlabel" />

</asp:BoundField>

<asp:TemplateField HeaderText="Description :"

SortExpression="Description">

<EditItemTemplate>

<asp:TextBox ID="TextBox1" runat="server"

Rows="5" Text='<%# Bind("Description") %>'

TextMode="MultiLine" Width="98%">

</asp:TextBox></EditItemTemplate>

<InsertItemTemplate>

Page 80: Job Portal Project Report by Alim

79

<asp:TextBox ID="TextBox1" runat="server"

Rows="5" Text='<%# Bind("Description") %>'

TextMode="MultiLine">

</asp:TextBox></InsertItemTemplate>

<ItemTemplate>

<asp:Label ID="Label5" runat="server"

Text='<%#

(Server.HtmlEncode(Eval("Description").ToString())).Replace("\r\n","<br>")

%>'></asp:Label></ItemTemplate>

<HeaderStyle CssClass="dataentryformlabel"

VerticalAlign="Top" />

</asp:TemplateField>

<asp:CommandField ButtonType="Image"

ShowDeleteButton="True" ShowEditButton="True"

ShowInsertButton="True"

CancelImageUrl="~/Images/CancelButton.gif"

DeleteImageUrl="~/Images/DeleteButton.gif"

EditImageUrl="~/Images/EditButton.gif"

InsertImageUrl="~/Images/SaveButton.gif"

NewImageUrl="~/Images/AddButton.gif"

UpdateImageUrl="~/Images/SaveButton.gif">

<ControlStyle CssClass="dataentryformbutton" />

<FooterStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</asp:CommandField>

</Fields>

<HeaderStyle HorizontalAlign="Right" />

<InsertRowStyle HorizontalAlign="Left" />

<EditRowStyle HorizontalAlign="Left" />

</asp:DetailsView>

</ContentTemplate>

</asp:UpdatePanel>

<asp:UpdateProgress ID="UpdateProgress1" runat="server"

AssociatedUpdatePanelID="UpdatePanel1">

<ProgressTemplate>

<asp:Image ID="Image1" runat="server"

ImageUrl="~/images/progress.gif" />

</ProgressTemplate>

Page 81: Job Portal Project Report by Alim

80

</asp:UpdateProgress>

<br />

<br />

<asp:HyperLink ID="HyperLink1" runat="server"

NavigateUrl="~/employer/jobpostings.aspx">Go to Listing Page</asp:HyperLink>

<br />

<br />

<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"

TypeName="JobSiteStarterKit.BOL.JobPosting"

DeleteMethod="Delete" InsertMethod="Insert"

SelectMethod="GetPosting" UpdateMethod="Update"

DataObjectTypeName="JobSiteStarterKit.BOL.JobPosting">

<DeleteParameters>

<asp:Parameter Name="original_JobPostingID" Type="Int32" />

</DeleteParameters>

<SelectParameters>

<asp:QueryStringParameter Name="id" QueryStringField="id"

Type="Int32"></asp:QueryStringParameter>

</SelectParameters>

</asp:ObjectDataSource>

<br />

<asp:ObjectDataSource ID="ObjectDataSource2" runat="server"

TypeName="JobSiteStarterKit.BOL.State"

SelectMethod="GetStates">

<SelectParameters>

<asp:Parameter Type="Int32" Name="countryid"></asp:Parameter>

</SelectParameters>

</asp:ObjectDataSource>

<asp:ObjectDataSource ID="ObjectDataSource3" runat="server"

TypeName="JobSiteStarterKit.BOL.Country"

SelectMethod="SelectCountries"></asp:ObjectDataSource>

<asp:ObjectDataSource ID="ObjectDataSource4" runat="server"

SelectMethod="GetEducationLevels"

TypeName="JobSiteStarterKit.BOL.EducationLevel"></asp:ObjectDataSource>

<asp:ObjectDataSource ID="ObjectDataSource5" runat="server"

SelectMethod="GetJobTypes"

TypeName="JobSiteStarterKit.BOL.JobType"></asp:ObjectDataSource>

Page 82: Job Portal Project Report by Alim

81

</div>

</asp:Content>

18.10 Example of AddEditPosting.aspx.cs (Code Behind) for Employer

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 JobSiteStarterKit.BOL;

public partial class AddEditPosting_aspx : Page

{

protected void Page_Load(object sender, EventArgs e)

{

if

(!Roles.IsUserInRole(ConfigurationManager.AppSettings["employerrolename"]))

{

Response.Redirect("~/customerrorpages/NotAuthorized.aspx");

}

if (!Page.IsPostBack)

{

if (Company.GetCompany(User.Identity.Name) == null)

{

Response.Redirect("~/customerrorpages/profilenotfound.aspx");

}

if (Request.QueryString["id"] == null)

{

DetailsView1.DefaultMode = DetailsViewMode.Insert;

}

else

Page 83: Job Portal Project Report by Alim

82

{

DetailsView1.DefaultMode = DetailsViewMode.ReadOnly;

}

}

}

protected void DetailsView1_ItemInserting(object sender,

DetailsViewInsertEventArgs e)

{

DropDownList ddl;

ddl = (DropDownList)DetailsView1.FindControl("ddlStateInsert");

e.Values["StateID"] = ddl.SelectedValue;

ddl = (DropDownList)DetailsView1.FindControl("ddlCountryInsert");

e.Values["CountryID"] = ddl.SelectedValue;

ddl = (DropDownList)DetailsView1.FindControl("ddlEduLevelInsert");

e.Values["EducationLevelID"] = ddl.SelectedValue;

ddl = (DropDownList)DetailsView1.FindControl("ddlJobTypeInsert");

e.Values["JobTypeID"] = ddl.SelectedValue;

e.Values["PostedBy"] = Profile.UserName;

e.Values["CompanyID"] = Profile.Employer.CompanyID.ToString();

e.Values["PostingDate"] = DateTime.Today.ToString("MM/dd/yyyy");

}

protected void DetailsView1_ItemUpdating(object sender,

DetailsViewUpdateEventArgs e)

{

DropDownList ddl;

ddl = (DropDownList)DetailsView1.FindControl("ddlStateUpdate");

e.NewValues["StateID"] = ddl.SelectedValue;

ddl = (DropDownList)DetailsView1.FindControl("ddlCountryUpdate");

e.NewValues["CountryID"] = ddl.SelectedValue;

Page 84: Job Portal Project Report by Alim

83

ddl = (DropDownList)DetailsView1.FindControl("ddlEduLevelUpdate");

e.NewValues["EducationLevelID"] = ddl.SelectedValue;

ddl = (DropDownList)DetailsView1.FindControl("ddlJobTypeUpdate");

e.NewValues["JobTypeID"] = ddl.SelectedValue;

e.NewValues["PostedBy"] = Profile.UserName;

e.NewValues["CompanyID"] = Profile.Employer.CompanyID.ToString();

e.NewValues["PostingDate"] = DateTime.Today.ToString("MM/dd/yyyy");

}

protected void DetailsView1_ItemDeleted(object sender,

DetailsViewDeletedEventArgs e)

{

Response.Redirect("~/employer/jobpostings.aspx");

}

protected void ddlCountryUpdate_SelectedIndexChanged(object sender,

EventArgs e)

{

DropDownList ddl;

ddl = (DropDownList)sender;

ObjectDataSource2.SelectParameters["countryid"].DefaultValue =

ddl.SelectedValue;

ObjectDataSource2.Select();

}

protected void ddlCountryInsert_SelectedIndexChanged(object sender,

EventArgs e)

{

DropDownList ddl;

ddl = (DropDownList)sender;

ObjectDataSource2.SelectParameters["countryid"].DefaultValue =

ddl.SelectedValue;

ObjectDataSource2.Select();

}

Page 85: Job Portal Project Report by Alim

84

protected void DetailsView1_DataBound(object sender, EventArgs e)

{

DropDownList ddl;

ddl = (DropDownList)DetailsView1.FindControl("ddlCountryUpdate");

if (ddl != null)

{

ObjectDataSource2.SelectParameters["countryid"].DefaultValue =

ddl.SelectedValue;

ObjectDataSource2.Select();

}

}

}

18.11 Example of companyprofile.aspx (UI Code) for Employer

<%@ Page Language="C#" CodeFile="companyprofile.aspx.cs"

Inherits="companyprofile_aspx"

MasterPageFile="~/MasterPage.master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

runat="server">

<div align="center">

<asp:Label ID="Label13" runat="server" Text="Modify Your Company

Profile" SkinID="formheading"></asp:Label>

</div>

<br />

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

<ContentTemplate>

<table style="width: 100%">

<tr>

<td valign="top" align="left" colspan="2"

class="dataentryformlabelbig">

Page 86: Job Portal Project Report by Alim

85

<asp:Label ID="Label14" runat="server"

Text="Introduce Your Company" SkinID="FormGroupLabel"></asp:Label>

</td>

</tr>

<tr>

<td valign="top" align="right" width="40%">

<asp:Label ID="Label1" runat="server" Text="Company

Name :"></asp:Label>

</td>

<td align="left" width="60%">

<asp:TextBox ID="txtCompanyName"

runat="server"></asp:TextBox>

<asp:RequiredFieldValidator

ID="RequiredFieldValidator1" runat="server" ErrorMessage="Please enter

company name"

ControlToValidate="txtCompanyName"

Display="Dynamic">

*</asp:RequiredFieldValidator>

</td>

</tr>

<tr>

<td valign="top" align="right" width="40%">

<asp:Label ID="Label12" runat="server" Text="Brief

Profile :"></asp:Label>

</td>

<td align="left" width="60%">

<asp:TextBox ID="txtProfile" runat="server"

Width="100%" Rows="5" TextMode="MultiLine"></asp:TextBox>

</td>

</tr>

<tr>

<td valign="top" align="left" colspan="2"

class="dataentryformlabelbig">

<asp:Label ID="Label15" runat="server"

Text="Location" SkinID="FormGroupLabel"></asp:Label>

</td>

</tr>

<tr>

Page 87: Job Portal Project Report by Alim

86

<td valign="top" align="right" width="40%">

<asp:Label ID="Label2" runat="server" Text="Address 1

:"></asp:Label>

</td>

<td align="left" width="60%">

<asp:TextBox ID="txtAddress1"

runat="server"></asp:TextBox>

<asp:RequiredFieldValidator

ID="RequiredFieldValidator2" runat="server" ErrorMessage="Please enter

address"

ControlToValidate="txtAddress1"

Display="Dynamic">

*</asp:RequiredFieldValidator>

</td>

</tr>

<tr>

<td valign="top" align="right" width="40%">

<asp:Label ID="Label3" runat="server" Text="Address 2

:"></asp:Label>

</td>

<td align="left" width="60%">

<asp:TextBox ID="txtAddress2"

runat="server"></asp:TextBox>

</td>

</tr>

<tr>

<td valign="top" align="right" width="40%">

<asp:Label ID="Label4" runat="server" Text="City

:"></asp:Label>

</td>

<td align="left" width="60%">

<asp:TextBox ID="txtCity"

runat="server"></asp:TextBox>

<asp:RequiredFieldValidator

ID="RequiredFieldValidator3" runat="server" ErrorMessage="Please enter city"

ControlToValidate="txtCity" Display="Dynamic">

*</asp:RequiredFieldValidator>

</td>

Page 88: Job Portal Project Report by Alim

87

</tr>

<tr>

<td valign="top" align="right" width="40%">

<asp:Label ID="Label6" runat="server" Text="Country

:"></asp:Label>

</td>

<td align="left" width="60%">

&nbsp;<asp:DropDownList ID="ddlCountry"

runat="server" AutoPostBack="True"

OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged">

</asp:DropDownList>

</td>

</tr>

<tr>

<td valign="top" align="right" width="40%">

<asp:Label ID="Label5" runat="server" Text="State

:"></asp:Label>

</td>

<td align="left" width="60%">

&nbsp;<asp:DropDownList ID="ddlState" runat="server">

</asp:DropDownList>

</td>

</tr>

<tr>

<td valign="top" align="right" width="40%">

<asp:Label ID="Label7" runat="server" Text="ZIP

:"></asp:Label>

</td>

<td align="left" width="60%">

<asp:TextBox ID="txtZIP"

runat="server"></asp:TextBox>

<asp:RequiredFieldValidator

ID="RequiredFieldValidator4" runat="server" ErrorMessage="Please enter ZIP

code"

ControlToValidate="txtZIP" Display="Dynamic">

*</asp:RequiredFieldValidator>

Page 89: Job Portal Project Report by Alim

88

<%-- <asp:RegularExpressionValidator

ID="RegularExpressionValidator1" Runat="server" ErrorMessage="Please enter

valid ZIP code"

ValidationExpression="\d{5}(-\d{4})?"

ControlToValidate="txtZIP" Display="Dynamic">

*</asp:RegularExpressionValidator>--%>

</td>

</tr>

<tr>

<td valign="top" align="left" colspan="2"

class="dataentryformlabelbig">

<asp:Label ID="Label16" runat="server" Text="Contact

Details" SkinID="FormGroupLabel"></asp:Label>

</td>

</tr>

<tr>

<td valign="top" align="right" width="40%">

<asp:Label ID="Label8" runat="server" Text="Phone

:"></asp:Label>

</td>

<td align="left" width="60%">

<asp:TextBox ID="txtPhone"

runat="server"></asp:TextBox><br />

<asp:Label ID="Label17" runat="server" Text="(e.g.

111-111-1111)"></asp:Label>

<asp:RegularExpressionValidator

ID="RegularExpressionValidator2" runat="server" ErrorMessage="Please enter

valid phone number"

ValidationExpression="((\(\d{3}\) ?)|(\d{3}-

))?\d{3}-\d{4}" ControlToValidate="txtPhone"

Display="Dynamic">

*</asp:RegularExpressionValidator>

<asp:RequiredFieldValidator

ID="RequiredFieldValidator5" runat="server" ErrorMessage="Please enter phone

number"

ControlToValidate="txtProfile" Display="Dynamic">

*</asp:RequiredFieldValidator>

</td>

Page 90: Job Portal Project Report by Alim

89

</tr>

<tr>

<td valign="top" align="right" width="40%">

<asp:Label ID="Label9" runat="server" Text="Fax

:"></asp:Label>

</td>

<td align="left" width="60%">

<asp:TextBox ID="txtFax"

runat="server"></asp:TextBox>

<asp:RegularExpressionValidator

ID="RegularExpressionValidator3" runat="server" ErrorMessage="Please enter

valid Fax number"

ValidationExpression="((\(\d{3}\) ?)|(\d{3}-

))?\d{3}-\d{4}" ControlToValidate="txtFax"

Display="Dynamic">

*</asp:RegularExpressionValidator>

</td>

</tr>

<tr>

<td valign="top" align="right" width="40%">

<asp:Label ID="Label10" runat="server" Text="Email

:"></asp:Label>

</td>

<td align="left" width="60%">

<asp:TextBox ID="txtEmail"

runat="server"></asp:TextBox>

<asp:RequiredFieldValidator

ID="RequiredFieldValidator6" runat="server" ErrorMessage="Please enter email

address"

ControlToValidate="txtEmail" Display="Dynamic">

*</asp:RequiredFieldValidator>

<asp:RegularExpressionValidator

ID="RegularExpressionValidator4" runat="server" ErrorMessage="Please enter

valid email address"

ValidationExpression="\w+([-+.']\w+)*@\w+([-

.]\w+)*\.\w+([-.]\w+)*" ControlToValidate="txtEmail"

Display="Dynamic">

*</asp:RegularExpressionValidator>

Page 91: Job Portal Project Report by Alim

90

</td>

</tr>

<tr>

<td style="height: 26px;" valign="top" align="right"

width="40%">

<asp:Label ID="Label11" runat="server" Text="Web Site

:"></asp:Label>

</td>

<td style="height: 26px;" align="left" width="60%">

<asp:TextBox ID="txtWebSiteUrl"

runat="server"></asp:TextBox><br />

<asp:Label ID="Label18" runat="server" Text="(e.g.

http://www.somedomain.com)"></asp:Label>

<asp:RegularExpressionValidator

ID="RegularExpressionValidator5" runat="server" ErrorMessage="Please enter

valid web site URL"

ValidationExpression="http(s)?://([\w-]+\.)+[\w-

]+(/[\w- ./?%&amp;=]*)?" ControlToValidate="txtWebSiteUrl"

Display="Dynamic">

*</asp:RegularExpressionValidator>

</td>

</tr>

<tr>

<td valign="top" align="right" width="40%">

</td>

<td align="left" width="60%">

&nbsp;

</td>

</tr>

<tr>

<td valign="top" align="center" colspan="2" width="40%">

<asp:ImageButton ID="ImageButton1" runat="server"

ImageUrl="~/Images/SaveButton.gif"

OnClick="ImageButton1_Click" />

&nbsp;

<asp:ImageButton ID="ImageButton2" runat="server"

ImageUrl="~/Images/CancelButton.gif"

OnClick="ImageButton2_Click" />

Page 92: Job Portal Project Report by Alim

91

</td>

</tr>

<tr>

<td align="center" colspan="2" valign="top" width="40%">

<asp:Label ID="lblMsg" runat="server"

SkinID="FormLabel"></asp:Label>

</td>

</tr>

<tr>

<td valign="top" align="center" width="40%" colspan="2">

<asp:ValidationSummary ID="ValidationSummary1"

runat="server" />

</td>

</tr>

</table>

</ContentTemplate>

</asp:UpdatePanel>

<br />

<asp:UpdateProgress ID="UpdateProgress1" runat="server"

AssociatedUpdatePanelID="UpdatePanel1">

<ProgressTemplate>

<center>

<asp:Image ID="Image1" runat="server"

ImageUrl="~/Images/Progress.gif" />

</center>

</ProgressTemplate>

</asp:UpdateProgress>

</asp:Content>

18.12 Example of companyprofile.aspx.cs (Code Behind) for Employer

using System;

using System.Data;

using System.Configuration;

using System.Web;

using System.Web.Security;

using System.Web.UI;

Page 93: Job Portal Project Report by Alim

92

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

using JobSiteStarterKit.BOL;

public partial class companyprofile_aspx : Page

{

protected void Page_Load(object sender, EventArgs e)

{

if

(!Roles.IsUserInRole(ConfigurationManager.AppSettings["employerrolename"]))

{

Response.Redirect("~/customerrorpages/NotAuthorized.aspx");

}

if (!Page.IsPostBack)

{

ddlCountry.DataSource = Country.GetCountries();

ddlCountry.DataTextField = "CountryName";

ddlCountry.DataValueField = "CountryID";

ddlCountry.DataBind();

Company objCompany = Company.GetCompany(Profile.UserName);

if (objCompany != null)

{

ListItem li;

txtCompanyName.Text = objCompany.CompanyName;

txtAddress1.Text = objCompany.Address1;

txtAddress2.Text = objCompany.Address2;

txtCity.Text = objCompany.City;

li =

ddlState.Items.FindByValue(objCompany.StateID.ToString());

if (li != null)

{

ddlState.ClearSelection();

li.Selected = true;

Page 94: Job Portal Project Report by Alim

93

}

li =

ddlCountry.Items.FindByValue(objCompany.CountryID.ToString());

if (li != null)

{

ddlCountry.ClearSelection();

li.Selected = true;

ddlState.DataSource =

State.GetStates(int.Parse(ddlCountry.SelectedValue));

ddlState.DataTextField = "StateName";

ddlState.DataValueField = "StateID";

ddlState.DataBind();

li =

ddlState.Items.FindByValue(objCompany.StateID.ToString());

if (li != null)

{

ddlState.ClearSelection();

li.Selected = true;

}

}

txtZIP.Text = objCompany.ZIP;

txtPhone.Text = objCompany.Phone;

txtFax.Text = objCompany.Fax;

txtEmail.Text = objCompany.Email;

txtWebSiteUrl.Text = objCompany.WebSiteUrl;

txtProfile.Text = objCompany.BriefProfile;

}

}

}

protected void ddlCountry_SelectedIndexChanged(object sender, EventArgs

e)

{

ddlState.DataSource =

State.GetStates(int.Parse(ddlCountry.SelectedValue));

ddlState.DataTextField = "StateName";

ddlState.DataValueField = "StateID";

Page 95: Job Portal Project Report by Alim

94

ddlState.DataBind();

}

protected void ImageButton1_Click(object sender, ImageClickEventArgs e)

{

Company objCompany = new Company();

objCompany.CompanyName = txtCompanyName.Text;

objCompany.Address1 = txtAddress1.Text;

objCompany.Address2 = txtAddress2.Text;

objCompany.City = txtCity.Text;

objCompany.StateID = int.Parse(ddlState.SelectedValue);

objCompany.CountryID = int.Parse(ddlCountry.SelectedValue);

objCompany.ZIP = txtZIP.Text;

objCompany.Phone = txtPhone.Text;

objCompany.Fax = txtFax.Text;

objCompany.Email = txtEmail.Text;

objCompany.WebSiteUrl = txtWebSiteUrl.Text;

objCompany.BriefProfile = txtProfile.Text;

objCompany.UserName = Profile.UserName;

if (Profile.Employer.CompanyID != -1)

{

objCompany.CompanyID = (int)Profile.Employer.CompanyID;

Company.Update(objCompany);

}

else

{

int i = Company.Insert(objCompany);

Profile.Employer.CompanyID = i;

}

lblMsg.Text = "Your company profile is updated!";

}

protected void ImageButton2_Click(object sender, ImageClickEventArgs e)

{

Response.Redirect("~/default.aspx");

}

}

Page 96: Job Portal Project Report by Alim

95

18.13 Example of jobpostings.aspx (UI Code) for Employer

<%@ Page Language="C#" CodeFile="jobpostings.aspx.cs"

Inherits="postinglist_aspx"

MasterPageFile="~/MasterPage.master" %>

<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0,

Culture=neutral, PublicKeyToken=31bf3856ad364e35"

Namespace="System.Web.UI.WebControls" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

runat="server">

<div align="center">

<asp:Label ID="Label14" runat="server" Text="List of Job Postings"

SkinID="FormHeading"></asp:Label>

<br />

<br />

<asp:HyperLink ID="HyperLink1" runat="server"

ImageUrl="~/Images/AddJobPosting.gif"

NavigateUrl="~/employer/AddEditPosting.aspx">HyperLink</asp:HyperLink>

<br />

</div>

<br />

<asp:GridView ID="GridView1" runat="server"

DataSourceID="ObjectDataSource1" AllowPaging="True"

AllowSorting="True" AutoGenerateColumns="False"

OnRowCommand="GridView1_RowCommand"

OnRowDataBound="GridView1_RowDataBound" DataKeyNames="PostingID"

Width="100%">

<Columns>

<asp:BoundField HeaderText="Title"

DataField="Title"></asp:BoundField>

<asp:BoundField HeaderText="Job Code"

DataField="JobCode"></asp:BoundField>

<asp:BoundField HeaderText="Location"

DataField="City"></asp:BoundField>

Page 97: Job Portal Project Report by Alim

96

<asp:BoundField HeaderText="Posted On" DataField="PostingDate"

DataFormatString="{0:MM/dd/yyyy}">

</asp:BoundField>

<asp:ButtonField ButtonType="Image"

ImageUrl="~/Images/ShowDetails.gif">

<ItemStyle Wrap="False"></ItemStyle>

</asp:ButtonField>

</Columns>

</asp:GridView>

<br />

&nbsp;<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"

TypeName="JobSiteStarterKit.BOL.JobPosting"

DeleteMethod="Delete" InsertMethod="Insert"

SelectMethod="GetPostings" UpdateMethod="Update"

DataObjectTypeName="JobSiteStarterKit.BOL.JobPosting">

<DeleteParameters>

<asp:Parameter Type="Int32" Name="id"></asp:Parameter>

</DeleteParameters>

<UpdateParameters>

<asp:Parameter Type="Int32" Name="JobPostingID"></asp:Parameter>

<asp:Parameter Type="Int32" Name="CompanyID"></asp:Parameter>

<asp:Parameter Type="String"

Name="ContactPerson"></asp:Parameter>

<asp:Parameter Type="String" Name="Title"></asp:Parameter>

<asp:Parameter Type="String" Name="Department"></asp:Parameter>

<asp:Parameter Type="String" Name="JobCode"></asp:Parameter>

<asp:Parameter Type="String" Name="City"></asp:Parameter>

<asp:Parameter Type="Int32" Name="StateID"></asp:Parameter>

<asp:Parameter Type="Int32" Name="CountryID"></asp:Parameter>

<asp:Parameter Type="Int32"

Name="EducationLevelID"></asp:Parameter>

<asp:Parameter Type="Int32" Name="JobTypeID"></asp:Parameter>

<asp:Parameter Type="Decimal" Name="MinSalary"></asp:Parameter>

<asp:Parameter Type="Decimal" Name="MaxSalary"></asp:Parameter>

<asp:Parameter Type="String" Name="Description"></asp:Parameter>

<asp:Parameter Type="DateTime"

Name="PostingDate"></asp:Parameter>

<asp:Parameter Type="String" Name="PostedBy"></asp:Parameter>

Page 98: Job Portal Project Report by Alim

97

</UpdateParameters>

<SelectParameters>

<asp:ProfileParameter Name="username" Type="String"

PropertyName="UserName"></asp:ProfileParameter>

</SelectParameters>

<InsertParameters>

<asp:Parameter Type="Int32" Name="JobPostingID"></asp:Parameter>

<asp:Parameter Type="Int32" Name="CompanyID"></asp:Parameter>

<asp:Parameter Type="String"

Name="ContactPerson"></asp:Parameter>

<asp:Parameter Type="String" Name="Title"></asp:Parameter>

<asp:Parameter Type="String" Name="Department"></asp:Parameter>

<asp:Parameter Type="String" Name="JobCode"></asp:Parameter>

<asp:Parameter Type="String" Name="City"></asp:Parameter>

<asp:Parameter Type="Int32" Name="StateID"></asp:Parameter>

<asp:Parameter Type="Int32" Name="CountryID"></asp:Parameter>

<asp:Parameter Type="Int32"

Name="EducationLevelID"></asp:Parameter>

<asp:Parameter Type="Int32" Name="JobTypeID"></asp:Parameter>

<asp:Parameter Type="Decimal" Name="MinSalary"></asp:Parameter>

<asp:Parameter Type="Decimal" Name="MaxSalary"></asp:Parameter>

<asp:Parameter Type="String" Name="Description"></asp:Parameter>

<asp:Parameter Type="DateTime"

Name="PostingDate"></asp:Parameter>

<asp:Parameter Type="String" Name="PostedBy"></asp:Parameter>

</InsertParameters>

</asp:ObjectDataSource>

</asp:Content>

18.14 Example of jobpostings.aspx.cs (Code Behind) for Employer

using System;

using System.Data;

using System.Configuration;

using System.Web;

using System.Web.Security;

using System.Web.UI;

Page 99: Job Portal Project Report by Alim

98

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

public partial class postinglist_aspx : Page

{

protected void Page_Load(object sender, EventArgs e)

{

if

(!Roles.IsUserInRole(ConfigurationManager.AppSettings["employerrolename"]))

{

Response.Redirect("~/customerrorpages/NotAuthorized.aspx");

}

}

protected void GridView1_RowCommand(object sender,

GridViewCommandEventArgs e)

{

if (e.CommandName == "edit")

{

Response.Redirect("~/employer/addeditposting.aspx?id=" +

e.CommandArgument);

}

}

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs

e)

{

if (e.Row.RowType == DataControlRowType.DataRow)

{

ImageButton b = (ImageButton)e.Row.Cells[4].Controls[0];

b.CommandName = "edit";

b.CommandArgument =

GridView1.DataKeys[e.Row.RowIndex].Value.ToString();

}

}

Page 100: Job Portal Project Report by Alim

99

}

18.15 Example of MyFavorites.aspx (UI Code) for Employer

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

CodeFile="MyFavorites.aspx.cs"

Inherits="MyFavorites_aspx" Title="Untitled Page" %>

<%@ Register Src="../UserControls/DisplayModeController.ascx"

TagName="DisplayModeController"

TagPrefix="uc4" %>

<%@ Register Src="../UserControls/MyJobs.ascx" TagName="MyJobs"

TagPrefix="uc3" %>

<%@ Register Src="../UserControls/MySearches.ascx" TagName="MySearches"

TagPrefix="uc2" %>

<%@ Register TagPrefix="uc1" TagName="MyResumes"

Src="../UserControls/MyResumes.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

runat="server">

<div align="center">

<asp:Label ID="Label14" runat="server" SkinID="FormHeading" Text="My

Favorites"></asp:Label>

<br />

<asp:WebPartManager ID="WebPartManager1" runat="server">

</asp:WebPartManager>

<br />

<uc4:DisplayModeController ID="DisplayModeController1" runat="server"

/>

<br />

<asp:CatalogZone ID="CatalogZone1" runat="server" HeaderText=""

VerbButtonType="Link">

<ZoneTemplate>

<asp:PageCatalogPart ID="PageCatalogPart1" runat="server"

Title="Available Web Parts" />

</ZoneTemplate>

</asp:CatalogZone>

</div>

Page 101: Job Portal Project Report by Alim

100

<br />

<table style="width: 100%">

<tr>

<td style="width: 100%">

<asp:WebPartZone HeaderText="My Resumes" ID="WebPartZone1"

runat="server" WebPartVerbRenderMode="TitleBar"

ShowTitleIcons="False" Width="100%">

<MinimizeVerb Text="Collapse"

ImageUrl="~/Images/CollapseButton.gif" />

<RestoreVerb Text="Expand"

ImageUrl="~/Images/ExpandButton.gif" />

<CloseVerb ImageUrl="~/Images/CloseButton.gif" />

<ZoneTemplate>

<uc1:MyResumes ID="MyResumes1" runat="server"

title="My Resumes" />

</ZoneTemplate>

</asp:WebPartZone>

</td>

</tr>

</table>

<br />

<br />

</asp:Content>

18.16 Example of MyFavorites.aspx.cs (Code Behind) for Employer

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;

public partial class MyFavorites_aspx : Page

Page 102: Job Portal Project Report by Alim

101

{

protected void Page_Load(object sender, EventArgs e)

{

if

(!Roles.IsUserInRole(ConfigurationManager.AppSettings["employerrolename"]))

{

Response.Redirect("~/customerrorpages/NotAuthorized.aspx");

}

}

}

18.17 Example of resumesearch.aspx (UI Code) for Employer

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

CodeFile="resumesearch.aspx.cs"

Inherits="resumesearch_aspx" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

runat="server">

<div align="center">

<asp:Label ID="Label14" runat="server" Text="Search Resume Database"

SkinID="FormHeading"></asp:Label>

<br />

<asp:Label ID="lblResumeCount" runat="server"

SkinID="Slogan"></asp:Label>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

<ContentTemplate>

<table style="width: 100%">

<tr>

<td align="right" valign="top" width="40%">

<asp:Label ID="Label1" runat="server"

Text="Skills :"></asp:Label>

</td>

<td align="left" style="width: 100px">

<asp:TextBox ID="txtSkills"

runat="server"></asp:TextBox>

Page 103: Job Portal Project Report by Alim

102

<asp:RequiredFieldValidator

ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtSkills"

Display="Dynamic" ErrorMessage="Please enter

skills to search for"> *</asp:RequiredFieldValidator>

</td>

</tr>

<tr>

<td align="right" valign="top">

<asp:Label ID="Label3" runat="server"

Text="Country :"></asp:Label>

</td>

<td align="left" style="width: 100px">

<asp:DropDownList ID="ddlCountry" runat="server"

AutoPostBack="True" OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged">

</asp:DropDownList>

</td>

</tr>

<tr>

<td align="right" valign="top">

<asp:Label ID="Label4" runat="server" Text="State

:"></asp:Label>

</td>

<td align="left" style="width: 100px">

<asp:DropDownList ID="ddlState" runat="server"

AutoPostBack="True" OnSelectedIndexChanged="ddlState_SelectedIndexChanged">

</asp:DropDownList>

</td>

</tr>

<tr>

<td align="right" valign="top">

<asp:Label ID="Label2" runat="server" Text="City

:"></asp:Label>

</td>

<td align="left" style="width: 100px">

<asp:TextBox ID="txtCity" runat="server"

Enabled="False"></asp:TextBox>

</td>

</tr>

Page 104: Job Portal Project Report by Alim

103

<tr>

<td align="center" colspan="2" valign="top">

<asp:ImageButton ID="ImageButton1" runat="server"

ImageUrl="~/Images/SearchButton.gif"

OnClick="ImageButton1_Click" />

</td>

</tr>

<tr>

<td align="center" colspan="2" valign="top">

<asp:Label ID="lblMsg" runat="server"

SkinID="FormLabel"></asp:Label>

</td>

</tr>

<tr>

<td align="left" colspan="2" valign="top">

<asp:ValidationSummary ID="ValidationSummary1"

runat="server" />

</td>

</tr>

</table>

</ContentTemplate>

</asp:UpdatePanel>

<asp:UpdateProgress ID="UpdateProgress1" runat="server"

AssociatedUpdatePanelID="UpdatePanel1">

<ProgressTemplate>

<asp:Image ID="Image1" runat="server"

ImageUrl="~/images/progress.gif" /></ProgressTemplate>

</asp:UpdateProgress>

<br />

</div>

<asp:UpdatePanel ID="UpdatePanel2" runat="server"

UpdateMode="Conditional">

<ContentTemplate>

<asp:GridView ID="GridView1" runat="server" AllowPaging="True"

AutoGenerateColumns="False"

DataKeyNames="ResumeID"

OnPageIndexChanging="GridView1_PageIndexChanging"

OnRowCommand="GridView1_RowCommand"

Page 105: Job Portal Project Report by Alim

104

OnRowDataBound="GridView1_RowDataBound" Width="100%">

<Columns>

<asp:BoundField DataField="JobTitle"

HeaderText="Title"></asp:BoundField>

<asp:BoundField DataField="educationlevelid"

HeaderText="Education" ShowHeader="False">

</asp:BoundField>

<asp:BoundField DataField="experiencelevelid"

HeaderText="Experience"></asp:BoundField>

<asp:BoundField DataField="TargetCity"

HeaderText="Location"></asp:BoundField>

<asp:ButtonField CommandName="viewdetails"

ButtonType="Image" ImageUrl="~/Images/ShowDetails.gif">

</asp:ButtonField>

</Columns>

</asp:GridView>

</ContentTemplate>

</asp:UpdatePanel>

<br />

<br />

</asp:Content>

18.18 Example of resumesearch.aspx.cs (Code Behind) for Employer

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 JobSiteStarterKit.BOL;

public partial class resumesearch_aspx : Page

{

Page 106: Job Portal Project Report by Alim

105

private void BindGrid()

{

int countryid = -1, stateid = -1;

if (ddlCountry.SelectedItem != null)

countryid = int.Parse(ddlCountry.SelectedValue);

if (ddlState.SelectedItem != null)

stateid = int.Parse(ddlState.SelectedValue);

DataSet ds = Resume.SearchResumes(txtSkills.Text, countryid, stateid,

txtCity.Text);

GridView1.DataSource = ds;

GridView1.DataBind();

if (GridView1.Rows.Count <= 0)

{

lblMsg.Text = "No records found!";

}

else

{

lblMsg.Text = "";

}

UpdatePanel2.Update();

}

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs

e)

{

if (e.Row.RowType == DataControlRowType.DataRow)

{

ImageButton b = (ImageButton)e.Row.Cells[4].Controls[0];

b.CommandName = "viewdetails";

b.CommandArgument =

GridView1.DataKeys[e.Row.RowIndex].Value.ToString();

e.Row.Cells[1].Text =

EducationLevel.GetEducationLevelName(int.Parse(e.Row.Cells[1].Text));

Page 107: Job Portal Project Report by Alim

106

e.Row.Cells[2].Text =

ExperienceLevel.GetExperienceLevelName(int.Parse(e.Row.Cells[2].Text));

}

}

protected void Page_Load(object sender, EventArgs e)

{

if

(!Roles.IsUserInRole(ConfigurationManager.AppSettings["employerrolename"]))

{

Response.Redirect("~/customerrorpages/NotAuthorized.aspx");

}

if (!Page.IsPostBack)

{

FillCountries();

FillStates();

lblResumeCount.Text = "(Currently we have " +

Resume.GetResumeCount() + " resumes !!!)";

}

}

private void FillCountries()

{

ddlCountry.DataSource = Country.GetCountries();

ddlCountry.DataTextField = "CountryName";

ddlCountry.DataValueField = "CountryID";

ddlCountry.DataBind();

}

private void FillStates()

{

ddlState.DataSource =

State.GetStates(int.Parse(ddlCountry.SelectedValue));

ddlState.DataTextField = "StateName";

ddlState.DataValueField = "StateID";

ddlState.DataBind();

}

Page 108: Job Portal Project Report by Alim

107

protected void ddlCountry_SelectedIndexChanged(object sender, EventArgs

e)

{

FillStates();

txtCity.Enabled = false;

}

protected void GridView1_RowCommand(object sender,

GridViewCommandEventArgs e)

{

if (e.CommandName == "viewdetails")

{

Response.Redirect("~/employer/viewresume.aspx?id=" +

e.CommandArgument);

}

}

protected void GridView1_PageIndexChanging(object sender,

GridViewPageEventArgs e)

{

GridView1.PageIndex = e.NewPageIndex;

BindGrid();

}

protected void ddlState_SelectedIndexChanged(object sender, EventArgs e)

{

if (ddlState.SelectedIndex > 0)

{

txtCity.Enabled = true;

}

else

{

txtCity.Enabled = false;

}

}

protected void ImageButton1_Click(object sender, ImageClickEventArgs e)

{

BindGrid();

Page 109: Job Portal Project Report by Alim

108

}

}

18.19 Example of viewresume.aspx (UI Code) for Employer

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

CodeFile="viewresume.aspx.cs"

Inherits="viewresume_aspx" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

runat="server">

<div align="center">

<asp:Label ID="Label14" runat="server" Text="View Resume"

SkinID="FormHeading"></asp:Label><br />

&nbsp;</div>

<table width="100%">

<tr>

<td>

<asp:Label ID="lblName" runat="server"

SkinID="FormGroupLabel"></asp:Label>

</td>

</tr>

<tr>

<td>

<asp:Label ID="lblEducation" runat="server"

SkinID="FormGroupLabel"></asp:Label>

</td>

</tr>

<tr>

<td>

<asp:Label ID="lblExperience" runat="server"

SkinID="FormGroupLabel"></asp:Label>

</td>

</tr>

<tr>

<td>

Page 110: Job Portal Project Report by Alim

109

<asp:Label ID="lblCoveringLetter" runat="server"

Width="100%"></asp:Label>

</td>

</tr>

<tr>

<td>

<asp:Label ID="lblResume" runat="server"

Width="100%"></asp:Label>

</td>

</tr>

<tr>

<td align="center">

<asp:ImageButton ID="ImageButton1" runat="server"

ImageUrl="~/Images/BackButton.gif"

OnClick="ImageButton1_Click" />

&nbsp;<asp:ImageButton ID="ImageButton2" runat="server"

ImageUrl="~/Images/MyFavorite.gif"

OnClick="ImageButton2_Click" />

</td>

</tr>

</table>

</asp:Content>

18.20 Example of viewresume.aspx.cs (Code Behind) for Employer

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 JobSiteStarterKit.BOL;

using ASP;

Page 111: Job Portal Project Report by Alim

110

public partial class viewresume_aspx : Page

{

protected void Page_Load(object sender, EventArgs e)

{

if

(!Roles.IsUserInRole(ConfigurationManager.AppSettings["employerrolename"]))

{

Response.Redirect("~/customerrorpages/NotAuthorized.aspx");

}

Resume r = Resume.GetResume(int.Parse(Request.QueryString["id"]));

ProfileCommon p = Profile.GetProfile(r.UserName);

lblName.Text = "Full Name : " + p.FirstName + " " + p.LastName;

lblEducation.Text = "Education Level : " +

EducationLevel.GetEducationLevelName(r.EducationLevelID);

lblExperience.Text = "Experience Level : " +

ExperienceLevel.GetExperienceLevelName(r.ExperienceLevelID);

lblCoveringLetter.Text = r.CoveringLetterText.Replace("\r\n",

"<br>");

lblResume.Text = r.ResumeText.Replace("\r\n", "<br>");

}

protected void ImageButton1_Click(object sender, ImageClickEventArgs e)

{

Response.Redirect("~/employer/resumesearch.aspx");

}

protected void ImageButton2_Click(object sender, ImageClickEventArgs e)

{

MyResume r = new MyResume();

r.ResumeID = int.Parse(Request.QueryString["id"]);

r.UserName = Profile.UserName;

MyResume.Insert(r);

}

}

Page 112: Job Portal Project Report by Alim

111

19. Conclusion In order to make the internal processes smooth and day to day jobs hassle free Jobs on the Net will have several report generation facilities. Following are the proposed reports in Job Portal on the Net : - List of Jobs.

List of Resume.

Add Resume to favourite.

Besides these several other reports may also get incorporated at a latter date.

Page 113: Job Portal Project Report by Alim

112

20. Reference

During the analysis, design and development of the project the following books

were required:

Software Engineering A Practioner’s Approach By Roger S.Pressman

An Introduction To Database Systems By Bipin C. Desai

Beginning .NET 2005 By Thearon Willis, Jonathan Crossland, Richard D. Blair

Beginning .NET Databases By Thearon Willis

Visual Basic.NET Programming Black Book By Steven Holzner


Recommended