EchoTex_Payroll/HRM.DA/DA/Recruitement/ReferredByDA.cs
2024-10-14 10:01:49 +06:00

42 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ease.Core.DataAccess;
using Ease.Core.Model;
using HRM.BO;
namespace HRM.DA
{
public class ReferredByDA
{
internal static void InsertReferredBy(ReferredBy refItem, TransactionContext tc)
{
string sql = SQLParser.MakeSQL(
@"Insert Into CVReferredBy(ReferredByID,CvId,Name,OtherDetail,ReferredBy,EmployeeNo)
Values(%n,%n,%s,%s,%n,%s)", refItem.ID, refItem.CvId, refItem.Name, refItem.OtherDetail,
refItem.ReferredBY, refItem.EmployeeNo);
tc.ExecuteNonQuery(sql);
}
internal static void UpdateReferredBy(ReferredBy refItem, TransactionContext tc)
{
string sql = SQLParser.MakeSQL(
@"Update CVReferredBy Set CvId = %n,Name = %s,OtherDetail = %s,ReferredBy = %n,EmployeeNo = %s Where ReferredByID = %n",
refItem.CvId, refItem.Name, refItem.OtherDetail, refItem.ReferredBY, refItem.EmployeeNo, refItem.ID);
tc.ExecuteNonQuery(sql);
}
internal static void Delete(int iD, TransactionContext tc)
{
string sql = SQLParser.MakeSQL(@"Delete From CVReferredBy Where ReferredByID = %n", iD);
tc.ExecuteNonQuery(sql);
}
internal static void DeleteByCvId(int oID, TransactionContext tc)
{
string sql = SQLParser.MakeSQL(@"Delete From CVReferredBy Where CvId = %n", oID);
tc.ExecuteNonQuery(sql);
}
}
}