66 lines
3.1 KiB
C#
66 lines
3.1 KiB
C#
using HRM.BO;
|
|
using Ease.Core.DataAccess;
|
|
using System;
|
|
using System.Data;
|
|
|
|
namespace HRM.DA
|
|
{
|
|
public class CVEducationDA
|
|
{
|
|
internal static void InsertEductionalQualification(CVEducation eduItem, TransactionContext tc)
|
|
{
|
|
string sql = SQLParser.MakeSQL(@"INSERT INTO dbo.CVEducation
|
|
(
|
|
CVEducationID, DegreeTitleID, DisciplineIID,
|
|
BoardID, PassingYear, ResultID,
|
|
CGPA, OutOF, IsHighest,
|
|
InstituteName, CVID
|
|
)
|
|
VALUES
|
|
(
|
|
%n, %n, %n,
|
|
%n, %s, %n,
|
|
%s, %s, %b,
|
|
%s, %n
|
|
)", eduItem.ID, eduItem.DegreeTitleID, eduItem.DisciplineID,
|
|
eduItem.BoardID, eduItem.PassingYear, eduItem.ResultID,
|
|
eduItem.CGPA,eduItem.OutOF, eduItem.IsHighest, eduItem.InstituteName, eduItem.CVID);
|
|
tc.ExecuteNonQuery(sql);
|
|
}
|
|
|
|
internal static void UpdateEductionalQualification(CVEducation eduItem, TransactionContext tc)
|
|
{
|
|
string sql = SQLParser.MakeSQL(@"UPDATE dbo.CVEducation
|
|
SET
|
|
DegreeTitleID = %n,
|
|
DisciplineIID = %n,
|
|
BoardID = %n,
|
|
PassingYear = %s,
|
|
ResultID = %n,
|
|
CGPA = %s,
|
|
OutOF = %s,
|
|
IsHighest = %b,
|
|
InstituteName = %s,
|
|
CVID = %n
|
|
WHERE CVEducationID = %n",
|
|
eduItem.DegreeTitleID, eduItem.DisciplineID, eduItem.BoardID, eduItem.PassingYear, eduItem.ResultID,
|
|
eduItem.CGPA, eduItem.OutOF, eduItem.IsHighest, eduItem.InstituteName,
|
|
eduItem.CVID, eduItem.ID);
|
|
tc.ExecuteNonQuery(sql);
|
|
}
|
|
|
|
internal static void Delete(int id, TransactionContext tc)
|
|
{
|
|
string sql = SQLParser.MakeSQL(
|
|
@"DELETE FROM CVEducation WHERE CVID = %n", id);
|
|
tc.ExecuteNonQuery(sql);
|
|
}
|
|
|
|
internal static void DeleteByCvId(int oID, TransactionContext tc)
|
|
{
|
|
string sql = SQLParser.MakeSQL(
|
|
@"Delete From CVEducation Where CvId = %n", oID);
|
|
tc.ExecuteNonQuery(sql);
|
|
}
|
|
}
|
|
} |