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

54 lines
2.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Ease.CoreV35.DataAccess;
using Ease.CoreV35.Model;
using Payroll.BO;
namespace Payroll.Service
{
public class BoardMemberDA
{
internal static void Insert(BoardMember obBm, TransactionContext tc)
{
string sql = SQLParser.MakeSQL(@"Insert Into RecruitementBoardMember(BoardMemberID,EmployeeId,
StepId,ProcessId)
Values(%n,%n,%n,%n)", obBm.ID.Integer, obBm.EmployeeId.Integer, obBm.StepId.Integer, obBm.ProcessId.Integer);
tc.ExecuteNonQuery(sql);
}
internal static void Delete(ID oID,ID recrStepId,TransactionContext tc)
{
string sql = SQLParser.MakeSQL(@"Delete From RecruitementBoardMember Where ProcessId = %n And StepId = %n", oID.Integer, recrStepId.Integer);
tc.ExecuteNonQuery(sql);
}
internal static void Update(BoardMember obBm, TransactionContext tc)
{
string sql = SQLParser.MakeSQL(@"Update RecruitementBoardMember Set EmployeeId = %n,StepId = %n,ProcessId = %n
Where BoardMemberID = %n", obBm.EmployeeId.Integer, obBm.StepId, obBm.ProcessId.Integer, obBm.ID.Integer);
tc.ExecuteNonQuery(sql);
}
internal static IDataReader Get(TransactionContext tc, ID processID, ID stepID)
{
string sql = SQLParser.MakeSQL(@"Select * From RecruitementBoardMember Where ProcessId = %n And StepId = %n", processID.Integer, stepID.Integer);
return tc.ExecuteReader(sql);
}
internal static void Delete(ID stepID, TransactionContext tc)
{
string sql = SQLParser.MakeSQL(@"Delete From RecruitementBoardMember Where StepId = %n", stepID.Integer);
tc.ExecuteNonQuery(sql);
}
internal static void Delete(ID processID, ID stepID, ID employeeID, TransactionContext tc)
{
string sql = SQLParser.MakeSQL(@"Delete From RecruitementBoardMember Where ProcessId = %n And StepId = %n And EmployeeId = %n", processID.Integer,stepID.Integer,employeeID.Integer);
tc.ExecuteNonQuery(sql);
}
}
}