EchoTex_Payroll/HRM.DA/DA/Attendance/DailyOTProcessDA.cs

71 lines
1.8 KiB
C#
Raw Permalink Normal View History

2024-10-14 10:01:49 +06:00
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 DailyOTProcessDA
internal class DailyOTProcessDA
{
#region Constructor
private DailyOTProcessDA()
{
}
#endregion
#region Insert function
internal static void Insert(TransactionContext tc, DailyOTProcess item)
{
tc.ExecuteNonQuery("INSERT INTO DailyOTProcess(ProcessID, termID, value, employeeID, workingdate)" +
" VALUES(%n, %n, %n, %n, %d)", item.ID, item.TermID, item.Value, item.EmployeeID,
item.WorkingDate);
}
#endregion
#region Update function
internal static void Update(TransactionContext tc, DailyOTProcess item)
{
tc.ExecuteNonQuery("UPDATE DailyOTProcess SET termID=%n, value=%n, employeeID=%n, workingdate=%d" +
" WHERE ProcessID=%n", item.TermID, item.Value, item.EmployeeID, item.WorkingDate,
item.ID);
}
#endregion
#region Get Function
internal static IDataReader Get(TransactionContext tc)
{
return tc.ExecuteReader("SELECT * FROM DailyOTProcess");
}
internal static IDataReader Get(TransactionContext tc, int nID)
{
return tc.ExecuteReader("SELECT * FROM DailyOTProcess WHERE ProcessID=%n", nID);
}
#endregion
#region Delete function
internal static void Delete(TransactionContext tc, int nID)
{
tc.ExecuteNonQuery("DELETE FROM DailyOTProcess WHERE ProcessID=%n", nID);
}
#endregion
}
#endregion
}