177 lines
6.0 KiB
C#
177 lines
6.0 KiB
C#
using HRM.BO;
|
|
using Ease.Core.DataAccess;
|
|
using System;
|
|
using System.Data;
|
|
using System.Security.Cryptography.Xml;
|
|
|
|
namespace HRM.DA
|
|
{
|
|
public class RecJobTrackingDA
|
|
{
|
|
internal static void Insert(RecJobTracking obRecJob, TransactionContext tc)
|
|
{
|
|
string sql = SQLParser.MakeSQL(
|
|
@"INSERT INTO RecJobTracking
|
|
(
|
|
RecJobTrackingID, RecruitementID, RecruiterID,OnBoardDays,
|
|
TrackingStartDate, OnBoardDate, JobPostingDate,
|
|
CvCollectionDate, InterviewStartDate,
|
|
InterviewEndDate, OfferLetterSendDate,
|
|
JoiningDate,CreatedBy,CreatedDate
|
|
)
|
|
VALUES
|
|
(
|
|
%n, %n, %n,
|
|
%n, %d, %d,
|
|
%d, %d, %d,
|
|
%d, %d, %d,
|
|
%n, %d
|
|
)", obRecJob.ID, obRecJob.RecruitementID, obRecJob.RecruiterID, obRecJob.OnBoardDays,
|
|
obRecJob.TrackingStartDate, obRecJob.OnBoardDate, obRecJob.JobPostingDate,
|
|
obRecJob.CvCollectionDate, obRecJob.InterviewStartDate, obRecJob.InterviewEndDate,
|
|
obRecJob.OfferLetterSendDate, obRecJob.JoiningDate, obRecJob.CreatedBy,
|
|
obRecJob.CreatedDate);
|
|
tc.ExecuteNonQuery(sql);
|
|
}
|
|
|
|
|
|
internal static void Update(RecJobTracking obRecJob, TransactionContext tc)
|
|
{
|
|
|
|
string sql = SQLParser.MakeSQL(
|
|
@"UPDATE RecJobTracking
|
|
SET
|
|
RecruitementID = %n,
|
|
RecruiterID = %n,
|
|
OnBoardDays = %n,
|
|
TrackingStartDate = %d,
|
|
OnBoardDate = %d,
|
|
JobPostingDate = %d,
|
|
CvCollectionDate = %d,
|
|
InterviewStartDate = %d,
|
|
InterviewEndDate = %d,
|
|
OfferLetterSendDate = %d,
|
|
JoiningDate = %d,
|
|
ModifiedBy=%n,
|
|
ModifiedDate=%d
|
|
WHERE RecJobTrackingID = %n",
|
|
obRecJob.RecruitementID, obRecJob.RecruiterID, obRecJob.OnBoardDays,
|
|
obRecJob.TrackingStartDate, obRecJob.OnBoardDate, obRecJob.JobPostingDate,
|
|
obRecJob.CvCollectionDate,obRecJob.InterviewStartDate, obRecJob.InterviewEndDate,
|
|
obRecJob.OfferLetterSendDate, obRecJob.JoiningDate, obRecJob.CreatedBy,
|
|
DateTime.Now, obRecJob.ID);
|
|
tc.ExecuteNonQuery(sql);
|
|
}
|
|
|
|
internal static void UpdateactualJobPosting(TransactionContext tc, int pkid)
|
|
{
|
|
string ssql = "";
|
|
if (pkid > 0)
|
|
{
|
|
ssql = SQLParser.MakeSQL(
|
|
"UPDATE RecJobTracking SET ActualJobPostingDate=%d WHERE RecruitementID=%n",
|
|
DateTime.Now,
|
|
pkid);
|
|
}
|
|
|
|
tc.ExecuteNonQuery(ssql);
|
|
}
|
|
|
|
internal static void UpdateactualCvCollectionDate(TransactionContext tc, int pkid)
|
|
{
|
|
string ssql = "";
|
|
if (pkid > 0)
|
|
{
|
|
ssql = SQLParser.MakeSQL(
|
|
"UPDATE RecJobTracking SET ActualCvCollectionDate=%d WHERE RecruitementID=%n",
|
|
DateTime.Now,
|
|
pkid);
|
|
}
|
|
|
|
tc.ExecuteNonQuery(ssql);
|
|
}
|
|
|
|
internal static void UpdateActualInterviewEndDate(TransactionContext tc, int pkid)
|
|
{
|
|
string ssql = "";
|
|
if (pkid > 0)
|
|
{
|
|
ssql = SQLParser.MakeSQL(
|
|
"UPDATE RecJobTracking SET ActualInterviewEndDate=%d WHERE RecruitementID=%n",
|
|
DateTime.Now,
|
|
pkid);
|
|
}
|
|
|
|
tc.ExecuteNonQuery(ssql);
|
|
}
|
|
|
|
internal static void UpdateInterViewStartDate(TransactionContext tc, int pkid)
|
|
{
|
|
string ssql = "";
|
|
if (pkid > 0)
|
|
{
|
|
ssql = SQLParser.MakeSQL(
|
|
"UPDATE RecJobTracking SET ActualInterviewStartDate=%d WHERE RecruitementID=%n",
|
|
DateTime.Now,
|
|
pkid);
|
|
}
|
|
|
|
tc.ExecuteNonQuery(ssql);
|
|
}
|
|
|
|
internal static void UpdateActualOfferLetterSendDate(TransactionContext tc, int pkid)
|
|
{
|
|
string ssql = "";
|
|
if (pkid > 0)
|
|
{
|
|
ssql = SQLParser.MakeSQL(
|
|
"UPDATE RecJobTracking SET ActualOfferLetterSendDate=%d WHERE RecruitementID=%n",
|
|
DateTime.Now,
|
|
pkid);
|
|
}
|
|
|
|
tc.ExecuteNonQuery(ssql);
|
|
}
|
|
|
|
internal static void UpdateActualJoiningDate(TransactionContext tc, int pkid)
|
|
{
|
|
string ssql = "";
|
|
if (pkid > 0)
|
|
{
|
|
ssql = SQLParser.MakeSQL(
|
|
"UPDATE RecJobTracking SET ActualJoiningDate=%d WHERE RecruitementID=%n",
|
|
DateTime.Now,
|
|
pkid);
|
|
}
|
|
|
|
tc.ExecuteNonQuery(ssql);
|
|
}
|
|
|
|
|
|
internal static IDataReader GetByID(int recJobTrackingID, TransactionContext tc)
|
|
{
|
|
string sql = SQLParser.MakeSQL(@"Select * From RecJobTracking Where RecJobTrackingID = %n", recJobTrackingID);
|
|
return tc.ExecuteReader(sql);
|
|
}
|
|
|
|
internal static IDataReader GetByRecruimentId(int recruitmentId, TransactionContext tc)
|
|
{
|
|
string sql = SQLParser.MakeSQL(@"Select * From RecJobTracking Where RecruitementID = %n", recruitmentId);
|
|
return tc.ExecuteReader(sql);
|
|
}
|
|
|
|
|
|
internal static IDataReader Get(TransactionContext tc)
|
|
{
|
|
string sql = SQLParser.MakeSQL(@"Select * From RecJobTracking");
|
|
return tc.ExecuteReader(sql);
|
|
}
|
|
|
|
internal static void Delete(int iD, TransactionContext tc)
|
|
{
|
|
string sql = SQLParser.MakeSQL(@"Delete From RecJobTracking Where RecJobTrackingID = %n", iD);
|
|
tc.ExecuteNonQuery(sql);
|
|
}
|
|
|
|
}
|
|
} |