63 lines
2.1 KiB
C#
63 lines
2.1 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using Ease.CoreV35.Model;
|
|||
|
using System.Data.SqlClient;
|
|||
|
using Ease.CoreV35.DataAccess;
|
|||
|
using Ease.CoreV35.DataAccess.SQL;
|
|||
|
|
|||
|
namespace Payroll.Service
|
|||
|
{
|
|||
|
#region PayScaleDetailDA
|
|||
|
public class PLDailyInterestDA
|
|||
|
{
|
|||
|
#region Constructor
|
|||
|
|
|||
|
private PLDailyInterestDA() { }
|
|||
|
|
|||
|
#endregion
|
|||
|
#region Get
|
|||
|
internal static System.Data.IDataReader Get(TransactionContext tc, DateTime FrominterestDate, DateTime ToIntDate)
|
|||
|
{
|
|||
|
string ssql = SQLParser.MakeSQL("Select * from PLDailyInterest where InterestDate Between %d AND %d",
|
|||
|
FrominterestDate, ToIntDate);
|
|||
|
return tc.ExecuteReader(ssql);
|
|||
|
}
|
|||
|
|
|||
|
internal static System.Data.IDataReader Get(TransactionContext tc, DateTime issueDate)
|
|||
|
{
|
|||
|
string ssql = SQLParser.MakeSQL("Select * from PLDailyInterest where InterestDate=%d ", issueDate);
|
|||
|
return tc.ExecuteReader(ssql);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Delete
|
|||
|
internal static void Delete(TransactionContext tc, DateTime FrominterestDate, DateTime ToIntDate)
|
|||
|
{
|
|||
|
tc.ExecuteNonQuery("DELETE FROM [PLDailyInterest] WHERE InterestDate>=%d AND InterestDate<=%d", FrominterestDate, ToIntDate);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Update
|
|||
|
internal static void Update(TransactionContext tc, Payroll.BO.PLDailyInterest oInt)
|
|||
|
{
|
|||
|
tc.ExecuteNonQuery("UPDATE PLDailyInterest SET InterestDate=%d, DailyRate=%n,AnnualRate=%n WHERE PLDailyInterestID=%n",
|
|||
|
oInt.InterestDate, oInt.DailyRate,oInt.AnnualRate, oInt.ID.Integer);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Insert
|
|||
|
internal static void Insert(TransactionContext tc, Payroll.BO.PLDailyInterest oInt)
|
|||
|
{
|
|||
|
tc.ExecuteNonQuery("INSERT INTO PLDailyInterest(PLDailyInterestID, InterestDate, DailyRate,AnnualRate)" +
|
|||
|
" VALUES(%n, %d, %n,%n)", oInt.ID.Integer, oInt.InterestDate, oInt.DailyRate,oInt.AnnualRate);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
#endregion
|
|||
|
}
|