Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 50

Recruitment Management System

Online Recruitment Management System can be used by employers to recruit the candidates
based on their experience and the further interviews easily. Achieving this objective is
difficult using the manual system as the information is scattered, can be redundant, and
collecting relevant information may be very time-consuming.
All these problems are solved by this project. This system helps in maintaining the
information of potential candidates in one place. It can be easily accessed by both applicants
and employers. It is kept safe for a long period of time without any changes or omissions. It
reduces the time employer take to make few recruitments in their firm.
This system helps the job seekers to get every information required for the process.
Modules of Online Recruitment System
The system has a different segment to process a specific task which is the modules. This will
help the system to developed easily and makes it more user-friendly.
The modules of the project are: –
Login Module: –
This will help users to login into the system using id and password. A user who has the valid
id and password can only log in to their respective accounts. It will help the authentication of
the user who enters the system. The module provides a layer of security over the system as
only authorized personal can login into the system.
This prevents any anonymous person to enter the system and mishandle the records. It is
better than the manual method as they do not have any security measure of who can access
the system and who cannot.
Registration Module: –
In this segment, we will register the new user of the system. As they are two different types
of users i.e. employer and job seekers this module can be fragmented into two parts. Each
part has its own interface and information required to get registered in the system.
Post Requisition: –
In this interface, the employer who has registered themselves in the system can post the jobs.
They can give the requisition specifying the post and skill needed for that post. It also implies
the criteria of recruitment the employer has planned for the post.
Job Search:
This module is for the job seeker where they can search all the requisition present in the
system. One can filter the search based on their skill and experience of the job. Once selected
a requisition applicant can apply for the post.
System Design of Online Recruitment System
Once the planning and analysis of the project are completed, the design phase begins. The
goal of system design is to transform the information collected about the project into the
blueprint structure which will serve as a base while constructing the system. It is considered
to be an unwieldy process as most of the errors are introduced in this phase.
However, if an error gets unnoticed in the later process it may become difficult to track them
down. In our system, we are developing a system which helps in recruitment management for
the employer. It will minimize the problems faces by both candidates and the recruiters in the
process.
Let’s discuss the system in detail:
Er Diagram of Online Recruitment System
The description above figure shows the E-R diagram of the proposed system. The ER model
defines the conceptual view of a database. It works around real-world entities and the
associations among them. At the view level, the ER model is considered a good option for
designing databases.
So, let’s see each entity in Details-:
Administrator:
The information of the admin of the system is stored in this entity. It is stored data of login
and the password. This provides security to the system and keeps the record of which user
entered in the system at what instance of time. This entity will have the access to all the
entities as it will add the job seeker to the system. This will manage the employer and its
requisition having specific skills and manage them.
It has the following attributes:
Username:
It stores the name of the admin which acts as the unique name given to the manager of the
firm. Through this login into the system and the work they made will be recorded against this
name. It will help their seniors to see what employer or seeker has the login to the system and
how much engagement he has with the interface.
Password:
This attribute holds the secured keyword given to every manager of the educational
institutions who need access to the system. This should not be shared with any other member.
As it would make any staff employee enter the system and see the information regarding a
candidate or the organization which can make them unbiased.
Login-Time:
The login time of the admin will be recorded in this field which helps in tracking the admin
performance.
Logout-Time:
It stores the logout time of the admin from the system.
Job Seeker:
To store the information of the candidate who registers to the system for participation in the
recruitment process, the Job Seeker entity is created. It will have all the required data about
the applicant. This has information which is personal like contact detail and the also
qualification of the user under the skill is.
It helps the employer also to get all the background information about the candidate if they
want to hire it. The entity also covers the major part of every recruitment process that is the
resume of the applicant. Once the resume is uploaded by the job seeker it will match with the
skill for the provided requisitions given by the employers.
It has following attributes:
Can-Id:
Candidate Id is a unique number given to each candidate who registers in the system. This
helps in identifying each applicant as distinct and different from others. Thus, it acts as the
primary key to the entity. To remove the redundancy in the system and further creating the
error in the system this type of attribute is introduced in the system.
Can-Name:
Candidate Name is the information required for details of the applicant who registers in the
system. It makes the system more realistic and aids the administrator in search of any specific
applicant on demand of the employer.
Resume/CV:
In this attribute job, seekers can store their resumes which can be reviewed by the
organization if they want to further check the candidate.
Projects:
Every candidate has many projects which they have created or worked on, which they want to
share with them, recruiters. This attribute will aid them to store the projects and write a full
fledge detail about them.
Personal-Info:
This attribute holds all the information the recruiters needed from the candidate apart from its
technical skills and eligibility. As it is the composite attributes it has further fields which
store the information. DOB store the date of birth of the candidate and the address will have
the residential address of the candidate which help in getting the location of the applicant as
some recruiters might need that. It also has the father’s name.
Contact:
This stores the contact information of the candidate like phone number and email id.
Skill:
It is an essential part of the system as it works on both from recruiter and job seeker. As the
recruiter gives the requisitions which have some specific eligibility criteria which are stored
in this skill whereas every seeker has its own set of skills that can be shared with the
employer. If the skills matched recruiters got their potential candidate for the post.
That is why this entity is needed in the system. It will be in relation to every requisition and
each job seeker. It will not only store the skills and talents required or possessed; it will also
have the academic qualification for the requisition.
It has the following attributes: –
Skill-Id:
As every set of skills is unique so every set is given a unique number that acts as its id in the
system. Thus, Skill-id stores the distinct number given to each skill. This helps in
differentiate every skill and identify them individually. This would help the applicant in
deciding which unique skill it belongs to without mixing it.
Technical:
It will store the technical skill by the applicant. It depends on the post for which he/she
applying for in the system.
Academic-details:
It will store the detailed information of the student in an academic field like high school
marks, senior secondary marks. It will also have the graduation percentage is necessary for
the skill. So, this attribute becomes a composite attribute for the entity. Each field in this
attribute will contribute to the qualification required for the skill.
Cocurricular-activities:
Every skill does not only require the technical talent of the student it also needs other social
skills. If an employer wants to check the social skill of the candidate, it could have referred to
the co-curricular activities in which the applicant has taken part. Like if some employer has
posted of receptionist, it would check the candidate’s communication skill apart from its
academic eligibility.
Requisition:
In the recruitment management system, every employer will make the requisition of the
application for the given post. From the application received from the number of the job
seekers, the company will check their eligibility and decide whether he/she is compatible for
the post or not. Then the shortlisted student will go for further rounds of the recruitment
process as per the employer.
This demand is stored in this entity. It helps the system and employer to get all the data in one
place instead of getting the information from different centers and offices where recruitment
is going on. This entity will also aid the applicant to search all the employers based on the
requisition they made.
As every post require a set of skills so the skill entity has a relation with this entity and this
also has a relation with the employer as it provides the requisition. Every post requires the
employer to test the applicants before handing them an offer letter. Thus, this has a relation
with the interview entity to make a record of which interview process will take place with
which post.
It has following attributes:
Req-Id:
Every requisition present in the system given by each employer has unique numbers assigned
to it. It helps in differentiating them and identify each of them individually. It aids the job
seeker in referencing every requisition differently as it may be possible it is applying for
more than one.
Emp-Id:
This attribute will hold the information of the employer who is giving this requisition. It will
be just a reference to the employer entity.
Post:
Every requisition given by the employer belongs to a specific post. The company provides
this information and specifies the details. It mentions what work they are hiring for which
helps the job seekers to make the sound decision of whether apply in it or not.
Skill-Id:
It is a reference to a skilled entity that implies the required skill set for the specific post. It
helps in normalizing the data in the system. It avoids the redundancy and multiplicity of
information in the system.
Package:
This attribute stores the information regarding the pay scale or salary. The amount of money
in form of salary the employer is expecting to give to the applicant for the post.
Criteria:
In the criteria attribute, data regarding the process of recruitment is stored. As for every
requisition is there are different criteria for testing the candidate eligible for the post. It has
info like how many interview rounds will be there or if there is group discussion before the
interview.
Employer:
It will store the detailed information of the employer present or registered in the system.
Thus, making it one of the essential entities in the system. Before applying for any post, the
applicant also wants to know about the company or the employer who has given the
requisition.
It will hold the data about the person and the post in the company who the job seekers may
contact for further information or any query regarding the post. This entity will have the
relationship with the requisition as the employer gives these so there is employer reference in
that entity.
The administrator of the system manages this entity to check the requisition employer is
giving and track its recruitment data. It also has relationships with the offer letter entity as
this will be provided by the entity to the candidate. Only given if the job seeker has applied
for one of the posts given by the company and he/she completed every criterion they have set
for that requisition with the good remark.
It is one of the parts of the recruitment process also to have the full knowledge about the
company candidate is applying for.
It has the following attributes-:
Emp-Id:
It is the unique number given to the employer to differentiate from others. It aids in the
situation where more than one employer has the same name or when referencing it in some
other entity. Instead of writing the whole data about the employer again, we can write this id
which can be further referenced in this entity.
Emp-Name:
It will hold the name of the employer which is registered in the system. The name should be
the same as mention in the official record of the employer. As it acts as the employer details
for the applicant.
Information:
This entity will hold the information of the employer like when it is founded, what kind of
projects they are working on. It also holds the information of what kind of social skill they
want in their employees or what they see in their candidate. It also mentions the work culture
in their workplace.
Key-Persons:
It holds the data of the important persons of the company and the point of the contact for the
interested candidates.
Interview:
It has information about the interviews that will happen for the specific requisition. As the
interview is an important part of any recruitment process as in this the employer and
candidates come face to face and they can judge each other.
Int-id:
It is the unique number given to each interview process that happens in the system. It makes
the whole process distinctive and able to identify each when need.
Int-type-id:
As there are many kinds of interviews that can happen during the recruitment process. It
holds the reference to which type was a specific interview was.
Req-Id:
It will hold the reference of the requisition for which a specific employer is conducting this
interview.
Remarks:
This has the remarks of the interviews which is given by the employers.
Emp-Id:
It holds the data of the employer who is conducting this interview and managing the whole
process.
Interview-Type:
As there is various type of interview process which happens in the recruitment like technical
for checking the technical knowledge of the candidate or the HR interview to test the social
and interpersonal skill of the applicant.
Int-type-id:
It is the unique number given to each type of interview. It helps in making the type distinct
and able to find when needed.
Int-type-Name:
It holds the name of the type of interview. It aids the employee or candidate when need to go
into details about the interview process.
Offer-Letter:
When candidates apply for the job and it takes every criterion provided for a specific post. If
it qualifies for the post the company will provide him/her with the offer letter. It is a
document that makes the offer to the candidate for joining the employer’s firm. It has detailed
information regarding the package and the work environment of the company.
Of-id:
Each offer letter is given a unique and distinct number. So, every candidate can identify them
differentially. As one applicant can get many letters.
Emp-Id:
It is the number given to the employer as it gives the information about which company has
given this letter.
Experience:
To show the talent each applicant writes the experience they have gain in the previous years.
It helps the employer to see which applicant has the relevant knowledge required for the post.
It is a weak entity dependent on the job seeker’s profile. So, they can hire a person who has
more potential than others.
Exp-Details:
It holds the information candidate has learned during the work. It can be the specific topic or
any social skill it has gained. It also includes the time duration of the work.
Exp-Organization:
The name of the organization in which the applicant has gained the experience.
Feedback:
A good system is where everyone has a say in everything. So, the feedback system is an
entity that holds the feedback of the job seekers about their recruitment process for an
employer or a requisition.
It has the following attributes:
Feed-Id:
It is a unique number given to each feedback. It makes the remark distinct and identifiable for
the employers to take note of.
Emp-id:
It is a reference to the employer for which this feedback is given.
Feed-details:
It holds the remark given by the applicant.
User Interface of Online Recruitment System:
To show the user interface of the system a use diagram is a mention below, it gives the wide-
angle of how the system is working from the perspective of the user. In the above diagram of
the online recruitment system, there are three users. First is job seeker its login in the system
and find the job and apply for it if approved by admin which is second user foster’s details
are sent to the third user i.e. employer.
Admin job is managing the system and approves the seeker’s application. The employers
check the eligibility of the candidate and allow it interview dates. In the above diagram, there
are three users. First is job seeker its login in the system and find the job and apply for it if
approved by admin which is second user foster’s details are sent to the third user i.e.
employer.
Admin job is managing the system and approves the seeker’s application. The employers
check the eligibility of the candidate and allow it interview dates.
Requirement Analysis of Online Recruitment
System
Hardware Requirements of Online Recruitment System
The hardware required for online recruitment system for the development of the
project is:
 Processor: Intel P-IV System
 Processor Speed: 250 MHz to 833 MHz
 Ram: 512 Mb
 Ram Hard Disk: 40 Gb
Software Requirements of Online Recruitment System
The software required for online recruitment system for the development of the project
is:
 Operating System: Windows 2000 Professional
 Environment: Visual Studio .NET 2002
 Net Framework: Version 1.0
 Language: Visual Basic .NET
 Backend: SQL Server 2000
Functional Requirement of Online Recruitment System:
 Creation of the new record for the new job seeker or the new employer.
 Deletion of the record which already exists in the system based on the admin’s
request.
 Posting the requisition for the candidates and able to retrieve them if required.
 Candidates can apply for the job and see the further details.
 Admin handles employers and their job posts, this function eases the process of
management.
Non-Functional Requirement of Online Recruitment System:
 The security of the system is maintained by providing a login interface to the user.
Only those who have the login is and password can enter the system.
 User-Friendly as the system is very interactive and can be easily operated.
 Maintainability and reliability if the system is kept very thoroughly as all the records
kept in the database have the backups and system can restore if there is power loss.
SYSTEM DEVELOPMENT LIFE CYCLE (SDLC)
The systems development life cycle is a project management technique that
divides complex projects into smaller, more easily managed segments or phases.
Segmenting projects allows managers to verify the successful completion of project
phases before allocating resources to subsequent phases.
Software development projects typically include initiation, planning,design,
development, testing, implementation,and maintenance phases. However, the
phases may be divided differently depending on the organization involved.
For example, initial project activities might be designated as request,
requirements-definition, and planning phases, or initiation, concept-development,and
planning phases. End users of the system under development should be involved in
reviewing the output of each phase to ensure the system is being built to deliver the
needed functionality.

PHASES OF SYSTEM DEVELOPMENT LIFE CYCLE

INITIATION PHASE

The Initiation Phase begins when a business sponsor identifies a need or an


opportunity.
The purpose of the Initiation Phase is to:
 Identify and validate an opportunity to improve business accomplishments of
the organization or a deficiency related to a business need.
 Identify significant assumptions and constraints on solutions to that need.
 Recommend the exploration of alternative concepts and methods to satisfy
the need including questioning the need for technology, i.e., will a change in
the business process offer a solution?
 Assure executive business and executive technical sponsorship. The Sponsor
designates a Project Manager and the business need is documented in a
Concept Proposal. The Concept Proposal includes information about the
business process andthe relationship to the Agency/Organization.
 Infrastructure and the Strategic Plan. A successful Concept Proposal results
in a Project Management Charter which outlines the authority of the project
manager to begin
the project.

Careful oversight is required to ensure projects support strategic business


objectives and resources are effectively implemented into an organization's
enterprise architecture. The initiation phase begins when an opportunity to add,
improve, or correct a system is identified and formally requested through the
presentation of a business case. The business case should, at a minimum, describe
a proposal’s purpose, identify expected benefits, and explain how the proposed
system supports one of the organization’s business strategies. The business case
should also identify alternative solutions and detail as many informational, functional,
and network requirements as possible.
SYSTEM CONCEPT DEVELOPMENT PHASE
The System Concept Development Phase begins after a business need or
opportunity is validated by the Agency/Organization Program Leadership and the
Agency/Organization CIO.
The purpose of the System Concept Development Phase is to:
 Determine the feasibility and appropriateness of the alternatives.
 Identify system interfaces.
 Identify basic functional and data requirements to satisfy the business need.
 Establish system boundaries; identify goals, objectives, critical success
factors, and performance measures.
 Evaluate costs and benefits of alternative approaches to satisfy the basic
functional requirements
 Assess project risks
 Identify and initiate risk mitigation actions, andDevelop high-level technical
architecture, process models, data models, and a concept of operations. This
phase explores potential technical solutions within the context of the business
need.
 It may include several trade-off decisions such as the decision to use COTS
software products as opposed to developing custom software or reusing
software components, or the decision to use an incremental delivery versus a
complete, onetime deployment.
 Construction of executable prototypes is encouraged to evaluate technology
to support the business process. The System Boundary Document serves as
an important reference document to support the Information Technology
Project Request (ITPR) process.
 The ITPR must be approved by the State CIO before the project can move
forward.

PICTORIAL REPRESENTATION OF SDLC:


PLANNING PHASE

The planning phase is the most critical step in completing development,


acquisition, and maintenance projects. Careful planning, particularly in the early
stages of a project, isnecessary to coordinate activities and manage project risks
effectively. The depth and formality of project plans should be commensurate with
the characteristics and risks of a given project. Project plans refine the information
gathered during the initiation phase by further identifying the specificactivities and
resources required to complete a project.
A critical part of a project manager’sjob is to coordinate discussions between
user, audit, security, design, development, and network personnel to identify and
document as many functional, security, and networkrequirements as possible.
During this phase, a plan is developed that documents the approach to be used and
includes a discussion of methods, tools, tasks, resources, project schedules, and
user input. Personnel assignments, costs, project schedule, and target dates are
established.
A Project Management Plan is created with components related to acquisition
planning, configuration management planning, quality assurance planning, concept
of operations, system security, verification and validation, and systems engineering
management planning.

REQUIREMENTS ANALYSISPHASE

This phase formally defines the detailed functional user requirements using
high-level requirements identified in the Initiation, System Concept, and Planning
phases. It also delineates the requirements in terms of data, system performance,
security, and maintainability requirements for the system. The requirements are
defined in this phase to alevel of detail sufficient for systems design to proceed. They
need to be measurable, testable, and relate to the business need or opportunity
identified in the Initiation Phase. The requirements that will be used to determine
acceptance of the system are captured in the Test and Evaluation MasterPlan.

The purposes of this phase are to:

 Further define and refine the functional and data requirements and document
them in the Requirements Document,
 Complete business process reengineering of the functions to be supported
(i.e., verify what information drives the business process, what information is
generated, who generates it, where does the information go, and who
processes it),
 Develop detailed data and process models (system inputs, outputs, and the
process.
 Develop the test and evaluation requirements that will be used to determine
acceptable system performance.

DESIGN PHASE

The design phase involves converting the informational, functional, and


network requirements identified during the initiation and planning phases into unified
design specifications that developers use to scriptprograms during the development
phase. Program designs are c onstructed in various ways. Using a top-down
approach, designers first identify and link majorprogram components and interfaces,
then expand design layouts as they identify and link smaller subsystems and
connections. Using a bottom-up approach, designers first identify and link minor
program components and interfaces, then expand design layouts as they identify
and link larger systems and connections. Contemporary design techniques often use
prototyping tools that build mock-up designs of items such as application screens,
database layouts, and system architectures. End users, designers, developers,
database managers, and network administrators should review and refine the
prototyped designs in an iterative process until they agree on an acceptable design.
Audit, security, and quality assurance personnel should be involved in the review
and approval process. During this phase, the system is designed to satisfy the
functional requirements identified in the previous phase. Since problems in the
design phase could be very expensive to solve in the later stage of the software
development, a variety of elements are considered in the design to mitigate risk.
These include:

 Identifying potential risks and defining mitigating design features.


 Performing a security risk assessment.
 Developing a conversion plan to migrate current data to the new system.
 Determining the operating environment.
 Defining major subsystems and their inputs and outputs.
 Allocating processes to resources.
 Preparing detailed logic specifications for each software module. The result is
a draft System Design Document which captures the preliminary design for
the system.
 Everything requiring user input or approval is documented and reviewed by
the user. Once these documents have been approved by the Agency CIO and
Business Sponsor, the final System Design Document is created to serve as
the Critical/Detailed Design for the system.
 This document receives a rigorous review byAgency technical and functional
representatives to ensure that it satisfies the business requirements.
Concurrent with the development of the system design, the Agency Project
Manager begins development of the Implementation Plan, Operations and
Maintenance Manual, and the Training Plan.

DEVELOPMENT PHASE

The development phase involves converting design specifications into


executable programs. Effective development standards include requirements that
programmers and other project participants discuss design specifications before
programming begins. The procedures help ensure programmers clearly
understand program designs and functional requirements. Programmers use
various techniques to develop computer programs. The large transaction oriented
programs associated with financial institutions have traditionally been developed
using procedural programming techniques. Procedural programming involves the
line-by-line scripting of logical instructions that are combined to form a
program.Effective completion of the previous stages is a key factor in the success
of the Development phase. The Development phase consists of:

 Translating the detailed requirements and design into system components.


 Testing individual elements (units) for usability.
 Preparing for integration and testing of the IT system.

INTEGRATION AND TEST PHASE

 Subsystem integration, system, security, and user acceptance testing is


conducted during the integration and test phase. The user, with those
responsible for quality assurance, validates that the functional requirements,
as defined in the functional requirements document, are satisfied by the
developed or modified system. OIT Security staff assess the system security
and issue a security certification and accreditation prior to
installation/implementation.

Multiple levels of testing are performed, including:

 Testing at the development facility by the contractor and possibly supported


by end users

 Testing as a deployed system with end users working together with contract
personnel

 Operational testing by the end user alone performing all functions.


Requirements are traced throughout testing,a final Independent Verification &
Validation evaluation is performed and all documentation is reviewedand
accepted prior to acceptance of the system.

IMPLEMENTATION PHASE

This phase is initiated after the system has been tested and accepted by the
user. In this phase, the system is installed to support the intended business
functions. System performance is compared to performance objectives established
during the planning phase. Implementation includes user notification, user training,
installation of hardware, installation of software onto production computers, and
integration of the system into daily work processes. This phase continues until the
system is operating in production in accordance with the defined user requirements.

OPERATIONS AND MAINTENANCE PHASE

The system operation is ongoing. The system is monitored for continued


performance in accordance with user requirements and needed system
modifications are incorporated. Operations continue as long as the system can be
effectively adapted to respond to the organization’s needs. When modifications or
changes are identified, the system may reenter the planning phase.

The purpose of this phase is to:

 Operate, maintain, and enhance the system.


 Certify that the system can process sensitive information.
 Conduct periodic assessments of the system to ensure the functional
requirements continue to be satisfied.
 Determine when the system needs to be modernized, replaced, or retired.

Main.py
from tkinter import *

from tkinter import messagebox

from modules.login import *

root = Tk()

root.geometry("1050x700")

root.title("Hire ME")

root.resizable(0, 0)

root.iconbitmap(r'elements\\favicon.ico')

log(root)
root.mainloop()
db_init.py

import mysql.connector as sql

from modules.creds import user_pwd

from cv_schema_init import *

mycon = sql.connect(host='localhost', user='root', passwd=user_pwd)

cur = mycon.cursor()

cur.execute(CREATE_SCHEMA)

cur.execute(Create_users_Table)

cur.execute(Create_recruiter_Table)

cur.execute(Create_client_Table)

cur.execute(Create_Job_Table)

cur.execute(Create_Application_Table)
mycon.close()
cv_schema

CREATE_SCHEMA = """

CREATE SCHEMA IF NOT EXISTS `mydb`;


"""

Create_users_Table = """

CREATE TABLE IF NOT EXISTS mydb.Users(

name VARCHAR(45) NOT NULL,

email Varchar(120) Not NULL,

type VARCHAR(45) NOT NULL,

password VARCHAR(45) NULL,

UNIQUE INDEX email_UNIQUE (email),

CHECK (type in ('Recruiter','Client')),

PRIMARY KEY (email) );

"""

Create_recruiter_Table = """

CREATE TABLE IF NOT EXISTS mydb.Recruiter(

RID INT NOT NULL AUTO_INCREMENT,

RName VARCHAR(45) NOT NULL,

REmail VARCHAR(45) NOT NULL,

CompanyName VARCHAR(45) NOT NULL,

CompanyLocation VARCHAR(45) NOT NULL,

RGender VARCHAR(2) NOT NULL,

PRIMARY KEY (RID),

UNIQUE (REmail)

);

"""

Create_client_Table = """
CREATE TABLE IF NOT EXISTS mydb.Client (

CID INT NOT NULL AUTO_INCREMENT,

CName VARCHAR(45) NOT NULL,

CEmail VARCHAR(45) NOT NULL,

CAge INT NOT NULL,

CLocation VARCHAR(45) NOT NULL,

CGender VARCHAR(2) NOT NULL,

CExp INT NOT NULL,

CSkills VARCHAR(45) NOT NULL,

CQualification VARCHAR(45) NOT NULL,

UNIQUE (CEmail),

PRIMARY KEY (CID)

);

"""

Create_Job_Table = """

CREATE TABLE IF NOT EXISTS mydb.Job (

RID INT NOT NULL,

JID INT NOT NULL AUTO_INCREMENT,

JobRole VARCHAR(45) NOT NULL,

JobType VARCHAR(45) NOT NULL,

Qualification VARCHAR(45) NOT NULL,

MinExp INT NOT NULL,

Salary INT NOT NULL,

FOREIGN KEY (RID) REFERENCES mydb.Recruiter(RID),


PRIMARY KEY (JID)

);

"""

Create_Application_Table="""

CREATE TABLE IF NOT EXISTS mydb.Application(

AID INT NOT NULL AUTO_INCREMENT,

RID INT NOT NULL,

JID INT NOT NULL,

CID INT NOT NULL,

PRIMARY KEY(AID),

FOREIGN KEY(RID) REFERENCES mydb.Recruiter(RID),

FOREIGN KEY(JID) REFERENCES mydb.Job(JID),

FOREIGN KEY(CID) REFERENCES mydb.Client(CID)

);
"""
Client.py

from tkinter import *

from tkinter import ttk

from tkinter import messagebox, Label

from tkinter_uix.Entry import Entry

import mysql.connector as sql

import modules.login as l

from modules.creds import user_pwd

def get_details(email):

global name, location, gen, clicid


q = f'select CName,CLocation,CGender,CID from mydb.client where CEmail="{email}"'

mycon = sql.connect(host='localhost', user='root',

passwd=user_pwd, database='mydb')

cur = mycon.cursor()

cur.execute(q)

d = cur.fetchall()

mycon.close()

name = d[0][0]

location = d[0][1]

gen = d[0][2]

clicid = d[0][3]

def logi(root):

try:

bg.destroy()

except:

pass

l.log(root)

# ---------------------------------------------Apply a Job---------------------------------------------------

def apply(table):

# fetch cid,jid from treeview that is in available jobs function


# code

selectedindex = table.focus() # that will return number index

# that will return list of values with columns=['JID','JobRole', 'JobType', 'CompanyName',


'CompanyLocation', 'Qualification','MinExp', 'Salary']

selectedvalues = table.item(selectedindex, 'values')

ajid = selectedvalues[0]

chkquery = f'SELECT * from mydb.application where cid={clicid} and jid={ajid}'

mycon = sql.connect(host='localhost', user='root',

passwd=user_pwd, database='mydb')

cur = mycon.cursor()

cur.execute(chkquery)

tempbuff = cur.fetchall()

mycon.close()

if(tempbuff):

messagebox.showinfo(

'Oops', 'It seems like you have already applied to this job')

else:

queryapplyjob = f'Insert into application values(NULL,(select rid from mydb.job where


job.jid={ajid}),{ajid},{clicid})'

mycon = sql.connect(host='localhost', user='root',

passwd=user_pwd, database='mydb')

cur = mycon.cursor()

cur.execute(queryapplyjob)

mycon.commit()

mycon.close()

messagebox.showinfo('Thanks', 'Your application has been submitted')


# ----------------------------------------------Delete A Job -----------------------------------

def delet(table):

selectedindex = table.focus()

selectedvalues = table.item(selectedindex, 'values')

aaid = selectedvalues[0]

mycon = sql.connect(host='localhost', user='root',

passwd=user_pwd, database='mydb')

cur = mycon.cursor()

cur.execute(

f'delete from mydb.application where aid={aaid}')

mycon.commit()

mycon.close()

messagebox.showinfo('Thanks', 'Your application has been Deleted')

myapp()

# -------------------------------------------- Sort Queries


--------------------------------------------------------

def sort_alljobs(table):

criteria = search_d.get()

if(criteria == "Select"):

pass

else:
table.delete(*table.get_children())

mycon = sql.connect(host='localhost', user='root',

passwd=user_pwd, database='mydb')

cur = mycon.cursor()

cur.execute(

f'select job.JID,job.JobRole,job.JobType, recruiter.CompanyName,


recruiter.CompanyLocation, job.Qualification, job.MinExp, job.Salary from mydb.job JOIN
mydb.recruiter ON job.rid=recruiter.rid order by {criteria}')

jobs = cur.fetchall()

mycon.close()

i=0

for r in jobs:

table.insert('', i, text="", values=(

r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7]))

i += 1

def sort_myapplications(table):

criteria = search_d.get()

if(criteria == "Select"):

pass

else:

table.delete(*table.get_children())

mycon = sql.connect(host='localhost', user='root',

passwd=user_pwd, database='mydb')

cur = mycon.cursor()
cur.execute(

f'SELECT application.aid,job.JobRole, job.JobType, recruiter.CompanyName,


recruiter.CompanyLocation, job.qualification, job.minexp, job.salary FROM application
JOIN recruiter ON application.rid=recruiter.rid JOIN job ON application.jid=job.jid where
application.CID={clicid} order by {criteria}')

jobs = cur.fetchall()

mycon.close()

i=0

for r in jobs:

table.insert('', i, text="", values=(

r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7]))

i += 1

# ----------------------------------------------Show all Jobs-----------------------------------------------

def showalljobs(table):

mycon = sql.connect(host='localhost', user='root',

passwd=user_pwd, database='mydb')

cur = mycon.cursor()

cur.execute(

f'select job.JID,job.JobRole,job.JobType, recruiter.CompanyName,


recruiter.CompanyLocation, job.Qualification, job.MinExp, job.Salary from mydb.job JOIN
mydb.recruiter ON job.rid=recruiter.rid')

jobs = cur.fetchall()

mycon.close()

i=0

for r in jobs:
table.insert('', i, text="", values=(

r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7]))

i += 1

# ----------------------------------------------Show my
Applications-----------------------------------------------------

def show_myapplications(table):

mycon = sql.connect(host='localhost', user='root',

passwd=user_pwd, database='mydb')

cur = mycon.cursor()

cur.execute(

f'SELECT application.aid,job.JobRole, job.JobType, recruiter.CompanyName,


recruiter.CompanyLocation, job.qualification, job.minexp, job.salary FROM application
JOIN recruiter ON application.rid=recruiter.rid JOIN job ON application.jid=job.jid where
application.CID={clicid}')

applications = cur.fetchall()

mycon.close()

print(applications)

i=0

for x in applications:

table.insert('', i, text="", values=(

x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7]))

i += 1
# ----------------------------------------------Available
Jobs----------------------------------------------------

def available():

mycon = sql.connect(host='localhost', user='root',

passwd=user_pwd, database='mydb')

cur = mycon.cursor()

for widget in rt.winfo_children():

widget.destroy()

for widget in tab.winfo_children():

widget.destroy()

bgr.destroy()

search_l = Label(rt, text="Order By : ", font=(

'normal', 18), bg="#ffffff")

search_l.grid(row=0, column=0, padx=10, pady=10)

global search_d

search_d = ttk.Combobox(rt, width=12, font=(

'normal', 18), state='readonly')

search_d['values'] = ('Select', 'JobRole', 'JobType', 'CompanyLocation')

search_d.current(0)

search_d.grid(row=0, column=2, padx=0, pady=10)

search = Button(rt, text="Sort", font=('normal', 12, 'bold'),

bg="#00b9ed", fg="#ffffff", command=lambda: sort_alljobs(table))

search.grid(row=0, column=3, padx=10, pady=10, ipadx=15)


apl = Button(rt, text="Apply", font=('normal', 12, 'bold'),

bg="#00b9ed", fg="#ffffff", command=lambda: apply(table))

apl.grid(row=0, column=4, padx=10, pady=10, ipadx=5)

scx = Scrollbar(tab, orient="horizontal")

scy = Scrollbar(tab, orient="vertical")

table = ttk.Treeview(tab, columns=('JID', 'JobRole', 'JobType', 'CompanyName',


'CompanyLocation', 'Qualification', 'MinExp', 'Salary'),

xscrollcommand=scx.set, yscrollcommand=scy.set)

scx.pack(side="bottom", fill="x")

scy.pack(side="right", fill="y")

table.heading("JID", text="JID")

table.heading("JobRole", text="JobRole")

table.heading("JobType", text="JobType")

table.heading("CompanyName", text='CompanyName')

table.heading("CompanyLocation", text="CompanyLocation")

table.heading("Qualification", text='Qualification')

table.heading("MinExp", text='MinExp')

table.heading("Salary", text="Salary")

table['show'] = 'headings'

scx.config(command=table.xview)

scy.config(command=table.yview)
table.column("JID", width=100)

table.column("JobRole", width=150)

table.column("JobType", width=150)

table.column("CompanyName", width=150)

table.column("CompanyLocation", width=150)

table.column("Qualification", width=100)

table.column("MinExp", width=100)

table.column("Salary", width=150)

showalljobs(table)

table.pack(fill="both", expand=1)

mycon.close()

# -----------------------------------------My
Applictions----------------------------------------------------------------

def myapp():

mycon = sql.connect(host='localhost', user='root',

passwd=user_pwd, database='mydb')

cur = mycon.cursor()

for widget in rt.winfo_children():

widget.destroy()

for widget in tab.winfo_children():

widget.destroy()

bgr.destroy()

search_l = Label(rt, text="Order By : ", font=('normal', 18), bg="#ffffff")


search_l.grid(row=0, column=0, padx=10, pady=10)

global search_d

search_d = ttk.Combobox(rt, width=12, font=(

'normal', 18), state='readonly')

search_d['values'] = ('Select', 'JobRole', 'JobType', 'CompanyLocation')

search_d.current(0)

search_d.grid(row=0, column=2, padx=0, pady=10)

search = Button(rt, text="Sort", font=('normal', 12, 'bold'), bg="#00b9ed",

fg="#ffffff", command=lambda: sort_myapplications(table))

search.grid(row=0, column=3, padx=10, pady=10, ipadx=15)

dlt = Button(rt, text="Delete", font=('normal', 12, 'bold'),

bg="#00b9ed", fg="#ffffff", command=lambda: delet(table))

dlt.grid(row=0, column=4, padx=10, pady=10, ipadx=5)

scx = Scrollbar(tab, orient="horizontal")

scy = Scrollbar(tab, orient="vertical")

table = ttk.Treeview(tab, columns=('AID', 'JobRole', 'JobType', 'CompanyName',


'CompanyLocation', 'Qualification', 'MinExp', 'Salary'),

xscrollcommand=scx.set, yscrollcommand=scy.set)

scx.pack(side="bottom", fill="x")

scy.pack(side="right", fill="y")

table.heading("AID", text="AID")

table.heading("JobRole", text="JobRole")

table.heading("JobType", text="JobType")
table.heading("CompanyName", text='CompanyName')

table.heading("CompanyLocation", text="CompanyLocation")

table.heading("Qualification", text='Qualification')

table.heading("MinExp", text='MinExp')

table.heading("Salary", text="Salary")

table['show'] = 'headings'

scx.config(command=table.xview)

scy.config(command=table.yview)

table.column("AID", width=50)

table.column("JobRole", width=150)

table.column("JobType", width=150)

table.column("CompanyName", width=150)

table.column("CompanyLocation", width=150)

table.column("Qualification", width=100)

table.column("MinExp", width=100)

table.column("Salary", width=150)

show_myapplications(table)

table.pack(fill="both", expand=1)

mycon.close()

#
----------------------------------------------------------------------------------------------------------------
-----------
def cli(root, email1):

global email

email = email1

bg = Frame(root, width=1050, height=700)

bg.place(x=0, y=0)

get_details(email)

bg.load = PhotoImage(file=f'elements\\bg{gen}.png')

img = Label(root, image=bg.load)

img.place(x=0, y=0)

# Navbar

nm = Label(root, text=f'{name}', font=(

'normal', 36, 'bold'), bg="#ffffff", fg="#0A3D62")

nm.place(x=300, y=50)

cp = Label(root, text=f'{location}', font=(

'normal', 24), bg="#ffffff", fg="#0A3D62")

cp.place(x=300, y=120)

bn = Button(root, text="LOGOUT", font=('normal', 20),

bg="#b32e2e", fg="#ffffff", command=lambda: logi(root))

bn.place(x=800, y=75)

# Left

lf = Frame(root, width=330, height=440, bg="#ffffff")


lf.place(x=60, y=240)

pj = Button(lf, text="Available Jobs", font=(

'normal', 20), bg="#b32e2e", fg="#ffffff", command=available)

pj.grid(row=0, column=0, padx=60, pady=70)

ap = Button(lf, text="My Applications", font=(

'normal', 20), bg="#b32e2e", fg="#ffffff", command=myapp)

ap.grid(row=1, column=0, padx=60, pady=70)

# Right

global rt, tab, bgr

rt = Frame(root, width=540, height=420, bg="#ffffff")

rt.place(x=450, y=220)

tab = Frame(root, bg="#FFFFFF")

tab.place(x=460, y=300, width=520, height=350)

bgrf = Frame(root, width=540, height=420)

bgrf.load = PhotoImage(file="elements\\bgr.png")

bgr = Label(root, image=bgrf.load, bg="#00b9ed")

bgr.place(x=440, y=210)

# root = Tk()

# root.geometry("1050x700")

# root.title("Client")

# root.resizable(0, 0)

# cli()
# root.mainloop()
login.py
from tkinter import *
from tkinter import messagebox
from tkinter_uix.Entry import Entry
import mysql.connector as sql
from modules.register import *
from modules.recruiter import *
from modules.client import *
from modules.creds import user_pwd

def success(root, email1):


global f
f1.destroy()
try:
r1.destroy()
except:
pass

s = f'select type from users where email="{email1}"'


mycon = sql.connect(host='localhost', user='root',
passwd=user_pwd, database='mydb')
cur = mycon.cursor()
cur.execute(s)
q = cur.fetchall()
mycon.close()
print(q)

if q[0][0] == "recruiter":
rec(root, email1)
else:
cli(root, email1)

def submit(root):
mycon = sql.connect(host='localhost', user='root',
passwd=user_pwd, database='mydb')
cur = mycon.cursor()
cur.execute('select email,password from users')
total = cur.fetchall()
mycon.close()
email1 = email.get()
password = pwd.get()
if email1 and password:
for i in total:
if email1 == i[0] and password == i[1]:
return success(root, email1)
elif email1 == i[0] and password != i[1]:
messagebox.showinfo('Alert!', 'Invalid Credentials')
break
else:
messagebox.showinfo(
'Alert!', 'Email is not registered, Please register')
else:
messagebox.showinfo(
'Alert!', 'Please Enter both Email and Password')

def reg(root):
try:
f1.destroy()
except:
pass
mai(root)

def log(root):
global f1, email, pwd
try:
f2.destroy()
except:
pass
f1 = Frame(root, width=1050, height=700, bg='#FFFFFF')
f1.place(x=0, y=0)

# Background
f1.render = PhotoImage(file='elements\\bg.png')
img = Label(f1, image=f1.render)
img.place(x=0, y=0)

# Email
email_l = Label(f1, text="Email : ", bg='#FFFFFF',
font=('normal', 20, 'bold'), fg="#00B9ED")
email_l.place(x=620, y=300)
email = Entry(f1, width=24, placeholder="Enter your Email..")
email.place(x=720, y=300)

# Password
pwd_l = Label(f1, text="Password : ", bg='#FFFFFF',
font=('normal', 20, 'bold'), fg="#00B9ED")
pwd_l.place(x=565, y=350)
pwd = Entry(f1, show="*", width=24, placeholder="Enter your Password..")
pwd.place(x=720, y=350)

# Buttons
f1.bn = PhotoImage(file="elements\\login2.png")
btn = Button(f1, image=f1.bn, bg='#FFFFFF', bd=0,
activebackground="#ffffff", command=lambda: submit(root))
btn.place(x=820, y=420)

f1.bn1 = PhotoImage(file="elements\\reg.png")
btn1 = Button(f1, image=f1.bn1, bg='#FFFFFF', bd=0,
activebackground="#ffffff", command=lambda: reg(root))
btn1.place(x=620, y=420)
recruiter.py
from tkinter import *
from tkinter import ttk
from tkinter import messagebox, Label
from tkinter_uix.Entry import Entry
import mysql.connector as sql
import modules.login as l
from modules.creds import user_pwd

def get_details(email):
global name, company, gen, recid
q = f'select RName,CompanyName,RGender,RID from mydb.recruiter where REmail="{email}"'
mycon = sql.connect(host='localhost', user='root',
passwd=user_pwd, database='mydb')
cur = mycon.cursor()
cur.execute(q)
d = cur.fetchall()
mycon.close()

name = d[0][0]
company = d[0][1]
gen = d[0][2]
recid = d[0][3]
def logi(root):
try:
bg.destroy()
except:
pass
l.log(root)
def submit_job():
global role1, jtype1, qual1, exp1, sal1
role1 = role.get()
jtype1 = jtype.get()
qual1 = qual.get()
exp1 = exp.get()
sal1 = sal.get()
print(role1, jtype1, qual1, exp1, sal1)
if role1 and jtype1 and qual1 and exp1 and sal1:
if jtype1 == "Select":
messagebox.showinfo('ALERT!', 'Please provide Job Type')
else:
exe1 = f'INSERT INTO mydb.Job(RID, JID, JobRole, JobType, Qualification, MinExp, Salary)
VALUES({recid}, NULL, "{role1}", "{jtype1}", "{qual1}", {exp1}, {sal1})'
try:
mycon = sql.connect(host='localhost', user='root',passwd=user_pwd, database='mydb')
cur = mycon.cursor()
cur.execute(exe1)
role.delete(0, END)
jtype.delete(0, END)
qual.delete(0, END)
exp.delete(0, END)
sal.delete(0, END)
mycon.commit()
mycon.close()
messagebox.showinfo('SUCCESS!', 'You have successfully created a Job')
except:
pass
else:
messagebox.showinfo('ALERT!', 'ALL FIELDS ARE MUST BE FILLED')

# -------------------------------------------- Sort Queries --------------------------------------------------------


def sort_all(table):
criteria = search_d.get()
if(criteria == "Select"):
pass
else:
table.delete(*table.get_children())
mycon = sql.connect(host='localhost', user='root',
passwd=user_pwd, database='mydb')

cur = mycon.cursor()
cur.execute(
f'select RID,JID, JobRole, JobType, Qualification, MinExp, Salary FROM mydb.Job where
RID={recid} order by {criteria}')
all_jobs = cur.fetchall()
mycon.close()
i=0
for r in all_jobs:
table.insert('', i, text="", values=(
r[1], r[2], r[3], r[4], r[5], r[6]))
i += 1

def sort_applicants(table):
criteria = search_d.get()
if(criteria == "Select"):
pass
else:
table.delete(*table.get_children())
mycon = sql.connect(host='localhost', user='root',
passwd=user_pwd, database='mydb')

cur = mycon.cursor()
cur.execute(
f'SELECT job.JobRole, client.CName, client.CEmail, client.CAge, client.CLocation,
client.CGender, client.CExp, client.CSkills, client.CQualification FROM application JOIN client ON
application.cid=client.CID JOIN job ON job.jid=application.jid where job.rid={recid} order by
{criteria}')
applicats = cur.fetchall()
mycon.close()
print(applicats)
i=0
for x in applicats:
table.insert('', i, text="", values=(
x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8]))
i += 1
# ----------------------------------------------Posted jobs Query-----------------------------------------------

def show_all(table):
mycon = sql.connect(host='localhost', user='root',
passwd=user_pwd, database='mydb')
cur = mycon.cursor()
cur.execute(
f'select RID,JID, JobRole, JobType, Qualification, MinExp, Salary FROM mydb.Job where
RID={recid}')
all_jobs = cur.fetchall()
mycon.close()
i=0
for r in all_jobs:
table.insert('', i, text="", values=(
r[1], r[2], r[3], r[4], r[5], r[6]))
i += 1

# ----------------------------------------------Applicants-----------------------------------------------------

def show_applicants(table):
mycon = sql.connect(host='localhost', user='root',
passwd=user_pwd, database='mydb')
cur = mycon.cursor()
cur.execute(
f'SELECT job.JobRole, client.CName, client.CEmail, client.CAge, client.CLocation, client.CGender,
client.CExp, client.CSkills, client.CQualification FROM application JOIN client ON
application.cid=client.CID JOIN job ON job.jid=application.jid where job.rid={recid}')
applicats = cur.fetchall()
mycon.close()
print(applicats)
i=0
for x in applicats:
table.insert('', i, text="", values=(
x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8]))
i += 1

# ---------------------------------------------Post a Job---------------------------------------------------
def create():
global role, jtype, qual, exp, sal
for widget in rt.winfo_children():
widget.destroy()
for widget in tab.winfo_children():
widget.destroy()
bgr.destroy()
# Create Form
f1 = Frame(rt, width=520)
f1.load = PhotoImage(file="elements\\create.png")
img = Label(rt, image=f1.load, bg="#FFFFFF")
img.grid(row=0, column=1, padx=150, pady=10)

# Form
# Labels
role_l = Label(tab, text="Role :", font=(
'normal', 18, 'bold'), bg="#FFFFFF")
role_l.grid(row=0, column=0, pady=10, padx=10)
type_l = Label(tab, text="Type :", font=(
'normal', 18, 'bold'), bg="#FFFFFF")
type_l.grid(row=1, column=0, pady=10, padx=10)
qual_l = Label(tab, text="Qualification :", font=(
'normal', 18, 'bold'), bg="#FFFFFF")
qual_l.grid(row=2, column=0, pady=10, padx=10)
exp_l = Label(tab, text="Experience :", font=(
'normal', 18, 'bold'), bg="#FFFFFF")
exp_l.grid(row=3, column=0, pady=10, padx=10)
sal_l = Label(tab, text="Salary :", font=(
'normal', 18, 'bold'), bg="#FFFFFF")
sal_l.grid(row=4, column=0, pady=10, padx=10)

# Entries
style = ttk.Style(tab)
style.configure("TCombobox", background="white",
foreground="#696969")

role = Entry(tab, placeholder="Enter Job Role")


role.grid(row=0, column=1, pady=10, padx=10)
jtype = ttk.Combobox(tab, font=("normal", 18),
width=23, state='readonly')
jtype['values'] = ('Select', 'FullTime', 'PartTime', 'Intern')
jtype.current(0)
jtype.grid(row=1, column=1, pady=10, padx=10)
qual = Entry(tab, placeholder="Enter Job Qualifications")
qual.grid(row=2, column=1, pady=10, padx=10)
exp = Entry(tab, placeholder="Enter Minimum Experience")
exp.grid(row=3, column=1, pady=10, padx=10)
sal = Entry(tab, placeholder="Enter Expected salary")
sal.grid(row=4, column=1, pady=10, padx=10)

btn = Button(tab, text="Submit", font=(20), bg="#45CE30",


fg="#FFFFFF", command=submit_job)
btn.grid(row=5, column=1, pady=15)

# -------------------------------------------------Delete A Posted
Job----------------------------------------------------------
def deletjob(table):
selectedindex = table.focus()
selectedvalues = table.item(selectedindex, 'values')
ajid = selectedvalues[0]
mycon = sql.connect(host='localhost', user='root',
passwd=user_pwd, database='mydb')
cur = mycon.cursor()
cur.execute(f'delete from mydb.application where jid={ajid}')
cur.execute(f'delete from mydb.job where jid={ajid}')
mycon.commit()
mycon.close()
messagebox.showinfo('Thanks', 'Your Job has been Deleted')
posted()

# ----------------------------------------------Posted Jobs by Recruiter----------------------------------------------------

def posted():
for widget in rt.winfo_children():
widget.destroy()
for widget in tab.winfo_children():
widget.destroy()
bgr.destroy()

search_l = Label(rt, text="Order By : ", font=(


'normal', 18), bg="#ffffff")
search_l.grid(row=0, column=0, padx=10, pady=10)
global search_d
search_d = ttk.Combobox(rt, width=12, font=(
'normal', 18), state='readonly')
search_d['values'] = ('Select', 'JobRole', 'JobType')
search_d.current(0)
search_d.grid(row=0, column=2, padx=0, pady=10)
search = Button(rt, text="Sort", font=('normal', 12, 'bold'),
bg="#00b9ed", fg="#ffffff", command=lambda: sort_all(table))
search.grid(row=0, column=3, padx=10, pady=10, ipadx=15)
dlt = Button(rt, text="Delete", font=('normal', 12, 'bold'),
bg="#00b9ed", fg="#ffffff", command=lambda: deletjob(table))
dlt.grid(row=0, column=4, padx=10, pady=10, ipadx=5)

scx = Scrollbar(tab, orient="horizontal")


scy = Scrollbar(tab, orient="vertical")

table = ttk.Treeview(tab, columns=('JID', 'JobRole', 'JobType', 'Qualification', 'MinExp', 'Salary'),


xscrollcommand=scx.set, yscrollcommand=scy.set)
scx.pack(side="bottom", fill="x")
scy.pack(side="right", fill="y")
table.heading("JID", text="JobID")
table.heading("JobRole", text="Role")
table.heading("JobType", text='Type')
table.heading("Qualification", text='Qualification')
table.heading("MinExp", text='MinExp')
table.heading("Salary", text="Salary")

table['show'] = 'headings'

scx.config(command=table.xview)
scy.config(command=table.yview)

table.column("JID", width=100)
table.column("JobRole", width=150)
table.column("JobType", width=150)
table.column("Qualification", width=100)
table.column("MinExp", width=100)
table.column("Salary", width=150)
show_all(table)
table.pack(fill="both", expand=1)

# -----------------------------------------Applications on your recruiters posted


jobs----------------------------------------------------------------
def app():
for widget in rt.winfo_children():
widget.destroy()
for widget in tab.winfo_children():
widget.destroy()
bgr.destroy()

search_l = Label(rt, text="Order By : ", font=('normal', 18), bg="#ffffff")


search_l.grid(row=0, column=0, padx=10, pady=10)
global search_d
search_d = ttk.Combobox(rt, width=12, font=(
'normal', 18), state='readonly')
search_d['values'] = ('Select', 'JobRole', 'CName', 'CLocation')
search_d.current(0)
search_d.grid(row=0, column=2, padx=10, pady=10)
search = Button(rt, text="Sort", font=('normal', 12, 'bold'),
bg="#00b9ed", fg="#ffffff", command=lambda: sort_applicants(table))
search.grid(row=0, column=3, padx=45, pady=10, ipadx=30)

scx = Scrollbar(tab, orient="horizontal")


scy = Scrollbar(tab, orient="vertical")

table = ttk.Treeview(tab, columns=('JobRole', 'CName', 'CEmail', 'CAge', 'CLocation', 'CGender',


'CExp', 'CSkills', 'CQualification'),
xscrollcommand=scx.set, yscrollcommand=scy.set)
scx.pack(side="bottom", fill="x")
scy.pack(side="right", fill="y")

table.heading("JobRole", text="Job Role")


table.heading("CName", text='Applicants Name')
table.heading("CEmail", text='Email')
table.heading("CAge", text='Age')
table.heading("CLocation", text='Location')
table.heading("CGender", text='Gender')
table.heading("CExp", text='Experience')
table.heading("CSkills", text='Skills')
table.heading("CQualification", text='Qualification')

table['show'] = 'headings'

scx.config(command=table.xview)
scy.config(command=table.yview)

table.column("JobRole", width=150)
table.column("CName", width=200)
table.column("CEmail", width=100)
table.column("CAge", width=50)
table.column("CLocation", width=150)
table.column("CGender", width=100)
table.column("CExp", width=100)
table.column("CSkills", width=200)
table.column("CQualification", width=150)
show_applicants(table)
table.pack(fill="both", expand=1)

# ---------------------------------------------------------------------------------------------------------------------------
def rec(root, email1):
global email
email = email1
bg = Frame(root, width=1050, height=700)
bg.place(x=0, y=0)

get_details(email)

bg.load = PhotoImage(file=f'elements\\bg{gen}.png')
img = Label(root, image=bg.load)
img.place(x=0, y=0)

# Navbar
nm = Label(root, text=f'{name}', font=(
'normal', 36, 'bold'), bg="#ffffff", fg="#0A3D62")
nm.place(x=300, y=50)
cp = Label(root, text=f'{company}', font=(
'normal', 24), bg="#ffffff", fg="#0A3D62")
cp.place(x=300, y=120)
bn = Button(root, text="LOGOUT", font=(
'normal', 20), bg="#b32e2e", fg="#ffffff", command=lambda: logi(root))
bn.place(x=800, y=75)

# Left
lf = Frame(root, width=330, height=440, bg="#ffffff")
lf.place(x=60, y=220)
cj = Button(lf, text="Post a Job", font=(
'normal', 20), bg="#b32e2e", fg="#ffffff", command=create)
cj.grid(row=0, column=0, padx=80, pady=40)
pj = Button(lf, text="Posted Jobs", font=(
'normal', 20), bg="#b32e2e", fg="#ffffff", command=posted)
pj.grid(row=1, column=0, padx=80, pady=40)
ap = Button(lf, text="Applications", font=(
'normal', 20), bg="#b32e2e", fg="#ffffff", command=app)
ap.grid(row=2, column=0, padx=80, pady=40)

# Right
global rt, tab, bgr
rt = Frame(root, width=540, height=420, bg="#ffffff")
rt.place(x=450, y=220)
tab = Frame(root, bg="#FFFFFF")
tab.place(x=460, y=300, width=520, height=350)
bgrf = Frame(root, width=540, height=420)
bgrf.load = PhotoImage(file="elements\\bgr.png")
bgr = Label(root, image=bgrf.load, bg="#00b9ed")
bgr.place(x=440, y=210)
register.py
from tkinter import *
from tkinter import ttk
from tkinter import messagebox, Label
from tkinter_uix.Entry import Entry
import mysql.connector as sql
import modules.login as l
from modules.creds import user_pwd

def logi(root):
try:
r2.destroy()
r3.destroy()
except:
pass
l.log(root)

def mai(root):
try:
r2.destroy()
except:
pass
global r1
r1 = Frame(root, height=700, width=1050)
r1.place(x=0, y=0)
r1.render = PhotoImage(file="elements/Registration_bg.png")
img = Label(r1, image=r1.render)
img.place(x=0, y=0)
r1.Img1 = PhotoImage(file="elements/recruiter_element.png")
recruit = Button(r1, image=r1.Img1, border=0, bg="#03DDEE",
relief="raised", activebackground="#03EAFD", command=lambda: recruiter_regis(root))
recruit.place(x=140, y=340)
r1.Img2 = PhotoImage(file="elements/client_element.png")
recruit2 = Button(r1, image=r1.Img2, border=0, bg="#05edFC",
relief="raised", activebackground="#05F6FD", command=lambda: client_regis(root))
recruit2.place(x=360, y=340)
r1.bn = PhotoImage(file="elements\\backlogin.png")
btn = Button(r1, image=r1.bn, bg='#05e4f6',
bd=0, activebackground="#05e4f6", command=lambda: logi(root))
btn.place(x=220, y=550)

def recruiter_regis(root):
global name, email, pwd, cpwd
print("hello recruiter")
r1.destroy()
r2 = Frame(root, height=700, width=1050)
r2.place(x=0, y=0)
r2.render = PhotoImage(file="elements/reg_bg.png")
img = Label(r2, image=r2.render)
img.place(x=0, y=0)
name_l = Label(r2, text="Name : ", bg='#FFFFFF', fg="#00B9ED",
font=('normal', 20, 'bold'))
name_l.place(x=100, y=250)
name = Entry(r2, placeholder='Enter Your Full Name...', width=20)
name.place(x=290, y=250)

email_l = Label(r2, text="Email : ", bg='#FFFFFF', fg="#00B9ED",


font=('normal', 20, 'bold'))
email_l.place(x=100, y=300)
email = Entry(r2, placeholder='Email', width=20)
email.place(x=290, y=300)

pwd_l = Label(r2, text="Password : ", bg='#FFFFFF', fg="#00B9ED",


font=('normal', 20, 'bold'))
pwd_l.place(x=100, y=350)
pwd = Entry(r2, placeholder='Password', show="*", width=20)
pwd.place(x=290, y=350)

con_pwd_l = Label(r2, text="Confirm : ", bg='#FFFFFF', fg="#00B9ED",


font=('normal', 20, 'bold'))
con_pwd_l.place(x=100, y=400)
cpwd = Entry(r2, placeholder='Confirm Password', show="*", width=20)
cpwd.place(x=290, y=400)

r2.bn = PhotoImage(file="elements\\next1.png")
btn = Button(r2, image=r2.bn, bg='#FFFFFF', bd=0,
activebackground="#ffffff", command=lambda: recruiter_check(root))
btn.place(x=320, y=500)
r2.back = PhotoImage(file="elements\\back.png")
btn2 = Button(r2, image=r2.back, bg='#FFFFFF', bd=0,
activebackground="#ffffff", command=lambda: mai(root))
btn2.place(x=120, y=500)

def recruiter_check(root):
global name1, email1, pwd1, cpwd1
name1 = name.get()
email1 = email.get()
pwd1 = pwd.get()
cpwd1 = cpwd.get()
print(name1, email1, pwd1, cpwd1)
if name1 and email1 and pwd1 and cpwd1:
mycon = sql.connect(host='localhost', user='root',
passwd=user_pwd, database='mydb')
cur = mycon.cursor()
cur.execute('select email from users')
total = cur.fetchall()
mycon.close()
exist_email = []
for i in total:
exist_email.append(i[0])
print("existing users:", exist_email)

if email1 in exist_email:
messagebox.showinfo('ALERT!', 'EMAIL ALREADY REGISTERED')
email.delete(0, END)

else:
if pwd1 == cpwd1:
recruit_complete(root)
else:
messagebox.showinfo('ALERT!', 'PASSWORDS DO NOT MATCH')

else:
messagebox.showinfo('ALERT!', 'ALL FIELDS ARE MUST BE FILLED')

def recruit_complete(root):
print("hello ", name1, ", Let's complete your profile")
r3 = Frame(root, height=700, width=1050)
r3.place(x=0, y=0)
r3.render = PhotoImage(file="elements/reg_bg.png")
img = Label(r3, image=r3.render)
img.place(x=0, y=0)

global gender, company, loc


gender = StringVar()
style = ttk.Style(r3)
style.configure("TRadiobutton", background="white",
foreground="#696969", font=("arial", 16, "bold"))

gender_l = Label(r3, text="Gender : ", bg='#FFFFFF', fg="#00B9ED",


font=('normal', 20, 'bold'))
gender_l.place(x=100, y=250)
ttk.Radiobutton(r3, text="Male", value="M", variable=gender).place(
x=300, y=250)
ttk.Radiobutton(r3, text="Female", value="F", variable=gender).place(
x=400, y=250)

company_l = Label(r3, text="Company : ", bg='#FFFFFF', fg="#00B9ED",


font=('normal', 20, 'bold'))
company_l.place(x=100, y=300)
company = Entry(r3, placeholder='Company', width=20)
company.place(x=290, y=300)

loc_l = Label(r3, text="Location : ", bg='#FFFFFF', fg="#00B9ED",


font=('normal', 20, 'bold'))
loc_l.place(x=100, y=350)
loc = Entry(r3, placeholder='Location', width=20)
loc.place(x=290, y=350)

r3.bn = PhotoImage(file="elements\\reg.png")
btn = Button(r3, image=r3.bn, bg='#FFFFFF', bd=0,
activebackground="#ffffff", command=lambda: recruiter_submit(root))
btn.place(x=320, y=500)

def recruiter_submit(root):
global gender1, company1, loc1
gender1 = gender.get()
company1 = company.get()
loc1 = loc.get()
print(name1, email1, gender1, company1, loc1)
if gender1 and company1 and loc1:
exe = f'insert into users values("{name1}","{email1}","recruiter","{pwd1}")'
exe1 = f'INSERT INTO mydb.Recruiter(RID, RName, REmail, CompanyName,
CompanyLocation ,RGender) VALUES
(NULL,"{name1}","{email1}","{company1}","{loc1}","{gender1}")'
try:
mycon = sql.connect(host='localhost', user='root',
passwd=user_pwd, database='mydb')
cur = mycon.cursor()
cur.execute(exe)
cur.execute(exe1)
name.delete(0, END)
email.delete(0, END)
pwd.delete(0, END)
cpwd.delete(0, END)
# gender.delete(0, END)
loc.delete(0, END)
company.delete(0, END)
mycon.commit()
mycon.close()
messagebox.showinfo('SUCCESS!', 'Registration Successful')
logi(root)
except:
pass

else:
messagebox.showinfo('ALERT!', 'ALL FIELDS ARE MUST BE FILLED')

def client_regis(root):
global name, email, pwd, cpwd
print("hello client")
r1.destroy()
r2 = Frame(root, height=700, width=1050)
r2.place(x=0, y=0)
r2.render = PhotoImage(file="elements/reg_bg.png")
img = Label(r2, image=r2.render)
img.place(x=0, y=0)

name_l = Label(r2, text="Name : ", bg='#FFFFFF', fg="#00B9ED",


font=('normal', 20, 'bold'))
name_l.place(x=100, y=250)
name = Entry(r2, placeholder='Enter Your Full Name...', width=20)
name.place(x=290, y=250)

email_l = Label(r2, text="Email : ", bg='#FFFFFF', fg="#00B9ED",


font=('normal', 20, 'bold'))
email_l.place(x=100, y=300)
email = Entry(r2, placeholder='Email', width=20)
email.place(x=290, y=300)

pwd_l = Label(r2, text="Password : ", bg='#FFFFFF', fg="#00B9ED",


font=('normal', 20, 'bold'))
pwd_l.place(x=100, y=350)
pwd = Entry(r2, placeholder='Password', show="*", width=20)
pwd.place(x=290, y=350)

con_pwd_l = Label(r2, text="Confirm : ", bg='#FFFFFF', fg="#00B9ED",


font=('normal', 20, 'bold'))
con_pwd_l.place(x=100, y=400)
cpwd = Entry(r2, placeholder='Confirm Password', show="*", width=20)
cpwd.place(x=290, y=400)

r2.bn = PhotoImage(file="elements\\next1.png")
btn = Button(r2, image=r2.bn, bg='#FFFFFF', bd=0,
activebackground="#ffffff", command=lambda: client_check(root))
btn.place(x=320, y=500)

r2.back = PhotoImage(file="elements\\back.png")
btn2 = Button(r2, image=r2.back, bg='#FFFFFF', bd=0,
activebackground="#ffffff", command=lambda: mai(root))
btn2.place(x=120, y=500)

def client_check(root):
global name1, email1, pwd1, cpwd1
name1 = name.get()
email1 = email.get()
pwd1 = pwd.get()
cpwd1 = cpwd.get()
print(name1, email1, pwd1, cpwd1)
if name1 and email1 and pwd1 and cpwd1:
mycon = sql.connect(host='localhost', user='root',
passwd=user_pwd, database='mydb')
cur = mycon.cursor()
cur.execute('select email from users')
total = cur.fetchall()
mycon.close()
exist_email = []
for i in total:
exist_email.append(i[0])
print("existing users:", exist_email)

if email1 in exist_email:
messagebox.showinfo('ALERT!', 'EMAIL ALREADY REGISTERED')
email.delete(0, END)

else:
if pwd1 == cpwd1:
client_complete(root)
else:
messagebox.showinfo('ALERT!', 'PASSWORDS DO NOT MATCH')

else:
messagebox.showinfo('ALERT!', 'ALL FIELDS ARE MUST BE FILLED')

def client_complete(root):
print("hello ", name1, ", Let's complete your profile")
r3 = Frame(root, height=700, width=1050)
r3.place(x=0, y=0)
r3.render = PhotoImage(file="elements/reg_bg.png")
img = Label(r3, image=r3.render)
img.place(x=0, y=0)

global gender, age, loc, workxp, qualification, skills


gender = StringVar()
style = ttk.Style(r3)
style.configure("TRadiobutton", background="white",
foreground="#696969", font=("arial", 16, "bold"))

gender_l = Label(r3, text="Gender : ", bg='#FFFFFF', fg="#00B9ED",


font=('normal', 20, 'bold'))
gender_l.place(x=100, y=200)
ttk.Radiobutton(r3, text="Male", value="M", variable=gender).place(
x=300, y=200)
ttk.Radiobutton(r3, text="Female", value="F", variable=gender).place(
x=400, y=200)

age_l = Label(r3, text="Age : ", bg='#FFFFFF', fg="#00B9ED",


font=('normal', 20, 'bold'))
age_l.place(x=100, y=250)
age = Entry(r3, placeholder='Age', width=20)
age.place(x=290, y=250)

loc_l = Label(r3, text="Location : ", bg='#FFFFFF', fg="#00B9ED",


font=('normal', 20, 'bold'))
loc_l.place(x=100, y=300)
loc = Entry(r3, placeholder='Location', width=20)
loc.place(x=290, y=300)

workxp_l = Label(r3, text="Experience : ", bg='#FFFFFF', fg="#00B9ED",


font=('normal', 20, 'bold'))
workxp_l.place(x=100, y=350)
workxp = Entry(r3, placeholder='Work Experience(yrs)', width=20)
workxp.place(x=290, y=350)

qualification_l = Label(r3, text="Qualification : ",


bg='#FFFFFF', fg="#00B9ED", font=('normal', 20, 'bold'))
qualification_l.place(x=100, y=400)
qualification = Entry(r3, placeholder='Btech/BE...', width=20)
qualification.place(x=290, y=400)

skills_l = Label(r3, text="Skills : ", bg='#FFFFFF',


fg="#00B9ED", font=('normal', 20, 'bold'))
skills_l.place(x=100, y=450)
skills = Entry(r3, placeholder='separated by comma', width=20)
skills.place(x=290, y=450)

r3.bn = PhotoImage(file="elements\\reg.png")
btn = Button(r3, image=r3.bn, bg='#FFFFFF', bd=0,
activebackground="#ffffff", command=lambda: client_submit(root))
btn.place(x=320, y=550)

def client_submit(root):
global gender1, age1, loc1, workxp1, qualification1, skills1
gender1 = gender.get()
age1 = age.get()
loc1 = loc.get()
workxp1 = workxp.get()
qualification1 = qualification.get()
skills1 = skills.get()
print(name1, email1, gender1, age1, loc1, workxp1, qualification1, skills1)
if gender1 and age1 and loc1 and workxp1:
exe = f'insert into users values("{name1}","{email1}","client","{pwd1}")'
exe1 = f'INSERT INTO mydb.Client(CID, CName , CEmail, CAge, CLocation, CGender, CExp, CSkills,
CQualification ) VALUES (NULL, "{name1}", "{email1}", {age1}, "{loc1}", "{gender1}", {workxp1},
"{skills1}", "{qualification1}");'
try:
mycon = sql.connect(host='localhost', user='root',
passwd=user_pwd, database='mydb')
cur = mycon.cursor()
cur.execute(exe)
cur.execute(exe1)
name.delete(0, END)
email.delete(0, END)
pwd.delete(0, END)
cpwd.delete(0, END)
# gender.delete(0, END)
loc.delete(0, END)
age.delete(0, END)
workxp.delete(0, END)
qualification.delete(0, END)
skills.delete(0, END)
mycon.commit()
mycon.close()
messagebox.showinfo('SUCCESS!', 'Registration Successful')
logi(root)
except:
pass
else:
messagebox.showinfo('ALERT!', 'ALL FIELDS ARE MUST BE FILLED')

Sample output:

You might also like