USE [DBEnvigoHr]
GO
/****** Object:  View [dbo].[vwPosition]    Script Date: 16-08-2019 11:46:52 ******/
DROP VIEW [dbo].[vwPosition]
GO
/****** Object:  Table [dbo].[tblUserLogin]    Script Date: 16-08-2019 11:46:52 ******/
DROP TABLE [dbo].[tblUserLogin]
GO
/****** Object:  Table [dbo].[tblPositions]    Script Date: 16-08-2019 11:46:52 ******/
DROP TABLE [dbo].[tblPositions]
GO
/****** Object:  Table [dbo].[tblMasterUnit]    Script Date: 16-08-2019 11:46:52 ******/
DROP TABLE [dbo].[tblMasterUnit]
GO
/****** Object:  Table [dbo].[tblMasterRole]    Script Date: 16-08-2019 11:46:52 ******/
DROP TABLE [dbo].[tblMasterRole]
GO
/****** Object:  Table [dbo].[tblMasterRating]    Script Date: 16-08-2019 11:46:52 ******/
DROP TABLE [dbo].[tblMasterRating]
GO
/****** Object:  Table [dbo].[tblMasterInterviewStatus]    Script Date: 16-08-2019 11:46:52 ******/
DROP TABLE [dbo].[tblMasterInterviewStatus]
GO
/****** Object:  Table [dbo].[tblMasterDesignation]    Script Date: 16-08-2019 11:46:52 ******/
DROP TABLE [dbo].[tblMasterDesignation]
GO
/****** Object:  Table [dbo].[tblMasterDepartment]    Script Date: 16-08-2019 11:46:52 ******/
DROP TABLE [dbo].[tblMasterDepartment]
GO
/****** Object:  Table [dbo].[tblMasterCandidatePool]    Script Date: 16-08-2019 11:46:52 ******/
DROP TABLE [dbo].[tblMasterCandidatePool]
GO
/****** Object:  Table [dbo].[tblJobDescription]    Script Date: 16-08-2019 11:46:52 ******/
DROP TABLE [dbo].[tblJobDescription]
GO
/****** Object:  Table [dbo].[tblApplicants]    Script Date: 16-08-2019 11:46:52 ******/
DROP TABLE [dbo].[tblApplicants]
GO
/****** Object:  StoredProcedure [dbo].[proc_tblUserLogin_Approve]    Script Date: 16-08-2019 11:46:52 ******/
DROP PROCEDURE [dbo].[proc_tblUserLogin_Approve]
GO
/****** Object:  StoredProcedure [dbo].[proc_tblUserLogin]    Script Date: 16-08-2019 11:46:52 ******/
DROP PROCEDURE [dbo].[proc_tblUserLogin]
GO
/****** Object:  StoredProcedure [dbo].[proc_tblPositions]    Script Date: 16-08-2019 11:46:52 ******/
DROP PROCEDURE [dbo].[proc_tblPositions]
GO
/****** Object:  StoredProcedure [dbo].[proc_tblMasterCandidatePool]    Script Date: 16-08-2019 11:46:52 ******/
DROP PROCEDURE [dbo].[proc_tblMasterCandidatePool]
GO
/****** Object:  StoredProcedure [dbo].[proc_tblJobDescription_Approve]    Script Date: 16-08-2019 11:46:52 ******/
DROP PROCEDURE [dbo].[proc_tblJobDescription_Approve]
GO
/****** Object:  StoredProcedure [dbo].[proc_tblJobDescription]    Script Date: 16-08-2019 11:46:52 ******/
DROP PROCEDURE [dbo].[proc_tblJobDescription]
GO
/****** Object:  StoredProcedure [dbo].[proc_tblApplicants]    Script Date: 16-08-2019 11:46:52 ******/
DROP PROCEDURE [dbo].[proc_tblApplicants]
GO
/****** Object:  StoredProcedure [dbo].[proc_tblApplicants]    Script Date: 16-08-2019 11:46:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE proc [dbo].[proc_tblApplicants] --proc_tblApplicants 1, '2,3,4,5','Sel'
(
@PositionID int,
@Candidate nvarchar(500),
@CurrentStatus nvarchar(5)

)
as
begin
DECLARE @IntLocation INT,@count int,@candidateID int
        WHILE (CHARINDEX(',',    @Candidate, 0) > 0)
        BEGIN
              SET @IntLocation =   CHARINDEX(',',    @Candidate, 0)   
			  
			  Select @count=count(1) from  tblApplicants where candidate=@candidate and PositionID=@PositionID
			  SELECT @candidateID=RTRIM(LTRIM(SUBSTRING(@Candidate,   0, @IntLocation)))
			  if(@count=0)
			  Begin
              INSERT INTO   tblApplicants (PositionID,Candidate,CurrentStatus,CreateDate)
			  values(@PositionID,@candidateID,@CurrentStatus,CURRENT_TIMESTAMP)
			  end
              --LTRIM and RTRIM to ensure blank spaces are   removed
                 
              SET @Candidate = STUFF(@Candidate,   1, @IntLocation,   '') 
        END
		end
GO
/****** Object:  StoredProcedure [dbo].[proc_tblJobDescription]    Script Date: 16-08-2019 11:46:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE proc [dbo].[proc_tblJobDescription]
(
@PositionID int,
@JobDescription nvarchar(max),
@UserID int,
@nstatus int out,
@ApproveStatus int
)
as Begin
declare @count int
select @count=count(1) from tblJobDescription where PositionID=@PositionID
if(@count=0)
Begin
insert into tblJobDescription (PositionID,JobDescription,AddedBy,ApproveStatus,CreateDate)
values(@PositionID,@JobDescription,@UserID,@ApproveStatus,CURRENT_TIMESTAMP)
set @nstatus=1
end
if(@count>0)
Begin
update tblJobDescription set 
JobDescription=@JobDescription,
UpdatedBy=@UserID,
UpdatedDate=CURRENT_TIMESTAMP,
ApproveStatus=@ApproveStatus
where PositionID=@PositionID
set @nstatus=2
end
update tblPositions set JDStatus=@ApproveStatus where PositionID=@PositionID
return @nstatus
end
GO
/****** Object:  StoredProcedure [dbo].[proc_tblJobDescription_Approve]    Script Date: 16-08-2019 11:46:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE proc [dbo].[proc_tblJobDescription_Approve]
(
@PositionID int,
@ApproveStatus int,
@UserID int
)
as begin
update tblJobDescription set
ApproveStatus=@ApproveStatus,
ApprovedBy=@UserID,
ApprovedDate=CURRENT_TIMESTAMP
where PositionID=@PositionID
update tblPositions set JDStatus=@ApproveStatus where PositionID=@PositionID
end
GO
/****** Object:  StoredProcedure [dbo].[proc_tblMasterCandidatePool]    Script Date: 16-08-2019 11:46:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create proc [dbo].[proc_tblMasterCandidatePool]
(
@CandidateID int,
@Name nvarchar(50),
@gender nvarchar(10),
@Experience numeric(4,2),
@EmailID nvarchar(50),
@Phone nvarchar(20),
@Education nvarchar(50),
@Year_of_Passing nvarchar(5),
@InterestedDepartmentID int,
@ProfessionalSummary nvarchar(500),
@LastCompany nvarchar(50),
@PrimaryIndustry nvarchar(50),
@PreviousNotableOrganisations nvarchar(500),
@CandidateStatus nvarchar(50),
@Source nvarchar(50),
@SourcingDate datetime,
@LastContactedDate datetime,
@ResumeGoogleLink nvarchar(1000),
@ResumeName nvarchar(500),
@addedby int,
@nid int out
)
as
Begin
declare @count int
select @count=count(1) from tblMasterCandidatePool where CandidateID=@CandidateID
if(@count=0)
begin
insert into tblMasterCandidatePool (Name,Gender,Experience,EmailID,Phone,Education,Year_of_Passing,InterestedDepartmentID,ProfessionalSummary,
LastCompany,PrimaryIndustry,PreviousNotableOrganisations,CandidateStatus,Source,SourcingDate,LastContactedDate,ResumeGoogleLink,ResumeName,addedby,createdate)
values(@Name,@gender,@Experience,@EmailID,@Phone,@Education,@Year_of_Passing,@InterestedDepartmentID,@ProfessionalSummary,@LastCompany,@PrimaryIndustry,
@PreviousNotableOrganisations,@CandidateStatus,@Source,@SourcingDate,@LastContactedDate,@ResumeGoogleLink,@ResumeName,@addedby,CURRENT_TIMESTAMP)
set @nid=IDENT_CURRENT('tblMasterCandidatePool')
end
else if(@count>0)
begin
update tblMasterCandidatePool set
Name=@Name,
Gender=@gender,
Experience=@Experience,
EmailID=@EmailID,
Phone=@Phone,
Education=@Education,
Year_of_Passing=@Year_of_Passing,
InterestedDepartmentID=@InterestedDepartmentID,
ProfessionalSummary=@ProfessionalSummary,
LastCompany=@LastCompany,
PrimaryIndustry=@PrimaryIndustry,
PreviousNotableOrganisations=@PreviousNotableOrganisations,
CandidateStatus=@CandidateStatus,
Source=@Source,
SourcingDate=@SourcingDate,
LastContactedDate=@LastContactedDate,
ResumeGoogleLink=@ResumeGoogleLink,
ResumeName=@ResumeName,
addedby=@addedby,
updatedate=CURRENT_TIMESTAMP
where CandidateID=@CandidateID
set @nid=@CandidateID
end
end
GO
/****** Object:  StoredProcedure [dbo].[proc_tblPositions]    Script Date: 16-08-2019 11:46:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE proc [dbo].[proc_tblPositions]
(
@PositionID int,
@DesignationID int,
@RequesterID int,
@Department int,
@Unit int,
@Priority nvarchar(15),
@TAT datetime,
@ClosedByDate datetime,
@Experience int,
@YearlySalaryBudget numeric(10,2),
@Status nvarchar(20)
)
AS
Begin
if(@PositionID=0)
Begin
insert into tblPositions (DesignationID,RequesterID,Department,Unit,Priority,TAT,RequestDate,ClosedByDate,Experience, YearlySalaryBudget, Status)
values(@DesignationID,@RequesterID,@Department,@Unit,@Priority,@TAT,CURRENT_TIMESTAMP,@ClosedByDate,@Experience,@YearlySalaryBudget,@Status)
end
else if(@PositionID>0)
Begin
update tblPositions set
DesignationID=@DesignationID,
RequesterID=@RequesterID,
Department=@Department,
Unit=@Unit,
Priority=@Priority,
TAT=@TAT,
ClosedByDate=@ClosedByDate,
Experience=@Experience,
YearlySalaryBudget=@YearlySalaryBudget,
Status=@Status
where PositionID=@PositionID
end
end
GO
/****** Object:  StoredProcedure [dbo].[proc_tblUserLogin]    Script Date: 16-08-2019 11:46:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create proc [dbo].[proc_tblUserLogin]
(
@UserEmail nvarchar(500),
@UserName nvarchar(500)
)
as
Begin
Declare @count int
select @count=count(1) from tblUserLogin where userEmail=@UserEmail
if(@count=0)
begin
insert into tblUserLogin(UserName,UserEmail,Status,CreateDate)
Values(@UserName,@UserEmail,0,current_Timestamp)
end
end
GO
/****** Object:  StoredProcedure [dbo].[proc_tblUserLogin_Approve]    Script Date: 16-08-2019 11:46:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create proc [dbo].[proc_tblUserLogin_Approve]
(
@UserId int,
@Role int,
@Status int
)
As
Begin
update tblUserLogin set 
Role=@Role,
Status=@Status,
ActivatedDate=CURRENT_TIMESTAMP
where UserID=@UserId
end
GO
/****** Object:  Table [dbo].[tblApplicants]    Script Date: 16-08-2019 11:46:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblApplicants](
	[SelectionID] [int] IDENTITY(1,1) NOT NULL,
	[PositionID] [int] NULL,
	[Candidate] [nvarchar](500) NULL,
	[CurrentStatus] [nvarchar](5) NULL,
	[CreateDate] [datetime] NULL
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[tblJobDescription]    Script Date: 16-08-2019 11:46:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblJobDescription](
	[JobID] [int] IDENTITY(1,1) NOT NULL,
	[PositionID] [int] NULL,
	[JobDescription] [nvarchar](max) NULL,
	[AddedBy] [int] NULL,
	[CreateDate] [datetime] NULL,
	[UpdatedBy] [int] NULL,
	[UpdatedDate] [datetime] NULL,
	[ApproveStatus] [int] NULL,
	[ApprovedBy] [int] NULL,
	[ApprovedDate] [datetime] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
/****** Object:  Table [dbo].[tblMasterCandidatePool]    Script Date: 16-08-2019 11:46:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblMasterCandidatePool](
	[CandidateID] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](50) NULL,
	[Gender] [nvarchar](10) NULL,
	[Experience] [float] NULL,
	[EmailID] [nvarchar](50) NULL,
	[Phone] [nvarchar](20) NULL,
	[Education] [nvarchar](50) NULL,
	[Year_of_Passing] [nvarchar](5) NULL,
	[InterestedDepartmentID] [int] NULL,
	[ProfessionalSummary] [nvarchar](500) NULL,
	[LastCompany] [nvarchar](50) NULL,
	[PrimaryIndustry] [nvarchar](50) NULL,
	[PreviousNotableOrganisations] [nvarchar](500) NULL,
	[CandidateStatus] [nvarchar](50) NULL,
	[Source] [nvarchar](50) NULL,
	[SourcingDate] [datetime] NULL,
	[LastContactedDate] [datetime] NULL,
	[ResumeGoogleLink] [nvarchar](1000) NULL,
	[ResumeName] [nvarchar](200) NULL,
	[createdate] [datetime] NULL,
	[updatedate] [datetime] NULL,
	[addedby] [int] NULL,
	[Iscandidate] [int] NULL CONSTRAINT [DF_tblMasterCandidatePool_Iscandidate]  DEFAULT ((0))
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[tblMasterDepartment]    Script Date: 16-08-2019 11:46:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblMasterDepartment](
	[DepartmentID] [int] IDENTITY(1,1) NOT NULL,
	[DepartmentName] [nvarchar](50) NULL
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[tblMasterDesignation]    Script Date: 16-08-2019 11:46:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblMasterDesignation](
	[DesignationID] [int] IDENTITY(1,1) NOT NULL,
	[DesignationName] [nvarchar](50) NULL,
	[DepartmentID] [int] NULL
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[tblMasterInterviewStatus]    Script Date: 16-08-2019 11:46:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblMasterInterviewStatus](
	[InterviewStatusID] [int] IDENTITY(1,1) NOT NULL,
	[StatusName] [nvarchar](50) NULL
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[tblMasterRating]    Script Date: 16-08-2019 11:46:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblMasterRating](
	[RatingID] [int] IDENTITY(1,1) NOT NULL,
	[RatingName] [nvarchar](50) NULL
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[tblMasterRole]    Script Date: 16-08-2019 11:46:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblMasterRole](
	[RoleID] [int] IDENTITY(1,1) NOT NULL,
	[RoleName] [nvarchar](50) NULL
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[tblMasterUnit]    Script Date: 16-08-2019 11:46:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblMasterUnit](
	[unitID] [int] IDENTITY(1,1) NOT NULL,
	[UnitName] [nvarchar](50) NULL
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[tblPositions]    Script Date: 16-08-2019 11:46:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblPositions](
	[PositionID] [int] IDENTITY(1,1) NOT NULL,
	[DesignationID] [int] NULL,
	[RequesterID] [int] NULL,
	[Department] [int] NULL,
	[Unit] [int] NULL,
	[Priority] [nvarchar](15) NULL,
	[TAT] [datetime] NULL,
	[RequestDate] [datetime] NULL,
	[ClosedByDate] [datetime] NULL,
	[Experience] [int] NULL,
	[YearlySalaryBudget] [float] NULL,
	[Status] [nvarchar](20) NULL,
	[JDStatus] [int] NULL CONSTRAINT [DF_tblPositions_JDStatus]  DEFAULT ((0)),
	[Closure_Date] [datetime] NULL,
	[SelectedCandidateID] [int] NULL,
	[Remark] [nvarchar](300) NULL
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[tblUserLogin]    Script Date: 16-08-2019 11:46:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblUserLogin](
	[UserID] [int] IDENTITY(1,1) NOT NULL,
	[UserEmail] [nvarchar](50) NULL,
	[UserName] [nvarchar](50) NULL,
	[LastLoginDate] [datetime] NULL,
	[Createdate] [datetime] NULL,
	[Status] [tinyint] NULL,
	[Role] [int] NULL,
	[ActivatedDate] [datetime] NULL
) ON [PRIMARY]

GO
/****** Object:  View [dbo].[vwPosition]    Script Date: 16-08-2019 11:46:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE View [dbo].[vwPosition]
as

select pos.*,dpt.DepartmentName,desg.DesignationName from tblPositions pos inner join tblMasterDepartment dpt on (pos.Department=dpt.DepartmentID) 
inner join tblMasterDesignation desg on (pos.DesignationID=desg.DesignationID)


GO
SET IDENTITY_INSERT [dbo].[tblApplicants] ON 

INSERT [dbo].[tblApplicants] ([SelectionID], [PositionID], [Candidate], [CurrentStatus], [CreateDate]) VALUES (1, 1, N'2', N'Sel', CAST(N'2019-08-16 10:32:42.197' AS DateTime))
INSERT [dbo].[tblApplicants] ([SelectionID], [PositionID], [Candidate], [CurrentStatus], [CreateDate]) VALUES (2, 1, N'3', N'Sel', CAST(N'2019-08-16 10:32:42.253' AS DateTime))
INSERT [dbo].[tblApplicants] ([SelectionID], [PositionID], [Candidate], [CurrentStatus], [CreateDate]) VALUES (3, 1, N'4', N'Sel', CAST(N'2019-08-16 10:32:42.253' AS DateTime))
INSERT [dbo].[tblApplicants] ([SelectionID], [PositionID], [Candidate], [CurrentStatus], [CreateDate]) VALUES (4, 2, N'1', N'Sel', CAST(N'2019-08-16 10:40:54.877' AS DateTime))
INSERT [dbo].[tblApplicants] ([SelectionID], [PositionID], [Candidate], [CurrentStatus], [CreateDate]) VALUES (5, 2, N'2', N'Sel', CAST(N'2019-08-16 10:40:54.877' AS DateTime))
INSERT [dbo].[tblApplicants] ([SelectionID], [PositionID], [Candidate], [CurrentStatus], [CreateDate]) VALUES (6, 2, N'3', N'Sel', CAST(N'2019-08-16 10:40:54.880' AS DateTime))
SET IDENTITY_INSERT [dbo].[tblApplicants] OFF
SET IDENTITY_INSERT [dbo].[tblJobDescription] ON 

INSERT [dbo].[tblJobDescription] ([JobID], [PositionID], [JobDescription], [AddedBy], [CreateDate], [UpdatedBy], [UpdatedDate], [ApproveStatus], [ApprovedBy], [ApprovedDate]) VALUES (1, 1, N'&lt;p&gt;dgfdgfdg fdgfdgfdgfdgfdg&amp;nbsp; &amp;nbsp;dfgfdgfdg&lt;/p&gt;', 2, CAST(N'2019-08-14 09:21:35.613' AS DateTime), 2, CAST(N'2019-08-14 15:33:58.360' AS DateTime), 2, 2, CAST(N'2019-08-14 10:23:11.827' AS DateTime))
INSERT [dbo].[tblJobDescription] ([JobID], [PositionID], [JobDescription], [AddedBy], [CreateDate], [UpdatedBy], [UpdatedDate], [ApproveStatus], [ApprovedBy], [ApprovedDate]) VALUES (2, 2, N'&lt;p&gt;fhfghjjhkjk ghjghj hfghfgh&lt;/p&gt;', 2, CAST(N'2019-08-16 10:29:56.193' AS DateTime), NULL, NULL, 2, 2, CAST(N'2019-08-16 10:30:06.733' AS DateTime))
INSERT [dbo].[tblJobDescription] ([JobID], [PositionID], [JobDescription], [AddedBy], [CreateDate], [UpdatedBy], [UpdatedDate], [ApproveStatus], [ApprovedBy], [ApprovedDate]) VALUES (3, 3, N'&lt;p&gt;&amp;nbsp;fdfdgfd dfgsfdgfdg&lt;/p&gt;', 2, CAST(N'2019-08-16 10:30:41.997' AS DateTime), NULL, NULL, 2, 2, CAST(N'2019-08-16 10:30:46.450' AS DateTime))
SET IDENTITY_INSERT [dbo].[tblJobDescription] OFF
SET IDENTITY_INSERT [dbo].[tblMasterCandidatePool] ON 

INSERT [dbo].[tblMasterCandidatePool] ([CandidateID], [Name], [Gender], [Experience], [EmailID], [Phone], [Education], [Year_of_Passing], [InterestedDepartmentID], [ProfessionalSummary], [LastCompany], [PrimaryIndustry], [PreviousNotableOrganisations], [CandidateStatus], [Source], [SourcingDate], [LastContactedDate], [ResumeGoogleLink], [ResumeName], [createdate], [updatedate], [addedby], [Iscandidate]) VALUES (1, N'Ajeet', N'Male', 1, N'ajeetkumar.kumar36@gmail.com', N'8700503783', N'dad', N'2014', 1, N'&lt;p&gt;dfgfdg&lt;/p&gt;', N'gfdg', N'fdgfd', N'dfgfdg', N'Working', N'dgfdg', CAST(N'2019-08-27 00:00:00.000' AS DateTime), NULL, N'https://bytes.com/topic/c-sharp/answers/260302-how-check-given-string-float-point-c-thanx', N'637009671948272715.pdf', CAST(N'2019-08-09 17:00:10.913' AS DateTime), CAST(N'2019-08-13 15:12:48.250' AS DateTime), 2, 0)
INSERT [dbo].[tblMasterCandidatePool] ([CandidateID], [Name], [Gender], [Experience], [EmailID], [Phone], [Education], [Year_of_Passing], [InterestedDepartmentID], [ProfessionalSummary], [LastCompany], [PrimaryIndustry], [PreviousNotableOrganisations], [CandidateStatus], [Source], [SourcingDate], [LastContactedDate], [ResumeGoogleLink], [ResumeName], [createdate], [updatedate], [addedby], [Iscandidate]) VALUES (2, N'Ajeet', N'Male', 2, N'ajeet.kumar@envigo.co.uk', N'9711472879', N'vfdgfd', N'2017', 1, N'&lt;p&gt;dfgfdg&lt;/p&gt;', N'ffdg', N'fdgfdg', N'dfgfdg', N'Working', N'fgfdgfdg', CAST(N'2019-08-27 00:00:00.000' AS DateTime), NULL, N'https://bytes.com/topic/c-sharp/answers/260302-how-check-given-string-float-point-c-thanx', N'637009671948272715.pdf', CAST(N'2019-08-09 17:00:10.913' AS DateTime), NULL, NULL, 0)
INSERT [dbo].[tblMasterCandidatePool] ([CandidateID], [Name], [Gender], [Experience], [EmailID], [Phone], [Education], [Year_of_Passing], [InterestedDepartmentID], [ProfessionalSummary], [LastCompany], [PrimaryIndustry], [PreviousNotableOrganisations], [CandidateStatus], [Source], [SourcingDate], [LastContactedDate], [ResumeGoogleLink], [ResumeName], [createdate], [updatedate], [addedby], [Iscandidate]) VALUES (3, N'Manish', N'Male', 2, N'manish@gmail.com', N'2222222222', N'sdfsdf', N'2012', 5, N'&lt;p&gt;dgfdgfdg&lt;/p&gt;', N'gfdg', N'sddfsdfs', N'fghfgh', N'Working', N'fghfg', CAST(N'2019-08-06 00:00:00.000' AS DateTime), NULL, N'https://api.jquery.com/empty/', NULL, CAST(N'2019-08-16 10:57:19.110' AS DateTime), CAST(N'2019-08-16 11:08:14.033' AS DateTime), 2, 0)
SET IDENTITY_INSERT [dbo].[tblMasterCandidatePool] OFF
SET IDENTITY_INSERT [dbo].[tblMasterDepartment] ON 

INSERT [dbo].[tblMasterDepartment] ([DepartmentID], [DepartmentName]) VALUES (1, N'Business Development')
INSERT [dbo].[tblMasterDepartment] ([DepartmentID], [DepartmentName]) VALUES (2, N'Content')
INSERT [dbo].[tblMasterDepartment] ([DepartmentID], [DepartmentName]) VALUES (3, N'Client Services')
INSERT [dbo].[tblMasterDepartment] ([DepartmentID], [DepartmentName]) VALUES (4, N'Pay Per Click Marketing')
INSERT [dbo].[tblMasterDepartment] ([DepartmentID], [DepartmentName]) VALUES (5, N'Design')
INSERT [dbo].[tblMasterDepartment] ([DepartmentID], [DepartmentName]) VALUES (6, N'Development')
INSERT [dbo].[tblMasterDepartment] ([DepartmentID], [DepartmentName]) VALUES (7, N'SEO')
SET IDENTITY_INSERT [dbo].[tblMasterDepartment] OFF
SET IDENTITY_INSERT [dbo].[tblMasterDesignation] ON 

INSERT [dbo].[tblMasterDesignation] ([DesignationID], [DesignationName], [DepartmentID]) VALUES (1, N'BD Head', 1)
INSERT [dbo].[tblMasterDesignation] ([DesignationID], [DesignationName], [DepartmentID]) VALUES (2, N'BD Manager', 1)
INSERT [dbo].[tblMasterDesignation] ([DesignationID], [DesignationName], [DepartmentID]) VALUES (3, N'PPC Head', 4)
INSERT [dbo].[tblMasterDesignation] ([DesignationID], [DesignationName], [DepartmentID]) VALUES (4, N'Content Writer', 2)
SET IDENTITY_INSERT [dbo].[tblMasterDesignation] OFF
SET IDENTITY_INSERT [dbo].[tblMasterInterviewStatus] ON 

INSERT [dbo].[tblMasterInterviewStatus] ([InterviewStatusID], [StatusName]) VALUES (1, N'Pending')
INSERT [dbo].[tblMasterInterviewStatus] ([InterviewStatusID], [StatusName]) VALUES (2, N'Pending with interviewer')
INSERT [dbo].[tblMasterInterviewStatus] ([InterviewStatusID], [StatusName]) VALUES (3, N'Pending with interviewee')
INSERT [dbo].[tblMasterInterviewStatus] ([InterviewStatusID], [StatusName]) VALUES (4, N'Position on Hold')
INSERT [dbo].[tblMasterInterviewStatus] ([InterviewStatusID], [StatusName]) VALUES (5, N'Position Filled')
INSERT [dbo].[tblMasterInterviewStatus] ([InterviewStatusID], [StatusName]) VALUES (6, N'Done')
SET IDENTITY_INSERT [dbo].[tblMasterInterviewStatus] OFF
SET IDENTITY_INSERT [dbo].[tblMasterRating] ON 

INSERT [dbo].[tblMasterRating] ([RatingID], [RatingName]) VALUES (1, N'No Hire')
INSERT [dbo].[tblMasterRating] ([RatingID], [RatingName]) VALUES (2, N'Probable')
INSERT [dbo].[tblMasterRating] ([RatingID], [RatingName]) VALUES (3, N'Worth Consideration')
INSERT [dbo].[tblMasterRating] ([RatingID], [RatingName]) VALUES (4, N'Good Candidate')
INSERT [dbo].[tblMasterRating] ([RatingID], [RatingName]) VALUES (5, N'Hire')
SET IDENTITY_INSERT [dbo].[tblMasterRating] OFF
SET IDENTITY_INSERT [dbo].[tblMasterRole] ON 

INSERT [dbo].[tblMasterRole] ([RoleID], [RoleName]) VALUES (1, N'Admin')
INSERT [dbo].[tblMasterRole] ([RoleID], [RoleName]) VALUES (2, N'HR')
INSERT [dbo].[tblMasterRole] ([RoleID], [RoleName]) VALUES (3, N'User')
INSERT [dbo].[tblMasterRole] ([RoleID], [RoleName]) VALUES (4, N'Recruiter')
SET IDENTITY_INSERT [dbo].[tblMasterRole] OFF
SET IDENTITY_INSERT [dbo].[tblMasterUnit] ON 

INSERT [dbo].[tblMasterUnit] ([unitID], [UnitName]) VALUES (1, N'Envigo')
INSERT [dbo].[tblMasterUnit] ([unitID], [UnitName]) VALUES (2, N'IBISM')
SET IDENTITY_INSERT [dbo].[tblMasterUnit] OFF
SET IDENTITY_INSERT [dbo].[tblPositions] ON 

INSERT [dbo].[tblPositions] ([PositionID], [DesignationID], [RequesterID], [Department], [Unit], [Priority], [TAT], [RequestDate], [ClosedByDate], [Experience], [YearlySalaryBudget], [Status], [JDStatus], [Closure_Date], [SelectedCandidateID], [Remark]) VALUES (1, 1, 2, 1, 1, N'High', CAST(N'2019-08-20 00:00:00.000' AS DateTime), CAST(N'2019-08-12 13:41:07.357' AS DateTime), CAST(N'2019-08-30 00:00:00.000' AS DateTime), 1, 1.8, N'Opened', 2, NULL, NULL, NULL)
INSERT [dbo].[tblPositions] ([PositionID], [DesignationID], [RequesterID], [Department], [Unit], [Priority], [TAT], [RequestDate], [ClosedByDate], [Experience], [YearlySalaryBudget], [Status], [JDStatus], [Closure_Date], [SelectedCandidateID], [Remark]) VALUES (2, 4, 2, 2, 2, N'High', CAST(N'2019-08-23 00:00:00.000' AS DateTime), CAST(N'2019-08-16 10:20:02.927' AS DateTime), CAST(N'2019-08-31 00:00:00.000' AS DateTime), 2, 0, N'Opened', 2, NULL, NULL, NULL)
INSERT [dbo].[tblPositions] ([PositionID], [DesignationID], [RequesterID], [Department], [Unit], [Priority], [TAT], [RequestDate], [ClosedByDate], [Experience], [YearlySalaryBudget], [Status], [JDStatus], [Closure_Date], [SelectedCandidateID], [Remark]) VALUES (3, 2, 2, 1, 1, N'Medium', CAST(N'2019-08-31 00:00:00.000' AS DateTime), CAST(N'2019-08-16 10:20:33.237' AS DateTime), CAST(N'2019-09-27 00:00:00.000' AS DateTime), 5, 0, N'Opened', 2, NULL, NULL, NULL)
SET IDENTITY_INSERT [dbo].[tblPositions] OFF
SET IDENTITY_INSERT [dbo].[tblUserLogin] ON 

INSERT [dbo].[tblUserLogin] ([UserID], [UserEmail], [UserName], [LastLoginDate], [Createdate], [Status], [Role], [ActivatedDate]) VALUES (1, N'ajeetkumar.kumar36@gmail.com', N'Ajeet Kumar', NULL, CAST(N'2019-08-07 18:04:35.300' AS DateTime), 1, 4, CAST(N'2019-08-16 10:55:34.700' AS DateTime))
INSERT [dbo].[tblUserLogin] ([UserID], [UserEmail], [UserName], [LastLoginDate], [Createdate], [Status], [Role], [ActivatedDate]) VALUES (2, N'ajeet.kumar@envigo.co.uk', N'Ajeet Kumar', NULL, CAST(N'2019-08-07 18:26:36.290' AS DateTime), 1, 1, CAST(N'2019-08-16 11:09:13.270' AS DateTime))
SET IDENTITY_INSERT [dbo].[tblUserLogin] OFF
