47 lines
1.5 KiB
C#
47 lines
1.5 KiB
C#
using System;
|
|
using Payroll.BO;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using Ease.CoreV35.Model;
|
|
using System.Data.SqlClient;
|
|
using Ease.CoreV35.DataAccess;
|
|
using System.Collections.Generic;
|
|
using Ease.CoreV35.DataAccess.SQL;
|
|
|
|
namespace Payroll.Service
|
|
{
|
|
class PremiumSetupDA
|
|
{
|
|
internal static IDataReader Get(TransactionContext tc, ID id)
|
|
{
|
|
return tc.ExecuteReader("SELECT * FROM PremiumSetup WHERE PremiumSetupID=%n", id.Integer);
|
|
}
|
|
|
|
internal static IDataReader Get(TransactionContext tc)
|
|
{
|
|
return tc.ExecuteReader("SELECT * FROM PremiumSetup");
|
|
}
|
|
|
|
internal static void Insert(Ease.CoreV35.DataAccess.TransactionContext tc, PremiumSetup oItem)
|
|
{
|
|
tc.ExecuteNonQuery("INSERT INTO PremiumSetup (PremiumSetupID, Factor, PremiumRate)" +
|
|
" VALUES(%n, %n, %n)", oItem.ID.Integer, oItem.Factor, oItem.PremiumRate);
|
|
}
|
|
|
|
internal static void Update(TransactionContext tc, PremiumSetup oItem)
|
|
{
|
|
tc.ExecuteNonQuery("UPDATE PremiumSetup SET Factor=%n, PremiumRate=%n" +
|
|
" WHERE PremiumSetupID=%n", oItem.Factor, oItem.PremiumRate, oItem.ID.Integer);
|
|
}
|
|
|
|
internal static void Delete(TransactionContext tc, ID id)
|
|
{
|
|
tc.ExecuteNonQuery("DELETE FROM PremiumSetup WHERE PremiumSetupID=%n", id.Integer);
|
|
}
|
|
internal static void Delete(TransactionContext tc)
|
|
{
|
|
tc.ExecuteNonQuery("DELETE FROM PremiumSetup");
|
|
}
|
|
}
|
|
}
|