EchoTex_Payroll/HRM.DA/DA/Claim/ClaimPaymentNewDA.cs
2024-10-14 10:01:49 +06:00

77 lines
2.6 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ease.CoreV35.DataAccess;
using Payroll.BO;
using System.Data;
using Ease.Core.DataAccess;
using HRM.BO;
namespace Payroll.Service
{
public class ClaimPaymentNewDA
{
#region Constructor
private ClaimPaymentNewDA() { }
#endregion
internal static IDataReader Get(TransactionContext tc, int id)
{
return tc.ExecuteReader("SELECT * FROM ClaimPaymentNew WHERE ClaimPaymentNewID = %n", id);
}
internal static IDataReader Get(TransactionContext tc, EnumStatus status, int payrollTypeID)
{
throw new NotImplementedException();
}
internal static IDataReader Get(TransactionContext tc, DateTime fromDate, DateTime todate, int payrollTypeID)
{
return tc.ExecuteReader("SELECT * FROM ClaimPaymentNew WHERE PAYMENTISSUEDATE BETWEEN %d AND %d", fromDate, todate);
}
internal static void Insert(TransactionContext tc, ClaimPaymentNew oClaimPaymentNew)
{
tc.ExecuteNonQuery(@"INSERT INTO ClaimPaymentNew
(ClaimPaymentNewID, PAYMENTISSUEDATE, NAME, AMOUNT,
WFStatus, CREATEDBY, CREATEDDATE,REMARKS)" +
" VALUES(%n,%d,%s,%n,%n,%n,%d,%s)",
DataReader.GetNullValue(oClaimPaymentNew.ID), oClaimPaymentNew.PaymentIssueDate, oClaimPaymentNew.Name, oClaimPaymentNew.Amount,
oClaimPaymentNew.WFStatus, oClaimPaymentNew.CreatedBy, oClaimPaymentNew.CreatedDate,oClaimPaymentNew.Remarks);
}
internal static void Update(TransactionContext tc, ClaimPaymentNew oClaimPaymentNew)
{
throw new NotImplementedException();
}
internal static void DeleteChild(TransactionContext tc, int iD)
{
throw new NotImplementedException();
}
internal static void Delete(TransactionContext tc, int id)
{
throw new NotImplementedException();
}
internal static IDataReader GetChild(TransactionContext tc, int attnNationalHolidayID)
{
return tc.ExecuteReader("SELECT * FROM ClaimPaymentDetail WHERE ClaimPaymentNewID=%n", attnNationalHolidayID);
}
internal static IDataReader Get(TransactionContext tc)
{
return tc.ExecuteReader("SELECT * FROM ClaimPaymentNew");
}
internal static IDataReader GetByClaimIDs(TransactionContext tc, string _claimIds)
{
return tc.ExecuteReader("SELECT * FROM ClaimPaymentNew WHERE ClaimPaymentNewID in (%q)",_claimIds);
}
}
}