CEL_Payroll/Payroll.Service/Recruitement/DA/ReferredByDA.cs
2024-09-17 14:30:13 +06:00

39 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ease.CoreV35.DataAccess;
using Ease.CoreV35.Model;
using Payroll.BO;
namespace Payroll.Service
{
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.Integer,refItem.CvId.Integer,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.Integer, refItem.Name, refItem.OtherDetail, refItem.ReferredBY, refItem.EmployeeNo, refItem.ID.Integer);
tc.ExecuteNonQuery(sql);
}
internal static void Delete(ID iD, TransactionContext tc)
{
string sql = SQLParser.MakeSQL(@"Delete From CVReferredBy Where ReferredByID = %n", iD.Integer);
tc.ExecuteNonQuery(sql);
}
internal static void DeleteByCvId(ID oID, TransactionContext tc)
{
string sql = SQLParser.MakeSQL(@"Delete From CVReferredBy Where CvId = %n", oID.Integer);
tc.ExecuteNonQuery(sql);
}
}
}