using System; using System.Collections.Generic; using System.Linq; using System.Text; using Ease.CoreV35.DataAccess; using Payroll.BO; using System.Data; using Ease.CoreV35.Model; namespace Payroll.Service.Attendence { #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.Integer, item.TermID.Integer, item.Value, item.EmployeeID.Integer, 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.Integer, item.Value, item.EmployeeID.Integer, item.WorkingDate, item.ID.Integer); } #endregion #region Get Function internal static IDataReader Get(TransactionContext tc) { return tc.ExecuteReader("SELECT * FROM DailyOTProcess"); } internal static IDataReader Get(TransactionContext tc, ID nID) { return tc.ExecuteReader("SELECT * FROM DailyOTProcess WHERE ProcessID=%n", nID.Integer); } #endregion #region Delete function internal static void Delete(TransactionContext tc, ID nID) { tc.ExecuteNonQuery("DELETE FROM [DailyOTProcess] WHERE ProcessID=%n", nID.Integer); } #endregion } #endregion }