51 lines
1.9 KiB
C#
51 lines
1.9 KiB
C#
|
using System;
|
|||
|
using Ease.Core.Model;
|
|||
|
using Ease.Core.DataAccess;
|
|||
|
using HRM.BO;
|
|||
|
using Ease.Core.Utility;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Data;
|
|||
|
|
|||
|
namespace HRM.DA
|
|||
|
{
|
|||
|
internal class AdvanceIncomeTaxDA
|
|||
|
{
|
|||
|
#region Methods
|
|||
|
|
|||
|
internal static IDataReader Get(TransactionContext tc, int advanceIncomeTaxID)
|
|||
|
{
|
|||
|
return tc.ExecuteReader("SELECT * FROM AdvanceIncomeTax WHERE AdvanceIncomeTaxID=%n", advanceIncomeTaxID);
|
|||
|
}
|
|||
|
|
|||
|
internal static IDataReader Get(TransactionContext tc)
|
|||
|
{
|
|||
|
return tc.ExecuteReader("SELECT * FROM AdvanceIncomeTax");
|
|||
|
}
|
|||
|
|
|||
|
internal static void Insert(TransactionContext tc, AdvanceIncomeTax item)
|
|||
|
{
|
|||
|
string sql = SQLParser.MakeSQL(
|
|||
|
@"INSERT INTO AdvanceIncomeTax(AdvanceIncomeTaxID, EmployeeID, TaxParameterID, Amount, Remarks, CreatedBy, CreatedDate)
|
|||
|
VALUES(%n, %n, %n, %n, %s, %n, %d)", item.ID, item.EmployeeID, item.TaxParameterID,
|
|||
|
item.Amount, item.Remarks, DataReader.GetNullValue(item.CreatedBy),
|
|||
|
DataReader.GetNullValue(item.CreatedDate));
|
|||
|
|
|||
|
tc.ExecuteNonQuery(sql);
|
|||
|
}
|
|||
|
|
|||
|
internal static void Update(TransactionContext tc, AdvanceIncomeTax item)
|
|||
|
{
|
|||
|
tc.ExecuteNonQuery(
|
|||
|
"UPDATE AdvanceIncomeTax SET EmployeeID=%n, TaxParameterID=%n, Amount=%n, Remarks=%s, ModifiedBy=%n, ModifiedDate=%d" +
|
|||
|
" WHERE AdvanceIncomeTaxID=%n", item.EmployeeID, item.TaxParameterID, item.Amount, item.Remarks,
|
|||
|
DataReader.GetNullValue(item.ModifiedBy), DataReader.GetNullValue(item.ModifiedDate), item.ID);
|
|||
|
}
|
|||
|
|
|||
|
internal static void Delete(TransactionContext tc, int advanceIncomeTaxID)
|
|||
|
{
|
|||
|
tc.ExecuteNonQuery("DELETE FROM AdvanceIncomeTax WHERE AdvanceIncomeTaxID=%n", advanceIncomeTaxID);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|
|||
|
}
|