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

41 lines
1.5 KiB
C#

using HRM.BO;
using Ease.Core.DataAccess;
using System;
using System.Data;
namespace HRM.DA
{
public class CVOrgDA
{
internal static void InsertCVOrgDA(CVOrg oCVOrg, TransactionContext tc)
{
string sql = SQLParser.MakeSQL(@"Insert Into CVOrg(CVOrgID,CVID,DesignationID,OrganizationID,CVOrgType)
Values(%n,%n,%n,%n,%n)", oCVOrg.ID, oCVOrg.CvID,
DataReader.GetNullValue(oCVOrg.DesignationID, 0), DataReader.GetNullValue(oCVOrg.OrganizationId, 0),
oCVOrg.CVOrgType);
tc.ExecuteNonQuery(sql);
}
internal static void UpdateCVOrgDA(CVOrg oCVOrg, TransactionContext tc)
{
string sql = SQLParser.MakeSQL(
@"Update CVOrg Set CVID = %n,DesignationID = %s,OrganizationID = %n,CVOrgType = %s Where CVOrgID = %n",
oCVOrg.CvID, DataReader.GetNullValue(oCVOrg.DesignationID, 0),
DataReader.GetNullValue(oCVOrg.OrganizationId, 0), oCVOrg.CVOrgType, oCVOrg.ID);
tc.ExecuteNonQuery(sql);
}
internal static void Delete(int iD, TransactionContext tc)
{
string sql = SQLParser.MakeSQL(@"Delete From CVOrg Where CVOrgID = %n", iD);
tc.ExecuteNonQuery(sql);
}
internal static void DeleteByCvId(int oID, TransactionContext tc)
{
string sql = SQLParser.MakeSQL(@"Delete From CVOrg Where CvId = %n", oID);
tc.ExecuteNonQuery(sql);
}
}
}