67 lines
1.8 KiB
C#
67 lines
1.8 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;
|
|||
|
|
|||
|
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 ESBSlab (SlabID, ServiceYear,CreatedBy,CreatedDate)" +
|
|||
|
" VALUES(%n, %n,%n,%n,%n,%d)", item.ID, item.ServiceYear, item.CreatedBy,
|
|||
|
item.CreatedDate);
|
|||
|
|
|||
|
tc.ExecuteNonQuery(sql);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Update function
|
|||
|
|
|||
|
internal static void Update(TransactionContext tc, ESBSlab item)
|
|||
|
{
|
|||
|
string sql = SQLParser.MakeSQL("UPDATE ESBSlab Set ServiceYear = %n, ModifiedBy = %n, ModifiedDate = %d" +
|
|||
|
"WHERE SlabID = %n ", item.ServiceYear, 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 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 ESBSlab WHERE SlabID=%n", ESBID);
|
|||
|
}
|
|||
|
|
|||
|
internal static IDataReader Get(TransactionContext tc)
|
|||
|
{
|
|||
|
return tc.ExecuteReader("SELECT * FROM ESBSlab order by ServiceYear");
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|
|||
|
}
|