69 lines
2.7 KiB
C#
69 lines
2.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using Payroll.BO;
|
|
using Ease.CoreV35.Model;
|
|
using System.Data.SqlClient;
|
|
using Ease.CoreV35.DataAccess;
|
|
using Ease.CoreV35.DataAccess.SQL;
|
|
|
|
namespace Payroll.Service
|
|
{
|
|
public class JVSetupCCDA
|
|
{
|
|
#region Constructor
|
|
public JVSetupCCDA() { }
|
|
#endregion
|
|
|
|
#region Get
|
|
internal static System.Data.IDataReader Get(TransactionContext tc,ID id)
|
|
{
|
|
return tc.ExecuteReader("SELECT * FROM JVSetupCC WHERE JVSetupCCID =%n", id.Integer);
|
|
}
|
|
|
|
internal static System.Data.IDataReader Get(Ease.CoreV35.DataAccess.TransactionContext tc)
|
|
{
|
|
return tc.ExecuteReader("SELECT * FROM JVSetupCC");
|
|
}
|
|
|
|
internal static System.Data.IDataReader GetByJVSetup(TransactionContext tc, ID JVSetupID)
|
|
{
|
|
return tc.ExecuteReader("SELECT * FROM JVSetupCC Where JVSetupID=%n", JVSetupID.Integer);
|
|
}
|
|
#endregion
|
|
|
|
#region Insert
|
|
internal static void Insert(Ease.CoreV35.DataAccess.TransactionContext tc, JVSetupCC oJVSetupCC)
|
|
{
|
|
tc.ExecuteNonQuery("INSERT INTO JVSetupCC(JVSetupCCID, CCID, JVSetupID, CreatedBy, CreationDate)" +
|
|
" VALUES(%n, %n, %n, %n, %d)", oJVSetupCC.ID.Integer, oJVSetupCC.CCID.Integer, oJVSetupCC.JVSetupID.Integer,
|
|
DataReader.GetNullValue(oJVSetupCC.CreatedBy.Integer), DataReader.GetNullValue(oJVSetupCC.CreatedDate));
|
|
}
|
|
#endregion
|
|
|
|
#region Update
|
|
internal static void Update(Ease.CoreV35.DataAccess.TransactionContext tc, JVSetupCC oJVSetupCC)
|
|
{
|
|
tc.ExecuteNonQuery("UPDATE JVSetupCC SET CCID=%n, JVSetupID=%n,ModifiedBy=%n, ModifiedDate=%d" +
|
|
" WHERE JVSetupCCID=%n", oJVSetupCC.CCID.Integer, oJVSetupCC.JVSetupID.Integer,
|
|
DataReader.GetNullValue(oJVSetupCC.ModifiedBy.Integer), DataReader.GetNullValue(oJVSetupCC.ModifiedDate),
|
|
oJVSetupCC.ID.Integer);
|
|
}
|
|
#endregion
|
|
|
|
#region Delete
|
|
internal static void Delete(TransactionContext tc,ID id)
|
|
{
|
|
tc.ExecuteNonQuery("DELETE FROM JVSetupCC WHERE JVSetupCCID=%n", id.Integer);
|
|
}
|
|
//Not Used in Any Service
|
|
internal static void DeleteByJVSetup(TransactionContext tc, ID nJVSetupID)
|
|
{
|
|
tc.ExecuteNonQuery("DELETE FROM JVSetupCC WHERE JVSetupID In(Select JVSetupID from JVSetup where JVSetupID=%n and PayrollTypeID=%n)", nJVSetupID.Integer, Payroll.BO.SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
|
|
//tc.ExecuteNonQuery("DELETE FROM [JVSetupCC] WHERE JVSetupID=%n", nJVSetupID.Integer);
|
|
}
|
|
#endregion
|
|
}
|
|
}
|