76 lines
2.0 KiB
C#
76 lines
2.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using Ease.CoreV35.DataAccess;
|
|
using System.Data;
|
|
using HRM.BO;
|
|
using Ease.Core.DataAccess;
|
|
|
|
namespace HRM.DA
|
|
{
|
|
#region ShiftTermDetailDA
|
|
|
|
internal class ShiftTermDetailDA
|
|
{
|
|
#region Constructor
|
|
|
|
private ShiftTermDetailDA()
|
|
{
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Insert function
|
|
|
|
internal static void Insert(TransactionContext tc, ShiftTermDetail item)
|
|
{
|
|
tc.ExecuteNonQuery(
|
|
"INSERT INTO ShiftTermDetail(ShiftTermDetailID, ShiftTermID, OTHour, SequenceNo,TermID)" +
|
|
" VALUES(%n, %n, %n, %n,%n)", item.ID, item.ShiftTermID, item.Hour, item.SequenceNo, item.TermID);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Update function
|
|
|
|
internal static void Update(TransactionContext tc, ShiftTermDetail item)
|
|
{
|
|
tc.ExecuteNonQuery("UPDATE ShiftTermDetail SET ShiftTermID=%n, OTHour=%n, SequenceNo=%n,TermID=%n" +
|
|
" WHERE ShiftTermDetailID=%n", item.ShiftTermID, item.Hour, item.SequenceNo, item.TermID,
|
|
item.ID);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Get Function
|
|
|
|
internal static IDataReader Get(TransactionContext tc)
|
|
{
|
|
return tc.ExecuteReader("SELECT * FROM ShiftTermDetail");
|
|
}
|
|
|
|
internal static IDataReader Get(TransactionContext tc, int nID)
|
|
{
|
|
return tc.ExecuteReader("SELECT * FROM ShiftTermDetail WHERE ShiftTermDetailID=%n", nID);
|
|
}
|
|
|
|
internal static IDataReader GetByShiftTermID(TransactionContext tc, int nShiftTermID)
|
|
{
|
|
return tc.ExecuteReader("SELECT * FROM ShiftTermDetail WHERE ShiftTermID=%n", nShiftTermID);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Delete function
|
|
|
|
internal static void Delete(TransactionContext tc, int nID)
|
|
{
|
|
tc.ExecuteNonQuery("DELETE FROM ShiftTermDetail WHERE ShiftTermDetailID=%n", nID);
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
} |