74 lines
2.0 KiB
C#
74 lines
2.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using Ease.CoreV35.DataAccess;
|
|
using Payroll.BO;
|
|
using Ease.CoreV35.Model;
|
|
using System.Data;
|
|
|
|
namespace Payroll.Service.Attendence.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.Integer, item.ShiftTermID.Integer, item.Hour, item.SequenceNo, item.TermID.Integer);
|
|
}
|
|
|
|
#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.Integer, item.Hour, item.SequenceNo, item.TermID.Integer, item.ID.Integer);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Get Function
|
|
|
|
internal static IDataReader Get(TransactionContext tc)
|
|
{
|
|
return tc.ExecuteReader("SELECT * FROM ShiftTermDetail");
|
|
|
|
}
|
|
|
|
internal static IDataReader Get(TransactionContext tc, ID nID)
|
|
{
|
|
return tc.ExecuteReader("SELECT * FROM ShiftTermDetail WHERE ShiftTermDetailID=%n", nID);
|
|
}
|
|
|
|
internal static IDataReader GetByShiftTermID(TransactionContext tc, ID nShiftTermID)
|
|
{
|
|
return tc.ExecuteReader("SELECT * FROM ShiftTermDetail WHERE ShiftTermID=%n", nShiftTermID.Integer);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Delete function
|
|
|
|
internal static void Delete(TransactionContext tc, ID nID)
|
|
{
|
|
tc.ExecuteNonQuery("DELETE FROM [ShiftTermDetail] WHERE ShiftTermDetailID=%n", nID);
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
}
|