72 lines
2.3 KiB
C#
72 lines
2.3 KiB
C#
using Ease.Core.DataAccess;
|
|
using HRM.BO;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace HRM.DA
|
|
{
|
|
public class RDRowAmountCalItemDA
|
|
{
|
|
#region Constructor
|
|
public RDRowAmountCalItemDA() { }
|
|
#endregion
|
|
|
|
#region Insert function
|
|
public static void Insert(TransactionContext tc, RDRowAmountCalItem oItem)
|
|
{
|
|
tc.ExecuteNonQuery("INSERT INTO FM_RDRowAmountCalItem(RowAmountCalID, ColRowID, GLID, Operator)" +
|
|
" VALUES(%n, %n, %n, %n)", oItem.ID, oItem.RowID, oItem.GLID, oItem.Operator);
|
|
}
|
|
#endregion
|
|
|
|
#region Update function
|
|
public static void Update(TransactionContext tc, RDRowAmountCalItem oItem)
|
|
{
|
|
tc.ExecuteNonQuery("UPDATE FM_RDRowAmountCalItem SET ColRowID=%n, GLID=%n, Operator=%n" +
|
|
" WHERE RowAmountCalID=%n", oItem.RowID, oItem.GLID, oItem.Operator, oItem.ID);
|
|
}
|
|
#endregion
|
|
|
|
#region ID Generation function
|
|
public static int GetNewID(TransactionContext tc)
|
|
{
|
|
return tc.GenerateID("FM_RDRowAmountCalItem", "RowAmountCalID");
|
|
}
|
|
#endregion
|
|
|
|
#region Get Function
|
|
public static IDataReader Get(TransactionContext tc)
|
|
{
|
|
return tc.ExecuteReader("SELECT * FROM FM_RDRowAmountCalItem");
|
|
}
|
|
|
|
public static IDataReader Get(TransactionContext tc, int nRowAmountCalID)
|
|
{
|
|
return tc.ExecuteReader("SELECT * FROM FM_RDRowAmountCalItem WHERE RowAmountCalID=%n", nRowAmountCalID);
|
|
}
|
|
|
|
public static IDataReader GetByRowID(TransactionContext tc, int nRowID)
|
|
{
|
|
string sSQL = SQLParser.MakeSQL("SELECT * FROM FM_RDRowAmountCalItem WHERE ColRowID=%n", nRowID);
|
|
return tc.ExecuteReader(sSQL);
|
|
}
|
|
#endregion
|
|
|
|
#region Delete function
|
|
public static void Delete(TransactionContext tc, int nRowAmountCalID)
|
|
{
|
|
tc.ExecuteNonQuery("DELETE FROM [FM_RDRowAmountCalItem] WHERE RowAmountCalID=%n", nRowAmountCalID);
|
|
}
|
|
public static void DeleteByRowID(TransactionContext tc, int nRowID)
|
|
{
|
|
tc.ExecuteNonQuery("DELETE FROM [FM_RDRowAmountCalItem] WHERE ColRowID=%n", nRowID);
|
|
}
|
|
#endregion
|
|
|
|
}
|
|
}
|