Docstoc

SIM UNIVERSITY.doc

Document Sample
SIM UNIVERSITY.doc Powered By Docstoc
					          SIM UNIVERSITY
SCHOOL OF SCIENCE AND TECHNOLOGY




            CAPSTONE ICT PROJECT


DESIGN AND IMPLEMENTATION OF AN
     E-RECRUITMENT SYSTEM


     FINAL REPORT


         STUDENT      : LEE AI LING
                       (PI NO. Q0707120)
         SUPERVISOR   : DR. SIVAKUMAR SASIKALA
         PROJECT CODE : JUL2009/ ICT499



       A project report submitted to SIM University
 in partial fulfilment of the requirements for the degree of
 BSc (Honours) in Information Technology and Business


                         May 2010
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                              Acknowledgements


I would like to express my sincere gratitude to my project supervisor, Dr. Sasi
Sivakumar for her consistent guidance, support and encouragement throughout my
project. Her valuable feedbacks and encouragement had provided me with a
wonderful learning experience and had helped me greatly in planning and developing
my project. Without her guidance and advices, this project would not be able to
complete so smoothly.


I would also like to thank the staffs of Neno Healthcare, who had supported me and
provided me with all the necessary information for my project development despite
their own commitments. Throughout the project, they have provided me with good
advices and shared their experiences with me, which were invaluable.


Lastly, I would like to show my appreciation to my family, friends and colleagues
who had been understanding and supportive. Their words of encouragement had
motivated me and built up my confidence to overcome this tough and demanding
period.




                                                                                 ii
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                                       Abstract


The internet and the availability of supporting information and communication
technologies (ICT) have brought radical change to recruitment by significantly
altering the traditional process of recruiting, resulting in the formation of Electronic
Recruitment (E-Recruitment) systems. This report explains the project objectives and
documents the process of developing and managing an E-Recruitment System
throughout the project life cycle.


This report is structured as follows. Firstly, it gives an introduction to the project by
identifying the project objectives and the existing problems faced by Neno Healthcare
with the traditional recruitment process. It then discusses the concepts of the system
development approach and methodology used. The waterfall model is adopted for the
System Development Life Cycle (SDLC). Its organised structure and clearly defined
key phases of system development ensures visible progress and clarity of tasks in my
project.


The report then describes the database and interface design and development. Visual
Basic and SQL codes used to implement the system and database are also included.
Test cases and results are shown to demonstrate that the system objectives and
business requirements were achieved.


Project management methodology and techniques were discussed and tools such as
work breakdown structure and Gantt chart were used to achieve effective project
performance and better management control. Literature reviews are written to show
how ideas were gained through researching and how these ideas influenced and
shaped the project.


I have also included critical review and reflections on the development process to
share on useful lessons learned. Enhancements specific to the developed database are
also identified so that future works can be performed to improve the system.




                                                                                      iii
                       Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                                                        Table of Content

Acknowledgements.................................................................................................................... ii

Abstract ..................................................................................................................................... iii

Table of Content ....................................................................................................................... iv

List of Figures and Tables ........................................................................................................ viii

About the CD-ROM .................................................................................................................... x

Chapter 1 - Project Introduction ................................................................................................ 1

   1.1          Company Background............................................................................................... 1

   1.2          General Project Aims ................................................................................................ 2

   1.3          System Objectives .................................................................................................... 3

Chapter 2 - Methodology ........................................................................................................... 7

   2.1 System Development Life Cycle ....................................................................................... 7

   2.2 Requirement Gathering Techniques ................................................................................ 8

       2.2.1 Internet ..................................................................................................................... 8

       2.2.2 User Interview with Neno’s Personnel ..................................................................... 8

       2.2.3 Survey for Job Seekers .............................................................................................. 9

   2.3 Equipment and Resources ............................................................................................... 9

       2.3.1 Hardware and Software Used ................................................................................... 9

       2.3.2 Techniques Used ..................................................................................................... 10

       2.3.3 Resources ................................................................................................................ 11

   2.4 Database Design Methodology ...................................................................................... 11

Chapter 3 - System Analysis and Design .................................................................................. 12

   3.1          System Analysis Technique..................................................................................... 12

       3.1.1           Use Case Analysis ............................................................................................. 12

   3.2          Database Design ..................................................................................................... 13

       3.2.1           Entity-Relationship Diagram ............................................................................ 13

           3.2.1.1         Initial Entity-Relationship Diagram .............................................................. 13



                                                                                                                                              iv
                     Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


          3.2.1.2        Final Entity-Relationship Diagram................................................................ 14
      3.2.2          Entity Definition ............................................................................................... 15

      3.2.3          Data Dictionary ................................................................................................ 17

      3.2.4          Relational Headings ......................................................................................... 23

   3.3         System Constraints and Assumptions .................................................................... 24

   3.4         System Architecture ............................................................................................... 25

   3.5         User Interface Design ............................................................................................. 25

Chapter 4 - System Implementation ........................................................................................ 27

   4.1 Database Development ................................................................................................. 27

      4.1.1 SQL Statements ....................................................................................................... 27

      4.1.2 Creating Database Triggers and Stored Procedures ............................................... 29

   4.2 System Development ..................................................................................................... 33

Chapter 5 - System Testing ...................................................................................................... 34

   5.1 Integrity Testing ............................................................................................................. 34

      5.1.1 Entity Integrity Testing ............................................................................................ 34

      5.1.2 Referential Integrity Testing ................................................................................... 35

      5.1.3 Cardinalities Testing ................................................................................................ 37

   5.2 Functional Testing .......................................................................................................... 40

Chapter 6 - Project Management ............................................................................................ 46

   6.1 Project Life Cycle ............................................................................................................ 46

      6.1.1 Initiating .................................................................................................................. 46

      6.1.2 Planning................................................................................................................... 47

      6.1.3 Executing ................................................................................................................. 48

      6.1.4 Monitoring and Controlling .................................................................................... 48

      6.1.5 Closing ..................................................................................................................... 49

   6.2 Work Breakdown Structure ........................................................................................... 50

   6.3 Gantt Chart..................................................................................................................... 52

Chapter 7 - Literature Review .................................................................................................. 54


                                                                                                                                          v
                     Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


   7.1 Online Recruitment ........................................................................................................ 54

   7.2 Methodology.................................................................................................................. 54

   7.3 System Analysis and Design ........................................................................................... 55

   7.4 Database Design and Implementation .......................................................................... 55

   7.5 Web Design and Implementation .................................................................................. 56

   7.6 Project Management ..................................................................................................... 57

Chapter 8 - Critical Review and Reflections ............................................................................. 58

   8.1 Methods of Investigation ............................................................................................... 58

   8.2 Database Design............................................................................................................. 58

   8.3 Database Development ................................................................................................. 59

   8.4 System Development ..................................................................................................... 59

   8.5 Project Management ..................................................................................................... 60

       8.5.1 Techniques Used ..................................................................................................... 60

       8.5.2 Project Schedule Review ......................................................................................... 60

Chapter 9 - Conclusion ............................................................................................................. 61

Chapter 10 - Recommendations .............................................................................................. 62

   10.1 Future Enhancement ................................................................................................... 62

       10.1.1 Auto Update of Job Application Status ................................................................. 62

       10.1.2 Tracking of jobs that have not been recruited for a long period of time ............. 62

       10.1.3 Provide quarterly and yearly reports .................................................................... 62

       10.1.4 Provide Graphical Charts in reports ...................................................................... 62

       10.1.5 Enhance Password Security .................................................................................. 63

       10.1.6 Send Email to acknowledge job application ......................................................... 63

       10.1.7 Online Requisition for new headcount ................................................................. 63

Chapter 11 - References .......................................................................................................... 64

   11.1 Book References .......................................................................................................... 64

   11.2 Website References ..................................................................................................... 64




                                                                                                                                    vi
                     Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Chapter 12 - Appendices .......................................................................................................... 67

   Appendix A: Questionnaire - Interview questions ............................................................... 67

   Appendix B: Questionnaire – Survey Form .......................................................................... 68

   Appendix C: Initial ER Diagram ............................................................................................ 70

   Appendix D: User Interface Screenshots ............................................................................. 71

   Appendix E: Detailed Test Suite for E-Recruitment System ................................................ 96

   Appendix F: Source Codes to create database tables:....................................................... 105

   Appendix G: Web System Source Codes ............................................................................ 109




                                                                                                                                 vii
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                              List of Figures and Tables


Figures

Figure 2.1.1         The Waterfall SDLC model                                       7
Figure 3.1.1         Use Case Diagram                                              12
Figure 3.2.1         Entity-Relationship Diagram (Final)                           14
Figure 3.4           System Architecture Diagram                                   25
Figure 4.1.1         A DDL for Job table                                           27
Figure 4.1.2         DML for Inserting data                                        28
Figure 4.1.3         Output after Insertion of data                                28
Figure 4.1.4         SQL for Create Trigger Update_Job_Status                      29
Figure 4.1.5         SQL for Create Procedure Update_Job_Deadline                  30
Figure 4.1.6         SQL to Execute Procedure                                      30
Figure 4.1.7         SQL to show run configuration check                           31
Figure 4.1.8         SQL to set the procedure to auto execute                      32
Figure 4.1.9         SQL to rerun configuration check (I)                          32
Figure 4.1.10        SQL to rerun configuration check (II) – After Restart         33
Figure 5.1.1         Entity Integrity Test – 1                                     35
Figure 5.1.2         Referential Integrity Test – 1                                36
Figure 5.1.3         Referential Integrity Test -2                                 36
Figure 5.1.4         Cardinalities Test – 1                                        38
Figure 5.1.5         Cardinalities Test – 2                                        39
Figure 6.1.1         Project Life Cycle Diagram                                    46
Figure 6.3.1         Gantt chart                                                   52
Figure 6.3.2         Gantt chart – Continue                                        53




Tables

Table 2.3.1          Project Resources                                             11
Table 3.2.2          Entity Definition                                             15
Table 3.2.3          Data Dictionary – Applicant                                   17
Table 3.2.4          Data Dictionary – User                                        18
Table 3.2.5          Data Dictionary - Reference                                   18




                                                                                  viii
               Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Table 3.2.6         Data Dictionary - Education                                   19
Table 3.2.7         Data Dictionary – Work_Experience                             19
Table 3.2.8         Data Dictionary - Skill                                       20
Table 3.2.9         Data Dictionary – Skill_Cat                                   20
Table 3.2.10        Data Dictionary – Job                                         21
Table 3.2.11        Data Dictionary – Job_Category                                21
Table 3.2.12        Data Dictionary – Job_Required_Skills                         21
Table 3.2.13        Data Dictionary – Application                                 22
Table 3.2.14        Data Dictionary – Interview                                   22
Table 3.2.15        Data Dictionary – Recruitment                                 22
Table 5.2.1         General Test Suite                                            41
Table 6.1.1         Risk Assessment                                               47
Table 6.1.2         Work Breakdown Structure                                      50




                                                                                   ix
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                               About the CD-ROM


This report comes with an accompanying CD-ROM that includes the softcopy of the
report in word document and the backup file of the database which can be used to
restore on SQL Server Express 2008 to recover the full structure and functionalities of
the developed database with sample data. A free copy of the Microsoft SQL Express
2008 Setup File is also included in the CD for easy installation of the supporting
software.


The contents of the CD-ROM include:
      Zip file of Project report in Microsoft Word (Filename:
       LeeAiLing_FYP_Report.zip)

      Zip File of all DDL & DML Scripts (Filename: SQL_Scripts.zip)

      Zip File of all ASP.NET codes (Filename: ERecruitment_Project_Files.zip)

      Zip File of all meeting logs (Filename: Meeting_Log.zip)

      Zip File of Project Poster in Microsoft PowerPoint (Filename:
       LeeAiLing_Poster.zip)

      Zip File of the setup files for installing MS Visual Studio 2008 Express
       (Filename: VisualStudio_setup_files.zip)

      Zip File of the setup files for installing MS SQL Server 2008 Express
       (Filename: SQLServer2008_setup_file)




                                                                                     x
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                         Chapter 1 - Project Introduction


1.1 Company Background

Neno Healthcare Limited is a pharmaceutical and healthcare service provider based in
Singapore. It offers patients with a wide range of healthcare services, from general
Fee-For-Service consultations to specialized industrial healthcare consultancy. As the
company is expanding into new offices, it is constantly seeking and recruiting talents.

Neno is currently adopting the traditional recruitment process, which has been in
practice for years. This process requires recruiters to post the jobs on newspapers and
job agency websites, and have job applicants to email resume directly to them. New
recruitment and interview information are being manually updated into their current
Human Resource information system by the human resource officers. All data have to
be manually entered into the system after data collection from the respective source
which is tedious. This will lead to problems such as data redundancy and uncontrolled
and inconsistent user input of data in the system.

In the process in which job applicants send resume through emails, there is a limited
email storage spaces issue. The employer’s mailbox can be easily filled with emails
sent by job seekers. As the number of job applicants increases, the current system has
become inefficient and insufficient for the expanding operation needs.


Hence, the company is taking a step to computerise its operations to minimize human
errors and to improve on the efficiency of its recruitment process by implementing an
E-Recruitment system.


An E-Recruitment system is a paperless web-based system that is available on 24/7
which allows job seekers to apply jobs at anytime and anywhere with internet access.
It enables the company to utilise to recruit personnel effectively and efficiently and
helps to streamline the recruitment process by reducing administrative effort in the
recruiting department and also the lapsed time from authorising a vacancy to an
applicant being successfully recruited for the job. The talent pool search function




                                                                                      1
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


allows HR personnel to search for most suitable candidates based on the skills and
educational level the job requires.


Ultimately, the system will reduce manual work, increase operations efficiency and
productivity. It allows the company to reach out to the most suitable candidates for
each of the jobs in a shorter time and more efficient manner.


1.2 General Project Aims

The overall objective for this project is to make use of information technology to
implement an E-Recruitment system that can help Neno to streamline the recruitment
process by reducing administrative effort in the recruiting department and also the
lapsed time from authorising a vacancy to an applicant receiving a formal offer of
appointment. This project also aims to provide job applicants a convenient and 24/7
access to job vacancies and application status and to minimize the time and cost
incurred in the recruitment processes, thus, increasing the efficiency and effectiveness
in recruiting personnel.

The main project aims of the E-Recruitment System are summarised as follows:


      To improve the efficiency of Neno’s recruitment by automating recruitment
       processes to eliminate manual work.


      To improve data integrity of business data by reducing inconsistent
       redundancy and errors caused by manual work.


      To generate accurate and up-to-date analytical reports for management staffs
       to view and analyze using little effort.


      To improve headhunting process by introducing a talent pool search function,
       available in the new system.


      To provide job seekers a convenient and 24/7 access to view and apply to job
       vacancies.


                                                                                      2
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


1.3 System Objectives


To achieve the project aims specified in Section 1.2 General Project Aims, a list of
system objectives have been identified and grouped into 4 categories (Job Applicant,
HR Admin, System and Managers). Below is the list of system objectives, grouped
according to the 4 categories.


For Job Applicant’s usage:
SO1    Online Job Applicant account registration
       Job applicant has to register a new account before he or she can apply for a
       job. The registration page is in the form of an online resume page which
       applicant is required to fill up details such as personal particulars, education
       background and past work experiences details.


SO2    Job vacancy search tool
       Job applicant can search for jobs and view job details using the search tool.
       The search tool will provide a list of job categories in which applicant can
       select and view the jobs within the selected job category.


SO3    Application for jobs
       Job applicant can apply job by submitting his or her online resume which has
       been created when user registers a new account initially.


SO4    Edit online resume
       Job applicant can login to the system to edit his or her online resume anytime
       after he or she has successfully registered an account.


SO5    Job application status viewing
       The system has a function for registered applicants to login to the system to
       view his or her job application status anytime after applying for a job.


SO6    Change login password
       Registered job applicant can login to the system to change his or her password.



                                                                                     3
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


For HR Administrator’s usage:
SO7    Post new job
       HR Admin can post a job by inputting the details of the job. The job posted
       will be displayed in the job list when applicant searches for job vacancies.


SO8    Update/ Delete job
       HR Admin can login to the system to update job details or delete posted jobs.


SO9    Adding job-required skills to each job
       Each job has a set of job-required skills which the applicant should be
       possessing before he or she applies for the job.


       HR Admin can add job-required skills to a job by searching and selecting
       skills from a skill list and add to the job.


SO10 Viewing of Application forms submitted
       HR Admin can view the job application forms submitted by applicant. HR
       Admin can select a particular job title to view all applications submitted for
       that job.


       The application form will include the applicant’s resume for HR Admin to
       screen through. This page also allows HR Admin to shortlist a suitable
       applicant for interview.


SO11 Talent Pool Search
       The Talent Pool Search function allows HR personnel to search for potential
       candidates exist in the job database based on the job-required skills and
       applicant’s education level.


SO12 Updating of Job application status
       In circumstances when the HR Admin is informed by the hiring manager that
       an applicant has been successfully shortlisted after the final round of
       interview, the HR Admin will login to the system and update the job
       application status to from “Pending” to “Pass”.


                                                                                       4
            Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


SO13 Updating of recruitment details
      HR Admin can add or update recruitment details such as cost and benefits of
      hire through the Update Recruitment details page after a job has been filled.
      The Cost of Hire total amount can be computed by the system when Admin
      fills up necessary details such as Cost amount from interviewer and
      advertising.


For System to Auto Update:
SO14 Auto Extend Job Application Deadline
      Every job has a job application deadline. Once the current date is greater than
      the job deadline, the system will auto extend the job deadline to one month
      later. For instance, if the current job deadline is 14 May and current date is 15
      May and the job is still vacant, the system will extend the deadline to 14 June.


SO15 Auto Update Job Status
      Once HR Admin has updated an application status to “Pass” when applicant
      has successfully recruited for a particular job, the system will detects the
      update and auto updates the status of that job to “Filled”


For Manager’s usage:
SO16 Job Application report
      Application report allows HR manager to track the job applications submitted
      within a selected year, month and job category. HR manager or hiring
      manager is also able to view the applicant’s application form corresponding to
      each application to make hiring decisions.


SO17 Add Interview Details
      After interview, the hiring manager can add interview details of the candidate
      such as the rating, status and remarks of the interview. The link to this
      function is associated with the Job Application report.


SO18 Job tracking report
      This is to track jobs that have been posted within the month and year selected
      by Manager, and whether the job has been filled.


                                                                                       5
               Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120




SO19 Interview tracking report
      HR Manager can track the interview details such as rating and status of
      interviews held within a selected year, month and interview status.


SO20 Recruitment report
      HR manager can track the jobs have been recruited within a selected month,
      year and job category. This report provides details such as the job details and
      date of recruitment.


SO21 Cost-Per-Hire report
      This report allows manager to track the cost and benefits of recruitment and
      time taken for each hire. The report can be viewed by job category or by job
      title.




                                                                                        6
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                              Chapter 2 - Methodology


In order to carry out this project, a set of project methodologies are to be fulfilled.
This chapter will discuss on the methodologies to gather and analyse requirements,
designing and implementing system.


2.1 System Development Life Cycle
The project follows closely to the System Development Life Cycle (SDLC)
methodology which is developed into different specific models cater for different
types of projects. The waterfall model is chosen for this project mainly because of its
flexibility to revert to the previous phase if problems encountered, thus gives higher
quality assurance to the project results.


The waterfall model is a sequential development process, in which development is
seen as flowing steadily downwards through the phases of requirements analysis,
                                                                      [10]
system analysis and design, system implementation and testing                . It allows the
project be divided into sequential phases, with some overlap and revert to previous
phase.


With the key phases clearly defined in the model, I am able to identify the tasks and
deliverables required in each phase and set project milestones. This helps me to
ensure visible progress in my project and going on the right track.




                          Figure 2.1.1 The Waterfall SDLC model



                                                                                          7
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


2.2 Requirement Gathering Techniques


Requirements describe the characteristics of the objective in very specific detail. In
order to understand the entire recruitment process adopted by Neno and to gather user
requirements, I have chosen the following methods as the investigation techniques in
the Requirements phase.


2.2.1 Internet
The Internet provides a fast and easy way to gain information. It played an important
role in this stage as it gives me a better understanding on how an E-Recruitment
process is carried out. With this knowledge gained, only then will I be able to prepare
for the interview questionnaires.


Internet also allows me to gain ideas on how the E-Recruitment system will look like
and came out with suggestions with the system design and functions. These
suggestions were then conveyed to the user during the interview sessions.


2.2.2 User Interview with Neno’s Personnel
The objective of having interviews with user is to gain a better understanding of
Neno’s recruitment process and to gather specific information on current issues and
user requirements. Meeting with users allows me to clarify any concerns up front and
aim to build up a rapport with the users. [5]


Initial meeting was held with the key personnel who are the HR personnel and
manager of Neno to understand the business process and gather requirements.
Subsequent meetings were held with them to clarify doubts after analysing the
information gathered previously.


Observations of the current workflow had also been carried out to spot any details that
have been missed out during the interactions and identify opportunities for
improvement.


Please refer to Appendix A for a sample copy of the interview questionnaire.



                                                                                     8
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


2.2.3 Survey for Job Seekers


Apart from Neno’s HR personnel and managers, the E-Recruitment system will be
used by job seekers who wish to view and apply jobs from Neno. Thus, I decided to
perform survey with the outsiders to gather more information. I have gathered 10
friends, ex-colleagues and relatives who are looking for jobs to help me with the
survey. Survey forms were distributed to them across the whole organisation
hierarchy to gather more information on their requirements for an E-Recruitment
system. Please refer to Appendix B for a sample copy of the survey form for job
seekers.


2.3 Equipment and Resources


2.3.1 Hardware and Software Used


Below is the list of software used in this project:


Microsoft Visual Studio.NET 2008 Express
I have chosen Microsoft Visual Studio.Net as my software development tool because
it is free, user-friendly and is embedded with HTML which makes web content design
easy. Visual Studio allows for the rapid development of powerful web applications
and is object-oriented.


Microsoft SQL Server 2008 Express
I have chosen Microsoft SQL Server as the database development tool because it
supports a rapidly increasing number of concurrent users, scalable, easy to use and is
freely-downloadable.


Microsoft Project 2003
I have chosen Microsoft Project as the project scheduling tool because it provides
easy-to-use functions such as creating Gantt chart and network diagram to track
project progress.




                                                                                    9
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Microsoft Office 2003 Professional
Microsoft Word is used for reporting and documentation of the plans and progress of
the system. With built-in functions such as drawing tools and grammatical and
spelling checks, diagrams can be easily drawn and grammatical and spelling errors
can minimized.


Below is the hardware used in this project:
Notebook Computer
A notebook computer is used to install necessary software and initial project research
and used in all phases of the project. Because of its mobility, I am able to work on the
project at anywhere with internet access, and able to present data and information to
Neno’s staffs conveniently.


2.3.2 Techniques Used


ASP.NET
There are many server-side programming language such as ASP.Net and JSP for web
development. I chose ASP.Net because it allows for rapid development of powerful
web applications and is object-oriented, and I have prior working experiences using it.


Language Integrated Query (LINQ)
LINQ is a Microsoft .NET Framework component that adds native data querying
capabilities to .NET languages. The LINQ to SQL provider allows LINQ to be used to
query SQL Server databases. This feature converts a LINQ query to a SQL query
                                                    [4]
which is then sent to SQL Server for processing.          Throughout the development of
the system, this feature has been extensively used to access the SQL database for data
retrieval.


SQL Statements
Because the system requires interacting with database, statements like SELECT query
are used to retrieve data, other more procedural statements are used to create triggers
and stored procedures, and Data Definition Language (DDL) to create and alter tables.
There is a need to master all these SQL techniques in order to use them appropriately.



                                                                                     10
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


2.3.3 Resources


The resources needed to execute this project are:

Resources                                    Justification
                                             Provide guidance and feedback
Project supervisor
                                             throughout the project’s lifecycle

Research materials from libraries and the    To carry out literature reviews and
Internet.                                    information gathering for the project

                                             The manager and the HR personnel
                                             provide information such as user
Neno Staffs                                  requirement and feedback, and
                                             background of company which are
                                             necessary to carry out this project.

                              Table 2.3.1 Project Resources




2.4 Database Design Methodology

As for the design methodology on database, an entity relationship (ER) model (Please
see Appendix C for Initial ER Diagram and Figure 3.2.1 for final ER Diagram) is
drawn to describe how data is represented and accessed.

It defines and represents the logical relationships of entities being identified. Each of
these entities stores respective data which the system will keep track of. More details
are discussed in Section 3.2 on Database Design




                                                                                      11
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                   Chapter 3 - System Analysis and Design


3.1 System Analysis Technique


3.1.1   Use Case Analysis
In order to design the system from the user’s perspective, I have adopted use case
analysis. Through use case analysis, system requirements, usage of system, the roles
the user (actor) plays in the system, what the system does in response to the user
stimulus and what the user receives from the system can be clearly communicated.


A use case diagram is drawn to present a graphical overview of the functionality
provided by a system in terms of actors, their goals (represented as use cases) and any
dependencies between the use cases. This allows me to identify what system functions
                                [2]
are performed for which actor         . The below use case diagram shows the scenario of
the E-Recruitment system. There are 4 types of users: Job Browser, Member, HR
Administrator and HR Manager.




                             Figure 3.1.1 Use Case Diagram




                                                                                     12
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


3.2 Database Design


3.2.1   Entity-Relationship Diagram


The database is designed using the Entity-Relationship (ER) design methodology. The
process leads to the design of an Entity-Relationship diagram (ERD) according to the
entities, relationships of entities and data attributes identified. The ERD gives a
conceptual representation of the entities, attributes and relationships identified. I have
drawn the ERD using Crow’s Foot Notation.


Within the ERD, the entity name is shown on the top of the rectangle. Within the
rectangle, the identifier of the entity is shown at the top followed by a horizontal line
                                                          [1]
with the rest of the attributes underneath the line             . Maximum and minimum
cardinalities are shown using symbols including circle, hash mark and crow’s foot
which represents zero, one and many entities respectively.


Reviews of the ERD are done constantly to ensure that the entities and their
associated relationships are accuratley reflecting the associations between the
business objects in the actual business environment


Once the database has been diagrammed, the ERD becomes the blueprint for
constructing the database using Microsoft SQL Server 2008.


Section 3.2.1.2 Final Entity-Relationship Diagram shows the final version of the
ERD after modifications and reviews had been done with the users as new knowledge
was discovered.


3.2.1.1 Initial Entity-Relationship Diagram


The initial version of the Entity-Relationship Diagram from the initial analysis is in
Appendix C.




                                                                                         13
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


3.2.1.2 Final Entity-Relationship Diagram


The final version of the Entity-Relationship Diagram is shown below:


Final ER Diagram




                      Figure 3.2.1 Entity-Relationship Diagram (Final)




                                                                                 14
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


3.2.2 Entity Definition


Entity Name       Attributes                           Description
                  (*Identifiers are underlined)
APPLICANT         AppID             AppPostal          This entity is to keep track
                  AppName           AppCountry         of the details of applicant
                  AppEmail          AppOtherCountry    who will fill up the Job
                  AppPhone          AppNRIC            Application profile form.
                  AppDOB            AppNRICType
                  AppGender         AppNationality
                  AppRace           AppAge
                  AppReligion       AppMarital
                  ExpectedSalary    AppCV
                  Achievement       Active
                  AppAddress        UserID

USER              UserID                               This entity is to keep track
                  Password                             of the users of the system,
                  UserType                             they are grouped according
                  UserGroup                            to 3 groups: Applicant,
                                                       Admin and Manager based
                                                       on UserType

REFERENCE         RefID                                This entity is to keep track
                  RefName                              of referee details of each
                  RefAddress                           applicant.
                  RefOccupation
                  RefPhone
                  RefCompany
                  NoOfYrKnown
                  AppID

EDUCATION         InstituteName                        This entity is to keep track
                  CertObtained                         of education details of each
                  StartDate                            applicant.
                  EndDate
                  HighestEdu
                  AppID

WORK_             CoName                               This entity is to keep track
EXPERIENCE        JobTitle                             of work experience details
                  JobDesc                              of each applicant.
                  LastDrawnPay
                  OtherBenefits
                  StartDate
                  EndDate
                  Reasons
                  CurrExp
                  AppID




                                                                                      15
            Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


SKILL           SkillName                                    This entity is to keep track
                AppID                                        of skill details that the
                SkillDesc                                    company is looking for and
                SkillLevel                                   skills from existing
                SkillCatName                                 employees.

SKILL_          SkillCatID                                   This entity is to keep track
CATEGORY        SkillCatName                                 of Skill category details.
                Remarks

JOB             JobID                                        This entity is to keep track
                JobTitle                                     of the job details which
                JobDesc                                      applicant can view the
                JobPostDate                                  details and apply the job.
                JobDeadline
                Remarks
                HighestPayOffer
                LowestPayOffer
                JobStatus
                JobRequirement
                JobCatID

JOB             JobCatID                                     This entity is to keep track
CATEGORY        JobCatName                                   of job category details.
                Remarks
JOB_            SkillName                                    This entity is to keep track
REQUIRED_       JobID                                        of job skills required for
SKILLS                                                       each job.

APPLICATION     ApplicationID                                This entity is to keep track
                AppDate                                      of the application details
                AppStatus                                    when applicant applied a
                LastUpdated                                  job by filling up the job
                AppID                                        application form.
                JobID
INTERVIEW       InterviewDate                                This entity is to keep track
                ApplicationID                                of interview details
                InterviewRating                              conducted by a manager
                InterviewStatus                              and held on the applicant.
                Remarks
                FinalInteview

RECRUITMENT     RecruitID                                    This entity is to keep track
                CostOfHire                                   of recruitment details when
                LengthOfTime                                 a new employee is
                Benefits                                     recruited.
                Remarks
                RecruitDate
                JobID

                             Table 3.2.2 Entity Definition




                                                                                            16
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


3.2.3 Data Dictionary


Data attributes associated with the entities stated in the above Section 3.2.2 Entity
definition are identified. Below are the data attributes identified and their
descriptions.


 Entity Name: APPLICANT
 Attribute Name   Data Type             Null    Description        Key      Sample Data
 AppID                 Varchar(50)      N      Unique           PK       A0000001,
                                               Applicant ID              A0000002
 AppName               Varchar(50)      N      Name of a job             Aileen Lee,
                                               applicant                 Danny Lee
 AppEmail              Varchar(50)      N      Email address of          aileen@hotmail.com,
                                               job applicant.            danny@hotmail.com
                                               Same as User ID
 AppPhone              Varchar(50)      N      Phone no of job           98379164,
                                               applicant                 91234567
 AppDOB                Date             N      Date of Birth of          1984-06-18,
                                               job applicant             1985-03-08
 AppGender             Varchar(50)      N      Gender of job             Female,
                                               applicant                 Male
 AppRace               Varchar(50)      N      Race of job               Chinese,
                                               applicant                 Malay
 AppReligion           Varchar(50)      Y      Religion of job           Buddhism, Christian
                                               applicant
 ExpectedSalary        Decimal (10,2)   Y      Expected salary           3000.00,
                                               of job applicant          3500.00
 Achievement           Varchar(MAX)     Y      Achievements              Awarded Edusave
                                               of job applicant          Scholarship in 1998
 AppAddress            Varchar(MAX)     Y      Address of job            Block 1 Hougang
                                               applicant                 avenue 2
 AppPostal             Varchar(50)      Y      Postal Code               530001
 AppCountry            Varchar(50)      Y      Country of job            Singapore,
                                               applicant                 Malaysia
 AppOtherCountry       Varchar(50)      Y      Other country             Saudi Arabia,
                                                                         Mexico
 AppNRIC               Varchar(50)      Y      NRIC of job               S8423817G,
                                               applicant                 S8568129A
 AppNRICType           Varchar(50)      Y      NRIC type of              Pink,
                                               job applicant             Blue
 AppNationality        Varchar(50)      Y      Nationality of            Singaporean,
                                               job applicant             Malaysian
 AppAge                Int              Y      Age of Job                25,
                                               applicant                 24
 AppMarital            Varchar(50)      Y      Marital Status of         Single,
                                               job applicant             Married
 AppCV                 Varchar(MAX)     Y      Job applicant’s           RESUME
                                               Resume and                PARTICULARS:
                                               cover letter              Name: Aileen Lee
                                                                         DOB: 18 June 1984


                                                                                        17
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Active              Varchar(50)      Y       To indicate if             Y,
                                             job applicant              N
                                             works in the
                                             company or not.
UserID              Varchar(50)      N       Unique User ID       FK    aileen@hotmail.com,
                                             of the job                 danny@hotmail.com
                                             applicant which
                                             is same as the
                                             email address.
                        Table 3.2.3 Data Dictionary - Applicant



Entity Name: USER
Attribute Name    Data Type          Null      Description        Key        Sample Data
UserID             Varchar(50)       N       Unique User ID       PK    danny@hotmail.com,
                                             of job applicant           Camry
Password           Varchar(50)       N       Name of a job              Dannylee
                                             applicant
UserType           Varchar(50)       N       Type of user               APP,
                                             which user is              Mgm,
                                             belonging.                 Admin

UserGroup          Varchar(50)       Y       User Group                 Applicant,
                                             which user is              Staff
                                             belonging. If
                                             user type is
                                             “APP”, user
                                             group is
                                             “Applicant”. If
                                             user type is
                                             “Mgm” or
                                             “Admin”, user
                                             group is “Staff”.
                          Table 3.2.4 Data Dictionary - User



Entity Name: REFERENCE
Attribute Name   Data Type           Null      Description        Key        Sample Data
RefID              Varchar(50)       N       Unique Referee       PK    1000001,
                                             ID of referee              1000002
RefName            Varchar(50)       Y       Name of referee            Richard Lee,
                                                                        Terry Tan
RefAddress         Varchar(50)       Y       Address of                 Toa Payoh Ave 1,
                                             referee                    Woodlands Ave 6
RefOccupation      Varchar(50)       Y       Occupation of              Lecturer,
                                             referee                    Manager
RefPhone           Varchar(50)       Y       Phone No of                64501234,
                                             referee                    62783372

RefCompany         Varchar(50)       Y       Company name               Ngee Ann Poly,
                                             of referee                 Hitachi Pte Ltd



                                                                                          18
               Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


NoOfYrKnown          Int                 Y       Years of known             5,
                                                 with job                   2
                                                 applicant
AppID                Varchar(50)         N       Unique               FK    A0000001,
                                                 Application ID             A0000002
                                                 of job applicant
                            Table 3.2.5 Data Dictionary - Reference



Entity Name: EDUCATION
Attribute Name   Data Type               Null      Description        Key        Sample Data
InstituteName        Varchar(100)        N       Name of            PK      Ngee Ann Poly,
                                                 Institution of job         SIM University
                                                 applicant
CertObtained         Varchar(100)        N       Certificate        PK      Diploma in Business,
                                                 obtained                   Degree in Business
StartDate            Date                N       Start date of the          2001-01-02,
                                                 course                     2007-01-02
EndDate              Date                Y       End date of the            2004-06-01,
                                                 course                     2010-06-01
HighestEdu           Varchar(50)         Y       To indicate if             Y,
                                                 the education is           N
                                                 the highest for
                                                 the job applicant
AppID                Varchar(50)         N       Unique             FK      A0000001,
                                                 Application ID             A0000002
                                                 of job applicant
                            Table 3.2.6 Data Dictionary - Education



Entity Name: WORK_EXPERIENCE
Attribute Name   Data Type Null                    Description        Key        Sample Data
CoName               Varchar(50)         N       Name of              PK    Hitachi Pte Ltd,
                                                 company of job             Motorola Pte Ltd
                                                 applicant
JobTitle             Varchar(20)         N       Job Title held       PK    Data Analyst,
                                                 by job applicant           Web designer

JobDesc              Varchar(20)         N       Job Description            Data analysis,
                                                 of job applicant           Web page designing

LastDrawnPay         Decimal(10,2)       N       Last drawn                 2400.00,
                                                 salary                     2200.00
OtherBenefits        Varchar(100)        Y       Other benefits             AWS,
                                                                            Variable Bonus
StartDate            Date                Y       Start date of              2001-01-02,
                                                 work                       2007-01-02
EndDate              Date                Y       End date of                2004-06-01,
                                                 work                       2010-06-01
Reasons              Varchar(MAX)        Y       Reasons for                To pursue further
                                                 leaving the job            education, to get a
                                                                            career in IT.


                                                                                             19
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


CurrJob            Varchar(50)       Y       To indicate                Y,
                                             whether the job            N
                                             is current job
AppID              Varchar(50)       N       Unique               FK    A0000001,
                                             Application ID             A0000002
                                             of job applicant
                    Table 3.2.7 Data Dictionary – Work_Experience



Entity Name: SKILL
Attribute Name    Data Type          Null      Description        Key        Sample Data
SkillName          Varchar(50)       N       Skill name       PK        Siebel,
                                             possessed by job           ASP.NET
                                             applicant
AppID              Varchar(50)       N       Unique           FK        A0000001,
                                             Application ID             A0000002
                                             of job applicant
SkillDesc          Varchar(100)      Y       Skill                      Siebel 7.0,
                                             Description                software developing
                                                                        language
SkillLevel         Varchar(20)       N       Skill Level                Intermediate,
                                                                        Advanced
SkillCatName       Varchar(200)      N       Skill Category             Information
                                             name which                 Technology -
                                             skill belongs to           Database,
                                                                        Information
                                                                        Technology –
                                                                        Software
                          Table 3.2.8 Data Dictionary - Skill



Entity Name: SKILL_CAT
Attribute Name    Data Type          Null      Description        Key        Sample Data
SkillCatID         Varchar(50)       N       Unique Skill         PK    SK00001,
                                             Category ID                SK00002
SkillCatName       Varchar(200)      N       Skill Category             Information
                                             name which                 Technology -
                                             skill belongs to           Database,
                                                                        Information
                                                                        Technology –
                                                                        Software
Remarks            Varchar(300)      N       Remarks for                Siebel 7.0,
                                             Skill category             software developing
                                                                        language
                        Table 3.2.9 Data Dictionary – Skill_Cat




                                                                                       20
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Entity Name: JOB
Attribute Name   Data Type             Null     Description      Key        Sample Data
JobID                Varchar(50)       N      Unique Job ID      PK      J000001,
                                                                         J000002
JobTitle             Varchar(50)       N      Job Title                  Corporate
                                                                         Development
                                                                         Executive,
                                                                         Web designer
JobDesc              Varchar(100)      N      Job Description            Business Admin,
                                                                         Web page designing

JobPostDate          Date              N      Job Post Date              2001-01-02,
                                              (Job Application           2007-01-02
                                              Start Date)
JobDeadline          Date              N      Job Application            2004-06-01,
                                              Deadline                   2010-06-01
Remarks              Varchar(100)      Y      Remarks                    Reporting to HR
                                                                         manager
HighestPayOffer      Decimal(10,2)     N      Maximum pay                2500.00,
                                              can be offered             3600.00
LowestPayOffer       Decimal(10,2)     N      Minimum pay to             2000.00,
                                              be offered                 2800.00
JobStatus            Varchar(50)       Y      Job Status                 Vacant,
                                                                         Filled
JobRequirement       Varchar(500)      Y      Unique                     Degree or Diploma
                                              Application ID             in Business with 2
                                              of job applicant           years experience
JobCatID             Varchar(50)       N      Job Category ID    FK      C0001, C0006
                            Table 3.2.10 Data Dictionary – Job



Entity Name: JOB_CATEGORY
Attribute Name    Data Type            Null     Description      Key        Sample Data
JobCatID             Varchar(50)       N      Job Category ID    PK      C0001, C0006
JobCatName           Varchar(50)       N      Job Category               Corporate,
                                              Name                       Information
                                                                         Technology
Remarks              Varchar(Max)      Y      Remarks                    For corporate
                                                                         development jobs
                       Table 3.2.11 Data Dictionary – Job_Category



Entity Name: JOB_REQUIRED_SKILLS
Attribute Name    Data Type Null                Description      Key        Sample Data
SkillName            Varchar(200)      N      Name of skill      PK      Siebel,
                                              required by a              ASP.NET
                                              job
JobID                Varchar(50)       N      Unique Job ID      PK      J000001,
                                                                         J000002
                    Table 3.2.12 Data Dictionary – Job_Required_Skills




                                                                                        21
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Entity Name: APPLICATION
Attribute Name    Data Type              Null     Description          Key        Sample Data
ApplicationID       Varchar(50)          N      Unique Job             PK    80000001,
                                                Application ID               80000002

AppDate             Date                 N      Date of Job                  2009-12-02,
                                                Application                  2010-03-09
AppStatus           Varchar(20)          Y      Job Application              New,
                                                Status                       Pending
LastUpdated         Date                 Y      Last updated                 2010-01-15,
                                                date                         2010-03-29
AppID               Varchar(50)          N      Unique job             FK    A0000001,
                                                applicant ID                 A0000002
JobID               Varchar(50)          N      Unique Job ID          FK    J000001,
                                                                             J000002
                          Table 3.2.13 Data Dictionary – Application

Entity Name: INTERVIEW
Attribute Name    Data Type              Null     Description          Key        Sample Data
InterviewDate       Date                 N      Date of                PK    2010-01-15,
                                                Interview                    2010-03-29
ApplicationID       Varchar(50)          N      Unique Job             FK    80000001,
                                                Application ID               80000002
InterviewRating     Varchar(100)         N      Interview                    Good,
                                                Rating                       Excellent
InterviewStatus     Varchar(100)         N      Interview Status             Selected,
                                                                             On Hold

Remarks             Varchar(100)         Y      Remarks                      Fits job criteria

FinalInteview       Varchar(50)          Y      To indicate                  Y,
                                                whether the                  N
                                                interview is
                                                final or not.
                           Table 3.2.14 Data Dictionary – Interview

Entity Name: RECRUITMENT
Attribute Name   Data Type               Null     Description          Key        Sample Data
RecruitID           Varchar(50)          N      Unique                 PK    90000001,
                                                recruitment ID               90000002
CostOfHire          Decimal(10,2)        N      Cost of hiring               2250.00,
                                                                             1800.00
LengthOfTime        Int                  N      Length of time               120,
                                                of recruitment               280
                                                (in hours)
Benefits            Varchar(200)         N      Benefits of                  Offload work for BD
                                                recruitment                  Manager.
Remarks             Varchar(100)         Y      Remarks                      Fits job criteria
RecruitDate         Date                 Y      Date of Join                 2010-01-15,
                                                                             2010-03-29
JobID               Varchar(50)          N      Unique Job ID          FK    J000001, J000002
                          Table 3.2.15 Data Dictionary – Recruitment



                                                                                                 22
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


3.2.4 Relational Headings


After the ERD has been finalised, it will be transformed into a relational database
design. Entities and attributes are represented with tables and columns. Relationships
are expressed by placing foreign keys into tables.


A list of relational headings in Boyce Codd Normal Form (BCNF) has been created,
                                                       [3]
in which every determinant is a candidate key.               Take APPLICANT table as
example, AppID is the candidate key which determines the rest of the attributes in the
same row and thus can be uniquely used to identify a database record. Primary keys
are underlined and foreign keys are in italics.


APPLICANT (AppID, AppName, AppEmail, AppPhone, AppDOB, AppGender, AppRace,
AppReligion, ExpectedSalary, Achievement, AppAddress, AppPostal, AppCountry,
AppOtherCountry, AppNRIC, AppNRICType, AppNationality, AppAge, AppMarital,
AppCV, Active, UserID)


USER (UserID, Password, UserType, UserGroup)


REFERENCE (RefID, RefName, RefAddress, RefOccupation, RefPhone, RefCompany,
NoOfYrKnown, AppID)
EDUCATION (InstituteName, CertObtained, StartDate, EndDate, HighestEdu, AppID)


WORK_EXPERIENCE (CoName, JobTitle, JobDesc, LastDrawnPay, OtherBenefits,
StartDate, EndDate, Reasons, CurrJob, AppID)


SKILL (SkillName, AppID, SkillDesc, SkillLevel, SkillCatName)


SKILL_CAT (SkillCatID, SkillCatName, Remarks)


JOB (JobID, JobTitle, JobDesc, JobPostDate, JobDeadline, Remarks, HighestPayOffer,
LowestPayOffer, JobStatus, JobRequirement, JobCatID)


JOB_CATEGORY (JobCatID, JobCatName, Remarks)


JOB_REQUIRED_SKILLS (SkillName, JobID)


                                                                                     23
                 Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



APPLICATION (ApplicationID, AppDate, AppStatus, LastUpdated, AppID, JobID)


INTERVIEW (InterviewDate, ApplicationID, InterviewRating, InterviewStatus, Remarks,
FinalInteview)

RECRUITMENT (RecruitID, CostOfHire, LengthOfTime, Benefits, Remarks, RecruitDate,
JobID)




3.3 System Constraints and Assumptions


The constraints being identified are listed below:
C01      The system calculates recruitment length of time in hours. For example, a job
         takes 14 days to be filled; the length of time calculated by system is 336 hours.
         (14 days * 24 hours)
C02      A job applicant can only apply one job.
C03      Each job can only have up to two interviews.
C04      Only registered users (account created) are able to apply jobs
C05      The data reports can only be view monthly.


In my designed system, there are some underlying assumptions as follows:
A01      Job applicant who is a current employee is not allowed to apply a job
A02      Jobs that are not filled within the open application period will be automatically
         extended for one month.
A03      Each job can have either one or two interviews.
A04      Length of recruitment time is from the job post date till the job is being filled.
A05      The job applicant’s record will remain kept in the system database if he or she
         resigns the job.
A06      Hiring Manager and/ or HR Manager will be the interviewer(s) for the
         interviews.




                                                                                         24
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


3.4 System Architecture


Three-tier client/server architecture is chosen to illustrate the relationship between a
client (computer) which requests the resources and is equipped with a user interface
(web browser) for presentation purposes. The application server provides the
requested resources, but by calling on another server. The data server will provide the
                                                       [9]
application server with the data it requires.                In a network, the client/server
architecture allows efficient way to interconnect programs that are distributed
efficiently across different locations.




                          Figure 3.4: System Architecture Diagram



3.5 User Interface Design
A user interface uses a combination of technologies and devices to provide a platform
                              [11]
the user can interact with           . It is resided at the presentation tier of the System
Architecture (Please see Figure 3.4 for System Architecture Diagram).


There is a need to present information and functions for user to view and use
according to user requirements. Many considerations such as information display,
interaction and presentation design has to be considered to create a good interface.
The user interface of my system is designed according to the system objectives in




                                                                                         25
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Section 1.3 System Objectives. The system objectives had been analysed and
illustrated in the form of a Use Case Diagram in Section 3.1.1 Use Case Analysis.


Information Design
Information contained in the website will be used as a communication tool between
the user and the company. A good information design is crucial to achieve system
objectives and goals. It has to contain clarity, simplicity and relevant information so
that users will receive value from the system and use the system with ease.


In the part of the system where reports are to be displayed, drop-down lists, radio
buttons and check boxes with populated with default values are used if possible, so
that it is more user-friendly and minimize the chance of human errors.


Interaction Design
This part is about how the user will interact with the system and get what they require
with ease while navigating through the system. A good system will allow user to
navigate to the part of the system he or she wants upon minimal clicks.


In the system, a frame consists of navigation links is placed on every page of the
system to allow easy navigation to different parts of the system. This can avoid the
hassle for user to navigate back to the main menu whenever a task is completed. A
“Back” button on every page facilitates the user to navigate back to the previous page
whenever the user wants to [13].


Presentation Design
Presentation Design is how the information of the system is presented to the user.
Consistency is one important point to take note in presentation designing. When there
is consistency maintained throughout the system, the process of learning and
understanding how to use the system becomes easier.


Within the system, all report pages are designed in similar style which managers
select some criteria like month and year and click the “Generate” button to display
data. This creates consistency, making system easier to use. Please refer to Appendix
D for the User Interfaces.


                                                                                    26
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                       Chapter 4 - System Implementation


The system implementation phase concerns with how the E-Recruitment system is
developed. Development will be carried out based on the outputs from the design
phase. The design diagrams such as Entity-Relationship Diagram and Use Case
Diagram will serves as blueprint for this phase.


4.1 Database Development


Data Definition Language (DDL) is used to create and alter database tables according
to the database design carried out previously in Chapter 3 System Analysis and
Design.


Primary keys were used to uniquely identify each record in a database table and the
column(s) to be used in primary key constraint have to be declared NOT NULL.
Foreign keys were used to create and enforce relationships between tables. Foreign
keys in the referenced (parent) table must be unique. [3] Minimum cardinalities were
enforced by ensuring that foreign keys are not null and using appropriate no action
updates and delete.


Sample data were then populated into the tables using Data Manipulation Language
(DML) which allows insertion, updating and deletion of data.


4.1.1 SQL Statements


The SQL DDL statements used for creating and populating the JOB table are shown
here as an example. Below is the summary explanation.


Table Name       JOB
CREATE TABLE dbo.JOB(
JobID Varchar(50) not null,
JobTitle Varchar(50) not null,
JobDesc Varchar(100) not null,
JobPostDate date not null,
JobDeadline date not null,
Remarks Varchar(100) null,
HighestPayOffer decimal(10,3) not null,



                                                                                 27
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


LowestPayOffer decimal(10,3) not null,
JobCatID Varchar(50) not null,
JobRequirement Varchar(500) null,
JobStatus Varchar(50) null

CONSTRAINT JobPK PRIMARY KEY (JobID),
CONSTRAINT JOB_CATFK FOREIGN KEY (JobCatID) REFERENCES DBO.JOB_CATEGORY
(JobCatID)
       ON DELETE NO ACTION
       ON UPDATE NO ACTION);

                              Figure 4.1.1 DDL for Job table


The INSERT statements to populate test data are shown below:
INSERT Statement to JOB Table
INSERT INTO [master].[dbo].[JOB]
            ([JobID]
            ,[JobTitle]
            ,[JobDesc]
            ,[JobPostDate]
            ,[JobDeadline]
            ,[Remarks]
            ,[HighestPayOffer]
            ,[LowestPayOffer]
            ,[JobCatID]
            ,[JobRequirement]
            ,[JobStatus])
     VALUES
            ('J000013',
            'Staff Nurse',
            'Provide nursing care medical centre',
            '2010-05-06',
            '2010-06-05',
            'Candidate must have relevant post-basic qualification’,
            2400.00,
            3000.00,
            'C0005',
            'Diploma in Nursing with at least 1 year experience.',
            'Vacant' )

                            Figure 4.1.2 DML for Inserting data




Below is the output after sample data is being populated using INSERT statement:



                         Figure 4.1.3 Output after Insertion of data



SQL Codes for developing and populating the rest of the tables are shown in
Appendix F. Columns were created according to the Data Dictionary found in Section
3.2.3 Data Dictionary.




                                                                                   28
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


4.1.2 Creating Database Triggers and Stored Procedures


Trigger and Procedure were used to achieve some of the system objectives stated in
Section 1.3 System Objectives. It can help to offload the work to be done on the web
server, but processing some tasks on the database server instead.


Update Job Status
Figure 4.1.4 below is a screenshot of a trigger created to automatically update a job’s
status. It will be triggered to update job status to “Filled” automatically once the HR
Admin had updated the job application status to “Pass” in the system when the job
applicant successfully shortlisted for recruitment.


 Trigger Name     UPDATE_JOB_STATUS
 Trigger          To Update Job Status to "Filled" once HR Admin has updated the
 Description      job application status to "Pass" when applicant has successfully
                  being recruited.

                  Please refer to SO15 of System Objectives in Section 1.3 and refer
                  to Appendix Figure AD-34 for screen shot.
 CREATE TRIGGER UPDATE_JOB_STATUS
 ON APPLICATION
 FOR update

 AS

 --To set the condition if Job Application status has been being
 updated to "Pass"
 IF EXISTS (SELECT * FROM APPLICATION WHERE APPSTATUS = 'Pass'
 and lastupdated = convert (varchar(10), getdate(), 101))

  BEGIN
  DECLARE @JOBID VARCHAR(50)

  --To retrive JobID of the job which the application status has
 just been
  --updated to "Pass" and assign to @JobID
  SET @JOBID = (SELECT JOBID FROM APPLICATION WHERE APPSTATUS =
 'Pass'
  and lastupdated = convert (varchar(10), getdate(), 101))

  --Update job status to "Filled" where the jobID value is @jobID
    UPDATE JOB
    SET JOBSTATUS = 'Filled'
    WHERE JOBID = @JOBID
  END
 go


                  Figure 4.1.4: SQL for Create Trigger Update_Job_Status



                                                                                     29
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Extension of Job Application Deadline
Figure 4.1.5 below is a screenshot of a procedure created to automatically extend a
job’s application deadline to one month later.


 Procedure Name          Update_Job_Deadline
 Procedure               To Extend Job Deadline to one more month once the job is
 Description             not filled within the open job application period

                         Please refer to SO14 of System Objectives in Section 1.3
                         and Appendix Figure AD-35 for screen shot.
 create procedure Update_Job_Deadline
 as
 Declare @jobid varchar(50), @newDate as date, @oldDate as date

 IF EXISTS (SELECT * FROM JOB WHERE JOBDEADLINE < convert
 (varchar(10), getdate(), 101)
 and JobStatus = 'Vacant')

 begin

 --Retrieve job record which status is 'Vacant' and current date is
 greater than its jobdeadline
 --This record needs to extend job deadline to one month later.
 SELECT @jobid = JOBID, @oldDate = JOBDEADLINE FROM JOB
 WHERE JOBDEADLINE < convert (varchar(10), getdate(), 101)
 and JobStatus = 'Vacant'

 -- Increment of one month to the current job deadline and assign to
 @newDate variable
 SET @newDate = DateAdd(month, 1, @oldDate)

 --To Update the job deadline to a new date (increment of one month)
 UPDATE JOB
 SET JOBDEADLINE = @newDate
 WHERE JOBID = @JOBID
 end
               Figure 4.1.5: SQL for Create Procedure Update_Job_Deadline


Issue with running procedure:
Stored procedure requires the below statement (Figure 4.1.6) to run the procedure. As
this is an E-Recruitment system, users are not expected to use DBMS to perform this
task. Thus, execution of the procedure has to be done automatically once the
condition to run the procedure has been met.




                         Figure 4.1.6: SQL to Execute Procedure



                                                                                    30
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Solution:
SQL Server offers the system stored procedure sp_procoption which can be used to
allow procedures to automatically execute when the SQL Server service is started. [6]
By using sp_procoption, the procedure can be run at server start-up to pre-compile the
execution plan so users do not need to run it. The following are the steps to achieve
that.


    1. By running the following query, we can see that the sp_configure advanced
        option 'scan for startup procs' needs to be set.




                     Figure 4.1.7: SQL to show run configuration check




                                                                                   31
         Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



2. Sp_procoption is now used to mark the procedure for auto-execution




               Figure 4.1.8: SQL to set the procedure to auto execute


3. By re-running the configuration check, the server is configured to check for
   start-up procedures (VALUE = 1) but the running value currently in effect is
   still set to not check for start-up procedures (VALUE_IN_USE = 0). SQL
   Server service needs to be restart to have the change to take effect.




                Figure 4.1.9: SQL to rerun configuration check (I)




                                                                            32
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


   4. When SQL Server service is restarted, we see that the configuration value now
       takes effect.




              Figure 4.1.10: SQL to rerun configuration check (II) – After Restart


With the above steps done, the SQL Server is configured to automatically execute the
procedure whenever the SQL Server service is started.




4.2 System Development


The entire system is developed in the Microsoft Visual Studio.Net 2008 integrated
development environment (IDE) using the programming language ASP.NET. This
includes writing codes to create user interfaces, interact with the database, and
retrieve records, insertion, modification and deletion of records upon user’s action on
the system.


Appendix G shows all the source codes for the E-Recruitment system. The user
interfaces were coded based on the User Interface Design Principles in Section 3.5
User Interface Design. Please see Appendix D for User Interfaces




                                                                                     33
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                             Chapter 5 - System Testing


This chapter will discuss about testing the system using various types of testing
techniques. The main objective of system testing is to ensure that the system works
according to the users’ requirements and function properly.


5.1 Integrity Testing


5.1.1 Entity Integrity Testing


Entity integrity ensures that each row in a table is a uniquely identifiable entity. [20] To
enforce entity integrity, each database table is created with a primary key constraint.
The system is developed in such as way that for all insertion functions, there is a
function written in Visual Basic (VB) in Visual Studio.Net 2008 to check the last
record of the database and get the primary key value, increment by 1 each time when
there is a new record to be inserted into database.


Take Job ID as an example, if the last record in database was “J000016”, the function
will increase the value by 1. Therefore, the next Job ID generated would be
“J000017”. Thus, each row will have a unique primary key value. In this way, entity
integrity is achieved.


Please see Figure 5.1.1 for the entity integrity method and results.




                                                                                         34
                    Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120




 Test Method              To insert a new record with JobID: J000016 into JOB table.
 Expected Test            Unable to insert
 Result
 Test Result              Passed




                                Figure 5.1.1: Entity Integrity Test – 1




5.1.2 Referential Integrity Testing


Referential integrity testing is performed to ensure consistent relationships between
          [20]
tables.          A primary key need to be existed before it is being referenced as a foreign
key in other tables. Record consisting foreign key cannot be inserted unless there is a
corresponding          record   in   the   linked    table.    Referential   integrity   between
RECRUITMENT and JOB tables is being tested below.


Please see Figure 5.1.2 and Figure 5.1.3 for the referential integrity tests and results.




                                                                                             35
          Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Test Method     To insert a new record with foreign key, JobID: J000014
                into RECRUITMENT table.
Expected Test   Insert value successfully when foreign key (JobID: J000014)
Result          already exist in its primary table JOB table.
Test Result     Passed




                    Figure 5.1.2: Referential Integrity Test - 1



Test Method     To insert a new record with foreign key, JobID: J000018
                into RECRUITMENT table.
Expected Test   Unable to insert value when foreign key (JobID: J000018)
Result          does not exist in its primary table JOB table.
Test Result     Passed




                                                                              36
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120




                          Figure 5.1.3: Referential Integrity Test -2




5.1.3 Cardinalities Testing


Cardinalities integrity testing is performed to ensure minimal cardinality relationship
between the primary table and its child tables is enforced. Cardinality integrity
between JOB_CATEGORY and JOB table is being tested to verify that a record in the
primary table cannot be removed when an existing child record is present.


Please see Figure 5.1.4, Figure 5.1.5 for the cardinalities test and results.




                                                                                    37
          Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Test Method          To remove a record with JobCatID: C0008 from
                     JOB_CATEGORY table where JobCatID: C0008 is NOT
                     being referenced in the JOB table
Expected Test        Able to delete the record with JobCatID: C0008 from
Result               JOB_CATEGORY table.
Test Result          Passed




                       Figure 5.1.4: Cardinalities Test - 1




                                                                             38
          Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Test Method          To remove a record with JobCatID: C0007 from
                     JOB_CATEGORY table where JobCatID: C0007 is being
                     referenced in the JOB table.
Expected Test        Unable to delete the record for JobCatID: C0007
Result
Test Result          Passed




                       Figure 5.1.5: Cardinalities Test - 2




                                                                             39
               Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


5.2 Functional Testing


Functional Testing is used to test software for the functional requirements and it is
commonly referred to as Black Box Testing. A test suite, consisting of test cases is
created in order to determine if the system is functioning properly and whether it is
programmed according to users’ needs.


The general test suite in Table 5.2.1 contains test cases which were created and tested
according to the system objectives in Session 1.3 System Objectives, with each
objective becoming a functional test. As a system objective is implemented, the
respective functional test is applied to it [21] [22].


I have also created a detailed test suite that contains all test cases, with each test case
created to test every step to accomplish each system objective. The detailed test suite
can be found under Appendix E.




                                                                                        40
                                                                             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



Table 5.2.1: General Test Suite for E-Recruitment System

Test   System            Who Uses or   Purpose of Test                    Test Shot/ Data      Expected           Actual Result      Pass/   Screen Shot
No.    Objectives        Triggers?                                                             Result                                Fail    Reference:
1      SO1:              Applicant     To test if system updates the      Input valid data     Success message    Success message    Pass    Please refer to
       Online Job                      record to the database once all    to all fields.       “Add Success”      “Add Success”              Appendix D:
       Applicant                       field validation checks had                             should be          is displayed               Figure AD-3
       Registration                    passed.                                                 displayed

2      SO2:              Applicant     To test if the system returns      Click on a job       The job details    The job details    Pass    Please refer to
       Job Vacancy                     the correct job details when       title (e.g. HR       of HR Specialist   of HR Specialist           Appendix D:
       Search Tool                     user clicks on a job link to       Specialist)          should be          are displayed.             Figure AD-6
                                       view job details.                                       displayed.

3      SO3:              Applicant     Once user has login, he/ she       Enter login          User should be     User is            Pass    Please refer to
       Job Application                 will be redirected to his/her      credentials to       redirected to      redirected to              Appendix D:
                                       online resume page which has       login                preview his/ her   preview his/ her           Figure AD-8
                                       been filled up upon                                     online resume      online resume
                                       registration.                                           page.              page.
4      SO3:              Applicant     To test if a job applicant (e.g.   After previewing     User should be     User is            Pass    Please refer to
       Job Application                 Applicant ID: A0000001) is         the online           redirected to a    redirected to a            Appendix D:
                                       able to apply a job.               resume, click        Application        Application                Figure AD-12
                                                                          Apply to apply       success page       success page
                                                                          the job.
5      SO3:              Applicant     To test if a job applicant         Select another job   User should be     User is            Pass    Please refer to
       Job Application                 (A0000001) is allowed to           and click Apply      redirected to an   redirected to an           Appendix D:
                                       apply a second job.                                     Application        Application                Figure AD-9
                                                                                               Failure page       Failure page
                                                                                               indicating he/     indicating he/
                                                                                               she had already    she had already
                                                                                               applied a          applied a
                                                                                               position.          position.




                                                                                                                                                         41
                                                                         Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



6    SO4:              Applicant   To test if system updates the      Input valid data     Success message      Success message      Pass   Please refer to
     Edit Online                   record to the database once all    to all fields.       “Update              “Update                     Appendix D:
     Resume                        field validation checks had                             Successful”          Successful” is              Figure AD-16
                                   passed.                                                 should be            displayed
                                                                                           displayed

7    SO5:              Applicant   To test if system display the      Click on the         System should        System displays      Pass   Please refer to
     Job Application               correct application details and    View Job             display the          the correct                 Appendix D:
     Status Viewing                status                             Application          correct              application                 Figure AD-15
                                                                      Status link under    application          details and status
                                                                      Applicant’s          details and status
                                                                      homepage
8    SO6:              Applicant   To test if system is able to       Input data to all    Success message      Success message      Pass   Please refer to
     Change Login                  change login password              fields and click     “Update              “Update                     Appendix D:
     Password                                                         update button.       Successful”          Successful” is              Figure AD-17
                                                                                           should be            displayed
                                                                                           displayed
9    SO7:              Admin       To test if system is able to add   Input job details    System should        System prompts       Pass   Please refer to
     Post new job                  job record into database           fields and click     prompt a success     a success                   Appendix D:
                                                                      Add Job              message              message                     Figure AD-20

10   SO8:              Admin       To test if system is able to       Change some          System should        System prompts       Pass   Please refer to
     Update/ Delete                update changes into database       field data and       prompt a success     a success                   Appendix D:
     Job                                                              click Update Job     message              message                     Figure AD-21

11   SO8:              Admin       To test if system is able to       Select a job         Job title should     Job title is         Pass   Please refer to
     Update/ Delete                delete a job record from           category and title   be deleted off       deleted off                 Appendix D:
     Job                           database                           and click Delete     and no more                                      Figure AD-22
                                                                      button               appearing in the
                                                                                           job title drop
                                                                                           down list




                                                                                                                                                        42
                                                                       Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



12   SO14:             System   To test if system is able to        Go to Update Job      Job deadline         Job deadline is      Pass   Please refer to
     Auto Extend                extend job deadline to one          page and select       should be            updated to one              Appendix D:
     Job Application            month later once the current        that particular job   updated to one       month later                 Figure AD-35
     Deadline                   date is greater than the job        and view the job      month later
                                deadline.                           deadline.
13   SO9:              Admin    To test if system is able to add    Select a job          System should        System prompts       Pass   Please refer to
     Add Required               required skills to a selected job   category and title.   prompt a success     a success                   Appendix D:
     Skills to each             title                               Next, select skill    message              message                     Figure AD-23
     Job                                                            category and skill
                                                                    name and click
                                                                    Update button
14   SO10:             Admin    To test if system display           Select a job          System should        System displays      Pass   Please refer to
     View                       applicant, application and job      category and job      display the          the necessary               Appendix D:
     Application                details correctly based on the      title from drop       necessary details    details belong to           Figure AD-25
     forms                      job title selected                  down lists and        belong to the job    the job title
     Submitted                                                      click Generate        title selected       selected
                                                                    button
15   SO10:             Admin    To test if system updates           Select a job          System should        System prompts       Pass   Please refer to
     View                       record when admin shortlist         applicant by          prompt a success     a success                   Appendix D:
     Application                applicant for interview by          checking the          message              message                     Figure AD-26
     forms                      clicking Shortlist for Interview    checkbox
     Submitted                  button                              associated with
                                                                    him/ her and click
                                                                    Shortlist for
                                                                    Interview button
16   SO11:             Admin    To test if applicant details are    Select a skill        Applicant(s)         Applicant(s)         Pass   Please refer to
     Talent Pool                displayed when skills are           category and          with skills          with skills                 Appendix D:
     Search                     selected and if the applicant       name and click        matched to the       matched to the              Figure AD-30,
                                possess the selected skills         Generate button       skills selected by   skills selected by          AD-31, AD-32
                                                                                          admin should be      admin is
                                                                                          displayed            displayed




                                                                                                                                                       43
                                                                       Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



17   SO12              Admin     To test if the system updates      Select an             System should       System prompts   Pass   Please refer to
     Updating of Job             record to database once Admin      application ID        prompt a success    a success               Appendix D:
     Application                 update the application status.     and select a status   message             message                 Figure AD-33
     Status                                                         and click Update
                                                                    button
18   SO15 Auto         System    To test if system updates the      Update                Job Status          Job Status is    Pass   Please refer to
     Update Job                  job status to “Filled” once the    application status    should be           updated to              Appendix D:
     Status                      status of application associated   to “Pass” to an       updated as          “Filled”                Figure AD-34
                                 with the job has being updated     application, and      “Filled”
                                 to “Pass”                          check in database
                                                                    if the job status
                                                                    becomes “Filled”.
                                                                    Alternatively, can
                                                                    view the job
                                                                    status in the
                                                                    Update
                                                                    Recruitment page
19   SO13:             Admin     To test if system is able to       Change values to      System should       System prompts   Pass   Please refer to
     Update                      update the changes made to         some fields and       prompt a success    a success               Appendix D:
     Recruitment                 each fields to the database        click Update          message             message                 Figure AD-29
     Details
20   SO16:             Manager   To test if the system displays     Select a Year,        Correct             Correct          Pass   Please refer to
     View Job                    the application details            Month Applied,        Application         Application             Appendix D:
     Application                 according to the selection         Job category and      details should be   details is              Figure AD-41
     Report                      criteria                           Application           displayed           displayed
                                                                    Status and click
                                                                    Generate
21   SO17:             Manager   To test if the system displays     Select a Job          Correct             Correct          Pass   Please refer to
     View                        the Application details            Category and Job      Application         Application             Appendix D:
     Applications                according to the job selection     Title and click       details should be   details is              Figure AD-38
     shortlisted for             criteria                           Generate              displayed           displayed
     Interview




                                                                                                                                                  44
                                                                       Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



22   SO17:             Manager   To test if the system is able to   Input values to       System should       System prompts      Pass   Please refer to
     Add Interview               add Interview record to the        the fields on Add     prompt a success    a success                  Appendix D:
     Details                     database.                          Interview page        message             message                    Figure AD-40
                                                                    and click “Add”
23   SO18:             Manager   To test if the system displays     Select a Year,        Correct Job         Correct Job         Pass   Please refer to
     View Job                    the job details according to the   Month and Job         details should be   details is                 Appendix D:
     Tracking                    selection criteria                 category and          displayed           displayed                  Figure AD-43
     Report                                                         Generate
24   SO19:             Manager   To test if the system displays     Select a Year,        Correct             Correct             Pass   Please refer to
     View Interview              the Interview details according    Month and             Interview details   Interview details          Appendix D:
     tracking Report             to the selection criteria          Interview Status      should be           is displayed               Figure AD-46
                                                                    and click             displayed
                                                                    Generate
25   SO20:             Manager   To test if the system displays     Select a Year,        Correct job         Correct job         Pass   Please refer to
     View                        the details of jobs being          Month and Job         details should be   details is                 Appendix D:
     Recruitment                 recruited according to the         category and          displayed           displayed                  Figure AD-42
     Report                      selection criteria                 click Generate

26   SO21:             Manager   To test if the system displays     Select a Year,        Correct cost-per-   Correct cost-per-   Pass   Please refer to
     View Cost-Per-              the cost-per-hire details          Month and Type        hire details        hire details is            Appendix D:
     Hire Report                 according to the selection         (By Job               should be           displayed                  Figure AD-44.
                                 criteria                           Category/ Job         displayed                                      AD-45
                                                                    Title) and click
                                                                    Generate


                                                         Table 5.2.1 General Test Suite




                                                                                                                                                     45
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                         Chapter 6 - Project Management


6.1 Project Life Cycle


This chapter will focus on the Project Management Methodology and techniques will
also be discussed that I have applied throughout entire project life cycle. The main
objective of applying project management techniques is to ensure better project
performance and management control. In the project lifecycle, five main phases have
been identified and they are: Initiating, Planning, Executing, Monitoring &
Controlling and Closing, [5] and they will be applied to my project. Each phase should
be seen as an interdependent continuous management effort in which the outputs from
one phase are used as input for the next phase.




                         Figure 6.1.1: Project Life Cycle Diagram


6.1.1 Initiating
The project life cycle started out when I initiated the project by submitting a proposal
to my project supervisor. In the proposal, business and project objectives, scope,
background and investigation methodologies of the proposed project had been
identified.


A diagnostic and analysis of the problem has been performed and it delineates the
strategies that the project will use to achieve its objectives. Once the proposal was
approved by supervisor, the project is ready to commence and project planning
begins.




                                                                                     46
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


6.1.2 Planning
In this phase, a project plan is created which includes a detailed breakdown and
assignment of every single task of my project. The principle techniques I used to
create the project plan are the Work Breakdown Structure (WBS) and Gantt chart.
While developing a WBS, a task analysis has been carried out, which allows me to
identify individual tasks that need to be performed to complete my project. WBS can
be found in Section 6.2 Work Breakdown Structure.


I then created a Gantt chart to be used as a baseline for the project schedule. The Gantt
chart displays the schedule of all the sequenced tasks and shows the project's overall
progress and status against the schedule. Throughout the project, I continuously
update the Gantt chart to reflect any changes. Gantt chart can be found in Section 6.3


In my project, there are some risks identified which could delay my project. A Risk
Assessment in Table 6.1.1 is done to assess these risks and decide what actions to take
to minimize disruptions to my project progress [23].


On a scale of 1 to 5 (1 being the lowest and 5 being the highest)


Risk                  Risk Category    Risk    Risk      Risk Management Action
                                       Level   Impact
User is not able to   Client           3       3         To get users to be actively
give accurate                                            involved in each phase of the
information                                              project so that they can
                                                         feedback if the output is what
                                                         they want before proceeding
                                                         further to next phase.
User is unable to     Client           3       3         Have to use dummy data
provide some                                             while developing and testing
important                                                the system and have to work
information due to                                       closely with users to ensure
confidentiality                                          that everything is working
                                                         according to their requirement.
Executive             Client           3       3         Have to understand users’
involvement is                                           schedules and try to find time
little.                                                  to get them involve in the
                                                         project testing.
User experiences      Client           3       3         Users have no experience with
                                                         similar projects, thus may not
                                                         understand how needs can be
                                                         met.


                                                                                      47
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Multiple users of     Client           3        3         To explain to them that their
the program have                                          common agreement and
different needs and                                       requirements for the project
have conflicts.                                           are necessary in order to run
                                                          the project smoothly.
Budget constraint     Project          2        2         To use freeware such as
                      management                          Microsoft Visual Studio.Net
                      practices                           Express and Microsoft SQL
                                                          Server 2008 Express.
Disruption of the     Project          2        2         To perform tasks concurrently
project due to        management                          and practise good time
other module          practices                           management.
assignment to
submit and exam
No much               Project          2        2         Need more time to explore on
experience with       management                          the integrated development
Visual Studio 2008    practices                           environment (IDE) of Visual
Express                                                   Studio 2008.
No much               Project          2        2         Need to spend more time on
experience with       management                          research on E-Recruitment
the process of E-     practices                           processes.
Recruitment
                               Table 6.1.1: Risk Assessment




After the project plan was created, I reviewed the plan with my tutor during tutor
review meeting and it was refined before the project is executed.


6.1.3 Executing
After the project plan has been finalised, the project is executed according to the
schedule and objectives based on the project plan. The project plan is refined to
accommodate any required changes that arise during the executing phase of the
project. Thus, planning and executing is a cycle until the project is completed. Please
Refer to Figure 6.1.1 for Project Lifecycle.


6.1.4 Monitoring and Controlling
The project has been monitored and controlled from the planning phase till the closing
phase. Regular timely project status and progress meetings were held with my
supervisor. These meetings enable me to monitor and evaluate the project’s progress
and performance. Details discussed and feedbacks given by supervisor in every
meeting were noted down into meeting logs.


                                                                                     48
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Through the information reflected from the monitoring process, I am able to control
the project by taking actions to address any issues such as schedule slippage or newly
identified tasks.


6.1.5 Closing
The project closure process begins with the submission of the project report. The
report documents the background, objectives, design and development processes, and
project management processes of my project. It also outlines my critical review,
literature review and future enhancements of my project. The report ends with
concluding the knowledge and lessons gained, and my thoughts for the project.
Following the report submission, I will prepare for the poster presentation to present
my project. The project comes to a formal closure after the presentation.




                                                                                   49
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


6.2 Work Breakdown Structure


E-Recruitment System


1. Planning
    1.1. Initial Studies
       1.1.1. Literature Research
       1.1.2. Tutor Review Meeting (1)
    1.2. Progress & Status Report
       1.2.1. Project Proposal
           1.2.1.1. Understand Project Background
           1.2.1.2. Project Approach & Methodology
           1.2.1.3. Draft Proposal
           1.2.1.4. Define Resources & Skills needed
           1.2.1.5. Finalise and Submit Proposal
       1.2.2. Interim Report


2. User Requirement Analysis
    2.1. Investigate Company Background
    2.2. Define Project Objectives
    2.3. Define User Requirements
    2.4. Tutor Review Meeting (2)
    2.5. Conduct Survey


3. System Analysis and Design
    3.1. Data Modelling
       3.1.1. Identify Entities, Attributes and Relationships
       3.1.2. Draw ER-Diagram


    3.2. Use Case Analysis
    3.3. Technical Requirement Analysis
    3.4. User Interface Design
    3.5. Tutor Review Meeting (3)



                                                                                50
            Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120




4. System Implementation
   4.1. Database Development
      4.1.1. Create Tables and Constraints
      4.1.2. Populate data into tables


   4.2. Web Development
   4.3. Tutor Review Meeting (4)
   4.4. Tutor Review Meeting (5)
   4.5. Tutor Review Meeting (6)
   4.6. Tutor Review Meeting (7)


5. System Testing
   5.1. Integrity Testing
   5.2. Functional Testing
   5.3. Tutor Review Meeting (8)


6. Project Closing
   6.1. Project Report
      6.1.1. Report Outline
      6.1.2. Draft Report
      6.1.3. Tutor Review Meeting (9)
      6.1.4. Tutor Review Meeting (10)
      6.1.5. Finalise and Submit Project Report


   6.2. Poster Presentation
      6.2.1. Create Poster
      6.2.2. Prepare Presentation PowerPoint Slides
      6.2.3. Practice presentation
      6.2.4. Oral Presentation


                         Table 6.1.2: Work Breakdown Structure




                                                                               51
                              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120




6.3 Gantt Chart




                  Figure 6.3.1: Gantt chart




                                                                                                 52
                                        Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120




Gantt chart Continue




                       Figure 6.3.2: Gantt chart - Continue




                                                                                                           53
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                         Chapter 7 - Literature Review


To develop my project, I had read and researched on various project topics from
several sources. The ideas and concepts gained had influenced and help shaped the
development of my project. Below is a list of reviews I had written that has
significantly influenced my project. I have segregated them into different sections
based on the types of information such as Online Recruitment.


7.1 Online Recruitment
As I am new to E-Recruitment technology, I am able to gain a better understanding of
what features and functions do E-Recruitment solutions have from the internet article,
A simple and effective way to recruit and manage new candidates.[19] Through this
information, I am able to do a comparison between Neno’s traditional recruitment
process and the E-Recruitment solutions.


The internet article, E-Recruitment,[7] provides me with information on the E-
Recruitment definition, the advantages and disadvantages of using e-recruitment as
well as the recent developments and new age E-Recruitment solutions. This
information had helped me to define my project and system objectives and writing the
project proposal.


In order to develop the system with the ability to generate meaningful reports, I read
                                                                               [8]
the web article on Applicant Tracking Reports Make Data Meaningful,                  the
information gave me a better understanding on how recruitment systems provide
meaningful data in the form of reports for management staffs. Examples of reports
mentioned in the article include Cost-Per-Hire report and Hire-By-Source report.


7.2 Methodology
In the Methodology stage, I will specify on the software development approach to be
                                                                                     [10]
applied to my project. The web article on Software development methodology,
introduces different types of software development methodologies which I can
compare each of them and decide on the methodology to be used in my project. I had
read on the overview of software development methodology, Software development


                                                                                     54
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


approaches, Business process and data modeling that gave me the idea of which
methodology to choose in my project.


In order to define project objectives well, I read on the chapter on Defining Project
                                                                                    [5]
Goals of the book by Kim Heldman, titled Project Management Jump Start                    . It
introduces the process of requirements gathering and different ways of gathering
requirements. This book stresses on the importance of conducting user meetings. One
particular section I felt exceptionally useful is holding of user meetings, and how to
ensure that everyone in the meeting has the same understanding of the goals. Through
this knowledge, I have learnt to avoid common mistakes that will result in an
ineffective meeting.


7.3 System Analysis and Design
To present the overall system architecture of my project, I drew 3-Tier Client / Server
Architecture Three-tier client/server architecture to illustrate the relationship between
a client which requests the resources and is equipped with a user interface for
presentation purposes. This web article on Networking - 3-Tier Client/Server
                [9]
Architecture,         gives me a better understanding on how a client and server
environment is like and their roles played. This article has complemented some useful
illustrations which I can applied while designing the system architecture for my
project.


In order to design the system from the user’s perspective, I have adopted use case
analysis. The book, UML – A Beginner’s Guide, [2] written by Jason T. Roff discusses
on how to identify components in Use Case Diagram such as actors and use cases and
their relationships in order to model a Use Case Diagram. With a use case diagram, I
can easily identify the system objectives and work on design and development of the
system.


7.4 Database Design and Implementation
The data modelling technique that I had used in the project is based on the book by
                      [1]
Andrew J.Oppel              . This book presents the data modelling concepts and explains
clearly how to design a database using Entity-Relationship diagram (ERD), as well as
normalization process to create logical data models. In order to draw the ERD, I had


                                                                                          55
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


applied the crow’s foot notation discussed in the book which was presented in a clear
and easy-to-understand manner.



In order to develop the database, there is a need to have a comprehensive knowledge
on the SQL commands. The book on developing database with SQL written by Robert
Sheldon and Andrew J.Oppel [3] gives me a better understanding on creating database,
triggers and stored procedures. I also read about creating constraints such as foreign
key and how to access multiple tables using different kinds of Join statements which I
was confused over previously.


While creating stored procedures for my project, I encountered an issue on how to
make a procedure run automatically without the need for anyone to run EXEC script.
I researched in Internet and found an article on How to: Create a Job (SQL Server
                      [12]
Management Studio)           , which discusses on creating a SQL job using a SQL Server
agent on the SQL Server to auto run the procedure. However, because I am using the
SQL Express Edition, this feature is not included in the software. Thus, I have to find
alternative to make it work. There is a web article on Automatically Running Stored
                                        [6]
Procedures at SQL Server Start-up             gave me a solution to this problem. Using this
solution, I can make use of a system stored procedure to allow stored procedures to
automatically execute when the SQL Server service is started.


7.5 Web Design and Implementation
While designing user interfaces for my system, I came across this web article on
                                                                          [13]
Design Tip: Should You Break the "Three-Click" Rule,                             which presents
information on how to design a good interface. It refreshed the knowledge that I have
learnt during polytechnic days on the importance of simplicity and good navigation
that will lead to a good interface design.


Prior to this project that uses Visual Studio.Net 2008 as software development tool, I
used 2003 version for web development in the past. In the 2008 version, user controls
and their syntax changed, though they are still serving similar purposes. The internet
                                                         [15]
article on Deleting Multiple Rows in a Grid View                helped to solve my problem on
how to delete multiple rows in a Grid View. DotNetCurry is one of my favourite



                                                                                            56
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


website to source for programming codes as it provides detailed steps in creating
functions using .net and forums for people to exchange ideas.


There is a need for the system to interact with database to retrieve, insert and updating
of data. Through online research on the web article on Connect to a SQL Database
and Use the LINQ to SQL Designer [14], there is a way of interacting .Net to database
using LINQ in 2008 version. This book titled Visual Basic 2008 Recipes [4], written by
several authors, gives me an overview of LINQ and how .Net can interact with SQL
Server using LINQ. This book provides a wide range of solid solutions to many
common programming problems and LINQ is one of them.


During web development, there are instances where the system requires to bulk insert
data into database. I encountered bugs while programming this part. Thus I did an
online research and found an article on Making SQL transaction in DB using
                          [16]
ASP.NET 2.0 and VB,              which guided me on how to make a Transact-SQL
transaction in a SQL Server database.


7.6 Project Management


Having good project management skills is essential to the success of a project. In
order to achieve this, there is a need to understand the entire project life cycle. The
                                                                  [5]
book by Kim Heldman, titled Project Management Jump Start               clearly explains the
project lifecycle and the five project management process groups. They are Initiating,
Planning, Executing, Monitoring & Controlling and Closing. Through the
information, I am able to narrow my focus breaking down the project tasks into the 5
phases and thus, increasing the effectiveness of project management.


A work breakdown structure (WBS) is essential in creating project plan as it defines
individual tasks that need to be performed to complete a project. Through the web
article on Work Breakdown Structure, [17] I gained understanding on how to construct
the WBS, organizing the WBS levels and the different ways of presenting the WBS.




                                                                                         57
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                  Chapter 8 - Critical Review and Reflections


8.1 Methods of Investigation
Several requirement gathering techniques had been selected. In order to leave a good
impression to Neno’s staffs, there is a need to have a good understanding on the
company background such as the services which the company offer. Online research
provides a fast and convenient way to check out details such as company profile,
services they provide and latest news on Neno’s website.


As this system is targeting at both the job seekers and Neno’s staffs, there is a need to
gather information to both groups of users. I decided to conduct face-to-face
interviews with Neno’s staffs, include managers, because it is able to allow me to get
detailed information and requirements from these project stakeholders and work
closely with them directly. Through this technique, I had gained experience with
meeting users for requirement gathering. This geared up my skills in communications
and structuring of questions.


Survey forms were distributed to ex-colleges, friends and neighbours to get feedbacks
from people on E-Recruitment systems. Survey form is a good way to reach out to a
large number of people within a short time. Because of time and manpower
constraints, I have chosen people around me to participate in the surveys. However,
because these are the people who know me, the results might not be that accurate. In
order to obtain more accurate results, I should have engaged the public to participate
in the survey if more time has been allocated to the Requirement Analysis phase.


8.2 Database Design
In designing of database, a data model in the form of ER diagram has been used.
Much time had been allocated in the data modelling because I have been taught that
the more time we spend in the designing stages of a project, the more smoothly the
implementation stages go. ER diagram was used because it can be easily understood
                                                                                [1]
by non-technical people while still providing great value to technical people         . With
this, I am able to present my ER diagram to my users from Neno during user meetings
for them to review.



                                                                                         58
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


ER Diagram has been modified several times throughout the entire project. In my
initial ER diagram in Appendix C created during project planning, I have
misunderstood the E-Recruitment system process that existing employee and
department data need to be tracked. After reviewing the objectives again, I felt that
there is no need to have entities for both employee and department, thus they were
removed. The final ER Diagram can be found in Section 3.2.1.2 Final Entity-
Relationship Diagram.


8.3 Database Development
As I develop the database, trigger and procedure, there were instances when I need
help, especially on the triggers and procedures part due to lack of hands-on experience
with them. There is a need for me to seek help from sources such as websites and
books from library on database development. Fortunately, there were plenty of online
forums and tutorials available that helped me to overcome coding issues. Section 7.4
of literature review shows the list of resources which I got help from. By researching
for solutions and hands-on coding, I got a better understanding in triggers and
procedures.


8.4 System Development
Coding issues were also faced during system implementation using Visual Studio.Net
2008. As I had never use the 2008 version before, time is needed to get myself
familiarized with the integrated development environment (IDE). There were many
instances when I encountered bugs in the system, online tutorials and forums are best
sources to find solutions to the coding issues because search is fast and convenient.


One of the main reasons for choosing Visual studio 2008 Express version for web
development is because it is a freeware. Because it is free, it has some limitations and
one of which is crystal report. [24] Crystal Reports allows developers to create complex
                                                     [25]
and professional reports in a GUI-based program.            With Crystal report feature, I
would be able to create more presentation-quality reports for my system.




                                                                                        59
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


8.5 Project Management


8.5.1 Techniques Used
Through this project, I had the chance to enhance my project management skills by
applying what I had learnt from the module IT Project Management in Unisim, to this
project. The techniques taught including creating WBS and Gantt chart had allowed
me to identify the required tasks and deliverables and perform tasks concurrently,
following the task schedule in the Gantt chart. They allowed me to track and review
my project progress and amend my project plan to ensure a smooth project
completion.


8.5.2 Project Schedule Review
I did not follow the project schedule closely due to other commitments. I had to work
on the project concurrently with other work such as school assignments. Fortunately,
the regular project review meetings with project supervisor and Gantt chart had
allowed me to keep track of my project progress. If the project is behind schedule,
actions have to be done to keep progress up-to-date.


Through this project, I had learnt the importance of effective time management and
how an ineffective one will hinder by project progress. I have learnt to overcome the
“Student Syndrome” of leaving work to be done only at the last possible moment
before a deadline.




                                                                                  60
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                              Chapter 9 - Conclusion


This project has been successfully completed and had achieved all its project
objectives. I shall round up my project report by expressing the lessons that I have
learnt throughout the entire project.


Precious learning experiences have been gained through handling and solving of
various problems that have occurred while developing the project. These had provided
me with the opportunity to apply the different knowledge and skills I had acquired to
a real world context.


The IT modules such as Database and project management taught during my three
years of studies in Unisim have been beneficial in developing and managing the
project. Project supervisor is always there whenever I have doubts and provide me
with good feedbacks through her project experiences.


Throughout the whole project, I have enjoyed developing the project. Many skills and
knowledge were developed and enhanced. Key skills such as requirement gathering,
data modelling and project management will definitely benefit me in the future. Given
the hands-on experiences and knowledge I have gained, if there is a chance for me to
do another project, I would gladly to it with greater confidence.




                                                                                  61
               Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                           Chapter 10 - Recommendations


10.1 Future Enhancement


Below are some of the future enhancements that I have come out with, and they are
not done due to time constraints.


10.1.1 Auto Update of Job Application Status
The system automation process can be enhanced by auto updating job application
status to “Pass” once applicant has passed the final round of interview. The interview
status will be updated by the interviewer, which is the hiring manager. This step on
updating application status is currently performed by HR Admin who will login to the
system and update the job application status once applicant has passed the final
interview round.


10.1.2 Tracking of jobs that have not been recruited for a long period of time
There may have jobs that have been posting on the system for a long period of time,
with the job deadline being extended continuously. A report to track jobs that are
facing difficulty in recruiting will be a useful report for HR manager and hiring
manager to see detailed information and prepares plan to enhance the recruitment rate
for these job positions.


10.1.3 Provide quarterly and yearly reports
In the system, the reports generated will be in monthly reports. Managers may want to
view reports quarterly or yearly. This report generation feature can be enhanced by
allowing managers to view quarterly and yearly reports.


10.1.4 Provide Graphical Charts in reports
In the system, the reports generated will be in tabular data. There is no visual aid that
allows the manager to see the overview results in the form of bar charts or line graphs.
This report generation feature can be enhanced by providing charts, alongside with the
tabular data




                                                                                      62
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


10.1.5 Enhance Password Security
In my system, there is a function written in VB to check if the length of password
characters is more than 5 characters. This is to prevent user to enter short password
characters, allowing easy hacking of passwords. Through my research, there is a
feature provided by Visual Studio.Net known as PasswordStrength to check if the
password is strong enough to be secure.


PasswordStrength is an ASP.NET AJAX extender that can be attached to an
                                                                              [26]
ASP.NET Text Box control used for the entry of passwords.                            The
PasswordStrength extender can display the strength of the password in the Text Box
and updates itself as the user types the password. This indicator can be in the form of
a text message or with a progress bar indicator.


10.1.6 Send Email to acknowledge job application
In the system, once the job applicant has successfully applied for a job, he or she will
only be redirected to a Success Application page. This process of acknowledging
applicant’s application can be enhanced by having a function to send an
acknowledgement email to applicant.


10.1.7 Online Requisition for new headcount
When a manager requires a new headcount, most companies have a formal process
which involves manually opening a requisition that contains the job details of the new
position, and forward the details to the HR department. From there, the HR personnel
will do their part in job advertising and interviewing job applicants. [27]


Currently, the system will be focusing on the job application collection and analysis,
interviewing and recruitment stages. However, the system can be more meaningful if
there is a headcount requisition function where a hiring manager can submit the
requisition details through the system and HR Admin will go through them and post
the new job online.




                                                                                      63
          Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                         Chapter 11 - References


11.1 Book References

[1] Andrew J.Oppel, (2010), Data Modelling: A Beginner’s Guide, pg 54-63


[2] Jason T. Roff, (2003), UML: A Beginner’s Guide, pg 17-43


[3] Robert Sheldon, Andrew J.Oppel, (2009), SQL: A Beginner’s Guide, Third
Edition, pg 83-87, 303-318, 333-341


[4] Todd Herman, Allen Jones, Matthew Macdonald, and Rakesh Rajan (2008),
Visual Basic 2008 Recipes. A Problem-Solution approach, Third Edition, pg 233-
249

[5] Kim Heldman, (2002), Project Management Jump start, Second Edition, pg 17
– 21, pg 88 - 90


11.2 Website References

[6] Armando Prato, Automatically Running Stored Procedures at SQL Server
Start-up
http://www.mssqltips.com/tip.asp?tip=1574 (Retrieved 3 February 2010)


 [7] CIPD, E-recruitment
http://www.cipd.co.uk/subjects/recruitmen/onlnrcruit/onlrec.htm (Retrieved 2
August 2009)


 [8] William Dickmeyer, Applicant Tracking Reports Make Data Meaningful
http://findarticles.com/p/articles/mi_m0FXS/is_2_80/ai_70651815/?tag=content;c
ol1 (Retrieved 15 December 2009)


 [9] Kioskea, Networking - 3-Tier Client/Server Architecture
http://en.kioskea.net/contents/cs/cs3tier.php3 (Retrieved 23 August 2009)


 [10] Wikipedia, Software Development Methodology
http://en.wikipedia.org/wiki/Software_development_methodology (Retrieved 23
August 2009)




                                                                               64
         Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


 [11] Wikipedia, Graphical User Interface
http://en.wikipedia.org/wiki/Graphical_user_interface (Retrieved 23 August 2009)

 [12] MSDN, How to: Create a Job (SQL Server Management Studio)
http://msdn.microsoft.com/en-us/library/ms190268.aspx (Retrieved 26 January
2010)


 [13] Larisa Thomason, Design Tip: Should You Break The "Three-Click" Rule?
http://www.netmechanic.com/news/vol6/design_no14.htm (Retrieved 27
December 2009)


[14] Charlie Calvert, Connect to a SQL Database and Use the LINQ to SQL
Designer
http://blogs.msdn.com/charlie/archive/2007/11/19/connect-to-a-sql-database-and-
use-the-sql-designer.aspx (Retrieved 6 February 2010)


 [15] Suprotim Agarwal, Deleting Multiple Rows in a GridView
http://www.dotnetcurry.com/ShowArticle.aspx?ID=66&AspxAutoDetectCookieS
upport=1 (Retrieved 15 February 2010)


 [16] ASPTutorial, Making SQL transaction in DB using ASP.NET 2.0 and VB
http://www.aspnettutorials.com/tutorials/database/sql-transaction-vb.aspx
(Retrieved 16 February 2010)


 [17] NetMBA, Work Breakdown Structure
http://www.netmba.com/operations/project/wbs/ (Retrieved 25 August 2009)


 [18] Gary, The Project Management Life Cycle - Successfully Guide Your
Projects to Completion
http://www.brighthub.com/office/project-management/articles/1907.aspx
(Retrieved 29 September 2009)


 [19] Xibis, A simple and effective way to recruit and manage new candidates
http://www.xibis.com/e-recruitment (Retrieved 2 August 2009)


 [20] Scott, Microsoft SQL Server Constraints
http://odetocode.com/articles/79.aspx (Retrieved 5 March 2010)




                                                                               65
          Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


[21] Info-Tech Research Group, Software Testing - Reduce software defects with
requirements-based function testing
http://searchsoftwarequality.techtarget.com/tip/0,289483,sid92_gci1264095_mem
1,00.html (Retrieved 12 March 2010)


 [22]Info-Tech Research Group , Six functional tests to ensure software quality
http://searchsoftwarequality.techtarget.com/generic/0,295582,sid92_gci1303938_
mem1,00.html (Retrieved 12 March 2010)


 [23] MindTools, Risk Analysis & Risk Management
http://www.mindtools.com/pages/article/newTMC_07.htm (Retrieved 29 March
2010)

[24] Wikipedia, Microsoft Visual Studio Express
http://en.wikipedia.org/wiki/Microsoft_Visual_Studio_Express (Retrieved 30
March 2010)


[25] MSDN, What is Crystal Reports?
http://msdn.microsoft.com/en-us/library/ms225593(VS.80).aspx (Retrieved 30
March 2010)


[26] ASP.net AJAX, PasswordStrength Demonstration
http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/PasswordStrength/PasswordSt
rength.aspx (Retrieved 2 April 2010)


[27] William Dickmeyer, What is requisition management?
http://findarticles.com/p/articles/mi_m0FXS/is_2_80/ai_70651815/pg_3/?tag=con
tent;col1 (Retrieved 2 April 2010)




                                                                             66
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                            Chapter 12 - Appendices


Appendix A: Questionnaire - Interview questions


The following is the sample copy of the interview questions that I have posed during
interview with Neno’s staffs.


Q1     Can you share with me, what are your daily work activities?


Q2     How would you describe the current recruitment process?


Q3     What are the problems faced with the current recruitment process?


Q4     In the current process, how do you manage and maintain the information?


Q5     What is the main purpose(s) for this E-Recruitment system?


Q6     What do you hope to achieve from this E-Recruitment system?


Q7     Who will be using this system?


Q8     What information do you need to keep track of?


Q9     What reports does the business require?


Q10    Do you think this system is beneficial in improving recruitment such as
       headhunting of more suitable people?




                                                                                   67
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Appendix B: Questionnaire – Survey Form


The following is the sample copy of the survey form for job seekers.


Q1     What is your age group?

       a. 20 - 29 years old

       b. 30 – 39 years old

       c. 40 – 49 years old

       d. 50 – 59 years old

       Your answer (      )

Q2     What is your gender?

       a. Female

       b. Male

       Your answer (      )

Q3     How often do you use the Internet, not including email, by yourself, either at
       work or at home?

       a. Less than 1 hour per week

       b. 1 to 2 hours per week

       c. 2 to 3 hours per week

       d. More than 3 hours per week

       Your answer (      )

Q4     On a scale of 1 to 5, with 1 being the least comfortable and 5 being the most
       comfortable, how comfortable and familiar are you in using the Internet to
       search and apply for jobs?

       Your answer (      )



                                                                                       68
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Q5     On a scale of 1 to 5, with 1 being the least comfortable and 5 being the most
       comfortable, how comfortable are you in filling up online application form
       and online resume on website?

       Your answer (     )


Q6     On a scale of 1 to 5, with 1 being the least willing and 5 being the most
       willing, how willing are you in filling up online job application form and
       online resume on website?

       Your answer (     )



Thank you for completing the survey form. Your responses are truly appreciated.




                                                                                       69
                                 Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



Appendix C: Initial ER Diagram




                                                                                                    70
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Appendix D: User Interface Screenshots

Figure AD-1 shows the Career Homepage. It can be accessed by clicking “Careers at
Neno” link on every page in the system. The hyperlink “REGISTER” allows new user
(applicant) to register account, in order to apply jobs.




                                    Figure AD-1



Figure AD-2 shows the Application form in which new applicant can fills up details
such as Personal Details, Education background, past working experience.




                                                                                     71
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120




                                     Figure AD-2



Figure AD-3 shows the Application Form – Continue in which applicant can fill up
education, work experience and referee details. Once data is successfully inserted,
success message “Add Success” (in Green) is displayed.




                                                                                      72
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120




                                    Figure AD-3




Figure AD-4 shows the Job Search Tool in which applicant can search for a job by
selecting the job category he/ she want to look under.




                                    Figure AD-4




                                                                                   73
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Figure AD-5 shows the list of jobs under the selected job category.




                                     Figure AD-5




Figure AD-6 shows the details of the selected job applicant has selected to view/
apply.




                                     Figure AD-6




                                                                                    74
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


If applicant decides to apply the job showed in Figure 6, he/ she can click “Apply
Online” button and applicant will be prompted to login to apply, showed in Fig AD-7.




                                    Figure AD-7



Figure AD-8 shows the Preview Application form in which applicant had filled up
during registration (in Figure AD-2 and AD-3).




                                    Figure AD-8




                                                                                  75
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Figure AD-9 shows the Error page if applicant has already applied for a job with the
company, he/ she will not be allowed to apply a second position.




                                     Figure AD-9



Figure AD-10 shows an applicant, who has not applied for any job, login into the
system to apply a job.




                                     Figure AD-10



Figure AD-11 shows the application form of the applicant who has not apply any job
previously.




                                     Figure AD-11




                                                                                   76
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Figure AD-12 is a success page informing the applicant has successfully applied a
job.




                                    Figure AD-12



User can login via Job Applicant by selecting Login as: Job Applicant as shown in
Figure AD-13 below.




                                    Figure AD-13




                                                                                    77
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



Figure AD-14 in the following shows the Applicant Homepage after user has login.




                                     Figure AD-14



When applicant clicks the first link “View Job Application Status” in Figure AD-14,
he/ she will be redirected to the page in Figure AD-15, displaying the status and date
of application he/ she has applied.




                                     Figure AD-15




                                                                                     78
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


When applicant clicks the second link “Change Login Password” in Figure AD-14,
applicant will be redirected to the update application form page in Figure AD-16.
Success message “Update Success” (in green) is displayed once user has updated the
form successfully.




                                    Figure AD-16



When applicant click the third link “View or Edit Resume” in Figure AD-14,
applicant will be redirected to the page in Figure AD-17 to change password. Success
message “Update Success” (in green) is displayed once user has updated the form
successfully.




                                    Figure AD-17



                                                                                  79
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



HR Admin can login via Staff by selecting Login as: Staff as shown in Figure AD-18
below.




                                   Figure AD-18



Figure AD-19 in the following shows the HR Admin Homepage after user has login.




                                   Figure AD-19




                                                                                80
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



Figure AD-20 in the following shows the Add Job page with success message “Job
Add Success” (in green) after user has successfully added a new job.




                                     Figure AD-20



Figure AD-21 in the following shows the Update/ Delete Job page with success
message “Update Success” (in green) after user has successfully updated a job details.




                                     Figure AD-21




                                                                                   81
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



Figure AD-22 in the following shows the Update/ Delete Job page with success
message “Delete Success” (in green) after user has successfully deleted a job.




                                    Figure AD-22




Figure AD-23 in the following shows the Add Job-Required Skills page with success
message “Add Success” (in green) after user has successfully added a job-required
skill to a selected job.




                                    Figure AD-23




                                                                                 82
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



Figure AD-24 shows the View Job Application Submitted page. User can select a job
category and job title to view the application forms submitted for each job.




                                     Figure AD-24

Fig AD-25 shows the pop-out page of applicant’s application form submitted. This
page is pop-out after user has clicked the “Application Form” link (Circle in Red).




                                     Figure AD-25

Figure AD-26 shows the View Job Application Submitted page with success message
“Update Success” (in green) after user has successfully shortlisted a selected
application for interview.




                                     Figure AD-26


                                                                                      83
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Figure AD-27 shows the upper portion of “Update Recruitment Details” page. Once
user has selected an application ID, the application and final interview details
associated with the application ID will be displayed (Circle in red).




                                       Figure AD-27



Figure AD-28 shows the lower portion of “Update Recruitment Details” page. Once
user has enter the no of hours and salary per cost etc, the total cost of hire (Circle in
red) will be computed and displayed.




                                       Figure AD-28




                                                                                            84
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Figure AD-29 shows the “Update Recruitment Details” page with success message
“Update Success” (in green) after user has successfully updated recruitment details




                                      Figure AD-29



Figure AD-30 shows the upper portion of “Talent Pool Search” page. The job-
required skills of each job will be displayed once user has selected a job to view.




                                      Figure AD-30




                                                                                      85
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Figure AD-31 shows the lower portion of “Talent Pool Search” page. Admin will
select skills that are needed for a particular job. This page will then display the details
of applicants who have possessed the skills selected by the Admin for viewing.




                                       Figure AD-31



Figure AD-32 shows the pop-out page displaying the details of the skills associated
with the selected applicant. This page will be pop-out once admin click on the “Show
Skills” link in the right-hand side of table in Figure AD-31.




                                       Figure AD-32




                                                                                         86
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Fig AD-33 shows the “Update Application Status” page with “Update Success” (in
green) after user has successfully updated application Status to “Pass”.




                                     Figure AD-33




Once an application status has been updated to “Pass”, that particular job has recruited
staff successfully. Thus, the system will auto update the job status of that job to
“Filled” (Circle in red).

1. Below shows a list of applications with “Pending” status.




2. Below shows a list of jobs with “Vacant” Status. Notice that those pending
applications were associated to jobs which are vacant.




                                                                                     87
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120




3. Admin will update the status of an application (ID: 80000006) to “Pass” as shown
below. This application is applied for the job (ID:J000004).




4. The below record shows that the job status of job (ID: J000004) has changed to
“Filled” automatically once the Application status for that job became “Pass”




                                                                                    88
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120




Admin can view the status of the job through the “Update Recruitment Details” page
by search for that particular job




                                   Figure AD-34




                                                                                 89
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Job Application deadline will be auto extended to one month later if the job is not
filled within the open job application period. The job deadline can be viewed in the
“Update/ Delete Job” page (Figure AD-35) if Admin wants to see up-to-date job
deadline.




                                     Figure AD-35



HR or hiring managers can login via Staff by selecting Login as: Staff as shown in
Figure AD-36 below.




                                     Figure AD-36




                                                                                       90
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



Figure AD-37 shows the management homepage once manager has login
successfully.




                                    Figure AD-37




Manager can view the below page (Figure AD-38) for a list of application details
which has been short-listed for interview.




                                    Figure AD-38




                                                                                   91
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



Manager can view the application form (Figure AD-39) for each application by
clicking the “Application Form” link the right-hand side of the table in Figure AD-38.




                                     Figure AD-39




Figure AD-40 shows the “Add Interview Details” page with success message “Update
Success” (in green) after user has successfully added interview details.




                                     Figure AD-40




                                                                                    92
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Figure AD-41 shows the Job Application Report after manager has selected the
criteria to generate report.




                                    Figure AD-41

Figure AD-42 shows the Recruitment Report after manager has selected the criteria to
generate report.




                                    Figure AD-42



Figure AD-43 shows the Job Report after manager has selected the criteria to generate
report.




                                    Figure AD-43



                                                                                  93
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Figure AD-44 shows the Cost-Per-Hire Report (By Job Category) after manager has
selected the criteria to generate report.




                                    Figure AD-44


Figure AD-45 shows the Cost-Per-Hire Report (By Job Title) after manager has
selected the criteria to generate report.




                                    Figure AD-45



Figure AD-46 shows the Interview Report after manager has selected the criteria to
generate report.




                                    Figure AD-46



                                                                                     94
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Figure AD-47 shows the company details about Neno. It can be assessed by clicking
“About Neno” link in the left-hand side of every page in the system.




                                    Figure AD-47



Figure AD-48 shows the contact Neno details. It can be assessed by clicking “Contact
Us” link in the left-hand side of every page in the system.




                                    Figure AD-48



Figure AD-49 shows Site Terms. It can be assessed by clicking “Site Terms” link in
the left-hand side of every page in the system.




                                    Figure AD-49



                                                                                     95
                                                                              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



Appendix E: Detailed Test Suite for E-Recruitment System
Test   System         Who Uses or   Purpose of Test                                  Test Shot/ Data        Expected Result       Actual Result       Pass/
No.    Objectives     Triggers?                                                                                                                       Fail
1      SO1:           Applicant     To test if system prompts error message          Input data to all      Error message         Error message       Pass
       Online Job                   when mandatory fields (e.g. Applicant            fields except for      “Please enter a       “Please enter a
       Applicant                    Name) are not inputted in the application        applicant name         name” should be       name” is
       Registration                 form while registering.                          field.                 displayed.            displayed.
2      SO1:           Applicant     To test if system prompts error message          Input alphabetic       Error message         Error message       Pass
       Online Job                   when non-numeric values are inputted to          values to Phone        “Phone Number         “Phone Number
       Applicant                    numeric fields (e.g. Phone)                      field.                 should be             should be
       Registration                                                                                         numeric” should       numeric” is
                                                                                                            be displayed          displayed
3      SO1:           Applicant     To test if system updates the record to the   Input valid data to       Success message       Success message     Pass
       Online Job                   database once all field validation checks had all fields.               “Account              “Account
       Applicant                    passed.                                                                 Successfully          Successfully
       Registration                                                                                         Created” should       Created” is
                                                                                                            be displayed          displayed
4      SO1:           Applicant     To test if all the fields become blank once      Input data to all      All fields should     All fields became   Pass
       Online Job                   the Clear Form button is clicked.                fields and click the   be blank              blank
       Applicant                                                                     Clear Form button.
       Registration
5      SO2:           Applicant     To test if the system returns the correct list   Select a job           All finance job       All finance job    Pass
       Job Vacancy                  of jobs when user selected a particular job      category (e.g.         titles should be      titles are
       Search Tool                  category                                         Finance)               displayed.            displayed.
6      SO2:           Applicant     To test if the system returns the correct job    Click on a job title   The job details of    The job details of Pass
       Job Vacancy                  details when user clicks on a job link to        (e.g. Finance          Finance Executive     Finance
       Search Tool                  view job details.                                Executive)             should be             Executive are
                                                                                                            displayed.            displayed.
7      SO2:           Applicant     To test if user is prompted for login            Click on Apply         User should be        User is redirected Pass
       Job Vacancy                  credentials to apply jobs once Apply Online      Online button at the   redirected to login   to login page.
       Search Tool                  button is clicked under job details page.        bottom of job          page.
                                                                                     details page.




                                                                                                                                                         96
                                                                        Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



8    SO3:          Applicant   Once user has login, he/ she will be             Enter login            User should be        User is redirected Pass
     Job                       redirected to his/her online resume page         credentials to login   redirected to         to preview his/
     Application               which has been filled up upon registration.                             preview his/ her      her online
                                                                                                       online resume         resume page.
                                                                                                       page.
9    SO3:          Applicant   To test if a job applicant (e.g. Applicant ID:   After previewing       User should           User is redirected Pass
     Job                       A0000001) is able to apply a job.                the online resume,     redirected to         to Application
     Application                                                                click Apply to         Application           success page
                                                                                apply the job.         success page
10   SO3:          Applicant   To test if a job applicant (A0000001) is         Select another job     User should be        User is redirected Pass
     Job                       allowed to apply a second job.                   and click Apply        redirected to an      to an Application
     Application                                                                                       Application           Failure page
                                                                                                       Failure page          indicating he/ she
                                                                                                       indicating he/ she    had already
                                                                                                       had already           applied a
                                                                                                       applied a position.   position.
11   SO4:          Applicant   To test if system prompts error message          Input data to all      Error message         Error message      Pass
     Edit Online               when mandatory fields (e.g. Applicant            fields except for      “Please enter a       “Please enter a
     Resume                    Name) are not inputted in the application        applicant name         name” should be       name” is
                               form while registering.                          field.                 displayed.            displayed.
12   SO4:          Applicant   To test if system prompts error message          Input alphabetic       Error message         Error message      Pass
     Edit Online               when non-numeric values are inputted to          values to Phone        “Phone Number         “Phone Number
     Resume                    numeric fields (e.g. Phone)                      field.                 should be             should be
                                                                                                       numeric” should       numeric” is
                                                                                                       be displayed          displayed

13   SO4:          Applicant   To test if system updates the record to the   Input valid data to       Success message       Success message   Pass
     Edit Online               database once all field validation checks had all fields.               “Update               “Update
     Resume                    passed.                                                                 Successful”           Successful” is
                                                                                                       should be             displayed
                                                                                                       displayed




                                                                                                                                                   97
                                                                       Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



14   SO5:          Applicant   To test if system display the correct         Click on the View       System should         System displays      Pass
     Job                       application details and status                Job Application         display the correct   the correct
     Application                                                             Status link under       application details   application
     Status                                                                  Applicant’s             and status            details and status
     Viewing                                                                 homepage
15   SO6:          Applicant   To test if system prompts error message       Input data to all       Error message         Error message        Pass
     Change                    when mandatory fields (e.g. New Password)     fields except for       “New Password         “New Password
     Login                     are not inputted.                             New Password            should not be         should not be
     Password                                                                field.                  blank” should be      blank” is
                                                                                                     displayed.            displayed.
16   SO6:          Applicant   To test if the system accepts wrong current   Enter a wrong           Error message         Error message        Pass
     Change                    password                                      current password        “Wrong Current        “Wrong
     Login                                                                   and click Update        Password” should      Current
     Password                                                                button                  be displayed          Password” is
                                                                                                                           displayed
17   SO6:          Applicant   To test if the system prompts error when      Enter a value to the    Error message         Error message        Pass
     Change                    Retype New password field value inputted      Retype New              “New Password         “New Password
     Login                     does not match New password field value.      Password field          and Retype            and Retype
     Password                                                                which is different      Password does         Password does
                                                                             from New Password       not match”            not match” is
                                                                             field.                  should be             displayed
                                                                                                     displayed

18   SO6:          Applicant   To test if system is able to change login     Input data to all       Success message       Success message      Pass
     Change                    password                                      fields and click        “Update               “Update
     Login                                                                   update button.          Successful”           Successful” is
     Password                                                                                        should be             displayed
                                                                                                     displayed
19   SO7:          Admin       To test if system is able to insert new job   Input all fields with   System should         System prompts       Pass
     Post Job                  record into database once user inputs valid   valid data and click    prompt a success      a success
                               data to all fields                            Add button              message               message




                                                                                                                                                   98
                                                                     Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



20   SO7:           Admin    To test if system prompt error message         Input all fields       System should         System prompts    Pass
     Post new job            when mandatory fields (e.g. Job Title) are     except Job Title       prompt a error        a error message
                             not input                                      field and click Add    message
                                                                            button
21   SO7:           Admin    To test if system prompts error message        Input alphabetic       System should         System prompts    Pass
     Post new job            when non-numeric values are inputted to        values to Job          prompt a error        a error message
                             numeric fields (e.g. Job Deadline)             Deadline fields.       message
22   SO8:           Admin    To test if system is able to retrieve and      Select a job           Correct job details   Correct job       Pass
     Update/                 display the correct job details selected by    category and title     should be             details is
     Delete Job              Admin                                                                 displayed             displayed

23   SO8:           Admin    To test if system is able to update changes    Change some field      System should         System prompts    Pass
     Update/                 into database                                  data and click         prompt a success      a success
     Delete Job                                                             Update Job             message               message
24   SO8:           Admin    To test if system prompt error message         Input all fields       System should         System prompts    Pass
     Update/                 when mandatory fields (e.g. Job Title) are     except Job Title       prompt a error        a error message
     Delete Job              not input                                      field and click Add    message
                                                                            button
25   SO8:           Admin    To test if system prompts error message        Input alphabetic       System should         System prompts    Pass
     Update/                 when non-numeric values are inputted to        values to Job          prompt a error        a error message
     Delete Job              numeric fields (e.g. Job Deadline)             Deadline fields.       message
26   SO8:           Admin    To test if system is able to retrieve and      Select a job           Correct job details   Correct job       Pass
     Update/                 display the correct job details selected by    category and title     should be             details is
     Delete Job              Admin                                                                 displayed             displayed
27   SO8:           Admin    To test if system is able to delete a job      Select a job           Job title should be   Job title is      Pass
     Update/                 record from database                           category and title     deleted off and no    deleted off
     Delete Job                                                             and click Delete       more appearing in
                                                                            button                 the job title drop
                                                                                                   down list
28   SO14:          System   To test if system is able to extend job        Go to Update Job       Job deadline          Job deadline is   Pass
     Auto Extend             deadline to one month later once the current   page and select that   should be updated     updated to one
     Job                     date is greater than the job deadline.         particular job and     to one month later    month later




                                                                                                                                              99
                                                                     Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



     Application                                                            view the job
     Deadline                                                               deadline.
29   SO9:           Admin   To test if system is able to add required       Select a job           System should         System prompts       Pass
     Add Required           skills to a selected job title                  category and title.    prompt a success      a success
     Skills to each                                                         Next, select skill     message               message
     Job                                                                    category and skill
                                                                            name and click
                                                                            Update button
30   SO10:         Admin    To test if system display applicant,            Select a job           System should         System displays      Pass
     View                   application and job details correctly based     category and job       display the           the necessary
     Application            on the job title selected                       title from drop        necessary details     details belong to
     forms                                                                  down lists and click   belong to the job     the job title
     Submitted                                                              Generate button        title selected        selected
31   SO10:         Admin    To test if system updates record when           Select a job           System should         System prompts       Pass
     View                   admin shortlist applicant for interview by      applicant by           prompt a success      a success
     Application            clicking Shortlist for Interview button         checking the           message               message
     forms                                                                  checkbox
     Submitted                                                              associated with
                                                                            him/ her and click
                                                                            Shortlist for
                                                                            Interview button
32   SO11:         Admin    To test if correct Job required skills are      Select a job           Correct job           Correct job          Pass
     Talent Pool            displayed when admin select a job title         category and title     required skills       required skills is
     Search                                                                                        should be             displayed
                                                                                                   displayed
33   SO11:         Admin    To test if applicant details are displayed      Select a skill         Applicant(s) with     Applicant(s) with Pass
     Talent Pool            when skills are selected and if the applicant   category and name      skills matched to     skills matched to
     Search                 possess the selected skills                     and click Generate     the skills selected   the skills selected
                                                                            button                 by admin should       by admin is
                                                                                                   be displayed          displayed
34   SO11:         Admin    To test if the “Show Skill” link associated     Click on the “Show     Correct skill         Correct skill       Pass
     Talent Pool            with each applicant pops out a new window       Skill” link            details associated    details associated




                                                                                                                                                100
                                                                        Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



     Search                  that displays the correct skills of that                                with the applicant     with the
                             applicant                                                               should be              applicant is
                                                                                                     displayed              displayed
35   SO12           Admin    To test if the system updates record to          Select an              System should          System prompts      Pass
     Updating Job            database once Admin update the application       application ID and     prompt a success       a success
     Application             status.                                          select a status and    message                message
     Status                                                                   click Update button
36   SO15 Auto      System   To test if system updates the job status to      Update application     Job Status should      Job Status is       Pass
     Update Job              “Filled” once the status of application          status to “Pass” to    be updated as          updated to
     Status                  associated with the job has being updated to     an application, and    “Filled”               “Filled”
                             “Pass”                                           check in database if
                                                                              the job status
                                                                              becomes “Filled”.
                                                                              Alternatively, can
                                                                              view the job status
                                                                              in the Update
                                                                              Recruitment page
37   SO13:          Admin    To test if system display the correct            Select an              Necessary details      Necessary details   Yes
     Update                  Application and Final Interview Details and      Application ID.        associated with the    associated with
     Recruitment             Recruitment Details (if exist)                                          Application ID         the Application
     Details                                                                                         selected should be     ID selected is
                                                                                                     displayed (if exist)   displayed
38   SO13:          Admin    To test if system prompts error message          Input alphabetic       System should          System prompts      Yes
     Update                  when non-numeric values are inputted to          values to Salary Per   prompt a error         a error message
     Recruitment             numeric fields (e.g. Salary Per hour)            hour fields.           message
     Details
39   SO13:          Admin    To test if system calculates Cost of Hire        Input valid values     Correct cost           Correct cost        Yes
     Update                  correctly using the formulae (No of hours *      to No of hours,        amount should be       amount is
     Recruitment             Salary Per hour + advertising cost)              Salary Per Hour and    displayed at the       displayed at the
     Details                                                                  Advertising and        Total Cost field       Total Cost field
                                                                              click Calculate Cost
                                                                              button




                                                                                                                                                  101
                                                                         Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



40   SO13:             Admin     To test if system is able to update the          Change values to     System should         System prompts      Pass
     Update                      changes made to each fields to the database      some fields and      prompt a success      a success
     Recruitment                                                                  click Update         message               message
     Details
41   SO16:             Manager   To test if the system displays the application   Select a Year,       Correct               Correct             Pass
     View Job                    details according to the selection criteria      Month Applied, Job   Application details   Application
     Application                                                                  category and         should be             details is
     Report                                                                       Application Status   displayed             displayed
                                                                                  and click Generate
42   SO16:             Manager   To test if the system prompts error message      Select a Year,       Error message         Error message       Pass
     View Job                    if no data is found                              Month Applied, Job   “No Data” should      “No Data” is
     Application                                                                  category and         be displayed          displayed
     Report                                                                       Application Status
                                                                                  with no data (e.g.
                                                                                  May) and click
                                                                                  Generate
43   SO17:             Manager   To test if the system displays the               Select a Job         Correct               Correct             Pass
     View                        Application details according to the job         Category and Job     Application details   Application
     Applications                selection criteria                               Title and click      should be             details is
     shortlisted for                                                              Generate             displayed             displayed
     Interview
44   SO17:             Manager   To test if system displays correct               Click on the         Correct               Correct             Pass
     Add                         application form when Manager clicks             “Application Form”   application form      application form
     Interview                   “Application Form” link                          link                 should be             is displayed
     Details                                                                                           displayed

45   SO17:             Manager   To test if system displays Add Interview         Click on the “Add    Add Interview         Add Interview       Pass
     Add                         Details page with Application ID belonging       Interview Details”   Details page with     Details page with
     Interview                   to selected application when Manager clicks      link                 the correct           the correct
     Details                     “Add Interview Details” link corresponding                            Application ID        Application ID is
                                 to the selected application.                                          should be             displayed
                                                                                                       displayed




                                                                                                                                                   102
                                                                      Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



46   SO17:         Manager   To test if the system is able to add Interview   Input values to the   System should         System prompts      Pass
     Add                     record to the database.                          fields on Add         prompt a success      a success
     Interview                                                                Interview page and    message               message
     Details                                                                  click “Add”
47   SO18:         Manager   To test if the system displays the job details   Select a Year,        Correct Job details   Correct Job         Pass
     View Job                according to the selection criteria              Month and Job         should be             details is
     Tracking                                                                 category and          displayed             displayed
     Report                                                                   Generate
48   SO18:         Manager   To test if the system prompts error message      Select a Year,        Error message         Error message       Pass
     View Job                if no data is found                              Month and Job         “No Data” should      “No Data” is
     Tracking                                                                 category with no      be displayed          displayed
     Report                                                                   data and Generate
49   SO19:         Manager   To test if the system displays the Interview     Select a Year,        Correct Interview     Correct             Pass
     View                    details according to the selection criteria      Month and             details should be     Interview details
     Interview                                                                Interview Status      displayed             is displayed
     tracking                                                                 and click Generate
     Report
50   SO19:         Manager   To test if the system prompts error message      Select a Year,        Error message         Error message       Pass
     View                    if no data is found                              Month and             “No Data” should      “No Data” is
     Interview                                                                Interview Status      be displayed          displayed
     tracking                                                                 with no data (e.g.
     Report                                                                   March) and
                                                                              Generate
51   SO20:         Manager   To test if the system displays the details of    Select a Year,        Correct job details   Correct job         Pass
     View                    jobs being recruited according to the            Month and Job         should be             details is
     Recruitment             selection criteria                               category and click    displayed             displayed
     Report                                                                   Generate
52   SO20:         Manager   To test if the system prompts error message      Select a Year,        Error message         Error message       Pass
     View                    if no data is found                              Month and Job         “No Data” should      “No Data” is
     Recruitment                                                              category with no      be displayed          displayed
     Report                                                                   data and click
                                                                              Generate




                                                                                                                                                103
                                                                    Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



53   SO21:        Manager   To test if the system displays the cost-per-   Select a Year,          Correct cost-per-     Correct cost-per-   Pass
     View Cost-             hire details according to the selection        Month and Type          hire details should   hire details is
     Per-Hire               criteria                                       (By Job Category/       be displayed          displayed
     Report                                                                Job Title) and click
                                                                           Generate
54   SO21:        Manager   To test if the system prompts error message    Select a Year,          Error message         Error message       Pass
     View Cost-             if no data is found                            Month and Type          “No Data” should      “No Data” is
     Per-Hire                                                              (By Job Category/       be displayed          displayed
     Report                                                                Job Title) with no
                                                                           data (e.g. April) and
                                                                           click Generate




                                                                                                                                               104
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Appendix F: Source Codes to create database tables:

Table Name      JOB
CREATE TABLE dbo.JOB(
JobID Varchar(50) not null,
JobTitle Varchar(50) not null,
JobDesc Varchar(100) not null,
JobPostDate date not null,
JobDeadline date not null,
Remarks Varchar(100) null,
HighestPayOffer decimal(10,3) not null,
LowestPayOffer decimal(10,3) not null,
JobCatID Varchar(50) not null,
JobRequirement Varchar(500) null,
JobStatus Varchar(50) null,

CONSTRAINT JobPK PRIMARY KEY (JobID),
CONSTRAINT JOB_CATFK FOREIGN KEY (JobCatID) REFERENCES DBO.JOB_CATEGORY
(JobCatID)
       ON DELETE NO ACTION
       ON UPDATE NO ACTION);



Table Name      APPLICANT
CREATE TABLE dbo.APPLICANT(
       [AppID] [varchar](50) NOT NULL,
       [AppName] [varchar](50) NOT NULL,
       [AppEmail] [varchar](50) NOT NULL,
       [AppPhone] [varchar](50) NOT NULL,
       [AppDOB] [date] NOT NULL,
       [AppGender] [varchar](50) NOT NULL,
       [AppRace] [varchar](50) NOT NULL,
       [AppReligion] [varchar](50) NULL,
       [ExpectedSalary] [decimal](10, 3) NULL,
       [Achievement] [varchar](max) NULL,
       [UserID] [varchar](50) NULL,
       [AppAddress] [varchar](max) NULL,
       [AppPostal] [varchar](50) NULL,
       [AppCountry] [varchar](50) NULL,
       [AppOtherCountry] [varchar](50) NULL,
       [AppNRIC] [varchar](50) NULL,
       [AppNRICType] [varchar](50) NULL,
       [AppNationality] [varchar](50) NULL,
       [AppAge] [int] NULL,
       [AppMarital] [varchar](50) NULL,
       [AppCV] [varchar](max) NULL,
       [Active] [varchar](50) NULL,

CONSTRAINT AppPK   PRIMARY KEY (AppID),
CONSTRAINT AppFK   FOREIGN KEY (AppID) REFERENCES DBO.APPLICANT(AppID)
       ON DELETE   NO ACTION
       ON UPDATE   NO ACTION);




                                                                               105
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Table Name      APPLICATION
CREATE TABLE [dbo].[APPLICATION](
       [JobID] [varchar](50) NOT NULL,
       [AppID] [varchar](50) NOT NULL,
       [ApplicationID] [varchar](50) NOT NULL,
       [AppDate] [date] NOT NULL,
       [AppStatus] [varchar](20) NULL,
       [LastUpdated] [date] NULL,
       [Active] [varchar](50) NULL,

CONSTRAINT [ApplicationPK] PRIMARY KEY (ApplicationID),
CONSTRAINT [JOB_AppFK] FOREIGN KEY([JobID]) REFERENCES [dbo].[JOB] ([JobID])
ON DELETE NO ACTION
ON UPDATE NO ACTION,

CONSTRAINT [Applic_AppFK] FOREIGN KEY([AppID]) REFERENCES [dbo].[APPLICANT]
([AppID])
ON DELETE NO ACTION
ON UPDATE NO ACTION);



Table Name      EDUCATION
CREATE TABLE DBO.EDUCATION(
InstituteName Varchar(100) not null,
AppID Varchar(50) not null,
StartDate date not null,
EndDate date null,
CertObtained Varchar(100) not null,
[HighestEdu] [varchar](50) NULL,

CONSTRAINT EDU_PK PRIMARY KEY(AppID, InstituteName, CertObtained),
CONSTRAINT AppFK FOREIGN KEY (AppID) REFERENCES DBO.APPLICANT (AppID)
       ON DELETE NO ACTION
       ON UPDATE NO ACTION);



Table Name      INTERVIEW
CREATE TABLE DBO.INTERVIEW(
ApplicationID Varchar(50) not null,
InterviewDate Date not null,
InterviewRating Varchar(100) not null,
InterviewStatus Varchar(100) not null,
Remarks Varchar(100) null,
FinalInterview Varchar(50) NULL,

CONSTRAINT InterviewPK PRIMARY KEY (ApplicationID, InterviewDate),
CONSTRAINT Int_AppFK FOREIGN KEY (ApplicationID) REFERENCES DBO.APPLICATION
(ApplicationID)
       ON DELETE NO ACTION
       ON UPDATE NO ACTION);



Table Name      JOB_CATEGORY
CREATE TABLE [dbo].[JOB_CATEGORY](
       [JobCatID] [varchar](50) NOT NULL,
       [JobCatName] [varchar](50) NOT NULL,
       [Remarks] [varchar](max) NULL,

 CONSTRAINT [PK_JOB_CATEGORY] PRIMARY KEY (JobCatID)
);



                                                                               106
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



Table Name      JOB_REQUIRED_SKILL
CREATE TABLE DBO.JOB_REQUIRED_SKILL(
       JobID Varchar(50) not null,
       SkillName varchar(200) not null,

CONSTRAINT jobFK FOREIGN KEY (JobID) REFERENCES DBO.Job (JobID)
       ON DELETE NO ACTION
       ON UPDATE NO ACTION);




Table Name      RECRUITMENT
CREATE TABLE DBO.RECRUITMENT(
JobID Varchar(50) not null,
RecruitID Varchar(50) not null,
CostOfHire decimal(10,3) not null,
LengthOfTime int not null,
Benefits Varchar(200) not null,
Remarks Varchar(100) null,
RecruitDate Date null,

CONSTRAINT RecruitPK PRIMARY KEY (RecruitID),

CONSTRAINT Recruit_JobFK FOREIGN KEY (JobID) REFERENCES DBO.Job (JobID)
       ON DELETE NO ACTION
       ON UPDATE NO ACTION);



Table Name      REFERENCE
CREATE TABLE [dbo].[REFERENCE](
       [RefID] [varchar](50) NOT NULL,
       [AppID] [varchar](50) NOT NULL,
       [RefName] [varchar](50) NULL,
       [RefAddress] [varchar](50) NULL,
       [RefOccupation] [varchar](50) NULL,
       [RefPhone] [varchar](50) NULL,
       [RefCompany] [varchar](50) NULL,
       [NoOfYrKnown] [int] NULL,

CONSTRAINT PK_Reference PRIMARY KEY (RefID)
);



Table Name      SKILL
CREATE TABLE DBO.SKILL(
AppID Varchar(50) not null,
SkillName varchar(50) not null,
SkillDesc Varchar(100) null,
SkillLevel Varchar(20) not null,
SkillCatName varchar(200) not null,

CONSTRAINT SKILL_PK PRIMARY KEY(AppID, SkillName),
CONSTRAINT App_SkillFK FOREIGN KEY (AppID) REFERENCES DBO.APPLICANT (AppID)
       ON DELETE NO ACTION
       ON UPDATE NO ACTION);




                                                                               107
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Table Name      SKILL_CAT
CREATE TABLE [dbo].[SKILL_CAT](
       [SkillCatID] [varchar](50) NOT NULL,
       [SkillCatName] [varchar](200) NOT NULL,
       [Remarks] [varchar](300) NOT NULL,

 CONSTRAINT [SkillCatPK] PRIMARY KEY (SkillCatID)
);



Table Name      USERS
CREATE TABLE [dbo].[USERS](
       [UserID] [varchar](50) NOT NULL,
       [Password] [varchar](50) NOT NULL,
       [UserType] [varchar](50) NOT NULL,
       [UserGroup] [varchar](50) NULL,

 CONSTRAINT [PK_User] PRIMARY KEY (UserID)
);



Table Name      WORK_EXPERIENCE
CREATE TABLE [dbo].[WORK_EXPERIENCE](
       [AppID] [varchar](50) NOT NULL,
       [CoName] [varchar](50) NOT NULL,
       [JobTitle] [varchar](20) NOT NULL,
       [JobDesc] [varchar](20) NOT NULL,
       [LastDrawnPay] [decimal](10, 3) NOT NULL,
       [OtherBenefits] [varchar](100) NULL,
       [StartDate] [date] NULL,
       [EndDate] [date] NULL,
       [Reasons] [varchar](max) NULL,
       [CurrentJob] [varchar](50) NULL,

CONSTRAINT WORK_EXPPK PRIMARY KEY (AppID, CoName, JobTitle),
CONSTRAINT WORK_EXP_AppFK FOREIGN KEY (AppID) REFERENCES DBO.APPLICANT
(AppID)
       ON DELETE NO ACTION
       ON UPDATE NO ACTION);




                                                                               108
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Appendix G: Web System Source Codes

Web Page      Career_Index.aspx.vb
Purpose(s)        To search for a job
                  To login via Job Applicant or Staff to access to different pages
Imports System.Linq
Imports System.Data.SqlClient

Partial Public Class Career_Index
    Inherits System.Web.UI.Page

   Dim err_msg As String

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load

       If Not Page.IsPostBack Then
           getJobCategory()
       End If

       'Determine the user type (Job application or Staff)
       Select Case Me.rbtn_logintype.SelectedValue
           Case 0
               Me.lbl_usertype.Text = "Job Applicant Login"
           Case 1
               Me.lbl_usertype.Text = "Staff Login"
       End Select
   End Sub

   Private Sub getJobCategory()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT distinct JobCatName FROM
dbo.[JOB_CATEGORY] ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

        For Each row As DataRow In myDataSet.Tables(0).Rows
            'To populate Job categories into drop down list
Me.dd_JobCat.Items.Add(row("JobCatName"))
        Next

   End Sub

    Protected Sub btn_Submit_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Submit.Click
        'Redirect to the page listing job titles under the selected job category
        Response.Redirect("Job_Listing.aspx?JobCatName=" & Me.dd_JobCat.SelectedValue)

   End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        'Link to Career Home
        Response.Redirect("Career_index.aspx")
    End Sub

   Private Function Validate_Input() As Boolean
       'Validate to check if user has entered user ID and password
       If Me.txt_userid.Text = "" Or Me.txt_pwd.Text = "" Then
           err_msg = "Please enter a User ID and a Password"
           Return False

       ElseIf Me.txt_userid.Text <> "" And Me.txt_pwd.Text <> "" Then
           Return True
       End If

   End Function




                                                                                    109
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


    Protected Sub btn_login_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_login.Click

        Dim passwordText As HtmlInputPassword = New HtmlInputPassword
        passwordText.MaxLength = 20
        Dim logingrp As String = ""
        Dim logintype, appid As String
        Dim userid As String = ""
        Dim ds As New DataSet
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter

       Select Case Me.rbtn_logintype.SelectedValue
           Case 0
               logingrp = "Applicant"
           Case 1
               logingrp = "Staff"
       End Select

       If Validate_Input() = True Then

            'To determine user group
            If logingrp = "Staff" Then
                myAdapter = New SqlDataAdapter("SELECT UserID, Password, UserType,
usergroup FROM dbo.[USERS] where UserID = '" & Me.txt_userid.Text.Trim & "' and
Password = '" & Me.txt_pwd.Text.Trim & "' and Usergroup = '" & logingrp & "' ",
myConnection)
            ElseIf logingrp = "Applicant" Then
                myAdapter = New SqlDataAdapter("SELECT u.UserID, u.Password,
u.UserType, u.usergroup, a.appid FROM USERS u, APPLICANT a where u.UserID = a.UserID
and u.UserID = '" & Me.txt_userid.Text.Trim & "' and u.Password = '" &
Me.txt_pwd.Text.Trim & "' and u.Usergroup = '" & logingrp & "' ", myConnection)
            End If

           myAdapter.Fill(ds)

           'Check if User exist
           'If user exist
           If ds.Tables(0).Rows.Count > 0 Then

               'Store user id into session
               Session("user") = txt_userid.Text

                If logingrp = "Staff" Then
                    'To determine if the staff is an Admin or Management staff to
individual different page access
                    For Each row As DataRow In ds.Tables(0).Rows
                        logintype = row("usertype")
                        userid = row("userid")
                    Next

                    If logintype = "Admin" Then

                        Response.Redirect("Admin_Index.aspx?UserID=" & userid)
                    ElseIf logintype = "Mgm" Then
                        Response.Redirect("Report_Index.aspx?UserID=" & userid)
                    End If

               ElseIf logingrp = "Applicant" Then
                   logintype = "APP"

                   For Each row As DataRow In ds.Tables(0).Rows
                       appid = row("appid")
                   Next
                   Response.Redirect("Applicant_Index.aspx?AppID=" & appid)
               End If
           Else
               'If user does not exist, display error message
               Me.lbl_err.Visible = True
               Me.lbl_err.Text = "Wrong Login ID or Password. Pls try again."
           End If
       Else
           'If validation fails, display error message
           Me.lbl_err.Visible = True




                                                                                    110
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


               Me.lbl_err.Text = err_msg
               End If

    End Sub

    Protected Sub rbtn_logintype_SelectedIndexChanged(ByVal sender As Object, ByVal e
As EventArgs) Handles rbtn_logintype.SelectedIndexChanged

         Me.lbl_err.Text = ""

        Select Case Me.rbtn_logintype.SelectedValue
            Case 0
                Me.lbl_usertype.Text = "Job Applicant Login"
            Case 1
                Me.lbl_usertype.Text = "Staff Login"
        End Select
    End Sub

    Protected Sub lnk_reg_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
lnk_reg.Click
        'Link to new application page
        Response.Redirect("Application.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        'Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        'Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        'Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub
End Class



Web Page       Application.aspx.vb
Purpose(s)     To allow new job applicant to register an account by filling up the application form,
               which act as an online resume form. In this form, user is required to fill up personal
               details.
Code Behind (Visual Basic codes)
Imports System.Linq
Imports System.Data.SqlClient

Partial Public Class Application
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load

    End Sub

    Private Function getNewApplicantID() As String

         Dim   appId As String = ""
         Dim   newappID As String = ""
         Dim   myConnection As New SqlConnection
         Dim   ds As New DataSet
         Dim   ds2 As New DataSet
         Dim   cnt As Integer
         Dim   myAdapter As SqlDataAdapter

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        myAdapter = New SqlDataAdapter("SELECT Top 1 appId FROM dbo.[Applicant] ORDER



                                                                                                   111
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


BY AppId desc", myConnection)

       myAdapter.Fill(ds2)

       myConnection.Open()

       '***Get last Application ID from the database
       If ds2.Tables(0).Rows.Count > 0 Then
           For Each row As DataRow In ds2.Tables(0).Rows
               appId = row("AppID")
           Next

            '***Form a new unique Applicant ID by increment last Application ID
existed in database by 1
            appId = appId.Substring(1)
            appId = appId + 1
            cnt = appId.Length

           Select Case cnt
               Case 1
                   newappID = "A000000" & appId
               Case 2
                   newappID = "A00000" & appId
               Case 3
                   newappID = "A0000" & appId
               Case 4
                   newappID = "A000" & appId
               Case 5
                   newappID = "A00" & appId
               Case 6
                   newappID = "A0" & appId
               Case 7
                   newappID = "A" & appId
           End Select
       Else
           newappID = "A0000001"
       End If

       myConnection.Close()

       Return newappID
   End Function

    Protected Sub btn_Submit_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Submit.Click

       '***Save Personal Details
       Dim sql As String
       Dim sqlCmd As SqlCommand
       Dim myConnection As New SqlConnection
       Dim newappID As String
       newappID = getNewApplicantID()

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"

       myConnection.Open()

        '***begin validation of each application fields
        Dim validate As New Validation(Me.txt_add.Text, Me.txt_age.Text,
Me.txt_cfm_pwd.Text, _
                                       Me.txt_dob_day.Text, Me.txt_dob_mth.Text,
Me.txt_dob_yr.Text, _
                                       Me.txt_email.Text, Me.txt_firstname.Text,
Me.txt_ic.Text, _
                                       Me.txt_ictype.Text, Me.txt_mthexpsalary.Text, _
                                       Me.txt_national.Text, Me.txt_phone.Text, _
                                       Me.txt_postal.Text, Me.txt_pwd.Text)

       '***If all values entered are valid
       If validate.validationOK = True Then

           Try
                '***insert record to Users table
                sql = "Insert into dbo.[USERS] values ('" & validate.get_Email & "','"
& validate.get_Pwd & "','APP', 'Applicant') "




                                                                                   112
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                   sqlCmd = New SqlCommand(sql, myConnection)
                   sqlCmd.CommandType = CommandType.Text
                   sqlCmd.ExecuteNonQuery()

             Catch ex As Exception
                 Me.lbl_err.Visible = True
                 Me.lbl_err.Text = "Error. Please try again."
             End Try

             Try
                '***insert record to Applicant table
                sql = "Insert into dbo.[APPLICANT] values ('" & newappID & "','" &
validate.get_Name & "','" & validate.get_Email & "','" & validate.get_Phone & "','" &
validate.get_DOB & "','" & Me.ddl_gender.SelectedValue & "','" &
Me.ddl_race.SelectedValue & "','" & Me.ddl_religion.SelectedValue & "', " &
validate.get_MthExpSalary & ", '" & Me.txt_achievement.Text.Trim & "','" &
validate.get_Email & "','" & validate.get_Add & "','" & validate.get_Postal & "','" &
Me.ddl_country.SelectedValue & "','" & Me.txt_othercountry.Text & "','" &
validate.get_IC & "','" & validate.get_ICType & "','" & validate.get_National & "', "
& validate.get_Age & ",'" & Me.ddl_marital_status.SelectedValue & "','" &
Me.txt_cv.Text & "', 'Y')"

                sqlCmd = New SqlCommand(sql, myConnection)
                sqlCmd.CommandType = CommandType.Text
                sqlCmd.ExecuteNonQuery()
                '***If record successfully inserted, user will be redirected to Part 2
of Application form.
                Response.Redirect("Application_PartTwo.aspx?AppID=" & newappID)

             Catch ex As Exception
                 Me.lbl_err.Visible = True
                 '***if record not successfully inserted, error displayed
                 Me.lbl_err.Text = "Error. Please try again."
             End Try

             myConnection.Close()

       Else
           '***if field values are not valid, error displayed
           Me.lbl_err.Visible = True
           Me.lbl_err.Text = validate.errorMsg
       End If

   End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        '***Link to Career Homepage
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        '***Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        '***Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        '***Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub

    Protected Sub btn_Clear_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Clear.Click
        '***Clear all fields
        Me.txt_achievement.Text = ""
        Me.txt_add.Text = ""
        Me.txt_age.Text = ""
        Me.txt_cfm_pwd.Text = ""




                                                                                    113
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


       Me.txt_cv.Text = ""
       Me.txt_dob_day.Text = ""
       Me.txt_dob_mth.Text = ""
       Me.txt_dob_yr.Text = ""
       Me.txt_email.Text = ""
       Me.txt_firstname.Text = ""
       Me.txt_ic.Text = ""
       Me.txt_ictype.Text = ""
       Me.txt_mthexpsalary.Text = ""
       Me.txt_national.Text = ""
       Me.txt_othercountry.Text = ""
       Me.txt_phone.Text = ""
       Me.txt_postal.Text = ""
       Me.txt_pwd.Text = ""
       Me.ddl_country.SelectedIndex = 0
       Me.ddl_gender.SelectedIndex = 0
       Me.ddl_marital_status.SelectedIndex = 0
       Me.ddl_race.SelectedIndex = 0
       Me.ddl_religion.SelectedIndex = 0
   End Sub

    Protected Sub btn_Back_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_Back.Click
        '***Redirect user back to Career Homepage
        Response.Redirect("Career_Index.aspx")
    End Sub
End Class

'Class for Validating fields input by user
Public Class Validation

   Private   _str_add As String
   Private   _str_age As String
   Private   _str_cfm_pwd As String
   Private   _str_dob_day As String
   Private   _str_dob_mth As String
   Private   _str_dob_yr As String
   Private   _str_email As String
   Private   _str_firstname As String
   Private   _str_ic As String
   Private   _str_ictype As String
   Private   _str_mthexpsalary As String
   Private   _str_national As String
   Private   _str_phone As String
   Private   _str_postal As String
   Private   _str_pwd As String
   Private   _bln_Validate As Boolean
   Private   _str_Error As String

   '***begin validation   in constructor
   Public Sub New(ByVal   str_add As String, _
                  ByVal   str_age As String, _
                  ByVal   str_cfm_pwd As String, _
                  ByVal   str_dob_day As String, _
                  ByVal   str_dob_mth As String, _
                  ByVal   str_dob_yr As String, _
                  ByVal   str_email As String, _
                  ByVal   str_firstname As String, _
                  ByVal   str_ic As String, _
                  ByVal   str_ictype As String, _
                  ByVal   str_mthexpsalary As String, _
                  ByVal   str_national As String, _
                  ByVal   str_phone As String, _
                  ByVal   str_postal As String, _
                  ByVal   str_pwd As String)

       Dim str_Error As New StringBuilder
       _bln_Validate = True

       _str_add = str_add.Trim
       _str_age = str_age.Trim
       _str_email = str_email.Trim
       _str_cfm_pwd = str_cfm_pwd
       _str_dob_day = str_dob_day.Trim
       _str_dob_mth = str_dob_mth.Trim
       _str_dob_yr = str_dob_yr.Trim




                                                                                  114
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


       _str_firstname = str_firstname
       _str_ic = str_ic.Trim
       _str_ictype = str_ictype.Trim
       _str_mthexpsalary = str_mthexpsalary.Trim
       _str_national = str_national.Trim
       _str_phone = str_phone.Trim
       _str_postal = str_postal.Trim
       _str_pwd = str_pwd.Trim

       If _str_add = "" Then
           '***if address has no input
           _bln_Validate = False
           str_Error.Append("Address - No input")
           str_Error.Append("<br>")
       End If

       If _str_age <> "" Then
           '***if age is not numeric, error displayed
           If IsNumeric(_str_age) = False Then
               _bln_Validate = False
               str_Error.Append("Age must be numeric")
               str_Error.Append("<br>")
           End If
       Else
           _bln_Validate = False
           str_Error.Append("Age - No input")
           str_Error.Append("<br>")
       End If

       If _str_email = "" Then
           _bln_Validate = False
           str_Error.Append("Email - No input")
           str_Error.Append("<br>")
       End If

       If _str_cfm_pwd = "" Then
           _bln_Validate = False
           str_Error.Append("Confirm Password - No input")
           str_Error.Append("<br>")
       End If

        If Not _str_dob_day = "" Or _str_dob_mth = "" Or _str_dob_yr = "" Then
            If IsNumeric(_str_dob_day) = False Or IsNumeric(_str_dob_mth) = False Or
IsNumeric(_str_dob_yr) = False Then
                _bln_Validate = False
                str_Error.Append("DOB must be numeric")
                str_Error.Append("<br>")
            End If
        Else
            _bln_Validate = False
            str_Error.Append("DOB cannot be empty - No input")
            str_Error.Append("<br>")
        End If

       If _str_firstname = "" Then
           _bln_Validate = False
           str_Error.Append("Name - No input")
           str_Error.Append("<br>")
       End If

       If _str_ic = "" Then
           _bln_Validate = False
           str_Error.Append("IC - No input")
           str_Error.Append("<br>")
       End If

       If _str_ictype = "" Then
           _bln_Validate = False
           str_Error.Append("IC Type - No input")
           str_Error.Append("<br>")
       End If

       If _str_mthexpsalary <> "" Then
           If IsNumeric(_str_mthexpsalary) = False Then
               _bln_Validate = False
               str_Error.Append("Expected Salary must be numeric")




                                                                                  115
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


               str_Error.Append("<br>")
           End If
       Else
           _bln_Validate = False
           str_Error.Append("Expected Salary - No input")
           str_Error.Append("<br>")
       End If

       If _str_national = "" Then
           _bln_Validate = False
           str_Error.Append("Nationality - No input")
           str_Error.Append("<br>")
       End If

       If _str_phone = "" Then
           _bln_Validate = False
           str_Error.Append("Phone number - No input")
           str_Error.Append("<br>")
       End If

       If _str_postal = "" Then
           _bln_Validate = False
           str_Error.Append("Postal Code - No input")
           str_Error.Append("<br>")
       End If

       If _str_pwd = "" Then
           _bln_Validate = False
           str_Error.Append("Password - No input")
           str_Error.Append("<br>")
       End If

       _str_Error = str_Error.ToString

   End Sub

    '***The following methods are used to save validated values into   methods for
other classes to call.
    ReadOnly Property get_Add() As String
        Get
            Return _str_add
        End Get
    End Property

   ReadOnly Property get_Age() As Integer
       Get
           Return CInt(_str_age)
       End Get
   End Property

   ReadOnly Property get_Email() As String
       Get
           Return _str_email
       End Get
   End Property

   ReadOnly Property get_ConfirmPwd() As String
       Get
           Return _str_cfm_pwd
       End Get
   End Property

   ReadOnly Property get_DOB() As String
       Get
           Return _str_dob_yr & "-" & _str_dob_mth & "-" & _str_dob_day
       End Get
   End Property

   ReadOnly Property get_Name() As String
       Get
           Return _str_firstname
       End Get
   End Property

   ReadOnly Property get_IC() As String
       Get




                                                                                     116
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


            Return _str_ic
        End Get
    End Property

    ReadOnly Property get_ICType() As String
        Get
            Return _str_ictype
        End Get
    End Property

    ReadOnly Property get_MthExpSalary() As String
        Get
            Return CDbl(_str_mthexpsalary)
        End Get
    End Property

    ReadOnly Property get_National() As String
        Get
            Return _str_national
        End Get
    End Property

    ReadOnly Property get_Phone() As String
        Get
            Return _str_phone
        End Get
    End Property

    ReadOnly Property get_Postal() As String
        Get
            Return _str_postal
        End Get
    End Property

    ReadOnly Property get_Pwd() As String
        Get
            Return _str_pwd
        End Get
    End Property

    ReadOnly Property validationOK() As Boolean
        Get
            Return _bln_Validate
        End Get
    End Property

    ReadOnly Property errorMsg() As String
        Get
            Return _str_Error
        End Get
    End Property

End Class



Web Page       Application_PartTwo.aspx.vb
Purpose(s)     It is the continual page of Application form. In this form, applicant will fill up
               education, work experiences, referee details etc.
Code Behind (Visual Basic codes)
Imports System.Linq
Imports System.Data.SqlClient

Partial Public Class Application_PartTwo
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
        If Not Page.IsPostBack Then
            getSkillCategory()
        End If
    End Sub

    Private Sub getSkillCategory()




                                                                                                    117
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


        '***To retrieve all skills and populate into drop-down list
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT distinct SkillCatName FROM
dbo.[SKILL_CAT] ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

       For Each row As DataRow In myDataSet.Tables(0).Rows
           Me.ddl_skilltype.Items.Add(row("SkillCatName"))
       Next

   End Sub

    Private Sub getEduDetails()
        '***To retrieve education details of an applicant based on Applicant ID and
populate into datagrid
        Dim newappID As String
        newappID = Request.QueryString.Get("AppID")

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT InstituteName, StartDate, EndDate,
CertObtained FROM dbo.[Education] where AppID = '" & newappID & "' ", myConnection)

       Dim ds As New DataSet
       myAdapter.Fill(ds)

       Me.dg_edu.DataSource = ds
       dg_edu.DataBind()

   End Sub

    Private Sub getSkillDetails()
        '***To retrieve skill details of an applicant based on Applicant ID and
populate into datagrid
        Dim newappID As String
        newappID = Request.QueryString.Get("AppID")

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT SkillName, SkillDesc, SkillLevel FROM
dbo.[Skill] where AppID = '" & newappID & "' ", myConnection)

       Dim ds As New DataSet
       myAdapter.Fill(ds)

       Me.dg_skill.DataSource = ds
       dg_skill.DataBind()

   End Sub

    Private Sub getExpDetails()
        '***To retrieve work experience details of an applicant based on Applicant ID
and populate into datagrid
        Dim newappID As String
        newappID = Request.QueryString.Get("AppID")

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT CoName, JobTitle, JobDesc,
LastDrawnPay, OtherBenefits FROM dbo.[WORK_EXPERIENCE] where AppID = '" & newappID &
"' ", myConnection)

       Dim ds As New DataSet
       myAdapter.Fill(ds)

       Me.dg_exp.DataSource = ds




                                                                                  118
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


       dg_exp.DataBind()

   End Sub

    Private Sub getRefDetails()
        '***To retrieve referee details of an applicant based on Applicant ID and
populate into datagrid
        Dim newappID As String
        newappID = Request.QueryString.Get("AppID")

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT RefName, RefAddress, RefOccupation,
RefPhone, NoOfYrKnown FROM dbo.[REFERENCE] where AppID = '" & newappID & "' ",
myConnection)

       Dim ds As New DataSet
       myAdapter.Fill(ds)

       Me.dg_ref.DataSource = ds
       dg_ref.DataBind()

   End Sub

   Private Function getUser() As String
       '***To retrieve userID based on the Applicant ID
       Dim newappID As String
       Dim user As String = ""
       newappID = Request.QueryString.Get("AppID")

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT userid FROM dbo.[Applicant] where AppID
= '" & newappID & "' ", myConnection)

       Dim ds As New DataSet
       myAdapter.Fill(ds)

       For Each row As DataRow In ds.Tables(0).Rows
           user = row("userid")
       Next

       Return user

   End Function

    Protected Sub btn_AddEdu_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_AddEdu.Click

       Dim strstartdate, strenddate, sql As String
       Dim sqlCmd As SqlCommand
       Dim myConnection As New SqlConnection
       Dim newappID As String
       newappID = Request.QueryString.Get("AppID")

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"

        '***To format date
        strstartdate = Me.txt_edu_startyr.Text & "-" & Me.txt_edu_startmth.Text & "-"
& Me.txt_edu_startdd.Text
        strenddate = Me.txt_edu_endyr.Text & "-" & Me.txt_edu_endmth.Text & "-" &
Me.txt_edu_enddd.Text

       Try
            myConnection.Open()
            '***To insert record to database
            sql = "Insert into dbo.[Education] values ('" &
Me.txt_institution_name.Text & "','" & newappID & "','" & strstartdate & "','" &
strenddate & "','" & Me.txt_cert.Text & "','" & Me.rbtn_highestEdu.SelectedValue & "'
) "
            sqlCmd = New SqlCommand(sql, myConnection)




                                                                                     119
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


             sqlCmd.CommandType = CommandType.Text
             sqlCmd.ExecuteNonQuery()

             myConnection.Close()

             Me.lbl_err.ForeColor = Drawing.Color.Green
             Me.lbl_err.Visible = True
             Me.lbl_err.Text = "Add Success"

       Catch ex As Exception
           Me.lbl_err.Visible = True
           Me.lbl_err.Text = "Error. Please try again."
       End Try

       getEduDetails()

   End Sub

    Protected Sub btn_AddSkill_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_AddSkill.Click

       Dim sql As String
       Dim sqlCmd As SqlCommand
       Dim myConnection As New SqlConnection
       Dim newappID As String
       newappID = Request.QueryString.Get("AppID")

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"

       Try
            myConnection.Open()
            '***To insert record to database
            sql = "Insert into dbo.[Skill] values ('" & newappID & "','" &
Me.txt_skillname.Text & "','" & Me.txt_skilldesc.Text & "','" &
Me.ddl_skilllevel.SelectedValue & "','" & Me.ddl_skilltype.SelectedValue & "') "
            sqlCmd = New SqlCommand(sql, myConnection)
            sqlCmd.CommandType = CommandType.Text
            sqlCmd.ExecuteNonQuery()

             myConnection.Close()

             Me.lbl_err.ForeColor = Drawing.Color.Green
             Me.lbl_err.Visible = True
             Me.lbl_err.Text = "Add Success"

       Catch ex As Exception
           Me.lbl_err.Visible = True
           Me.lbl_err.Text = "Error. Please try again."
       End Try

       getSkillDetails()

   End Sub

    Protected Sub btn_AddExp_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_AddExp.Click
        Dim strstartdate, strenddate, sql As String
        Dim sqlCmd As SqlCommand
        Dim myConnection As New SqlConnection

       Dim newappID As String

       newappID = Request.QueryString.Get("AppID")

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"

        strstartdate = Me.txt_exp_startyr.Text & "-" & Me.txt_exp_startmth.Text & "-"
& Me.txt_exp_startdd.Text
        strenddate = Me.txt_exp_endyr.Text & "-" & Me.txt_exp_endmth.Text & "-" &
Me.txt_exp_enddd.Text

       Try
             myConnection.Open()
             '***If it is current job, the end date should be blank




                                                                                     120
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


            If Me.rbtn_currjob.SelectedValue = "Y" Then
                '***To insert to database
                sql = "Insert into dbo.[WORK_EXPERIENCE] values ('" & newappID & "','"
& Me.txt_coname.Text & "','" & Me.txt_jobtitle.Text & "','" & Me.txt_jobresp.Text &
"','" & Me.txt_lastdrawn.Text & "','" & Me.txt_benefits.Text & "','" & strstartdate &
"',null,'" & Me.txt_reasonsleave.Text & "','" & Me.rbtn_currjob.SelectedValue & "' ) "

                '***If it is not current job, the end date should NOT be blank
            Else
                '***To insert to database
                strenddate = Me.txt_exp_enddd.Text & "/" & Me.txt_exp_endmth.Text &
"/" & Me.txt_exp_endyr.Text
                sql = "Insert into dbo.[WORK_EXPERIENCE] values ('" & newappID & "','"
& Me.txt_coname.Text & "','" & Me.txt_jobtitle.Text & "','" & Me.txt_jobresp.Text &
"','" & Me.txt_lastdrawn.Text & "','" & Me.txt_benefits.Text & "','" & strstartdate &
"','" & strenddate & "','" & Me.txt_reasonsleave.Text & "','" &
Me.rbtn_currjob.SelectedValue & "' ) "

             End If

             sqlCmd = New SqlCommand(sql, myConnection)
             sqlCmd.CommandType = CommandType.Text
             sqlCmd.ExecuteNonQuery()

             Me.lbl_err.ForeColor = Drawing.Color.Green
             Me.lbl_err.Visible = True
             Me.lbl_err.Text = "Update Success"
             myConnection.Close()

       Catch ex As Exception
           Me.lbl_err.Visible = True
           Me.lbl_err.Text = "Update Failure"
       End Try

       getExpDetails()

   End Sub

    Protected Sub btn_AddRef_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_AddRef.Click
        Dim sql As String
        Dim refid As String = ""
        Dim sqlCmd As SqlCommand
        Dim myConnection As New SqlConnection
        Dim newappID As String
        newappID = Request.QueryString.Get("AppID")
        Dim myAdapter As SqlDataAdapter
        Dim ds As New DataSet

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        myAdapter = New SqlDataAdapter("SELECT Top 1 RefID FROM dbo.[REFERENCE] ORDER
BY RefID desc", myConnection)

       myAdapter.Fill(ds)
       myConnection.Open()

       '***To form a new unique ID
       If ds.Tables(0).Rows.Count > 0 Then
           For Each row As DataRow In ds.Tables(0).Rows
               refid = row("RefID")
           Next

           refid = CInt(refid)
           refid = refid + 1
       Else
           refid = "10001"
       End If

       Try
            '***Insert record to database
            sql = "Insert into dbo.[REFERENCE] values ('" & refid & "','" & newappID &
"','" & Me.txt_ref_name.Text & "','" & Me.txt_ref_add.Text & "','" &
Me.txt_ref_occ.Text & "','" & Me.txt_ref_phone.Text & "','" & Me.txt_ref_co.Text &
"','" & Me.txt_ref_yrs_known.Text & "') "




                                                                                   121
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


           sqlCmd = New SqlCommand(sql, myConnection)
           sqlCmd.CommandType = CommandType.Text
           sqlCmd.ExecuteNonQuery()

       Catch ex As Exception

           Me.lbl_err.Visible = True
           Me.lbl_err.Text = "Error. Please try again."

       End Try

       myConnection.Close()

       getRefDetails()
   End Sub

    Private Function getAppName(ByVal newappID As String) As String
        Dim appName As String = ""
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter

        '***To retrieve applicant name based on applicant ID
        myAdapter = New SqlDataAdapter("SELECT appName FROM dbo.[APPLICANT] where
AppID = '" & newappID & "' ", myConnection)

       Dim ds As New DataSet
       myAdapter.Fill(ds)

       For Each row As DataRow In ds.Tables(0).Rows
           appName = row("appName")
       Next

       Return appName

   End Function

    Protected Sub btn_Submit_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Submit.Click
        Dim newappID As String
        newappID = Request.QueryString.Get("AppID")
        Dim user As String
        user = getUser()

        Session("user") = user
        '***Redirect user to Applicant Homepage if application form is successfully
submitted.
        Response.Redirect("Applicant_Index.aspx?appID=" & newappid)
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        '***Link to Career Homepage
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        '***Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        '***Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        '***Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub

   Protected Sub rbtn_currjob_SelectedIndexChanged(ByVal sender As Object, ByVal e As




                                                                                    122
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


EventArgs) Handles rbtn_currjob.SelectedIndexChanged
        If Me.rbtn_currjob.SelectedValue = "Y" Then
            'if the job is current job, the end date of job and reasons in leaving
should be disabled.
            Me.txt_exp_enddd.Enabled = False
            Me.txt_exp_endmth.Enabled = False
            Me.txt_exp_endyr.Enabled = False
            Me.txt_reasonsleave.Enabled = False
        End If
    End Sub
End Class


Web Page              Job_Listing.aspx.vb
Purpose(s)            To allow applicant to view a list of jobs within a selected job category.
Code Behind (Visual Basic codes)
Imports System.Linq
Imports System.Data.SqlClient

Partial Public Class Job_Listing
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As              System.EventArgs)
Handles Me.Load
        Dim jobcatname As String
        jobcatname = Request.QueryString.Get("JobCatName")
        Me.lbl_JobCat.Text = jobcatname

        If Not Page.IsPostBack Then
            getJobCategory()
            getJobListing(jobcatname)
        End If
    End Sub

    Private Function getJobCatID(ByVal jobcatname As String) As String

        Dim jobcatid As String = ""
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT JobCatID, JobCatName FROM
dbo.[JOB_CATEGORY] where JobCatName = '" & jobcatname & "' ", myConnection)
        Dim ds As New DataSet
        myAdapter.Fill(ds)

         '***Get Job cat ID to retrieve the list of jobs within this category
         For Each row As DataRow In ds.Tables(0).Rows
             jobcatid = row("JobCatID")
         Next

        Return jobcatid
    End Function

    Private Sub getJobCategory()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT distinct JobCatName FROM
dbo.[JOB_CATEGORY] ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)
        '***To retrieve job categories and populate into drop-down list
        For Each row As DataRow In myDataSet.Tables(0).Rows
            Me.dd_JobCat.Items.Add(row("JobCatName"))
        Next

    End Sub

    Private Sub getJobListing(ByVal jobcatname As String)
        Dim jobcatid As String
        Dim myConnection As New SqlConnection




                                                                                                  123
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


         Dim myAdapter As SqlDataAdapter
         Dim myDataSet As New DataSet

         '***Get the selected job category name
         jobcatid = getJobCatID(jobcatname)

        '***Retrieve jobs within the selected category and populate into datagrid
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        myAdapter = New SqlDataAdapter("SELECT distinct JobTitle, JobId FROM dbo.[JOB]
where jobcatid = '" & jobcatid & "' and jobStatus = 'Vacant' ", myConnection)
        myAdapter.Fill(myDataSet)

        Me.DataList3.DataSource = myDataSet
        DataList3.DataBind()
    End Sub

    Protected Sub btn_Submit_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Submit.Click
        Me.lbl_JobCat.Text = Me.dd_JobCat.SelectedValue
        getJobListing(Me.dd_JobCat.SelectedValue)
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        '***Link to Career Homepage
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        '***Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        '***Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        '***Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub
End Class


Web Page       View_Job.aspx.vb
Purpose(s)     To display the job details for user to view and apply jobs through the “Apply Online”
               button.
Code Behind (Visual Basic codes)
Imports System.Linq
Imports System.Data.SqlClient

Partial Public Class View_Job
    Inherits System.Web.UI.Page

    Dim _JobCatName, _JobTitle, _JobId As String

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load

         _JobCatName = Request.QueryString.Get("JobCatName")
         _JobTitle = Request.QueryString.Get("JobTitle")
         _JobId = Request.QueryString.Get("JobId")

         Me.lbl_JobCat.Text = _JobCatName
         Me.lbl_JobTitle.Text = _JobTitle

         If Not Page.IsPostBack Then
             getJobCategory()
             getJobDetails()




                                                                                                124
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


       End If

   End Sub

   Private Sub getJobCategory()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT distinct JobCatName FROM
dbo.[JOB_CATEGORY] ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)
        '***To retrieve job categories and populate into drop-down list
        For Each row As DataRow In myDataSet.Tables(0).Rows
            Me.dd_JobCat.Items.Add(row("JobCatName"))
        Next

   End Sub

    Private Sub getJobDetails()
        '***To retrieve job details from database based on the selected job title
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT JobDesc, JobRequirement, JobPostDate,
JobDeadline FROM dbo.[JOB] where JobTitle = '" & _JobTitle & "' ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

       Dim   jobdesc As String = ""
       Dim   jobreq As String = ""
       Dim   jobpostdate As String = ""
       Dim   jobdeadline As String = ""

       For Each row As DataRow In myDataSet.Tables(0).Rows
           If Not IsDBNull(row("JobDesc")) Then
               jobdesc = row("JobDesc")
           End If

             If Not IsDBNull(row("JobRequirement")) Then
                 jobreq = row("JobRequirement")
             End If

             If Not IsDBNull(row("jobpostdate")) Then
                 jobpostdate = row("jobpostdate")
             End If

             If Not IsDBNull(row("jobdeadline")) Then
                 jobdeadline = row("jobdeadline")
             End If

       Next

       Me.lbl_jobdesc.Text = jobdesc
       Me.lbl_jobreq.Text = jobreq
       Me.lbl_postdate.Text = jobpostdate
       Me.lbl_deadline.Text = jobdeadline
   End Sub

    Protected Sub btn_Submit_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Submit.Click
        '***Redirect applicant back to job listing page
        Response.Redirect("Job_Listing.aspx?JobCatName=" & Me.dd_JobCat.SelectedValue)
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        '***Link to Career Homepage
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub btn_apply_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_apply.Click




                                                                                    125
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


        Dim jobtitle As String
        jobtitle = _JobTitle.Replace(" ", "_")
        '***Redirect applicant to login page to login to apply for job.
        Response.Redirect("UserLogin.aspx?JobTitle=" & jobtitle & "&JobId=" & _JobId)
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        '***Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        '***Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        '***Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub

End Class


Web Page       UserLogin.aspx.vb
Purpose(s)     To allow applicant to login to apply job.
Code Behind (Visual Basic codes)
Imports System.Linq
Imports System.Data.SqlClient

Partial Public Class UserLogin
    Inherits System.Web.UI.Page

    Dim err_msg As String
    Dim _jobId As String

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load

    End Sub

    Protected Sub btn_back_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_back.Click
        Response.Redirect("Job_Listing.aspx")
    End Sub

    Protected Sub btn_login_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_login.Click

         Dim passwordText As HtmlInputPassword = New HtmlInputPassword
         passwordText.MaxLength = 20

         If Validate_Input() = True Then

              _jobId = Request.QueryString.Get("JobId")

            Dim myConnection As New SqlConnection
            myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
            Dim myAdapter As SqlDataAdapter
            myAdapter = New SqlDataAdapter("SELECT UserID, Password, UserType FROM
dbo.[USERS] where UserID = '" & Me.txt_userid.Text.Trim & "' and Password = '" &
Me.txt_pwd.Text.Trim & "' and UserType = 'APP' ", myConnection)
            Dim ds As New DataSet
            myAdapter.Fill(ds)

              '***User exist
              If ds.Tables(0).Rows.Count > 0 Then
                  '***Store user id into session
                  Session("user") = txt_userid.Text
                  Response.Redirect("Job_Application.aspx?JobId=" & _jobId & "&UserID="




                                                                                     126
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


& Me.txt_userid.Text.Trim)
            Else
                Me.lbl_err.Text = "Wrong Login ID or Password. Pls try again."
            End If
        Else
            Me.lbl_err.Text = err_msg
        End If

    End Sub

    Private Function Validate_Input()        As Boolean
        '***Check if user has enter a        user ID and password
        If Me.txt_userid.Text = "" Or        Me.txt_pwd.Text = "" Then
            err_msg = "Please enter a        User ID and a Password"
            Return False

         ElseIf Me.txt_userid.Text <> "" And Me.txt_pwd.Text <> "" Then
             Return True
         End If

    End Function

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        'Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        'Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        'Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub

End Class


Web Page       Job_Application.aspx.vb
Purpose(s)     To allow new job applicant to register an account by filling up the application form,
               which act as an online resume form.
Code Behind (Visual Basic codes)
Imports System.Linq
Imports System.Data.SqlClient

Partial Public Class Job_Application
    Inherits System.Web.UI.Page

    Dim _jobId As String
    Dim _userid, _appid As String

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load

         _jobId = Request.QueryString.Get("JobId")
         _userid = Request.QueryString.Get("UserId")

        '***Get job Title
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT JobTitle FROM dbo.[Job] where JobID =
'" & _jobId.Trim & "' ", myConnection)




                                                                                                  127
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


       Dim ds As New DataSet
       myAdapter.Fill(ds)

       For Each row As DataRow In ds.Tables(0).Rows
           Me.lbl_jobtitle.Text = row("JobTitle")
       Next

       getPersonalData()
       getEduDetails()
       getSkillDetails()
       getExpDetails()
       getRefDetails()
   End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        Response.Redirect("Career_index.aspx")
    End Sub

    Private Sub getPersonalData()
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT * FROM dbo.[Applicant] where UserID =
'" & _userid.Trim & "' ", myConnection)
        Dim ds As New DataSet
        myAdapter.Fill(ds)
        Dim arr As Array

       If ds.Tables(0).Rows.Count > 0 Then
           '***Applicant has applied before, data exists
           For Each row As DataRow In ds.Tables(0).Rows
               _appid = row("AppId")
               Me.txt_firstname.Text = row("AppName")
               Me.txt_email.Text = row("AppEmail")
               Me.txt_phone.Text = row("AppPhone")
               arr = row("AppDOB").ToString.Split("/")
               Me.txt_dob_yr.Text = arr(2).ToString.Substring(0, 4)
               Me.txt_dob_mth.Text = arr(1)
               Me.txt_dob_day.Text = arr(0)

               Me.txt_gender.Text = row("AppGender")
               Me.txt_race.Text = row("AppRace")
               Me.txt_religion.Text = row("AppReligion")
               Me.txt_mthexpsalary.Text = row("ExpectedSalary")

               Me.txt_add.Text = row("AppAddress")
               Me.txt_postal.Text = row("AppPostal")
               Me.txt_country.Text = row("AppCountry")
               Me.txt_othercountry.Text = row("AppOtherCountry")

               Me.txt_ic.Text = row("AppNRIC")
               Me.txt_ictype.Text = row("AppNRICType")
               Me.txt_national.Text = row("AppNationality")
               Me.txt_age.Text = CInt(row("AppAge"))
               Me.txt_marital.Text = row("AppMarital")
               Me.txt_achievement.Text = row("Achievement")
               Me.txt_cv.Text = row("AppCV")
           Next
       End If
   End Sub

    Private Sub getEduDetails()
        '***Retrieve Education details from database
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT InstituteName, StartDate, EndDate,
CertObtained FROM dbo.[Education] where AppID = '" & _appid.Trim & "' ", myConnection)

       Dim ds As New DataSet
       myAdapter.Fill(ds)
       Me.dg_edu.DataSource = ds
       dg_edu.DataBind()




                                                                                    128
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


   End Sub

    Private Sub getSkillDetails()
        '***Retrieve Skill details from database
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT SkillName, SkillDesc, SkillLevel FROM
dbo.[Skill] where AppID = '" & _appid.Trim & "' ", myConnection)

       Dim ds As New DataSet
       myAdapter.Fill(ds)
       Me.dg_skill.DataSource = ds
       dg_skill.DataBind()

   End Sub

    Private Sub getExpDetails()
        '***Retrieve Experience details from database
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT CoName, JobTitle, JobDesc,
LastDrawnPay, OtherBenefits FROM dbo.[WORK_EXPERIENCE] where AppID = '" & _appid.Trim
& "' ", myConnection)

       Dim ds As New DataSet
       myAdapter.Fill(ds)

       Me.dg_exp.DataSource = ds
       dg_exp.DataBind()

   End Sub

    Private Sub getRefDetails()
        '***Retrieve Referee details from database
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT RefName, RefAddress, RefOccupation,
RefPhone, NoOfYrKnown FROM dbo.[REFERENCE] where AppID = '" & _appid.Trim & "' ",
myConnection)

       Dim ds As New DataSet
       myAdapter.Fill(ds)

       Me.dg_ref.DataSource = ds
       dg_ref.DataBind()

   End Sub

    Protected Sub btn_Submit_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Submit.Click

       Dim   sql, appStatus, active As String
       Dim   applicationId As String = ""
       Dim   sqlCmd As SqlCommand
       Dim   myConnection As New SqlConnection
       Dim   ds As New DataSet
       Dim   ds2 As New DataSet

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"

       Dim myAdapter As SqlDataAdapter

        'To check if applicant has applied a job before, if yes and application is
active (still with the company) --> application will have error. Else, application
will be success.
        myAdapter = New SqlDataAdapter("SELECT * FROM dbo.[Application] where appId =
'" & _appid & "' and active = 'Y' ", myConnection)
        myAdapter.Fill(ds)
        myAdapter = New SqlDataAdapter("SELECT Top 1 applicationId FROM




                                                                                     129
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


dbo.[Application] ORDER BY ApplicationId desc", myConnection)
        myAdapter.Fill(ds2)
        myConnection.Open()

         '***Get last Application ID
         If ds2.Tables(0).Rows.Count > 0 Then
             For Each row As DataRow In ds2.Tables(0).Rows
                 applicationId = row("ApplicationID")
             Next
             applicationId = CInt(applicationId)
             applicationId = applicationId + 1
         Else
             applicationId = "80000001"
         End If

'***check if applicant has apply a job before, if yes, show error
        If ds.Tables(0).Rows.Count <= 0 Then

            appStatus = "New"
            active = "Y"
            '***insert record to database
            sql = "Insert into dbo.[application] values ('" & _jobId & "','" &
_appid.Trim & "','" & applicationId & "', current_timestamp,'" & appStatus & "',
current_timestamp, '" & active & "') "

            sqlCmd = New SqlCommand(sql, myConnection)
            sqlCmd.CommandType = CommandType.Text
            sqlCmd.ExecuteNonQuery()
            '***Redirect user to Success Page
            Response.Redirect("Application_Success_Page.aspx")
        Else
   '***if user has applied a job already, redirect user to Error Page
            Response.Redirect("Application_Failure_Page.aspx")
        End If
        myConnection.Close()
    End Sub

    Protected Sub btn_Edit_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_Edit.Click
    Response.Redirect("Edit_Application_Form.aspx?AppID=" & _appid)
    End Sub

    Protected Sub btn_Logout_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Logout.Click
        '***To Log out
        Session("user") = ""
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        '***Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        '***Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        '***Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub
End Class


Web Page       Application_Failure_Page.aspx.vb
Purpose(s)     To show error page in which user has already applied a position before.
Code Behind (Visual Basic codes)
Public Partial Class Application_Failure_Page
    Inherits System.Web.UI.Page




                                                                                         130
               Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        'Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        'Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        'Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub

    Protected Sub btn_back_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_back.Click
        Session("user") = ""
        Response.Redirect("Career_index.aspx")
    End Sub
End Class


Web Page       Application_Success_Page.aspx.vb
Purpose(s)     To show user that Application is success.
Code Behind (Visual Basic codes)
Public Partial Class Application_Success_Page
    Inherits System.Web.UI.Page
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        'Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        'Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        'Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub

    Protected Sub btn_back_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_back.Click
        Session("user") = ""
        Response.Redirect("Career_index.aspx")
    End Sub
End Class




                                                                                    131
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120



Web Page       Applicant_Index.aspx.vb
Purpose(s)     It is a homepage for applicant to access different pages.
Code Behind (Visual Basic codes)
Imports System.Linq
Imports System.Data.SqlClient

Partial Public Class Applicant_Index
    Inherits System.Web.UI.Page
    Dim _userid As String
    Dim _appID As String
    Dim _appName As String

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
        Me.lbl_appname.Text = getAppName()
    End Sub

    Private Function getAppName() As String

        _appID = getAppID()
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT AppName FROM dbo.[APPLICANT] where
appID = '" & _appID & "' ", myConnection)
        Dim ds As New DataSet
        myAdapter.Fill(ds)

         For Each row As DataRow In ds.Tables(0).Rows
             _appName = row("AppName")
         Next

         Return _appName

    End Function

    Private Function getAppID() As String

         _userid = Session("user")

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT AppID FROM dbo.[APPLICANT] where UserID
= '" & _userid & "' ", myConnection)
        Dim ds As New DataSet
        myAdapter.Fill(ds)

         For Each row As DataRow In ds.Tables(0).Rows
             _appID = row("AppID")
         Next

         Return _appID

    End Function

    Protected Sub LinkButton7_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton7.Click
        _appID = getAppID()
        Response.Redirect("View_App_Status.aspx?AppID=" & _appID)
    End Sub

    Protected Sub LinkButton10_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton10.Click
        _appID = getAppID()
        Response.Redirect("Edit_Application_Form.aspx?AppID=" & _appID)
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        Response.Redirect("Career_index.aspx")




                                                                                     132
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


    End Sub

    Protected Sub LinkButton9_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton9.Click
        _appID = getAppID()
        Response.Redirect("ChangeLoginPassword.aspx?AppID=" & _appID)
    End Sub

    Protected Sub btn_Logout_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Logout.Click
        'To Log out
        Session("user") = ""
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        'Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        'Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        'Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub
End Class


Web Page       View_App_Status.aspx.vb
Purpose(s)     To allow applicant to view application status.
Code Behind (Visual Basic codes)
Imports System.Linq
Imports System.Data.SqlClient

Partial Public Class View_App_Status
    Inherits System.Web.UI.Page
    Dim _appid As String

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
        LoadData()
    End Sub

    Private Sub LoadData()
        '***To load application details include status of application and populate
into datagrid
        _appid = Request.QueryString.Get("AppID")
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        Dim ds As New DataSet
        Dim count As Integer

        myAdapter = New SqlDataAdapter("select j.jobTitle, ap.appdate, ap.appstatus
from JOB j, APPLICATION ap where j.jobid = ap.jobid and ap.appid = '" & _appid & "' ",
myConnection)
        myAdapter.Fill(ds)
        count = ds.Tables(0).Rows.Count

         If count > 0 Then
             Me.lbl_err.Visible = False
             Me.dg_app_status.Visible = True
             Me.dg_app_status.DataSource = ds
             dg_app_status.DataBind()

         ElseIf count <= 0 Then




                                                                                     133
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


            Me.dg_app_status.Visible = False
            Me.lbl_err.Visible = True
            Me.lbl_err.Text = "No Data!"
        End If
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub btn_back_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_back.Click
        Response.Redirect("Applicant_Index.aspx")
    End Sub

    Protected Sub btn_Logout_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Logout.Click
        'To Log out
        Session("user") = ""
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        'Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        'Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        'Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub
End Class


Web Page       Edit_Application_Form.aspx.vb
Purpose(s)     To allow new job applicant to register an account by filling up the application form,
               which act as an online resume form.
Code Behind (Visual Basic codes)
Imports System.Linq
Imports System.Data.SqlClient

Partial Public Class Edit_Application_Form
    Inherits System.Web.UI.Page

    Dim _jobId As String
    Dim _userid, _appid As String

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load

         _jobId = Request.QueryString.Get("JobId")
         _userid = Request.QueryString.Get("UserId")
         _appid = Request.QueryString.Get("appID")

         If Not Page.IsPostBack Then
             getSkillCategory()
             getPersonalData()
             getEduDetails()
             getSkillDetails()
             getExpDetails()
             getRefDetails()
         End If

    End Sub




                                                                                                  134
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


    Private Sub getSkillCategory()
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT distinct SkillCatName FROM
dbo.[SKILL_CAT] ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

       For Each row As DataRow In myDataSet.Tables(0).Rows
           Me.ddl_skilltype.Items.Add(row("SkillCatName"))
       Next
   End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        Response.Redirect("Career_index.aspx")
    End Sub

   Private Sub getPersonalData()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT * FROM dbo.[Applicant] where appid = '"
& _appid.Trim & "' ", myConnection)
        Dim ds As New DataSet
        myAdapter.Fill(ds)

       Dim arr As Array

       If ds.Tables(0).Rows.Count > 0 Then
           'Applicant has applied before, data exists
           For Each row As DataRow In ds.Tables(0).Rows
               '_appid = row("AppId")
               Me.txt_firstname.Text = row("AppName")
               Me.txt_email.Text = row("AppEmail")
               Me.txt_phone.Text = row("AppPhone")
               arr = row("AppDOB").ToString.Split("/")
               Me.txt_dob_yr.Text = arr(2).ToString.Substring(0, 4)
               Me.txt_dob_mth.Text = arr(1)
               Me.txt_dob_day.Text = arr(0)

               Me.ddl_gender.SelectedValue = row("AppGender")
               Me.ddl_race.SelectedValue = row("AppRace")
               Me.ddl_religion.SelectedValue = row("AppReligion")
               Me.txt_mthexpsalary.Text = row("ExpectedSalary")

               Me.txt_add.Text = row("AppAddress")
               Me.txt_postal.Text = row("AppPostal")
               Me.ddl_country.SelectedValue = row("AppCountry")
               Me.txt_othercountry.Text = row("AppOtherCountry")

               Me.txt_ic.Text = row("AppNRIC")
               Me.txt_ictype.Text = row("AppNRICType")
               Me.txt_national.Text = row("AppNationality")
               Me.txt_age.Text = CInt(row("AppAge"))
               Me.ddl_marital_status.SelectedValue = row("AppMarital")
               Me.txt_achievement.Text = row("Achievement")
               Me.txt_cv.Text = row("AppCV")
           Next
       End If

   End Sub

   Private Sub getEduDetails()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT Appid, InstituteName, StartDate,
EndDate, CertObtained FROM dbo.[Education] where AppID = '" & _appid.Trim & "' ",
myConnection)




                                                                                    135
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


       Dim ds As New DataSet
       myAdapter.Fill(ds)

       Me.dg_edu.DataSource = ds
       dg_edu.DataBind()

   End Sub

    Protected Sub btn_AddEdu_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_AddEdu.Click

       Dim strstartdate, strenddate, sql As String
       Dim sqlCmd As SqlCommand
       Dim myConnection As New SqlConnection

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"

        strstartdate = Me.txt_edu_startyr.Text & "-" & Me.txt_edu_startmth.Text & "-"
& Me.txt_edu_startdd.Text
        strenddate = Me.txt_edu_endyr.Text & "-" & Me.txt_edu_endmth.Text & "-" &
Me.txt_edu_enddd.Text

       Try
             myConnection.Open()

            sql = "Insert into dbo.[Education] values ('" &
Me.txt_institution_name.Text & "','" & _appid.Trim & "','" & strstartdate & "','" &
strenddate & "','" & Me.txt_cert.Text & "','" & Me.rbtn_highestEdu.SelectedValue & "'
) "

             sqlCmd = New SqlCommand(sql, myConnection)
             sqlCmd.CommandType = CommandType.Text
             sqlCmd.ExecuteNonQuery()

             Me.lbl_err.ForeColor = Drawing.Color.Green
             Me.lbl_err.Visible = True
             Me.lbl_err.Text = "Update Success"
             myConnection.Close()

       Catch ex As Exception
           Me.lbl_err.Visible = True
           Me.lbl_err.Text = "Update Failure"
       End Try

       getEduDetails()
       getPersonalData()

   End Sub

   Private Sub getSkillDetails()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT APPID, SkillName, SkillDesc, SkillLevel
FROM dbo.[Skill] where AppID = '" & _appid.Trim & "' ", myConnection)

       Dim ds As New DataSet
       myAdapter.Fill(ds)

       Me.dg_skill.DataSource = ds
       dg_skill.DataBind()

   End Sub

    Protected Sub btn_AddSkill_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_AddSkill.Click

       Dim sql As String
       Dim sqlCmd As SqlCommand
       Dim myConnection As New SqlConnection

       myConnection.ConnectionString = "server=USER-




                                                                                     136
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


PC\SQLEXPRESS;database=master;Trusted_Connection=True"

       Try
             myConnection.Open()

            sql = "Insert into dbo.[Skill] values ('" & _appid.Trim & "','" &
Me.txt_skillname.Text & "','" & Me.txt_skilldesc.Text & "','" &
Me.ddl_skilllevel.SelectedValue & "','" & Me.ddl_skilltype.SelectedValue & "') "

             sqlCmd = New SqlCommand(sql, myConnection)
             sqlCmd.CommandType = CommandType.Text
             sqlCmd.ExecuteNonQuery()

             Me.lbl_err.ForeColor = Drawing.Color.Green
             Me.lbl_err.Visible = True
             Me.lbl_err.Text = "Update Success"

             myConnection.Close()

       Catch ex As Exception
           Me.lbl_err.Visible = True
           Me.lbl_err.Text = "Update Failure"
       End Try

       getSkillDetails()
       getPersonalData()

   End Sub

   Private Sub getExpDetails()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT appid, CoName, JobTitle, JobDesc,
LastDrawnPay, OtherBenefits, startdate, enddate, reasons FROM dbo.[WORK_EXPERIENCE]
where AppID = '" & _appid.Trim & "' ", myConnection)

       Dim ds As New DataSet
       myAdapter.Fill(ds)

       Me.dg_exp.DataSource = ds
       dg_exp.DataBind()

   End Sub

    Protected Sub btn_AddExp_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_AddExp.Click

       Dim strstartdate, strenddate, sql As String
       Dim sqlCmd As SqlCommand
       Dim myConnection As New SqlConnection

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"

        strstartdate = Me.txt_exp_startyr.Text & "-" & Me.txt_exp_startmth.Text & "-"
& Me.txt_exp_startdd.Text
        strenddate = Me.txt_exp_endyr.Text & "-" & Me.txt_exp_endmth.Text & "-" &
Me.txt_exp_enddd.Text

       Try
            myConnection.Open()
            'If it is current job, the end date should be blank
            If Me.rbtn_CurrentExp.SelectedValue = "Y" Then
                sql = "Insert into dbo.[WORK_EXPERIENCE] values ('" & _appid.Trim &
"','" & Me.txt_coname.Text & "','" & Me.txt_jobtitle.Text & "','" &
Me.txt_jobresp.Text & "','" & Me.txt_lastdrawn.Text & "','" & Me.txt_benefits.Text &
"','" & strstartdate & "',null,'" & Me.txt_reasonsleave.Text & "','" &
Me.rbtn_CurrentExp.SelectedValue & "' ) "

            Else
                strenddate = Me.txt_exp_enddd.Text & "/" & Me.txt_exp_endmth.Text &
"/" & Me.txt_exp_endyr.Text
                sql = "Insert into dbo.[WORK_EXPERIENCE] values ('" & _appid.Trim &




                                                                                   137
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


"','" & Me.txt_coname.Text & "','" & Me.txt_jobtitle.Text & "','" &
Me.txt_jobresp.Text & "','" & Me.txt_lastdrawn.Text & "','" & Me.txt_benefits.Text &
"','" & strstartdate & "','" & strenddate & "','" & Me.txt_reasonsleave.Text & "','" &
Me.rbtn_CurrentExp.SelectedValue & "' ) "

             End If

             sqlCmd = New SqlCommand(sql, myConnection)
             sqlCmd.CommandType = CommandType.Text
             sqlCmd.ExecuteNonQuery()

             Me.lbl_err.ForeColor = Drawing.Color.Green
             Me.lbl_err.Visible = True
             Me.lbl_err.Text = "Update Success"
             myConnection.Close()

       Catch ex As Exception
           Me.lbl_err.Visible = True
           Me.lbl_err.Text = "Update Failure"
       End Try

       getExpDetails()
       getPersonalData()

   End Sub

   Private Sub getRefDetails()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT RefID, RefName, RefAddress,
RefOccupation, RefPhone, NoOfYrKnown FROM dbo.[REFERENCE] where AppID = '" &
_appid.Trim & "' ", myConnection)

       Dim ds As New DataSet
       myAdapter.Fill(ds)

       Me.dg_ref.DataSource = ds
       dg_ref.DataBind()

   End Sub

    Protected Sub btn_AddRef_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_AddRef.Click

       Dim sql, refid As String
       Dim sqlCmd As SqlCommand
       Dim myConnection As New SqlConnection

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"

        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT Top 1 RefID FROM dbo.[REFERENCE] ORDER
BY RefID desc", myConnection)

       Dim ds As New DataSet
       myAdapter.Fill(ds)

       Try
             myConnection.Open()

             If ds.Tables(0).Rows.Count > 0 Then
                 For Each row As DataRow In ds.Tables(0).Rows
                      refid = row("RefID")
                 Next

                 refid = CInt(refid)
                 refid = refid + 1
             Else
                 refid = "10001"
             End If

             sql = "Insert into dbo.[REFERENCE] values ('" & refid & "','" &




                                                                                   138
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


_appid.Trim & "','" & Me.txt_ref_name.Text & "','" & Me.txt_ref_add.Text & "','" &
Me.txt_ref_occ.Text & "','" & Me.txt_ref_phone.Text & "','" & Me.txt_ref_co.Text &
"','" & Me.txt_ref_yrs_known.Text & "') "

             sqlCmd = New SqlCommand(sql, myConnection)
             sqlCmd.CommandType = CommandType.Text
             sqlCmd.ExecuteNonQuery()

             Me.lbl_err.ForeColor = Drawing.Color.Green
             Me.lbl_err.Visible = True
             Me.lbl_err.Text = "Update Success"

           myConnection.Close()
       Catch ex As Exception
           Me.lbl_err.Visible = True
           Me.lbl_err.Text = "Update Failure"
       End Try

       getRefDetails()
       getPersonalData()

   End Sub

    Protected Sub btn_Submit_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Submit.Click

       '--------To update personal details and CV
       'Save Personal Details
       Dim sql As String
       Dim sqlCmd As SqlCommand
       Dim myConnection As New SqlConnection

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"

        'begin validation
        Dim validate As New Validation_Edit(Me.txt_add.Text, Me.txt_age.Text, _
                                       Me.txt_dob_day.Text, Me.txt_dob_mth.Text,
Me.txt_dob_yr.Text, _
                                       Me.txt_email.Text, Me.txt_firstname.Text,
Me.txt_ic.Text, _
                                       Me.txt_ictype.Text, Me.txt_mthexpsalary.Text, _
                                       Me.txt_national.Text, Me.txt_phone.Text, _
                                       Me.txt_postal.Text)


       If validate.validationOK = True Then

             Try
                   myConnection.Open()

                sql = "update dbo.[APPLICANT] set AppName = '" & validate.get_Name &
"', AppEmail = '" & validate.get_Email & "', AppPhone = '" & validate.get_Phone & "',
AppDOB = '" & validate.get_DOB & "', AppGender = '" & Me.ddl_gender.SelectedValue &
"', AppRace = '" & Me.ddl_race.SelectedValue & "', AppReligion = '" &
Me.ddl_religion.SelectedValue & "', ExpectedSalary = " & validate.get_MthExpSalary &
", Achievement = '" & Me.txt_achievement.Text & "', AppAddress = '" & validate.get_Add
& "', AppPostal = '" & validate.get_Postal & "', AppCountry = '" &
Me.ddl_country.SelectedValue & "', AppOtherCountry = '" & Me.txt_othercountry.Text &
"', AppNRIC = '" & validate.get_IC & "', AppNRICType = '" & validate.get_ICType & "',
AppNationality = '" & validate.get_National & "', AppAge = " & validate.get_Age & ",
AppMarital = '" & Me.ddl_marital_status.SelectedValue & "', AppCV = '" &
Me.txt_cv.Text & "' where AppID = '" & _appid & "' "

                   sqlCmd = New SqlCommand(sql, myConnection)
                   sqlCmd.CommandType = CommandType.Text
                   sqlCmd.ExecuteNonQuery()

                   myConnection.Close()

                   Me.lbl_err.ForeColor = Drawing.Color.Green
                   Me.lbl_err.Visible = True
                   Me.lbl_err.Text = "Update Success"
                   getPersonalData()

             Catch ex As Exception




                                                                                     139
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                 Me.lbl_err.Visible = True
                 Me.lbl_err.Text = "Update Failure"
             End Try

         Else
             Me.lbl_err.Visible = True
             Me.lbl_err.Text = validate.errorMsg
         End If

   End Sub

    Protected Sub btn_DeleteEdu_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_DeleteEdu.Click

         Dim sql As String
         Dim sqlCmd As SqlCommand
         Dim myConnection As New SqlConnection

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"

         For Each row As GridViewRow In Me.dg_edu.Rows
             Dim chkbox As CheckBox = CType(row.FindControl("chkbox"), CheckBox)

             If chkbox.Checked Then

                  Try
                        myConnection.Open()

                    sql = "Delete from EDUCATION where appid = '" & row.Cells(1).Text
& "' and institutename = '" & row.Cells(2).Text & "' and certobtained = '" &
row.Cells(5).Text & "' "

                        sqlCmd = New SqlCommand(sql, myConnection)
                        sqlCmd.CommandType = CommandType.Text
                        sqlCmd.ExecuteNonQuery()

                        myConnection.Close()

                        Me.lbl_err.ForeColor = Drawing.Color.Green
                        Me.lbl_err.Visible = True
                        Me.lbl_err.Text = "Delete Success"
                        getEduDetails()


                  Catch ex As Exception
                      Me.lbl_err.Visible = True
                      Me.lbl_err.Text = "Delete Error"
                  End Try

             End If

         Next

   End Sub

    Protected Sub btn_DeleteRef_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_DeleteRef.Click
        Dim sql As String
        Dim sqlCmd As SqlCommand
        Dim myConnection As New SqlConnection

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"

         For Each row As GridViewRow In Me.dg_ref.Rows
             Dim chkbox As CheckBox = CType(row.FindControl("chkbox"), CheckBox)

             If chkbox.Checked Then

                  Try
                        myConnection.Open()

                        sql = "Delete from REFERENCE where refid = '" & row.Cells(1).Text
& "' "




                                                                                      140
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                      sqlCmd = New SqlCommand(sql, myConnection)
                      sqlCmd.CommandType = CommandType.Text
                      sqlCmd.ExecuteNonQuery()

                      myConnection.Close()

                      Me.lbl_err.ForeColor = Drawing.Color.Green
                      Me.lbl_err.Visible = True
                      Me.lbl_err.Text = "Delete Success"
                      getRefDetails()


                Catch ex As Exception
                    Me.lbl_err.Visible = True
                    Me.lbl_err.Text = "Delete Error"
                End Try

           End If

       Next
   End Sub

    Protected Sub btn_DeleteExp_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_DeleteExp.Click


       Dim sql As String
       Dim sqlCmd As SqlCommand
       Dim myConnection As New SqlConnection

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"

       For Each row As GridViewRow In Me.dg_exp.Rows
           Dim chkbox As CheckBox = CType(row.FindControl("chkbox"), CheckBox)

           If chkbox.Checked Then

                Try
                      myConnection.Open()

                    sql = "Delete from WORK_EXPERIENCE where appid = '" &
row.Cells(1).Text & "' and coname = '" & row.Cells(2).Text & "' and jobtitle = '" &
row.Cells(3).Text & "' "

                      sqlCmd = New SqlCommand(sql, myConnection)
                      sqlCmd.CommandType = CommandType.Text
                      sqlCmd.ExecuteNonQuery()

                      myConnection.Close()

                      Me.lbl_err.ForeColor = Drawing.Color.Green
                      Me.lbl_err.Visible = True
                      Me.lbl_err.Text = "Delete Success"
                      getExpDetails()


                Catch ex As Exception
                    Me.lbl_err.Visible = True
                    Me.lbl_err.Text = "Delete Error"
                End Try

           End If

       Next
   End Sub

    Protected Sub btn_DeleteSkill_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_DeleteSkill.Click

       Dim sql As String
       Dim sqlCmd As SqlCommand
       Dim myConnection As New SqlConnection

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"




                                                                                  141
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


       For Each row As GridViewRow In Me.dg_skill.Rows
           Dim chkbox As CheckBox = CType(row.FindControl("chkbox"), CheckBox)

            If chkbox.Checked Then

                Try
                      myConnection.Open()

                    sql = "Delete from SKILL where appid = '" & row.Cells(1).Text & "'
and SkillName = '" & row.Cells(2).Text & "' "

                      sqlCmd = New SqlCommand(sql, myConnection)
                      sqlCmd.CommandType = CommandType.Text
                      sqlCmd.ExecuteNonQuery()

                      myConnection.Close()

                      Me.lbl_err.ForeColor = Drawing.Color.Green
                      Me.lbl_err.Visible = True
                      Me.lbl_err.Text = "Delete Success"
                      getSkillDetails()


                Catch ex As Exception
                    Me.lbl_err.Visible = True
                    Me.lbl_err.Text = "Delete Error"
                End Try

            End If

       Next
   End Sub

    Protected Sub rbtn_CurrentExp_SelectedIndexChanged(ByVal sender As Object, ByVal e
As EventArgs) Handles rbtn_CurrentExp.SelectedIndexChanged
        If Me.rbtn_CurrentExp.SelectedValue = "Y" Then
            Me.txt_exp_enddd.Enabled = False
            Me.txt_exp_endmth.Enabled = False
            Me.txt_exp_endyr.Enabled = False
            Me.txt_reasonsleave.Enabled = False
        End If
    End Sub

    Protected Sub btn_Logout_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Logout.Click
        Session("user") = ""
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub btn_back_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_back.Click
        Response.Redirect("Applicant_Index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        'Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        'Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        'Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub

End Class

Public Class Validation_Edit




                                                                                    142
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


   Private   _str_add As String
   Private   _str_age As String
   Private   _str_dob_day As String
   Private   _str_dob_mth As String
   Private   _str_dob_yr As String
   Private   _str_email As String
   Private   _str_firstname As String
   Private   _str_ic As String
   Private   _str_ictype As String
   Private   _str_mthexpsalary As String
   Private   _str_national As String
   Private   _str_phone As String
   Private   _str_postal As String

   Private _bln_Validate As Boolean
   Private _str_Error As String

   'begin validation in   constructor
   Public Sub New(ByVal   str_add As String, _
                  ByVal   str_age As String, _
                  ByVal   str_dob_day As String, _
                  ByVal   str_dob_mth As String, _
                  ByVal   str_dob_yr As String, _
                  ByVal   str_email As String, _
                  ByVal   str_firstname As String, _
                  ByVal   str_ic As String, _
                  ByVal   str_ictype As String, _
                  ByVal   str_mthexpsalary As String, _
                  ByVal   str_national As String, _
                  ByVal   str_phone As String, _
                  ByVal   str_postal As String)

       Dim str_Error As New StringBuilder
       _bln_Validate = True

       _str_add = str_add.Trim
       _str_age = str_age.Trim
       _str_email = str_email.Trim
       _str_dob_day = str_dob_day.Trim
       _str_dob_mth = str_dob_mth.Trim
       _str_dob_yr = str_dob_yr.Trim
       _str_firstname = str_firstname
       _str_ic = str_ic.Trim
       _str_ictype = str_ictype.Trim
       _str_mthexpsalary = str_mthexpsalary.Trim
       _str_national = str_national.Trim
       _str_phone = str_phone.Trim
       _str_postal = str_postal.Trim

       If _str_add = "" Then
           _bln_Validate = False
           str_Error.Append("Address - No input")
           str_Error.Append("<br>")
       End If

       If _str_age <> "" Then
           'if age is not numeric, error displayed
           If IsNumeric(_str_age) = False Then
               _bln_Validate = False
               str_Error.Append("Age must be numeric")
               str_Error.Append("<br>")
           End If
       Else
           _bln_Validate = False
           str_Error.Append("Age - No input")
           str_Error.Append("<br>")
       End If

       If _str_email = "" Then
           _bln_Validate = False
           str_Error.Append("Email - No input")
           str_Error.Append("<br>")
       End If

If Not _str_dob_day = "" Or _str_dob_mth = "" Or _str_dob_yr = "" Then




                                                                                143
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


If IsNumeric(_str_dob_day) = False Or IsNumeric(_str_dob_mth) = False Or
IsNumeric(_str_dob_yr) = False Then
                _bln_Validate = False
                str_Error.Append("DOB must be numeric")
                str_Error.Append("<br>")
            End If
        Else
            _bln_Validate = False
            str_Error.Append("DOB cannot be empty - No input")
            str_Error.Append("<br>")
        End If

       If _str_firstname = "" Then
           _bln_Validate = False
           str_Error.Append("Name - No input")
           str_Error.Append("<br>")
       End If

       If _str_ic = "" Then
           _bln_Validate = False
           str_Error.Append("IC - No input")
           str_Error.Append("<br>")
       End If

       If _str_ictype = "" Then
           _bln_Validate = False
           str_Error.Append("IC Type - No input")
           str_Error.Append("<br>")
       End If

       If _str_mthexpsalary <> "" Then
           If IsNumeric(_str_mthexpsalary) = False Then
               _bln_Validate = False
               str_Error.Append("Expected Salary must be numeric")
               str_Error.Append("<br>")
           End If
       Else
           _bln_Validate = False
           str_Error.Append("Expected Salary - No input")
           str_Error.Append("<br>")
       End If

       If _str_national = "" Then
           _bln_Validate = False
           str_Error.Append("Nationality - No input")
           str_Error.Append("<br>")
       End If

       If _str_phone = "" Then
           _bln_Validate = False
           str_Error.Append("Phone number - No input")
           str_Error.Append("<br>")
       End If

       If _str_postal = "" Then
           _bln_Validate = False
           str_Error.Append("Postal Code - No input")
           str_Error.Append("<br>")
       End If
       _str_Error = str_Error.ToString
   End Sub
   ReadOnly Property get_Add() As String
       Get
           Return _str_add
       End Get
   End Property

   ReadOnly Property get_Age() As Integer
       Get
           Return CInt(_str_age)
       End Get
   End Property

   ReadOnly Property get_Email() As String
       Get
           Return _str_email




                                                                               144
               Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


        End Get
    End Property

    ReadOnly Property get_DOB() As String
        Get
      Return _str_dob_yr & "-" & _str_dob_mth & "-" & _str_dob_day
        End Get
    End Property

    ReadOnly Property get_Name() As String
        Get
            Return _str_firstname
        End Get
    End Property

    ReadOnly Property get_IC() As String
        Get
            Return _str_ic
        End Get
    End Property

    ReadOnly Property get_ICType() As String
        Get
            Return _str_ictype
        End Get
    End Property

    ReadOnly Property get_MthExpSalary() As String
        Get
            Return CDbl(_str_mthexpsalary)
        End Get
    End Property

    ReadOnly Property get_National() As String
        Get
            Return _str_national
        End Get
    End Property

    ReadOnly Property get_Phone() As String
        Get
            Return _str_phone
        End Get
    End Property

    ReadOnly Property get_Postal() As String
        Get
            Return _str_postal
        End Get
    End Property

    ReadOnly Property validationOK() As Boolean
        Get
            Return _bln_Validate
        End Get
    End Property

    ReadOnly Property errorMsg() As String
        Get
            Return _str_Error
        End Get
    End Property
End Class


Web Page       ChangeLoginPassword.aspx.vb
Purpose(s)     To allow applicant to change login password
Code Behind (Visual Basic codes)
Imports System.Linq
Imports System.Data.SqlClient

Partial Public Class ChangeLoginPassword
    Inherits System.Web.UI.Page




                                                                                 145
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


   Dim err As New StringBuilder

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
        Me.lbl_username.Text = getUsername()
    End Sub

    Protected Sub btn_back_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_back.Click
        Response.Redirect("Applicant_Index.aspx")
    End Sub

    Private Function getUsername() As String
        Dim appid As String = ""
        Dim userid As String = ""
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        Dim ds As New DataSet

        appid = Request.QueryString.Get("AppID")
        myAdapter = New SqlDataAdapter("select userid from applicant where appid = '"
& appid & "' ", myConnection)
        myAdapter.Fill(ds)

       For Each row As DataRow In ds.Tables(0).Rows
           userid = row("userid")
       Next

       Return userid

    End Function
    '***To retrieve current password
    Private Function getCurrPassword() As String
        Dim pwd As String = ""
        Dim userid As String = ""
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        Dim ds As New DataSet

        userid = getUsername()
        myAdapter = New SqlDataAdapter("select password from users where userid = '" &
userid & "' ", myConnection)
        myAdapter.Fill(ds)

       For Each row As DataRow In ds.Tables(0).Rows
           pwd = row("password")
       Next

       Return pwd

   End Function

   Private Function validateCurrentInput() As Boolean
       '***To validate fields for current password
       Dim currpwd, correctpwd As String
       currpwd = Me.txt_curr_pwd.Text.Trim
       correctpwd = getCurrPassword()

       If currpwd <> correctpwd Then

            err.Append("Current Password entered does not match the one in the system.
Please enter again.")
            err.Append("<br>")
            Return False
        Else
            Return True
        End If

   End Function

   Private Function validateNewInput() As Boolean
       '***To validate fields for new password




                                                                                   146
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


       Dim newpwd As String
       newpwd = Me.txt_new_pwd.Text.Trim

       If newpwd.Length < 5 Then

           err.Append("Password should be at least 5 characters. Please enter
again.")
           err.Append("<br>")
           Return False
       Else
           Return True
       End If

   End Function
   '***Proceed to check if new password matches retype password
   Private Function PasswordMatch() As Boolean

       Dim newpwd, newpwd2 As String

       newpwd = Me.txt_new_pwd.Text.Trim
       newpwd2 = Me.txt_new_pwd2.Text.Trim

       '***If passwords not match
       If newpwd <> newpwd2 Then

           err.Append("New Password and Retype Password does not match. Please enter
again.")
           err.Append("<br>")
           Return False

           '***if matches
       Else
           Return True
       End If
   End Function

    Protected Sub btn_update_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_update.Click

        Dim sql As String
        Dim sqlCmd As SqlCommand
        Dim myConnection As New SqlConnection
        Dim userid As String
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"

       userid = getUsername()

       Dim bln_currpwd As New Boolean
       Dim bln_newpwd As New Boolean
       Dim bln_pwdmatch As New Boolean

       bln_currpwd = validateCurrentInput()
       bln_newpwd = validateNewInput()
       bln_pwdmatch = PasswordMatch()

       If bln_currpwd = True And bln_newpwd = True And bln_pwdmatch = True Then

           Try
                myConnection.Open()
                '***To update password
                sql = "Update users set password = '" & Me.txt_new_pwd2.Text.Trim & "'
where userid = '" & userid & "' "

                 sqlCmd = New SqlCommand(sql, myConnection)
                 sqlCmd.CommandType = CommandType.Text
                 sqlCmd.ExecuteNonQuery()

                 myConnection.Close()

                 Me.lbl_err.ForeColor = Drawing.Color.Green
                 Me.lbl_err.Visible = True
                 Me.lbl_err.Text = "Update Success"

           Catch ex As Exception
               Me.lbl_err.Visible = True




                                                                                   147
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                  Me.lbl_err.Text = "Update error. Please try again."
              End Try

          Else
              Me.lbl_err.Visible = True
              Me.lbl_err.Text = err.ToString

        End If
    End Sub

    Protected Sub btn_Logout_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Logout.Click
        'To Log out
        Session("user") = ""
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        'Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        'Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        'Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub
End Class


Web Page              Add_Job.aspx.vb
Purpose(s)            To allow new job applicant to register an account by filling up the application
                      form, which act as an online resume form.
Code Behind (Visual Basic codes)
Imports   System.Linq
Imports   System.Data.SqlClient
Imports   System.Configuration.ConfigurationSettings
Imports   System.Text
Imports   System.Web
Imports   System.Web.HttpContext
Imports   System
Imports   System.IO

Partial Public Class Add_Job
    Inherits System.Web.UI.Page
    Dim _userid As String

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load

          Me.lbl_currentDate.Text = Date.Today
          If Not Page.IsPostBack Then
              getJobCategory_add()
          End If

    End Sub

    Private Sub getJobCategory_add()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"




                                                                                                 148
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT distinct JobCatName FROM
dbo.[JOB_CATEGORY] ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

       For Each row As DataRow In myDataSet.Tables(0).Rows
           Me.ddl_jobcat.Items.Add(row("JobCatName"))
       Next

   End Sub

   Private Function getNewJobID() As String

       Dim   jobId As String = ""
       Dim   newjobID As String = ""
       Dim   myConnection As New SqlConnection
       Dim   ds As New DataSet
       Dim   ds2 As New DataSet
       Dim   cnt As Integer

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"

        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT Top 1 jobId FROM dbo.[Job] ORDER BY
jobId desc", myConnection)
        myAdapter.Fill(ds2)

       myConnection.Open()

       '***Get last Application ID
       If ds2.Tables(0).Rows.Count > 0 Then
           For Each row As DataRow In ds2.Tables(0).Rows
               jobId = row("jobID")
           Next

             '***Form new Applicant ID
             jobId = jobId.Substring(1)

             jobId = jobId + 1

             cnt = jobId.Length

           Select Case cnt
               Case 1
                   newjobID = "J00000" & jobId
               Case 2
                   newjobID = "J0000" & jobId
               Case 3
                   newjobID = "J000" & jobId
               Case 4
                   newjobID = "J00" & jobId
               Case 5
                   newjobID = "J0" & jobId
               Case 6
                   newjobID = "J" & jobId
           End Select
       Else
           newjobID = "J000001"
       End If

       myConnection.Close()

       Return newjobID
   End Function

    Protected Sub btn_back_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_back.Click
        Response.Redirect("Admin_Index.aspx")
    End Sub

    Protected Sub btn_Update_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Update.Click
        Dim sql As String
        Dim sqlCmd As SqlCommand




                                                                                     149
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


       Dim   myConnection As New SqlConnection
       Dim   jobid, jobcatid As String
       Dim   currdate As Date
       Dim   postdate As String

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"

       jobid = getNewJobID()
       jobcatid = getJobCatID()

       '***Convert string job Postdate date to date
       currdate = Date.Today
       postdate = currdate.ToString("yyyy-MM-dd")

       Try
            myConnection.Open()
            sql = "Insert into dbo.[job] values ('" & jobid & "','" &
Me.txt_title.Text & "','" & Me.txt_jobdesc.Text & "','" & postdate & "','" &
Me.txt_j_yr.Text & "-" & Me.txt_j_mth.Text & "-" & Me.txt_j_day.Text & "','" &
txt_remarks.Text & "'," & CInt(Me.txt_highpay.Text) & "," & CInt(Me.txt_lowpay.Text) &
",'" & jobcatid & "','" & Me.txt_jobreq.Text & "','Vacant' )"

             sqlCmd = New SqlCommand(sql, myConnection)
             sqlCmd.CommandType = CommandType.Text
             sqlCmd.ExecuteNonQuery()

             myConnection.Close()

             Me.lbl_err.ForeColor = Drawing.Color.Green
             Me.lbl_err.Visible = True
             Me.lbl_err.Text = "Job add Success"
             ClearJobDetails()

       Catch ex As Exception
           Me.lbl_err.Visible = True
           Me.lbl_err.Text = "Job add Failure. Please try again."
       End Try
   End Sub

   Private   Function getJobCatID() As String
       Dim   jobcatid As String = ""
       Dim   myConnection As New SqlConnection
       Dim   myAdapter As SqlDataAdapter
       Dim   myDataSet As New DataSet

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        myAdapter = New SqlDataAdapter("SELECT JobCatID FROM dbo.[JOB_CATEGORY] where
jobcatname = '" & Me.ddl_jobcat.SelectedValue & "' ", myConnection)
        myAdapter.Fill(myDataSet)

       For Each row As DataRow In myDataSet.Tables(0).Rows
           jobcatid = row("JobCatID")
       Next

       Return jobcatid
   End Function

   Private Sub ClearJobDetails()
       '***Clear fields
       Me.txt_title.Text = ""
       Me.txt_jobdesc.Text = ""
       Me.txt_jobreq.Text = ""
       Me.txt_remarks.Text = ""
       Me.txt_highpay.Text = ""
       Me.txt_lowpay.Text = ""
       Me.txt_j_yr.Text = ""
       Me.txt_j_mth.Text = ""
       Me.txt_j_day.Text = ""
   End Sub

    Protected Sub btn_Logout_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Logout.Click
        '***To Log out
        Session("user") = ""




                                                                                   150
               Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        '***Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        '***Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        '***Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub
End Class



Web Page              Update_Job.aspx.vb
Purpose(s)            To allow Admin to update or delete a job
Code Behind (Visual Basic codes)
Imports   System.Linq
Imports   System.Data.SqlClient
Imports   System.Configuration.ConfigurationSettings
Imports   System.Text
Imports   System.Web
Imports   System.Web.HttpContext
Imports   System
Imports   System.IO

Partial Public Class Update_Job
    Inherits System.Web.UI.Page
    Dim _userid As String

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
        Me.lbl_currentDate.Text = Date.Today
        If Not Page.IsPostBack Then
            getJobCategory()
        End If
    End Sub

    Private Sub getJobCategory()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT distinct JobCatName FROM
dbo.[JOB_CATEGORY] ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

          For Each row As DataRow In myDataSet.Tables(0).Rows
              Me.ddl_jobcat.Items.Add(row("JobCatName"))
          Next

    End Sub

    Private   Function getJobCatID() As String
        Dim   jobcatid As String = ""
        Dim   myConnection As New SqlConnection
        Dim   myAdapter As SqlDataAdapter




                                                                                    151
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


       Dim myDataSet As New DataSet

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        myAdapter = New SqlDataAdapter("SELECT JobCatID FROM dbo.[JOB_CATEGORY] where
jobcatname = '" & Me.ddl_jobcat.SelectedValue & "' ", myConnection)
        myAdapter.Fill(myDataSet)

       For Each row As DataRow In myDataSet.Tables(0).Rows
           jobcatid = row("JobCatID")
       Next

       Return jobcatid
   End Function

   Private Sub getJobTitle()

        Dim myConnection As New SqlConnection
        Dim jobcatid As String
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter

        jobcatid = getJobCatID()
        myAdapter = New SqlDataAdapter("SELECT JobTitle FROM dbo.[JOB] where jobcatid
= '" & jobcatid & "' and jobstatus = 'Vacant' ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

       Me.ddl_jobTitle_update.Items.Clear()
       Me.ddl_jobTitle_update.Items.Add("Please Select")

       For Each row As DataRow In myDataSet.Tables(0).Rows
           Me.ddl_jobTitle_update.Items.Add(row("JobTitle"))
       Next

   End Sub

   Private Sub getJobDetails()
       '***To retrieve job details
       Dim myConnection As New SqlConnection
       Dim jobcatid As String
       Dim myAdapter As SqlDataAdapter
       Dim myDataSet As New DataSet
       Dim arr As Array

        jobcatid = getJobCatID()
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        myAdapter = New SqlDataAdapter("SELECT * FROM dbo.[JOB] where jobcatid = '" &
jobcatid & "' and jobtitle = '" & Me.ddl_jobTitle_update.SelectedValue & "' ",
myConnection)

       myAdapter.Fill(myDataSet)

       For Each row As DataRow In myDataSet.Tables(0).Rows
           Me.lbl_jobid_update.Text = row("jobID")
           Me.txt_title0.Text = row("jobTitle")
           Me.txt_jobdesc0.Text = row("jobDesc")
           Me.txt_jobreq0.Text = row("jobRequirement")
           Me.txt_remarks0.Text = row("remarks")
           Me.txt_highpay0.Text = CInt(row("highestPayOffer"))
           Me.txt_lowpay0.Text = CInt(row("lowestPayOffer"))
           Me.lbl_currentDate.Text = CStr(row("jobPostDate"))

           arr = row("jobDeadline").ToString.Split("/")
           Me.txt_j_yr0.Text = arr(2).ToString.Substring(0, 4)
           Me.txt_j_mth0.Text = arr(1)
           Me.txt_j_day0.Text = arr(0)
       Next

   End Sub

   Private Sub ClearJobDetails()
       '***Clear fields
       Me.lbl_jobid_update.Text = ""




                                                                                  152
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


       Me.txt_title0.Text = ""
       Me.txt_jobdesc0.Text = ""
       Me.txt_jobreq0.Text = ""
       Me.txt_remarks0.Text = ""
       Me.txt_highpay0.Text = ""
       Me.txt_lowpay0.Text = ""
       Me.lbl_currentDate.Text = ""
       Me.txt_j_yr0.Text = ""
       Me.txt_j_mth0.Text = ""
       Me.txt_j_day0.Text = ""

   End Sub

    Protected Sub ddl_jobcat_SelectedIndexChanged(ByVal sender As Object, ByVal e As
EventArgs) Handles ddl_jobcat.SelectedIndexChanged
        ClearJobDetails()
        getJobTitle()
    End Sub

    Protected Sub btn_Update_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Update.Click

       '***To update Job details
       Dim sql As String
       Dim sqlCmd As SqlCommand
       Dim myConnection As New SqlConnection

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"

       Try
             myConnection.Open()

            sql = "update dbo.[Job] set jobTitle = '" & Me.txt_title0.Text & "',
JobDesc = '" & Me.txt_jobdesc0.Text & "', Remarks = '" & Me.txt_remarks0.Text.Trim &
"', JobDeadline = '" & Me.txt_j_yr0.Text & "-" & Me.txt_j_mth0.Text & "-" &
Me.txt_j_day0.Text & "', highestPayOffer = '" & Me.txt_highpay0.Text & "',
lowestPayOffer = '" & Me.txt_lowpay0.Text & "', JobRequirement = '" &
Me.txt_jobreq0.Text & "' where jobID = '" & Me.lbl_jobid_update.Text & "' "

             sqlCmd = New SqlCommand(sql, myConnection)
             sqlCmd.CommandType = CommandType.Text
             sqlCmd.ExecuteNonQuery()

             myConnection.Close()

             Me.lbl_err.ForeColor = Drawing.Color.Green
             Me.lbl_err.Visible = True
             Me.lbl_err.Text = "Update Success"

       Catch ex As Exception
           Me.lbl_err.Visible = True
           Me.lbl_err.Text = "Update Failure"
       End Try

   End Sub

    Protected Sub btn_back_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_back.Click
        Response.Redirect("Admin_Index.aspx")
    End Sub

    Protected Sub ddl_jobTitle_update_SelectedIndexChanged(ByVal sender As Object,
ByVal e As EventArgs) Handles ddl_jobTitle_update.SelectedIndexChanged
        getJobDetails()
    End Sub

    Protected Sub btn_Delete_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Delete.Click

       '***To Delete Job details
       Dim sql As String
       Dim sqlCmd As SqlCommand
       Dim myConnection As New SqlConnection

       myConnection.ConnectionString = "server=USER-




                                                                                     153
                 Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


PC\SQLEXPRESS;database=master;Trusted_Connection=True"

          Try
                myConnection.Open()

                sql = "delete from Job where jobID = '" & Me.lbl_jobid_update.Text & "' "

                sqlCmd = New SqlCommand(sql, myConnection)
                sqlCmd.CommandType = CommandType.Text
                sqlCmd.ExecuteNonQuery()

                myConnection.Close()

                Me.lbl_err.ForeColor = Drawing.Color.Green
                Me.lbl_err.Visible = True
                Me.lbl_err.Text = "Delete Success"

        Catch ex As Exception
            Me.lbl_err.Visible = True
            Me.lbl_err.Text = "Delete Failure"
        End Try
    End Sub

    Protected Sub btn_Logout_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Logout.Click
        'To Log out
        Session("user") = ""
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        'Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        'Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        'Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub
End Class


Web Page             Add_Job_Skills.aspx.vb
Purpose(s)           To allow Admin to add job-required skills to job
Code Behind (Visual Basic codes)
Imports   System.Linq
Imports   System.Data.SqlClient
Imports   System.Configuration.ConfigurationSettings
Imports   System.Text
Imports   System.Web
Imports   System.Web.HttpContext
Imports   System
Imports   System.IO

Partial Public Class Add_Job_Skills
    Inherits System.Web.UI.Page
    Dim _userid As String

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
        If Not Page.IsPostBack Then




                                                                                      154
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


           getJobCategory()
           getSkillCategory()
       End If
   End Sub

   Private Sub getJobCategory()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT distinct JobCatName FROM
dbo.[JOB_CATEGORY] ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

       For Each row As DataRow In myDataSet.Tables(0).Rows
           Me.ddl_jobcat.Items.Add(row("JobCatName"))
       Next

   End Sub


   Private   Function getJobCatID() As String
       Dim   jobcatid As String = ""
       Dim   myConnection As New SqlConnection
       Dim   myAdapter As SqlDataAdapter
       Dim   myDataSet As New DataSet

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        myAdapter = New SqlDataAdapter("SELECT JobCatID FROM dbo.[JOB_CATEGORY] where
jobcatname = '" & Me.ddl_jobcat.SelectedValue & "' ", myConnection)
        myAdapter.Fill(myDataSet)

       For Each row As DataRow In myDataSet.Tables(0).Rows
           jobcatid = row("JobCatID")
       Next

       Return jobcatid
   End Function

   Private Sub getJobTitle()

        Dim myConnection As New SqlConnection
        Dim jobcatid As String
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter

        jobcatid = getJobCatID()
        myAdapter = New SqlDataAdapter("SELECT JobTitle FROM dbo.[JOB] where jobcatid
= '" & jobcatid & "' and jobstatus = 'Vacant' ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

       Me.ddl_jobTitle_update.Items.Clear()

       For Each row As DataRow In myDataSet.Tables(0).Rows
           Me.ddl_jobTitle_update.Items.Add(row("JobTitle"))
       Next

   End Sub

    Private Function getJobID() As String
        Dim myConnection As New SqlConnection
        Dim jobid, jobcatid As String
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter

        jobcatid = getJobCatID()
        myAdapter = New SqlDataAdapter("SELECT Jobid FROM dbo.[JOB] where jobtitle =
'" & Me.ddl_jobTitle_update.SelectedValue & "' ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)




                                                                                  155
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


       For Each row As DataRow In myDataSet.Tables(0).Rows
           jobid = row("jobid")
       Next

       Return jobid
   End Function

   Private Sub getSkillCategory()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT distinct SkillCatName FROM
dbo.[SKILL_CAT] ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

       Me.ddl_skillcat.Items.Add("Select a Skill category")

       For Each row As DataRow In myDataSet.Tables(0).Rows
           Me.ddl_skillcat.Items.Add(row("SkillCatName"))
       Next

   End Sub

   Private Sub getSkill()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter

        myAdapter = New SqlDataAdapter("SELECT distinct SkillName FROM SKILL where
SkillCatName = '" & Me.ddl_skillcat.SelectedValue & "' ", myConnection)

       Dim myDataSet As New DataSet
       myAdapter.Fill(myDataSet)

       Me.ddl_skill.Items.Clear()

       For Each row As DataRow In myDataSet.Tables(0).Rows
           Me.ddl_skill.Items.Add(row("SkillName"))
       Next

   End Sub

    Protected Sub btn_back_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_back.Click
        Response.Redirect("Admin_Index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        '***Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        '***Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        '***Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub

    Protected Sub ddl_jobcat_SelectedIndexChanged(ByVal sender As Object, ByVal e As
EventArgs) Handles ddl_jobcat.SelectedIndexChanged
        getJobTitle()
    End Sub
    '***Add Job Required Skills into Database




                                                                                     156
               Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


    Protected Sub btn_add_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_add.Click
        Me.lbxSkill.Items.Add(Me.ddl_skill.SelectedValue)
    End Sub
    '***Delete Job Required Skills into Database
    Protected Sub btn_delete0_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_delete0.Click
        Me.lbxSkill.Items.Remove(Me.lbxSkill.SelectedValue)
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub ddl_skillcat_SelectedIndexChanged(ByVal sender As Object, ByVal e As
EventArgs) Handles ddl_skillcat.SelectedIndexChanged
        getSkill()
    End Sub

    Protected Sub btn_Update_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Update.Click

        '***To Add Job required Skill
        Dim sql As String = ""
        Dim sqlCmd As New SqlCommand
        Dim myConnection As New SqlConnection

        Dim jobid, skillitem As String

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"

        jobid = getJobID()

        Try
              myConnection.Open()

              Dim myTrans = myConnection.BeginTransaction()

              sqlCmd.Connection = myConnection
              sqlCmd.Transaction = myTrans

            For i As Integer = 0 To Me.lbxSkill.Items.Count - 1
                skillitem = Me.lbxSkill.Items(i).Value
                sqlCmd.CommandText = "insert into job_required_skill values ( '" &
jobid & "','" & skillitem & "' )"
                sqlCmd.ExecuteNonQuery()
            Next

              myTrans.Commit()
              Me.lbl_err.ForeColor = Drawing.Color.Green
              Me.lbl_err.Visible = True
              Me.lbl_err.Text = "Add Success"

        Catch ex As Exception
            Me.lbl_err.Visible = True
            Me.lbl_err.Text = "Add Failure"

        Finally
            myConnection.Close()
        End Try

    End Sub

    Protected Sub btn_Logout_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Logout.Click
        '***To Log out
        Session("user") = ""
        Response.Redirect("Career_index.aspx")
    End Sub
End Class


Web Page           View_Application_Submitted.aspx.vb
Purpose(s)         To allow Admin to view applications submitted for each job and shortlist


                                                                                              157
               Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                  applicants for interview.
Code Behind (Visual Basic codes)
Imports   System.Linq
Imports   System.Data.SqlClient
Imports   System.Configuration.ConfigurationSettings
Imports   System.Text
Imports   System.Web
Imports   System.Web.HttpContext
Imports   System
Imports   System.IO

Partial Public Class View_Application_Submitted
    Inherits System.Web.UI.Page

    Dim _userid As String

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load

        If Not Page.IsPostBack Then
            getJobCategory()
        End If
    End Sub

    Private Sub getJobCategory()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT distinct JobCatName FROM
dbo.[JOB_CATEGORY] ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

          For Each row As DataRow In myDataSet.Tables(0).Rows
              Me.ddl_jobcat.Items.Add(row("JobCatName"))
          Next

    End Sub

    Private   Function getJobCatID() As String
        Dim   jobcatid As String = ""
        Dim   myConnection As New SqlConnection
        Dim   myAdapter As SqlDataAdapter
        Dim   myDataSet As New DataSet

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        myAdapter = New SqlDataAdapter("SELECT JobCatID FROM dbo.[JOB_CATEGORY] where
jobcatname = '" & Me.ddl_jobcat.SelectedValue & "' ", myConnection)
        myAdapter.Fill(myDataSet)

          For Each row As DataRow In myDataSet.Tables(0).Rows
              jobcatid = row("JobCatID")
          Next

        Return jobcatid
    End Function

    Private Sub getJobTitle()

        Dim myConnection As New SqlConnection
        Dim jobcatid As String
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter

          '***Get job category ID
          jobcatid = getJobCatID()

        '***Get all job title with application status is "New" within the selected job
category
        myAdapter = New SqlDataAdapter("SELECT j.JobTitle FROM JOB j, APPLICATION ap
where j.jobid = ap.jobid and j.jobcatid = '" & jobcatid & "' and ap.AppStatus = 'New'



                                                                                   158
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


", myConnection)

       Dim myDataSet As New DataSet
       myAdapter.Fill(myDataSet)

       Me.ddl_jobTitle.Items.Clear()

       '***Populate job titles retrieved from database into dropdown list
       For Each row As DataRow In myDataSet.Tables(0).Rows
           Me.ddl_jobTitle.Items.Add(row("JobTitle"))
       Next

   End Sub

    Private Function getJobID() As String
        Dim myConnection As New SqlConnection
        Dim jobid As String = ""
        Dim jobcatid As String = ""
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter

        jobcatid = getJobCatID()
        myAdapter = New SqlDataAdapter("SELECT Jobid FROM dbo.[JOB] where jobtitle =
'" & Me.ddl_jobTitle.SelectedValue & "' ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

       For Each row As DataRow In myDataSet.Tables(0).Rows
           jobid = row("jobid")
       Next

       Return jobid
   End Function

    Private Sub loaddata()
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        Dim ds As New DataSet
        Dim count As Integer
        Dim jobid As String

       '***Get Job ID of the job selected by user
       jobid = getJobID()

        myAdapter = New SqlDataAdapter("select ap.ApplicationID, ap.AppDate, a.AppId,
a.AppName, j.JobId, j.JobTitle, jc.JobCatName from Application ap, APPLICANT a, Job j,
Job_Category jc where ap.appid = a.appid and ap.jobid = j.jobid and j.jobcatid =
jc.jobcatid and ap.jobid = '" & jobid & "' and ap.AppStatus = 'New' ", myConnection)

       myAdapter.Fill(ds)

       count = ds.Tables(0).Rows.Count

       '***Check if data exist
       If count > 0 Then
           Me.lbl_err.Visible = False
           Me.P_application.Visible = True
           Me.dg_app.DataSource = ds
           dg_app.DataBind()

       ElseIf count <= 0 Then
           Me.P_application.Visible = False
           Me.lbl_err.Visible = True
           Me.lbl_err.Text = "No Data!"
       End If

   End Sub

    Protected Sub btn_shortlist_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_shortlist.Click

       Dim sql As String
       Dim sqlCmd As SqlCommand




                                                                                  159
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


       Dim myConnection As New SqlConnection
       Dim status As String

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"

       For Each row As GridViewRow In Me.dg_app.Rows
           Dim chkbox As CheckBox = CType(row.FindControl("chkbox"), CheckBox)

           If chkbox.Checked Then

    '***Set App Status to "Pending" once application has been shortlisted for
interview
                status = "Pending"
                Try
                    myConnection.Open()

                    sql = "Update Application set AppStatus = 'Pending' where
applicationId = '" & row.Cells(1).Text & "' "

                    sqlCmd = New SqlCommand(sql, myConnection)
                    sqlCmd.CommandType = CommandType.Text
                    sqlCmd.ExecuteNonQuery()

                    myConnection.Close()

                    Me.lbl_err.ForeColor = Drawing.Color.Green
                    Me.lbl_err.Visible = True
                    Me.lbl_err.Text = "Update Success"

                Catch ex As Exception
                    Me.lbl_err.Visible = True
                    Me.lbl_err.Text = "Update Error"
                End Try

           End If

       Next
   End Sub

    Protected Sub btn_Logout_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Logout.Click
        'To Log out
        Session("user") = ""
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub btn_show_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_show.Click
        loaddata()
    End Sub

    Protected Sub btn_back_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_back.Click
        Response.Redirect("Admin_Index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        '***Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        '***Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        '***Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub

   Protected Sub ddl_jobcat_SelectedIndexChanged(ByVal sender As Object, ByVal e As




                                                                                    160
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


EventArgs) Handles ddl_jobcat.SelectedIndexChanged
        getJobTitle()
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        Response.Redirect("Career_index.aspx")
    End Sub
End Class


Web Page            Update_Recruitment_Details.aspx.vb
Purpose(s)          To allow Admin to add or update recruitment details for each application being
                    successfully recruited.
Code Behind (Visual Basic codes)
Imports   System.Linq
Imports   System.Data.SqlClient
Imports   System.Configuration.ConfigurationSettings
Imports   System.Text
Imports   System.Web
Imports   System.Web.HttpContext
Imports   System
Imports   System.IO

Partial Public Class Update_Recruitment_Details
    Inherits System.Web.UI.Page

    Dim _userid As String

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
        If Not Page.IsPostBack Then
            getApplicationID()
        End If
    End Sub

    Private Sub getApplicationID()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT ApplicationID FROM dbo.[Application]
where appStatus = 'Pass' ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

          Me.ddl_appid.Items.Add("Please select")

          For Each row As DataRow In myDataSet.Tables(0).Rows
              Me.ddl_appid.Items.Add(row("ApplicationID"))
          Next

    End Sub

    Private Function getJobID() As String

        Dim myConnection As New SqlConnection
        Dim jobid As String
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT jobID FROM dbo.[Application] where
applicationid = '" & Me.ddl_appid.SelectedValue & "' ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

          For Each row As DataRow In myDataSet.Tables(0).Rows
              jobid = row("jobid")
          Next

        Return jobid
    End Function




                                                                                               161
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


   Private Sub getApplicationDetails()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT a.appname, j.jobtitle, j.jobpostdate,
j.jobstatus, jc.jobcatname, ap.appdate, ap.appStatus, ap.lastupdated FROM application
ap, applicant a, job j, job_category jc where ap.jobid = j.jobid and ap.appid =
a.appid and j.jobcatid = jc.jobcatid and ap.applicationid = '" &
Me.ddl_appid.SelectedValue & "' ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)
        Dim ts As TimeSpan
        Dim day As Integer

        Me.P_application.Visible = True

        For Each row As DataRow In myDataSet.Tables(0).Rows

            '***To retrieve application and job details
            Me.lbl_app_date.Text = CStr(row("appdate"))
            Me.lbl_appStatus.Text = row("appStatus")
            Me.lbl_app_name.Text = row("appname")
            Me.lbl_jobStatus.Text = row("jobstatus")
            Me.lbl_jobcatname.Text = row("jobcatname")
            Me.lbl_jobtitle.Text = row("jobtitle")
            Me.lbl_jobStart.Text = row("JobPostDate")
            Me.lbl_HireDate.Text = row("LastUpdated")
        Next

        '***To get the length of time used to recruit this job (Hire Date - Job post
date)
        ts = CDate(Me.lbl_HireDate.Text) - CDate(Me.lbl_jobStart.Text)
        day = ts.Days
        Me.lbl_time.Text = day

   End Sub

   Private Sub getInterviewDetails()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT interviewdate, interviewrating, remarks
FROM Interview where applicationid = '" & ddl_appid.SelectedValue & "' and
finalinterview = 'Y' ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

        Me.P_interview.Visible = True

        For Each row As DataRow In myDataSet.Tables(0).Rows
            '***To retrieve final interview details
            Me.lbl_interview_date.Text = CStr(row("interviewdate"))
            Me.lbl_interview_rate.Text = row("interviewrating")
            Me.lbl_remarks.Text = row("remarks")
        Next

   End Sub

   Private Function getNewRecruitID() As String

        Dim recruitId As String
        Dim myConnection As New SqlConnection
        Dim ds As New DataSet
        Dim myAdapter As SqlDataAdapter
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"

        '***Get last Recruit ID from previous records
        myAdapter = New SqlDataAdapter("SELECT Top 1 recruitId FROM dbo.[Recruitment]
ORDER BY RecruitId desc", myConnection)
        myAdapter.Fill(ds)




                                                                                  162
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


       myConnection.Open()

       If ds.Tables(0).Rows.Count > 0 Then
           For Each row As DataRow In ds.Tables(0).Rows
               recruitId = row("recruitID")
           Next

             recruitId = CInt(recruitId)
             recruitId = recruitId + 1

        Else
            '***If there has not been any records of recruitment, default "90000001"
will be used
            recruitId = "90000001"
        End If

       myConnection.Close()

       Return recruitId
   End Function

   Private Sub getRecruitDetails()

       Dim arr As Array
       Dim jobid As String
       jobid = getJobID()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT * FROM Recruitment where jobid = '" &
jobid & "' ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

        For Each row As DataRow In myDataSet.Tables(0).Rows
            '***To retrieve Recruitment details (If they exist) for update. If not
exist, for new insert
            Me.txt_benefits.Text = row("Benefits")
            Me.txt_total_cost.Text = row("CostOfHire")
            Me.txt_remarks.Text = row("Remarks")
            arr = row("RecruitDate").ToString.Split("/")
            Me.txt_r_yr.Text = arr(2).ToString.Substring(0, 4)
            Me.txt_r_mth.Text = arr(1)
            Me.txt_r_day.Text = arr(0)
        Next

   End Sub

   Private Function getOldRecruitID() As String
       Dim recruitId As String = ""
       Dim jobid As String
       jobid = getJobID()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT * FROM Recruitment where jobid = '" &
jobid & "' ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

       For Each row As DataRow In myDataSet.Tables(0).Rows
           '***To retrieve RecruitID (If exist) for update.
           recruitId = row("recruitid")
       Next

       Return recruitId
   End Function

    Protected Sub btn_Update_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Update.Click
        Dim sql As String
        Dim sqlCmd As SqlCommand




                                                                                     163
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


       Dim myConnection As New SqlConnection
       Dim oldrecruitid, recruitid, jobid As String
       Dim cnt As Integer = 0

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"

       recruitid = getNewRecruitID()
       jobid = getJobID()
       oldrecruitid = getOldRecruitID()

        Dim validate As New Validation_Update_Recruit(Me.txt_benefits.Text, _
                                                    Me.txt_r_day.Text,
Me.txt_r_mth.Text, Me.txt_r_yr.Text)


       '***begin validation of field values
       If validate.validationOK = True Then

             If oldrecruitid <> "" Then

                Try
                    myConnection.Open()
                    sql = "update dbo.[recruitment] set costofhire = " &
CDbl(Me.txt_total_cost.Text) & ", benefits = '" & validate.get_Benefit & "', remarks =
'" & Me.txt_remarks.Text & "', recruitdate = '" & validate.get_RecruitDate & "' where
recruitid = '" & oldrecruitid & "' "

                      sqlCmd = New SqlCommand(sql, myConnection)
                      sqlCmd.CommandType = CommandType.Text
                      sqlCmd.ExecuteNonQuery()

                      myConnection.Close()

                      Me.lbl_err.ForeColor = Drawing.Color.Green
                      Me.lbl_err.Visible = True
                      Me.lbl_err.Text = "Update Success"

                Catch ex As Exception
                    Me.lbl_err.Visible = True
                    Me.lbl_err.Text = "Update Fail"
                End Try

            Else
                '***recruitid is blank, data dont exist - insert
                Try
                    myConnection.Open()
                    sql = "Insert into dbo.[recruitment] values ('" & jobid & "','" &
recruitid & "'," & CDbl(Me.txt_total_cost.Text) & "," & CInt(Me.lbl_time.Text) & ",'"
& validate.get_Benefit & "','" & Me.txt_remarks.Text & "','" &
validate.get_RecruitDate & "')"

                      sqlCmd = New SqlCommand(sql, myConnection)
                      sqlCmd.CommandType = CommandType.Text
                      sqlCmd.ExecuteNonQuery()

                      myConnection.Close()

                      Me.lbl_err.ForeColor = Drawing.Color.Green
                      Me.lbl_err.Visible = True
                      Me.lbl_err.Text = "Update Success"

                Catch ex As Exception
                    Me.lbl_err.Visible = True
                    Me.lbl_err.Text = "Update Fail"
                End Try

           End If
       Else
           Me.lbl_err.Visible = True
           Me.lbl_err.Text = validate.errorMsg
       End If

   End Sub

   Protected Sub btn_back_Click(ByVal sender As Object, ByVal e As EventArgs) Handles




                                                                                  164
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


btn_back.Click
        Response.Redirect("Admin_Index.aspx")
    End Sub

    Protected Sub ddl_appid_SelectedIndexChanged(ByVal sender As Object, ByVal e As
EventArgs) Handles ddl_appid.SelectedIndexChanged
        getApplicationDetails()
        getInterviewDetails()
        getRecruitDetails()

       '***Clear cost and hour spent fields
       Me.txt_hr_first.Text = ""
       Me.txt_hr_second.Text = ""
       Me.txt_hr_admin.Text = ""
       Me.txt_sal_first.Text = ""
       Me.txt_sal_second.Text = ""
       Me.txt_sal_admin.Text = ""
       Me.txt_ad_cost.Text = ""
       Me.lbl_total_first.Text = ""
       Me.lbl_total_second.Text = ""
       Me.lbl_total_admin1.Text = ""
   End Sub

    Protected Sub btn_Logout_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Logout.Click
        '***To Log out
        Session("user") = ""
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        '***Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        '***Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        '***Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub

    Protected Sub btn_calc_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_calc.Click

       '***Calc First Interviewer Cost:
       Dim firstTotal, secondTotal, adminTotal, adTotal As Double
       Dim grandTotal As Double

        Dim validate As New Validation_Update_Cost(Me.txt_hr_first.Text,
Me.txt_hr_second.Text, _
                                                    Me.txt_hr_admin.Text,
Me.txt_sal_first.Text, _
                                                    Me.txt_sal_second.Text,
Me.txt_sal_admin.Text, _
                                                    Me.txt_ad_cost.Text)


       '***begin validation
       If validate.validationOK = True Then

           firstTotal = validate.get_Hr1 * validate.get_Sal1
           secondTotal = validate.get_Hr2 * validate.get_Sal2
           adminTotal = validate.get_Hr_Admin * validate.get_Sal_admin
           adTotal = validate.get_Sal_adv

           Me.lbl_total_first.Text = firstTotal
           Me.lbl_total_second.Text = secondTotal
           Me.lbl_total_admin1.Text = adminTotal




                                                                                    165
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


           grandTotal = firstTotal + secondTotal + adminTotal + adTotal
           Me.txt_total_cost.Text = grandTotal
       Else
           Me.lbl_err.Visible = True
           Me.lbl_err.Text = validate.errorMsg
       End If

   End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        Response.Redirect("Career_index.aspx")
    End Sub
End Class

Public Class Validation_Update_Recruit

   Private   _str_benefit As String
   Private   _str_r_day As String
   Private   _str_r_mth As String
   Private   _str_r_yr As String

   Private _bln_Validate As Boolean
   Private _str_Error As String

   '***begin validation   in constructor
   Public Sub New(ByVal   str_benefit As String, _
                  ByVal   str_r_day As String, _
                  ByVal   str_r_mth As String, _
                  ByVal   str_r_yr As String)

       Dim str_Error As New StringBuilder
       _bln_Validate = True

       _str_benefit = str_benefit.Trim
       _str_r_day = str_r_day.Trim
       _str_r_mth = str_r_mth.Trim
       _str_r_yr = str_r_yr.Trim

       If _str_benefit = "" Then
           _bln_Validate = False
           str_Error.Append("Benefits - No input")
           str_Error.Append("<br>")
       End If

        If Not _str_r_day = "" Or _str_r_mth = "" Or _str_r_yr = "" Then
            If IsNumeric(_str_r_day) = False Or IsNumeric(_str_r_mth) = False Or
IsNumeric(_str_r_yr) = False Then
                _bln_Validate = False
                str_Error.Append("Recruit Date must be numeric")
                str_Error.Append("<br>")
            End If
        Else
            _bln_Validate = False
            str_Error.Append("Recruit Date cannot be empty - No input")
            str_Error.Append("<br>")
        End If

       _str_Error = str_Error.ToString

   End Sub
   ReadOnly Property get_Benefit() As String
       Get
           Return _str_benefit
       End Get
   End Property

   ReadOnly Property get_RecruitDate() As String
       Get
           Return _str_r_yr & "-" & _str_r_mth & "-" & _str_r_day
       End Get
   End Property

   ReadOnly Property validationOK() As Boolean
       Get
           Return _bln_Validate




                                                                                    166
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


       End Get
   End Property

   ReadOnly Property errorMsg() As String
       Get
           Return _str_Error
       End Get
   End Property

End Class
'***Validation class for update cost of hire fields
Public Class Validation_Update_Cost

   Private   _str_hr_first As String
   Private   _str_hr_second As String
   Private   _str_hr_admin As String
   Private   _str_sal_first As String
   Private   _str_sal_second As String
   Private   _str_sal_admin As String
   Private   _str_ad_cost As String

   Private _bln_Validate As Boolean
   Private _str_Error As String

   '***begin validation in constructor
   Public Sub New(ByVal str_hr_first As String, _
                   ByVal str_hr_second As String, _
                   ByVal str_hr_admin As String, _
                   ByVal str_sal_first As String, _
                   ByVal str_sal_second As String, _
                   ByVal str_sal_admin As String, _
                   ByVal str_ad_cost As String)

       Dim str_Error As New StringBuilder
       _bln_Validate = True

       _str_hr_first = str_hr_first.Trim
       _str_hr_second = str_hr_second.Trim
       _str_hr_admin = str_hr_admin.Trim
       _str_sal_first = str_sal_first.Trim
       _str_sal_second = str_sal_second.Trim
       _str_sal_admin = str_sal_admin.Trim
       _str_ad_cost = str_ad_cost.Trim

       '***Check if Hours Spent - First Interviewer is numeric
       If _str_hr_first <> "" Then
           '***if cost is not numeric, error displayed
           If IsNumeric(_str_hr_first) = False Then
               _bln_Validate = False
               str_Error.Append("No of Hrs Spent in interview must be numeric")
               str_Error.Append("<br>")
           End If
       Else
           '***Set hour as 0 if blank field
           _str_hr_first = "0"
       End If

       '***Check if Hours Spent - Second Interviewer is numeric
       If _str_hr_second <> "" Then
           '***if cost is not numeric, error displayed
           If IsNumeric(_str_hr_second) = False Then
               _bln_Validate = False
               str_Error.Append("No of Hrs Spent in interview must be numeric")
               str_Error.Append("<br>")
           End If
       Else
           '***Set hour as 0 if blank field
           _str_hr_second = "0"
       End If

       '***Check if Hours Spent - HR Admin is numeric
       If _str_hr_admin <> "" Then
           '***if cost is not numeric, error displayed
           If IsNumeric(_str_hr_admin) = False Then
               _bln_Validate = False
               str_Error.Append("No of Hrs Spent in HR admin must be numeric")




                                                                                  167
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


                 str_Error.Append("<br>")
             End If
         Else
             '***Set hour as 0 if blank field
             _str_hr_admin = "0"
         End If

        '-----------------------------------------------------------------------------
---------
        '***Check if Cost Spent - First Interviewer is numeric
        If _str_sal_first <> "" Then
            '***if cost is not numeric, error displayed
            If IsNumeric(_str_sal_first) = False Then
                _bln_Validate = False
                str_Error.Append("Salary Per Hour in First interviewer must be
numeric")
                str_Error.Append("<br>")
            End If
        Else
            '***Set Salary as 0 if blank field
            _str_sal_first = "0"
        End If

        '***Check if sal Spent - Second Interviewer is numeric
        If _str_sal_second <> "" Then
            '***if cost is not numeric, error displayed
            If IsNumeric(_str_sal_second) = False Then
                _bln_Validate = False
                str_Error.Append("Salary Per Hour in Second interviewer must be
numeric")
                str_Error.Append("<br>")
            End If
        Else
            '***Set sal as 0 if blank field
            _str_sal_second = "0"
        End If

         '***Check if Salary Spent - HR Admin is numeric
         If _str_sal_admin <> "" Then
             '***if cost is not numeric, error displayed
             If IsNumeric(_str_sal_admin) = False Then
                 _bln_Validate = False
                 str_Error.Append("Salary Per Hour in HR Admin must be numeric")
                 str_Error.Append("<br>")
             End If
         Else
             '***Set salary as 0 if blank field
             _str_sal_admin = "0"
         End If

         '-----------------------------------------------------------------------------
------
         '***Check if Advertising cost Spent is numeric
         If _str_ad_cost <> "" Then
             '***if cost is not numeric, error displayed
             If IsNumeric(_str_ad_cost) = False Then
                 _bln_Validate = False
                 str_Error.Append("Advertising Cost must be numeric")
                 str_Error.Append("<br>")
             End If
         Else
             '***Set cost as 0 if blank field
             _str_ad_cost = "0"
         End If

         _str_Error = str_Error.ToString

   End Sub

   ReadOnly Property get_Hr1() As Integer
       Get
           Return CInt(_str_hr_first)
       End Get
   End Property

   ReadOnly Property get_Hr2() As Integer




                                                                                   168
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


          Get
            Return CInt(_str_hr_second)
        End Get
    End Property

    ReadOnly Property get_Hr_Admin() As Integer
        Get
            Return CInt(_str_hr_admin)
        End Get
    End Property

    ReadOnly Property get_Sal1() As Double
        Get
            Return CDbl(_str_sal_first)
        End Get
    End Property

    ReadOnly Property get_Sal2() As Double
        Get
            Return CDbl(_str_sal_second)
        End Get
    End Property

    ReadOnly Property get_Sal_admin() As Double
        Get
            Return CDbl(_str_sal_admin)
        End Get
    End Property

    ReadOnly Property get_Sal_adv() As Double
        Get
            Return CDbl(_str_ad_cost)
        End Get
    End Property

    ReadOnly Property validationOK() As Boolean
        Get
            Return _bln_Validate
        End Get
    End Property

    ReadOnly Property errorMsg() As String
        Get
            Return _str_Error
        End Get
    End Property
End Class


Web Page                   Candidate_Track_Report.aspx.vb
Purpose(s)                 To allow Admin to search for potential candidates under Talent Pool
                           Search Tool.
Code Behind (Visual Basic codes)
Imports   System.Linq
Imports   System.Data.SqlClient
Imports   System.Configuration.ConfigurationSettings
Imports   System.Text
Imports   System.Web
Imports   System.Web.HttpContext
Imports   System
Imports   System.IO

Partial Public Class Candidate_Track_Rpt
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
        If Not Page.IsPostBack Then
            getJobCategory()
            getSkillCategory()
        End If
    End Sub

    Private Sub getJobCategory()




                                                                                                 169
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT distinct JobCatName FROM
dbo.[JOB_CATEGORY] ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

       For Each row As DataRow In myDataSet.Tables(0).Rows
           Me.ddl_jobcat.Items.Add(row("JobCatName"))
       Next

   End Sub

   Private   Function getJobCatID() As String
       Dim   jobcatid As String = ""
       Dim   myConnection As New SqlConnection
       Dim   myAdapter As SqlDataAdapter
       Dim   myDataSet As New DataSet

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        myAdapter = New SqlDataAdapter("SELECT JobCatID FROM dbo.[JOB_CATEGORY] where
jobcatname = '" & Me.ddl_jobcat.SelectedValue & "' ", myConnection)
        myAdapter.Fill(myDataSet)

       For Each row As DataRow In myDataSet.Tables(0).Rows
           jobcatid = row("JobCatID")
       Next

       Return jobcatid
   End Function

   Private Sub getJobTitle()

        Dim myConnection As New SqlConnection
        Dim jobcatid As String
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter

        jobcatid = getJobCatID()
        myAdapter = New SqlDataAdapter("SELECT JobTitle FROM dbo.[JOB] where jobcatid
= '" & jobcatid & "' and jobstatus = 'Vacant' ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

       Me.ddl_jobTitle.Items.Clear()
       Me.ddl_jobTitle.Items.Add("Please Select")

       For Each row As DataRow In myDataSet.Tables(0).Rows
           Me.ddl_jobTitle.Items.Add(row("JobTitle"))
       Next

   End Sub

   Private   Function getJobID() As String
       Dim   myConnection As New SqlConnection
       Dim   jobid As String = ""
       Dim   jobcatid As String = ""

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter

       jobcatid = getJobCatID()

        If Me.ddl_jobTitle.SelectedIndex <> 0 Then
            myAdapter = New SqlDataAdapter("SELECT Jobid FROM dbo.[JOB] where jobtitle
= '" & Me.ddl_jobTitle.SelectedValue & "' ", myConnection)
        Else
            Me.lbl_err2.Visible = True
            Me.lbl_err2.Text = "Please select a Job Title"
        End If




                                                                                  170
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


       Dim myDataSet As New DataSet
       myAdapter.Fill(myDataSet)

       For Each row As DataRow In myDataSet.Tables(0).Rows
           jobid = row("jobid")
       Next

       Return jobid
   End Function

   Private Sub getSkillCategory()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT distinct SkillCatName FROM
dbo.[SKILL_CAT] ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

       Me.ddl_skillcat.Items.Add("Select a Skill category")

       For Each row As DataRow In myDataSet.Tables(0).Rows
           Me.ddl_skillcat.Items.Add(row("SkillCatName"))
       Next

   End Sub

   Private Sub getSkill()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT distinct SkillName FROM SKILL where
SkillCatName = '" & Me.ddl_skillcat.SelectedValue & "' ", myConnection)

       Dim myDataSet As New DataSet
       myAdapter.Fill(myDataSet)
       Me.ddl_skill.Items.Clear()

       For Each row As DataRow In myDataSet.Tables(0).Rows
           Me.ddl_skill.Items.Add(row("SkillName"))
       Next

   End Sub

    Protected Sub ddl_skillcat_SelectedIndexChanged(ByVal sender As Object, ByVal e As
EventArgs) Handles ddl_skillcat.SelectedIndexChanged
        getSkill()
    End Sub

    Protected Sub btn_add_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_add.Click
        Me.lbxSkill.Items.Add(Me.ddl_skill.SelectedValue)
    End Sub

    Private Sub LoadData()
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        Dim ds As New DataSet
        Dim count, len As Integer
        Dim sb As New StringBuilder
        Dim str, str2 As String

       '***For Skills
       If Me.lbxSkill.Items.Count <> 0 Then
           For Each item As ListItem In Me.lbxSkill.Items
               str = item.ToString
               sb.Append("'" & str & "'")
               sb.Append(",")
           Next




                                                                                     171
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


           '***Remove the last comma from the string
           str2 = sb.ToString
           len = str2.Length
           str2 = str2.Substring(0, len - 1)
       Else
           '***If user does not enter any skills, the string is empty
           str2 = ""
       End If

        If str2 <> "" Then
            myAdapter = New SqlDataAdapter("select distinct a.AppID, a.AppName,
a.AppEmail, a.AppPhone, a.AppDOB, a.AppGender, a.ExpectedSalary, a.Achievement,
a.AppNationality, a.AppNRIC, a.AppAge, a.AppMarital, e.CertObtained from APPLICANT a,
SKILL s, EDUCATION e where a.appid = s.appid and a.appid = e.AppID and s.skillname IN
(" & str2 & ") and e.highestedu = 'Y' and e.CertObtained like '%" &
Me.ddl_edu.SelectedValue.Trim & "%' and a.active = 'Y' ", myConnection)
        ElseIf str2 = "" Then
            myAdapter = New SqlDataAdapter("select distinct a.AppID, a.AppName,
a.AppEmail, a.AppPhone, a.AppDOB, a.AppGender, a.ExpectedSalary, a.Achievement,
a.AppNationality, a.AppNRIC, a.AppAge, a.AppMarital, e.CertObtained from APPLICANT a,
SKILL s, EDUCATION e where a.appid = s.appid and a.appid = e.AppID and e.highestedu =
'Y' and e.CertObtained like '%" & Me.ddl_edu.SelectedValue.Trim & "%' and a.active =
'Y' ", myConnection)
        End If

       myAdapter.Fill(ds)

       count = ds.Tables(0).Rows.Count

       If count > 0 Then
           Me.lbl_err.Visible = False
           Me.dg_app.Visible = True
           Me.dg_app.DataSource = ds
           dg_app.DataBind()

       ElseIf count <= 0 Then
           Me.dg_app.Visible = False
           Me.lbl_err.Visible = True
           Me.lbl_err.Text = "No Data!"
       End If

   End Sub

   Private Sub getSkillDetails()
       '***Get Skill name and category
       Dim count As Integer
       Dim jobid As String
       jobid = getJobID()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT js.skillname, s.skillcatname FROM
job_required_skill js, skill s where js.skillname = s.skillname and js.jobid = '" &
jobid & "' ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

       Me.P_skills.Visible = True

       count = myDataSet.Tables(0).Rows.Count

       If count > 0 Then
           Me.lbl_err2.Visible = False
           Me.dg_skills.Visible = True
           Me.dg_skills.DataSource = myDataSet
           dg_skills.DataBind()

       ElseIf count <= 0 Then
           Me.dg_skills.Visible = False
           Me.lbl_err2.Visible = True
           Me.lbl_err2.Text = "No Data!"
       End If




                                                                                  172
               Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


    End Sub

    Protected Sub btn_generate_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_generate.Click
        LoadData()
    End Sub

    Protected Sub btn_delete_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_delete.Click
        Me.lbxSkill.Items.Remove(Me.lbxSkill.SelectedValue)
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        '***Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        '***Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        '***Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub

    Protected Sub btn_back_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_back.Click
        Response.Redirect("Admin_Index.aspx")
    End Sub

    Protected Sub ddl_jobcat_SelectedIndexChanged(ByVal sender As Object, ByVal e As
EventArgs) Handles ddl_jobcat.SelectedIndexChanged
        getJobTitle()
    End Sub

    Protected Sub ddl_jobTitle_SelectedIndexChanged(ByVal sender As Object, ByVal e As
EventArgs) Handles ddl_jobTitle.SelectedIndexChanged
        getSkillDetails()
    End Sub

    Protected Sub btn_Logout_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Logout.Click
        '***To Log out
        Session("user") = ""
        Response.Redirect("Career_index.aspx")
    End Sub
End Class


Web Page               Candidate_Tracking_Report.aspx.vb
Purpose(s)             To allow Manager to view job applications submitted.
Code Behind (Visual Basic codes)
Imports   System.Linq
Imports   System.Data.SqlClient
Imports   System.Configuration.ConfigurationSettings
Imports   System.Text
Imports   System.Web
Imports   System.Web.HttpContext
Imports   System
Imports   System.IO

Partial Public Class Candidate_Tracking_Rpt
    Inherits System.Web.UI.Page




                                                                                     173
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
        If Not Page.IsPostBack Then
            getYear()
            getMonth()
            getStatus()
            getJobCategory()
        End If
    End Sub

   Private Sub getYear()
       For i As Integer = 2009 To 2019
           Me.ddl_year.Items.Add(i)
       Next
   End Sub

   Private Sub getMonth()

       Dim arr As New ArrayList

        arr.Add("Jan") : arr.Add("Feb") : arr.Add("Mar") : arr.Add("Apr") :
arr.Add("May")
        arr.Add("Jun") : arr.Add("Jul") : arr.Add("Aug") : arr.Add("Sep") :
arr.Add("Oct")
        arr.Add("Nov") : arr.Add("Dec")

       For i As Integer = 0 To arr.Count - 1
           Me.ddl_Month.Items.Add(arr(i))
       Next

   End Sub

   Private Sub getStatus()

       Dim arr As New ArrayList

       arr.Add("Selected") : arr.Add("Absent from Interview")
       arr.Add("Job Offer - Reject Offer") : arr.Add("Rejected")

       Me.ddl_status.Items.Add("All Status")

       For i As Integer = 0 To arr.Count - 1
           Me.ddl_status.Items.Add(arr(i))
       Next

   End Sub

   Private Sub getJobCategory()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT distinct JobCatName FROM
dbo.[JOB_CATEGORY] ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

       Me.dd_JobCat.Items.Add("All Categories")

       For Each row As DataRow In myDataSet.Tables(0).Rows
           Me.dd_JobCat.Items.Add(row("JobCatName"))
       Next
   End Sub

    Private Sub LoadData()
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        Dim intmth, intyear, count As Integer

       intyear = CInt(Me.ddl_year.SelectedValue)

       Select Case Me.ddl_Month.SelectedValue
           Case "Jan"




                                                                                   174
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


               intmth   = 1
           Case "Feb"
               intmth   = 2
           Case "Mar"
               intmth   = 3
           Case "Apr"
               intmth   = 4
           Case "May"
               intmth   = 5
           Case "Jun"
               intmth   = 6
           Case "Jul"
               intmth   = 7
           Case "Aug"
               intmth   = 8
           Case "Sep"
               intmth   = 9
           Case "Oct"
               intmth   = 10
           Case "Nov"
               intmth   = 11
           Case "Dec"
               intmth   = 12
       End Select

        If Me.dd_JobCat.SelectedValue = "All Categories" And
Me.ddl_status.SelectedValue <> "All Status" Then
            myAdapter = New SqlDataAdapter("select ap.AppID, ap.AppName, a.appdate,
j.JobTitle, jc.JobCatName, i.interviewdate, i.interviewstatus from dbo.APPLICATION a,
dbo.INTERVIEW i, APPLICANT ap, JOB j, JOB_CATEGORY jc where i.ApplicationID =
a.ApplicationID and ap.AppID = a.AppID and a.JobID = j.JobID and j.JobCatID =
jc.JobCatID and i.interviewstatus = '" & Me.ddl_status.SelectedValue & "' and
month(a.AppDate) = " & intmth & " and year(a.appDate) = " & intyear & " ",
myConnection)
        ElseIf Me.dd_JobCat.SelectedValue <> "All Categories" And
Me.ddl_status.SelectedValue <> "All Status" Then
            myAdapter = New SqlDataAdapter("select ap.AppID, ap.AppName, a.appdate,
j.JobTitle, jc.JobCatName, i.interviewdate, i.interviewstatus from dbo.APPLICATION a,
dbo.INTERVIEW i, APPLICANT ap, JOB j, JOB_CATEGORY jc where i.ApplicationID =
a.ApplicationID and ap.AppID = a.AppID and a.JobID = j.JobID and j.JobCatID =
jc.JobCatID and i.interviewstatus = '" & Me.ddl_status.SelectedValue & "' and
month(a.AppDate) = " & intmth & " and year(a.appDate) = " & intyear & " and
jc.jobcatname = '" & Me.dd_JobCat.SelectedValue & "' ", myConnection)
        ElseIf Me.dd_JobCat.SelectedValue = "All Categories" And
Me.ddl_status.SelectedValue = "All Status" Then
            myAdapter = New SqlDataAdapter("select ap.AppID, ap.AppName, a.appdate,
j.JobTitle, jc.JobCatName, i.interviewdate, i.interviewstatus from dbo.APPLICATION a,
dbo.INTERVIEW i, APPLICANT ap, JOB j, JOB_CATEGORY jc where i.ApplicationID =
a.ApplicationID and ap.AppID = a.AppID and a.JobID = j.JobID and j.JobCatID =
jc.JobCatID and month(a.AppDate) = " & intmth & " and year(a.appDate) = " & intyear &
" ", myConnection)
        ElseIf Me.dd_JobCat.SelectedValue <> "All Categories" And
Me.ddl_status.SelectedValue = "All Status" Then
            myAdapter = New SqlDataAdapter("select ap.AppID, ap.AppName, a.appdate,
j.JobTitle, jc.JobCatName, i.interviewdate, i.interviewstatus from dbo.APPLICATION a,
dbo.INTERVIEW i, APPLICANT ap, JOB j, JOB_CATEGORY jc where i.ApplicationID =
a.ApplicationID and ap.AppID = a.AppID and a.JobID = j.JobID and j.JobCatID =
jc.JobCatID and month(a.AppDate) = " & intmth & " and year(a.appDate) = " & intyear &
" and jc.jobcatname = '" & Me.dd_JobCat.SelectedValue & "' ", myConnection)
        End If

       Dim ds As New DataSet
       myAdapter.Fill(ds)
       count = ds.Tables(0).Rows.Count

       If count > 0 Then
           Me.lbl_err.Visible = False
           Me.dg_applicant_track.Visible = True
           Me.dg_applicant_track.DataSource = ds
           dg_applicant_track.DataBind()

       ElseIf count <= 0 Then
           Me.dg_applicant_track.Visible = False

           Me.lbl_err.Visible = True
           Me.lbl_err.Text = "No Data!"




                                                                                  175
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


        End If
    End Sub

    Protected Sub btn_generate_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_generate.Click
        LoadData()
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        'Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        'Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        'Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub

    Protected Sub btn_back_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_back.Click
        Response.Redirect("Report_Index.aspx")
    End Sub

    Protected Sub btn_Logout_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Logout.Click
        'To Log out
        Session("user") = ""
        Response.Redirect("Career_index.aspx")
    End Sub
End Class


Web Page            CostPerHire_Rpt.aspx.vb
Purpose(s)          To allow manager to view the cost and benefits of hire and other recruitment
                    details.
Code Behind (Visual Basic codes)
Imports   System.Linq
Imports   System.Data.SqlClient
Imports   System.Configuration.ConfigurationSettings
Imports   System.Text
Imports   System.Web
Imports   System.Web.HttpContext
Imports   System
Imports   System.IO

Partial Public Class CostPerHire_Rpt
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
        If Not Page.IsPostBack Then
            getYear()
            getMonth()
        End If
    End Sub

    Private Sub getYear()
        For i As Integer = 2009 To 2019
            Me.ddl_year.Items.Add(i)
        Next
    End Sub




                                                                                                   176
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


   Private Sub getMonth()

       Dim arr As New ArrayList

        arr.Add("Jan") : arr.Add("Feb") : arr.Add("Mar") : arr.Add("Apr") :
arr.Add("May")
        arr.Add("Jun") : arr.Add("Jul") : arr.Add("Aug") : arr.Add("Sep") :
arr.Add("Oct")
        arr.Add("Nov") : arr.Add("Dec")

       For i As Integer = 0 To arr.Count - 1
           Me.ddl_Month.Items.Add(arr(i))
       Next

   End Sub

    Private Sub LoadData()
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        Dim intmth, intyear As Integer
        Dim ds As New DataSet
        Dim ds1 As New DataSet
        Dim count As Integer

       intyear = CInt(Me.ddl_year.SelectedValue)

       Select Case Me.ddl_Month.SelectedValue
           Case "Jan"
               intmth = 1
           Case "Feb"
               intmth = 2
           Case "Mar"
               intmth = 3
           Case "Apr"
               intmth = 4
           Case "May"
               intmth = 5
           Case "Jun"
               intmth = 6
           Case "Jul"
               intmth = 7
           Case "Aug"
               intmth = 8
           Case "Sep"
               intmth = 9
           Case "Oct"
               intmth = 10
           Case "Nov"
               intmth = 11
           Case "Dec"
               intmth = 12
       End Select

       If Me.dd_type.SelectedValue = 0 Then

            myAdapter = New SqlDataAdapter("select jc.jobCatName, sum(r.costofhire) as
costofhire, sum(r.lengthoftime) as lengthoftime from dbo.RECRUITMENT r, JOB j,
JOB_CATEGORY jc where r.jobID = j.jobID And j.JobCatID = jc.JobCatID And
month(r.recruitdate) = " & intmth & " and year(r.recruitdate) = " & intyear & " group
by JobCatname", myConnection)
            myAdapter.Fill(ds1)
            count = ds1.Tables(0).Rows.Count
        Else
            myAdapter = New SqlDataAdapter("select jc.jobCatName, j.jobTitle,
r.costofhire, r.lengthoftime, r.recruitDate from dbo.RECRUITMENT r, JOB j,
JOB_CATEGORY jc where r.jobID = j.jobID and j.JobCatID = jc.JobCatID and
month(r.recruitdate) = " & intmth & " and year(r.recruitdate) = " & intyear & " ",
myConnection)
            myAdapter.Fill(ds)
            count = ds.Tables(0).Rows.Count
        End If

       If count > 0 Then




                                                                                  177
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


             Me.lbl_err.Visible = False

             Select Case Me.dd_type.SelectedValue
                 'View by Job Category
                 Case 0
                     Me.dg_Cost_track1.DataSource = ds1
                     dg_Cost_track1.DataBind()
                     Me.dg_Cost_track1.Visible = True
                     Me.dg_Cost_track.Visible = False

                    For Each item As GridViewRow In dg_Cost_track1.Rows
                        item.Cells(0).Text = intmth
                    Next
                    'View by Job Title
                Case 1
                    Me.dg_Cost_track.DataSource = ds
                    dg_Cost_track.DataBind()
                    Me.dg_Cost_track1.Visible = False
                    Me.dg_Cost_track.Visible = True

                     For Each item As GridViewRow In dg_Cost_track.Rows
                         item.Cells(0).Text = intmth
                         Me.dg_Cost_track.Visible = True
                         dg_Cost_track.HeaderRow.Cells(1).Visible = False
                         item.Cells(1).Visible = False
                     Next
             End Select

       ElseIf count <= 0 Then
           Me.dg_Cost_track.Visible = False
           Me.dg_Cost_track1.Visible = False
           Me.lbl_err.Visible = True
           Me.lbl_err.Text = "No Data!"
       End If

   End Sub

    Protected Sub btn_generate_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_generate.Click
        LoadData()
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub btn_back_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_back.Click
        Response.Redirect("Report_Index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        'Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        'Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        'Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub

    Protected Sub btn_Logout_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Logout.Click
        'To Log out
        Session("user") = ""
        Response.Redirect("Career_index.aspx")
    End Sub




                                                                                     178
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


End Class


Web Page                Interview_Tracking_Rpt.aspx.vb
Purpose(s)              To allow manager to view and track interview details.
Code Behind (Visual Basic codes)
Imports   System.Linq
Imports   System.Data.SqlClient
Imports   System.Configuration.ConfigurationSettings
Imports   System.Text
Imports   System.Web
Imports   System.Web.HttpContext
Imports   System
Imports   System.IO

Partial Public Class Interview_Tracking_Rpt
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
        If Not Page.IsPostBack Then
            getYear()
            getMonth()
            getStatus()
        End If
    End Sub

    Private Sub getYear()
        For i As Integer = 2009 To 2019
            Me.ddl_year.Items.Add(i)
        Next
    End Sub

    Private Sub getMonth()

          Dim arr As New ArrayList

        arr.Add("Jan") : arr.Add("Feb") : arr.Add("Mar") : arr.Add("Apr") :
arr.Add("May")
        arr.Add("Jun") : arr.Add("Jul") : arr.Add("Aug") : arr.Add("Sep") :
arr.Add("Oct")
        arr.Add("Nov") : arr.Add("Dec")

          For i As Integer = 0 To arr.Count - 1
              Me.ddl_Month.Items.Add(arr(i))
          Next

    End Sub

    Private Sub getStatus()

          Dim arr As New ArrayList

          arr.Add("Pending") : arr.Add("Absent from Interview")
          arr.Add("Selected") : arr.Add("Rejected")

          Me.ddl_status.Items.Add("All Status")

          For i As Integer = 0 To arr.Count - 1
              Me.ddl_status.Items.Add(arr(i))
          Next

    End Sub

    Private Sub LoadData()
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        Dim intmth, intyear, count As Integer

          Select Case Me.ddl_Month.SelectedValue
              Case "Jan"
                  intmth = 1




                                                                                   179
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


           Case "Feb"
               intmth   = 2
           Case "Mar"
               intmth   = 3
           Case "Apr"
               intmth   = 4
           Case "May"
               intmth   = 5
           Case "Jun"
               intmth   = 6
           Case "Jul"
               intmth   = 7
           Case "Aug"
               intmth   = 8
           Case "Sep"
               intmth   = 9
           Case "Oct"
               intmth   = 10
           Case "Nov"
               intmth   = 11
           Case "Dec"
               intmth   = 12
       End Select

       intyear = CInt(Me.ddl_year.SelectedValue)

        If Me.ddl_status.SelectedValue <> "All Status" Then
            myAdapter = New SqlDataAdapter("select j.jobtitle, a.appname, ap.AppDate,
i.interviewdate, i.interviewrating, i.interviewstatus, i.remarks from dbo.APPLICATION
ap, dbo.INTERVIEW i, APPLICANT a, JOB j where i.ApplicationID = ap.ApplicationID and
ap.jobid = j.jobid and ap.AppID = a.AppID and i.interviewstatus = '" &
Me.ddl_status.SelectedValue & "' and month(i.interviewdate) = " & intmth & " and
year(i.interviewdate) = " & intyear & " ", myConnection)
        ElseIf Me.ddl_status.SelectedValue = "All Status" Then
            myAdapter = New SqlDataAdapter("select j.jobtitle, a.appname, ap.AppDate,
i.interviewdate, i.interviewrating, i.interviewstatus, i.remarks from dbo.APPLICATION
ap, dbo.INTERVIEW i, APPLICANT a, JOB j where i.ApplicationID = ap.ApplicationID and
ap.jobid = j.jobid and ap.AppID = a.AppID and month(i.interviewdate) = " & intmth & "
and year(i.interviewdate) = " & intyear & " ", myConnection)
        End If

       Dim ds As New DataSet
       myAdapter.Fill(ds)

       count = ds.Tables(0).Rows.Count

       If count > 0 Then
           Me.dg_interview_track.Visible = True
           Me.lbl_err.Visible = False
           Me.dg_interview_track.DataSource = ds
           dg_interview_track.DataBind()

       ElseIf count <= 0 Then
           Me.dg_interview_track.Visible = False
           Me.lbl_err.Visible = True
           Me.lbl_err.Text = "No Data!"
       End If

   End Sub

    Protected Sub btn_generate_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_generate.Click
        LoadData()
    End Sub

    Protected Sub btn_back_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_back.Click
        Response.Redirect("Report_Index.aspx")
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        Response.Redirect("Career_index.aspx")
    End Sub

   Protected Sub btn_Logout_Click(ByVal sender As Object, ByVal e As EventArgs)




                                                                                     180
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Handles btn_Logout.Click
        'To Log out
        Session("user") = ""
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        'Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        'Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        'Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub
End Class


Web Page            Job_Trend_Rpt.aspx.vb
Purpose(s)          To allow manager to view the jobs that has been posted in a selected job
                    category, month and year.
Code Behind (Visual Basic codes)
Imports   System.Linq
Imports   System.Data.SqlClient
Imports   System.Configuration.ConfigurationSettings
Imports   System.Text
Imports   System.Web
Imports   System.Web.HttpContext
Imports   System
Imports   System.IO

Partial Public Class Job_Trend_Rpt
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
        If Not Page.IsPostBack Then
            getYear()
            getMonth()
            getJobCategory()
        End If
    End Sub

    Private Sub getYear()
        For i As Integer = 2009 To 2019
            Me.ddl_year.Items.Add(i)
        Next
    End Sub

    Private Sub getMonth()

          Dim arr As New ArrayList

        arr.Add("Jan") : arr.Add("Feb") : arr.Add("Mar") : arr.Add("Apr") :
arr.Add("May")
        arr.Add("Jun") : arr.Add("Jul") : arr.Add("Aug") : arr.Add("Sep") :
arr.Add("Oct")
        arr.Add("Nov") : arr.Add("Dec")

          For i As Integer = 0 To arr.Count - 1
              Me.ddl_Month.Items.Add(arr(i))
          Next

    End Sub

    Private Sub getJobCategory()




                                                                                               181
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT distinct JobCatName FROM
dbo.[JOB_CATEGORY] ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

       Me.dd_JobCat.Items.Add("All Categories")

       For Each row As DataRow In myDataSet.Tables(0).Rows
           Me.dd_JobCat.Items.Add(row("JobCatName"))
       Next

   End Sub

    Private Sub LoadData()
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        Dim intmth, intyear As Integer
        Dim ds As New DataSet
        Dim count As Integer

       Select Case Me.ddl_Month.SelectedValue
           Case "Jan"
               intmth = 1
           Case "Feb"
               intmth = 2
           Case "Mar"
               intmth = 3
           Case "Apr"
               intmth = 4
           Case "May"
               intmth = 5
           Case "Jun"
               intmth = 6
           Case "Jul"
               intmth = 7
           Case "Aug"
               intmth = 8
           Case "Sep"
               intmth = 9
           Case "Oct"
               intmth = 10
           Case "Nov"
               intmth = 11
           Case "Dec"
               intmth = 12
       End Select

       intyear = CInt(Me.ddl_year.SelectedValue)

        If Me.dd_JobCat.SelectedValue = "All Categories" Then
            myAdapter = New SqlDataAdapter("select j.jobid, jc.jobCatName, j.jobTitle,
j.jobstatus, j.JobPostDate, j.JobDeadline from JOB j, JOB_CATEGORY jc where j.JobCatID
= jc.JobCatID and month(j.jobpostdate) = " & intmth & " and YEAR(j.jobpostdate) = " &
intyear & " ", myConnection)
        Else
            myAdapter = New SqlDataAdapter("select j.jobid, jc.jobCatName, j.jobTitle,
j.jobstatus, j.JobPostDate, j.JobDeadline from JOB j, JOB_CATEGORY jc where j.JobCatID
= jc.JobCatID and month(j.jobpostdate) = " & intmth & " and YEAR(j.jobpostdate) = " &
intyear & " and jc.jobcatname = '" & Me.dd_JobCat.SelectedValue & "' ", myConnection)
        End If

       myAdapter.Fill(ds)

       count = ds.Tables(0).Rows.Count

       If count > 0 Then
           Me.lbl_err.Visible = False
           Me.dg_recruit_track.Visible = True
           Me.dg_recruit_track.DataSource = ds




                                                                                  182
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


              dg_recruit_track.DataBind()

              For Each item As GridViewRow In dg_recruit_track.Rows
                  item.Cells(0).Text = intmth
              Next

          ElseIf count <= 0 Then
              Me.dg_recruit_track.Visible = False
              Me.lbl_err.Visible = True
              Me.lbl_err.Text = "No Data!"
          End If

    End Sub

    Protected Sub btn_generate_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_generate.Click
        LoadData()
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub btn_back_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_back.Click
        Response.Redirect("Report_Index.aspx")
    End Sub

    Protected Sub btn_Logout_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Logout.Click
        'To Log out
        Session("user") = ""
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        'Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        'Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        'Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub
End Class


Web Page             Mgm_View_Application_Submitted.aspx.vb
Purpose(s)           To allow managers to view applications that has been shortlisted for interview.
                     Manager is also able to view the resume associated with each application.
                     Manager is also able to add interview details through the “Add Interview
                     Details” link.
Code Behind (Visual Basic codes)
Imports   System.Linq
Imports   System.Data.SqlClient
Imports   System.Configuration.ConfigurationSettings
Imports   System.Text
Imports   System.Web
Imports   System.Web.HttpContext
Imports   System
Imports   System.IO

Partial Public Class Mgm_View_Application_Submitted
    Inherits System.Web.UI.Page




                                                                                                183
              Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


   Dim _userid As String

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
        If Not Page.IsPostBack Then
            getJobCategory()
        End If
    End Sub

   Private Sub getJobCategory()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT distinct JobCatName FROM
dbo.[JOB_CATEGORY] ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

       For Each row As DataRow In myDataSet.Tables(0).Rows
           Me.ddl_jobcat.Items.Add(row("JobCatName"))
       Next

   End Sub

   Private   Function getJobCatID() As String
       Dim   jobcatid As String = ""
       Dim   myConnection As New SqlConnection
       Dim   myAdapter As SqlDataAdapter
       Dim   myDataSet As New DataSet

        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        myAdapter = New SqlDataAdapter("SELECT JobCatID FROM dbo.[JOB_CATEGORY] where
jobcatname = '" & Me.ddl_jobcat.SelectedValue & "' ", myConnection)
        myAdapter.Fill(myDataSet)

       For Each row As DataRow In myDataSet.Tables(0).Rows
           jobcatid = row("JobCatID")
       Next

       Return jobcatid
   End Function

   Private Sub getJobTitle()

        Dim myConnection As New SqlConnection
        Dim jobcatid As String
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter

       'Get job category ID
       jobcatid = getJobCatID()

        'Get all job title with application status is "New" within the selected job
category
        myAdapter = New SqlDataAdapter("SELECT j.JobTitle FROM JOB j, APPLICATION ap
where j.jobid = ap.jobid and j.jobcatid = '" & jobcatid & "' and ap.AppStatus =
'Pending' and j.jobstatus = 'Vacant' ", myConnection)

       Dim myDataSet As New DataSet
       myAdapter.Fill(myDataSet)

       Me.ddl_jobTitle.Items.Clear()

       'Populate job titles retrieved from database into dropdown list
       For Each row As DataRow In myDataSet.Tables(0).Rows
           Me.ddl_jobTitle.Items.Add(row("JobTitle"))
       Next

   End Sub

   Private Function getJobID() As String
       Dim myConnection As New SqlConnection




                                                                                   184
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


        Dim jobid As String = ""
        Dim jobcatid As String = ""
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter

        jobcatid = getJobCatID()
        myAdapter = New SqlDataAdapter("SELECT Jobid FROM dbo.[JOB] where jobtitle =
'" & Me.ddl_jobTitle.SelectedValue & "' ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

       For Each row As DataRow In myDataSet.Tables(0).Rows
           jobid = row("jobid")
       Next

       Return jobid
   End Function

    Private Sub loaddata()
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        Dim ds As New DataSet
        Dim count As Integer
        Dim jobid As String

       'Get Job ID of the job selected by user
       jobid = getJobID()

        myAdapter = New SqlDataAdapter("select ap.ApplicationID, ap.AppDate, a.AppId,
a.AppName, j.JobId, j.JobTitle, jc.JobCatName from Application ap, APPLICANT a, Job j,
Job_Category jc where ap.appid = a.appid and ap.jobid = j.jobid and j.jobcatid =
jc.jobcatid and ap.jobid = '" & jobid & "' and ap.AppStatus = 'Pending' and
j.jobstatus = 'Vacant' ", myConnection)

       myAdapter.Fill(ds)

       count = ds.Tables(0).Rows.Count

       'Check if data exist
       If count > 0 Then
           Me.lbl_err.Visible = False
           Me.P_application.Visible = True
           Me.dg_app.DataSource = ds
           dg_app.DataBind()

       ElseIf count <= 0 Then
           Me.P_application.Visible = False
           Me.lbl_err.Visible = True
           Me.lbl_err.Text = "No Data!"
       End If

   End Sub

    Protected Sub btn_Logout_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Logout.Click
        'To Log out
        Session("user") = ""
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub btn_show_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_show.Click
        loaddata()
    End Sub

    Protected Sub btn_back_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_back.Click
        Response.Redirect("Report_Index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        'Link to About Neno Page




                                                                                    185
               Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        'Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        'Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub

    Protected Sub ddl_jobcat_SelectedIndexChanged(ByVal sender As Object, ByVal e As
EventArgs) Handles ddl_jobcat.SelectedIndexChanged
        getJobTitle()
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        Response.Redirect("Career_index.aspx")
    End Sub
End Class


Web Page            Recruitment_Rate_Rpt.aspx.vb
Purpose(s)          To allow manager to view recruitment details.
Code Behind (Visual Basic codes)
Imports   System.Linq
Imports   System.Data.SqlClient
Imports   System.Configuration.ConfigurationSettings
Imports   System.Text
Imports   System.Web
Imports   System.Web.HttpContext
Imports   System
Imports   System.IO

Partial Public Class Recruitment_Rate_Rpt
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
        If Not Page.IsPostBack Then
            getYear()
            getMonth()
            getJobCategory()
        End If
    End Sub

    Private Sub getYear()

        For i As Integer = 2009 To 2019
            Me.ddl_year.Items.Add(i)
        Next
    End Sub

    Private Sub getMonth()

          Dim arr As New ArrayList

        arr.Add("Jan") : arr.Add("Feb") : arr.Add("Mar") : arr.Add("Apr") :
arr.Add("May")
        arr.Add("Jun") : arr.Add("Jul") : arr.Add("Aug") : arr.Add("Sep") :
arr.Add("Oct")
        arr.Add("Nov") : arr.Add("Dec")

          For i As Integer = 0 To arr.Count - 1
              Me.ddl_Month.Items.Add(arr(i))
          Next

    End Sub




                                                                                    186
             Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


   Private Sub getJobCategory()

        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        myAdapter = New SqlDataAdapter("SELECT distinct JobCatName FROM
dbo.[JOB_CATEGORY] ", myConnection)
        Dim myDataSet As New DataSet
        myAdapter.Fill(myDataSet)

       Me.dd_JobCat.Items.Add("All Categories")

       For Each row As DataRow In myDataSet.Tables(0).Rows
           Me.dd_JobCat.Items.Add(row("JobCatName"))
       Next

   End Sub

    Private Sub LoadData()
        Dim myConnection As New SqlConnection
        myConnection.ConnectionString = "server=USER-
PC\SQLEXPRESS;database=master;Trusted_Connection=True"
        Dim myAdapter As SqlDataAdapter
        Dim intmth, intyear As Integer
        Dim ds As New DataSet
        Dim count As Integer

       Select Case Me.ddl_Month.SelectedValue
           Case "Jan"
               intmth = 1
           Case "Feb"
               intmth = 2
           Case "Mar"
               intmth = 3
           Case "Apr"
               intmth = 4
           Case "May"
               intmth = 5
           Case "Jun"
               intmth = 6
           Case "Jul"
               intmth = 7
           Case "Aug"
               intmth = 8
           Case "Sep"
               intmth = 9
           Case "Oct"
               intmth = 10
           Case "Nov"
               intmth = 11
           Case "Dec"
               intmth = 12
       End Select

       intyear = CInt(Me.ddl_year.SelectedValue)

        If Me.dd_JobCat.SelectedValue = "All Categories" Then
            myAdapter = New SqlDataAdapter("select j.jobid, jc.jobCatName, j.jobTitle,
j.jobstatus, j.JobPostDate, r.recruitdate from JOB j, JOB_CATEGORY jc, RECRUITMENT r
where r.jobid = j.jobid and j.JobCatID = jc.JobCatID and month(r.recruitdate) = " &
intmth & " and YEAR(r.recruitdate) = " & intyear & " ", myConnection)
        Else
            myAdapter = New SqlDataAdapter("select j.jobid, jc.jobCatName, j.jobTitle,
j.jobstatus, j.JobPostDate, r.recruitdate from JOB j, JOB_CATEGORY jc, RECRUITMENT r
where r.jobid = j.jobid and j.JobCatID = jc.JobCatID and month(r.recruitdate) = " &
intmth & " and YEAR(r.recruitdate) = " & intyear & " and jc.jobcatname = '" &
Me.dd_JobCat.SelectedValue & "' ", myConnection)
        End If

       myAdapter.Fill(ds)

       count = ds.Tables(0).Rows.Count

       If count > 0 Then
           Me.lbl_err.Visible = False




                                                                                  187
                Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


              Me.dg_recruit_track.Visible = True
              Me.dg_recruit_track.DataSource = ds
              dg_recruit_track.DataBind()

            For Each item As GridViewRow In dg_recruit_track.Rows
                item.Cells(0).Text = intmth
            Next
        ElseIf count <= 0 Then
            Me.dg_recruit_track.Visible = False
            Me.lbl_err.Visible = True
            Me.lbl_err.Text = "No Data!"
        End If
    End Sub


    Protected Sub btn_generate_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_generate.Click
        LoadData()
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub btn_back_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
btn_back.Click
        Response.Redirect("Report_Index.aspx")
    End Sub

    Protected Sub btn_Logout_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btn_Logout.Click
        'To Log out
        Session("user") = ""
        Response.Redirect("Career_index.aspx")
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        'Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        'Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        'Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub
End Class


Web Page            SiteTerm.aspx.vb
Purpose(s)          To allow user to view site terms of the website.
Code Behind (Visual Basic codes)
Public Partial Class SiteTerm
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        'Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)




                                                                                     188
               Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


Handles LinkButton5.Click
        'Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        'Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        'Link to Career Home
        Response.Redirect("Career_index.aspx")
    End Sub
End Class


Web Page            AboutNeno.aspx.vb
Purpose(s)          To allow user to view Neno’s company details.
Code Behind (Visual Basic codes)
Public Partial Class AboutNeno
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load

    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        'Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub

    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        'Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        'Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        'Link to Career Homepage
        Response.Redirect("Career_index.aspx")
    End Sub
End Class



Web Page            ContactUs.aspx.vb
Purpose(s)          To allow user to view Neno’s contact details
Code Behind (Visual Basic codes)
Public Partial Class ContactUs
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton1.Click
        'Link to About Neno Page
        Response.Redirect("AboutNeno.aspx")
    End Sub




                                                                                    189
               Capstone Project: ICT499 Student Name: Lee Ai Ling PI Number: Q0707120


    Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton5.Click
        'Link to Contact Us Page
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton6.Click
        'Link to Site Terms Page
        Response.Redirect("SiteTerm.aspx")
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles LinkButton3.Click
        'Link to Career Homepage
        Response.Redirect("Career_index.aspx")
    End Sub
End Class




                                     --- End of Report ---


   The entire report consists of 8895 words, excluding the following items: Headers and Footers,
Acknowledgement, Abstract, Table of Content, list of Figures and Tables, About CD-Rom, all figures
                                   and tables, and all Appendices.




                                                                                              190

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:31
posted:5/22/2012
language:
pages:200
wangnuanzg wangnuanzg http://
About