CEL_Payroll/Payroll.Service/Recruitement/DA/CVOrgDA.cs

39 lines
1.6 KiB
C#
Raw Normal View History

2024-09-17 14:30:13 +06:00
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 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.Integer, oCVOrg.CvID.Integer, DataReader.GetNullValue(oCVOrg.DesignationID,IDType.Integer), DataReader.GetNullValue(oCVOrg.OrganizationId,IDType.Integer),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.Integer, DataReader.GetNullValue(oCVOrg.DesignationID,IDType.Integer),DataReader.GetNullValue(oCVOrg.OrganizationId,IDType.Integer),oCVOrg.CVOrgType,oCVOrg.ID.Integer);
tc.ExecuteNonQuery(sql);
}
internal static void Delete(ID iD, TransactionContext tc)
{
string sql = SQLParser.MakeSQL(@"Delete From CVOrg Where CVOrgID = %n", iD.Integer);
tc.ExecuteNonQuery(sql);
}
internal static void DeleteByCvId(ID oID, TransactionContext tc)
{
string sql = SQLParser.MakeSQL(@"Delete From CVOrg Where CvId = %n", oID.Integer);
tc.ExecuteNonQuery(sql);
}
}
}