HRM-10/HRM.DA/DA/Fund/GF/ESBSlabDA.cs
Mohaimen Hasan 838b8d4480 first commit
2026-11-03 13:06:00 +06:00

69 lines
2.1 KiB
C#

using System;
using System.Collections.Generic;
using System;
using System.Data;
using System.Linq;
using System.Text;
using Ease.Core.DataAccess;
using HRM.BO.Fund;
namespace HRM.DA.Fund
{
internal class ESBSlabDA
{
public ESBSlabDA()
{
}
#region Insert Function
internal static void Insert(TransactionContext tc, ESBSlab item)
{
string sql = SQLParser.MakeSQL("INSERT INTO FM_ESBSlab (SlabID, ServiceYear, CalculNo, fundTypeID, CreatedBy,CreatedDate)" +
" VALUES(%n, %n,%n,%n,%n,%d)", item.ID, item.ServiceYear,item.CalculNo, item.FundTypeID, item.CreatedBy, item.CreatedDate);
tc.ExecuteNonQuery(sql);
}
#endregion
#region Update function
internal static void Update(TransactionContext tc, ESBSlab item)
{
string sql = SQLParser.MakeSQL("UPDATE FM_ESBSlab Set ServiceYear = %n, CalculNo = %n, fundTypeID=%n, ModifiedBy = %n, ModifiedDate = %d" +
"WHERE SlabID = %n ", item.ServiceYear, item.CalculNo, item.FundTypeID, item.ModifiedBy, item.ModifiedDate,
item.ID);
tc.ExecuteNonQuery(sql);
}
#endregion
#region Delete Function
internal static void Delete(TransactionContext tc, int ESBID)
{
string sSQL = SQLParser.MakeSQL("DELETE FROM FM_ESBSlab WHERE SlabID=%n", ESBID);
tc.ExecuteNonQuery(sSQL);
}
#endregion
#region Get Function
internal static IDataReader Get(TransactionContext tc, int ESBID)
{
return tc.ExecuteReader("SELECT * FROM FM_ESBSlab WHERE SlabID=%n", ESBID);
}
internal static IDataReader Get(TransactionContext tc)
{
return tc.ExecuteReader("SELECT * FROM FM_ESBSlab order by ServiceYear");
}
internal static IDataReader GetByFundTypeID(TransactionContext tc, int fundTypeID)
{
return tc.ExecuteReader("SELECT * FROM FM_ESBSlab Where FundTypeID = %n order by ServiceYear",fundTypeID);
}
#endregion
}
}