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