70 lines
2.3 KiB
C#
70 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 RowSumCalcItemDA
|
|||
|
|
{
|
|||
|
|
public RowSumCalcItemDA() { }
|
|||
|
|
#region Insert function
|
|||
|
|
public static void Insert(TransactionContext tc, RowSumCalcItem oItem)
|
|||
|
|
{
|
|||
|
|
tc.ExecuteNonQuery("INSERT INTO FM_RowSumCalcItem(RowSumCalcItemID, CALCROWID, OtherRowID, Operator)" +
|
|||
|
|
" VALUES(%n, %n, %n, %n)", oItem.ID, oItem.CalcRowID, oItem.RDReportRow.ID, oItem.Operator);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region Update function
|
|||
|
|
public static void Update(TransactionContext tc, RowSumCalcItem oItem)
|
|||
|
|
{
|
|||
|
|
tc.ExecuteNonQuery("UPDATE FM_RowSumCalcItem SET CALCROWID=%n, OtherRowID=%n, Operator=%n" +
|
|||
|
|
" WHERE RowSumCalcItemID=%n", oItem.CalcRowID, oItem.OtherRowID, oItem.Operator, oItem.ID);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region ID Generation function
|
|||
|
|
public static int GetNewID(TransactionContext tc)
|
|||
|
|
{
|
|||
|
|
return tc.GenerateID("FM_RowSumCalcItem", "RowSumCalcItemID");
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region Get Function
|
|||
|
|
//public static IDataReader Get(TransactionContext tc)
|
|||
|
|
//{
|
|||
|
|
// return tc.ExecuteReader("SELECT * FROM RowSumCalcItem");
|
|||
|
|
//}
|
|||
|
|
//public static IDataReader Get(TransactionContext tc, int nRowSumCalcItemID)
|
|||
|
|
//{
|
|||
|
|
// return tc.ExecuteReader("SELECT * FROM RowSumCalcItem WHERE RowSumCalcItemID=%n", nRowSumCalcItemID);
|
|||
|
|
//}
|
|||
|
|
public static IDataReader GetByRowIDGetByRowID(TransactionContext tc, int nRowID)
|
|||
|
|
{
|
|||
|
|
return tc.ExecuteReader("SELECT * FROM FM_RowSumCalcItem WHERE CALCROWID=%n", nRowID);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region Delete function
|
|||
|
|
public static void Delete(TransactionContext tc, int nRowSumCalcItemID)
|
|||
|
|
{
|
|||
|
|
tc.ExecuteNonQuery("DELETE FROM [FM_RowSumCalcItem] WHERE RowSumCalcItemID=%n", nRowSumCalcItemID);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public static void DeleteByRowID(TransactionContext tc, int nRowID)
|
|||
|
|
{
|
|||
|
|
tc.ExecuteNonQuery("DELETE FROM [FM_RowSumCalcItem] WHERE CALCROWID=%n", nRowID);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|