CEL_Payroll/Payroll.Service/Attendence/DA/EmpMobileAttendanceDA.cs
2024-09-17 14:30:13 +06:00

43 lines
1.7 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ease.CoreV35.Model;
using Ease.CoreV35.DataAccess;
using Payroll.BO;
using System.Data;
namespace Payroll.Service
{
class EmpMobileAttendanceDA
{
internal static IDataReader Get(TransactionContext tc, ID id)
{
return tc.ExecuteReader(@"select * from EMPMOBILEATTENDANCE where EmpMobAttendID=%n", id.Integer);
}
internal static IDataReader Get(TransactionContext tc)
{
return tc.ExecuteReader(@"select * from EMPMOBILEATTENDANCE");
}
internal static ID Insert(TransactionContext tc, EmpMobileAttendance empAttend)
{
tc.ExecuteNonQuery(@"insert into EMPMOBILEATTENDANCE(EmpMobAttendID,EmpID,IMENO,CreatedBy,CreationDate)
values(%n,%n,%s,%n,%d)", empAttend.ID.Integer, empAttend.EmpID.Integer, empAttend.IMENO, empAttend.CreatedBy.Integer, empAttend.CreatedDate);
return empAttend.ID;
}
internal static ID Delete(TransactionContext tc, EmpMobileAttendance empAttend)
{
tc.ExecuteNonQuery(@"delete from EMPMOBILEATTENDANCE where EmpMobAttendID=%n", empAttend.ID.Integer);
return empAttend.ID;
}
internal static ID Update(TransactionContext tc, EmpMobileAttendance empAttend)
{
tc.ExecuteNonQuery(@"update EMPMOBILEATTENDANCE set EmpID=%n,IMENO=%s,CreatedBy=%n,CreationDate=%d,ModifiedBy=%n,ModifiedDate=%d where EmpMobAttendID=%n ", empAttend.EmpID.Integer, empAttend.IMENO, empAttend.CreatedBy.Integer, empAttend.CreatedDate, empAttend.ModifiedBy.Integer, empAttend.ModifiedDate, empAttend.ID.Integer);
return empAttend.ID;
}
}
}