73 lines
2.5 KiB
C#
73 lines
2.5 KiB
C#
|
using HRM.BO;
|
|||
|
using Ease.Core.DataAccess;
|
|||
|
using System;
|
|||
|
using System.Data;
|
|||
|
|
|||
|
namespace HRM.DA
|
|||
|
{
|
|||
|
public class CVReferenceDA
|
|||
|
{
|
|||
|
internal static void Insert(CVReference exprItem, TransactionContext tc)
|
|||
|
{
|
|||
|
string sql =
|
|||
|
SQLParser.MakeSQL(
|
|||
|
@"INSERT INTO CVReference
|
|||
|
(
|
|||
|
CVReferenceID, Name, Occupation,
|
|||
|
Relation, Address, Email,
|
|||
|
Telephone, Mobile, CVID
|
|||
|
)
|
|||
|
VALUES
|
|||
|
(
|
|||
|
%n, %s, %s,
|
|||
|
%s, %s, %s,
|
|||
|
%s, %s, %n
|
|||
|
)
|
|||
|
",
|
|||
|
exprItem.ID, exprItem.Name, exprItem.Occupation,
|
|||
|
exprItem.Relation, exprItem.Address, exprItem.Email,
|
|||
|
exprItem.Telephone, exprItem.Mobile,
|
|||
|
exprItem.CVID);
|
|||
|
tc.ExecuteNonQuery(sql);
|
|||
|
}
|
|||
|
|
|||
|
internal static void UpdateExperience(CVReference exprItem, TransactionContext tc)
|
|||
|
{
|
|||
|
string sql =
|
|||
|
SQLParser.MakeSQL(
|
|||
|
@"UPDATE CVReference
|
|||
|
SET
|
|||
|
Name = %s,
|
|||
|
Occupation = %s,
|
|||
|
Relation = %s,
|
|||
|
Address = %s,
|
|||
|
Email = %s,
|
|||
|
Telephone = %s,
|
|||
|
Mobile = %s,
|
|||
|
CVID = %n
|
|||
|
WHERE CVExperienceID = %n
|
|||
|
",
|
|||
|
exprItem.Name, exprItem.Occupation, exprItem.Relation, exprItem.Address,
|
|||
|
exprItem.Email, exprItem.Telephone, exprItem.Mobile, exprItem.CVID, exprItem.ID);
|
|||
|
tc.ExecuteNonQuery(sql);
|
|||
|
}
|
|||
|
|
|||
|
internal static void Delete(int iD, TransactionContext tc)
|
|||
|
{
|
|||
|
string sql = SQLParser.MakeSQL(@"Delete From CVReference Where CVID = %n", iD);
|
|||
|
tc.ExecuteNonQuery(sql);
|
|||
|
}
|
|||
|
|
|||
|
internal static void DeleteByCvId(int oID, TransactionContext tc)
|
|||
|
{
|
|||
|
string sql = SQLParser.MakeSQL(@"Delete From CVReference Where CVID = %n", oID);
|
|||
|
tc.ExecuteNonQuery(sql);
|
|||
|
}
|
|||
|
|
|||
|
internal static IDataReader Get(object cVID, TransactionContext tc)
|
|||
|
{
|
|||
|
string sql = SQLParser.MakeSQL(@"SELECT * FROM CVReference WHERE CVID = %n", cVID);
|
|||
|
return tc.ExecuteReader(sql);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|