97 lines
4.7 KiB
C#
97 lines
4.7 KiB
C#
using Ease.Core.DataAccess;
|
|
using HRM.BO;
|
|
using Org.BouncyCastle.Utilities.Collections;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace HRM.DA
|
|
{
|
|
public class PFDepositFlowDA
|
|
{
|
|
#region Constructor
|
|
|
|
private PFDepositFlowDA()
|
|
{
|
|
}
|
|
#endregion
|
|
|
|
#region Get
|
|
internal static IDataReader Get(TransactionContext tc, int id)
|
|
{
|
|
return tc.ExecuteReader("SELECT * FROM PFDepositFlow WHERE PFDepositFlowID=%n", id);
|
|
}
|
|
|
|
internal static IDataReader GetAll(TransactionContext tc)
|
|
{
|
|
return tc.ExecuteReader("SELECT * FROM PFDepositFlow order by PFDepositFlowID asc");
|
|
}
|
|
#endregion
|
|
|
|
#region Insert
|
|
|
|
internal static void Insert(TransactionContext tc, PFDepositFlow oPFDepositFlow)
|
|
{
|
|
string sql = SQLParser.MakeSQL("INSERT INTO PFDepositFlow(PFDepositFlowID, MonthDate, " +
|
|
"ProjectID, OwnContribution, CmpContribution, LapesForfeiture, " +
|
|
"PFloanAsPerPayroll, PFLoanInstallmentRefund, PFDeductionRefund," +
|
|
"PaybleToBDCL, AddPFLoanInstallment, AddPFOutstandigDeduction, " +
|
|
"CreatedBy, CreatedDate, Prepareby, PrepareDate, CheckedBy," +
|
|
" CheckedDate, CheckedRemarks, ApprovedBy, ApprovedDate, ApprovedRemarks)" +
|
|
"VALUES(%n, %d, %n, %n, %n, %n, %n, %n, %n, %n, %n, %n, %n, %d, %n, %d, %n, " +
|
|
"%d, %s, %n, %d, %s)",
|
|
oPFDepositFlow.PFDepositFlowID, oPFDepositFlow.MonthDate, oPFDepositFlow.ProjectID,
|
|
oPFDepositFlow.OwnContribution, oPFDepositFlow.CmpContribution, oPFDepositFlow.LapesForfeiture,
|
|
oPFDepositFlow.PFloanAsPerPayroll, oPFDepositFlow.PFLoanInstallmentRefund,
|
|
oPFDepositFlow.PFDeductionRefund, oPFDepositFlow.PaybleToBDCL, oPFDepositFlow.AddPFLoanInstallment,
|
|
oPFDepositFlow.AddPFOutstandigDeduction, oPFDepositFlow.CreatedBy, oPFDepositFlow.CreatedDate,
|
|
oPFDepositFlow.Prepareby, oPFDepositFlow.PrepareDate, DataReader.GetNullValue(oPFDepositFlow.CheckedBy),
|
|
DataReader.GetNullValue(oPFDepositFlow.CheckedDate), oPFDepositFlow.CheckedRemarks, oPFDepositFlow.ApprovedBy,
|
|
oPFDepositFlow.ApprovedDate, oPFDepositFlow.ApprovedRemarks);
|
|
|
|
tc.ExecuteNonQuery(sql);
|
|
}
|
|
|
|
#endregion
|
|
|
|
|
|
#region Update
|
|
|
|
internal static void Update(TransactionContext tc, PFDepositFlow oPFDepositFlow)
|
|
{
|
|
string sSQL = SQLParser.MakeSQL("UPDATE PFDepositFlow SET " +
|
|
"MonthDate = %d, ProjectID = %n, OwnContribution = %n, CmpContribution = %n, " +
|
|
"LapesForfeiture = %n, PFloanAsPerPayroll = %n, PFLoanInstallmentRefund = %n, " +
|
|
"PFDeductionRefund = %n, PaybleToBDCL = %n, AddPFLoanInstallment = %n, " +
|
|
"AddPFOutstandigDeduction = %n, CreatedBy = %n, CreatedDate = %d, Prepareby = %n, " +
|
|
"PrepareDate = %d, CheckedBy = %d, CheckedDate = %d, CheckedRemarks = %s, " +
|
|
"ApprovedBy = %d, ApprovedDate = %d, ApprovedRemarks = %s " +
|
|
"WHERE PFDepositFlowID = %n)",
|
|
oPFDepositFlow.PFDepositFlowID, oPFDepositFlow.MonthDate, oPFDepositFlow.ProjectID,
|
|
oPFDepositFlow.OwnContribution, oPFDepositFlow.CmpContribution, oPFDepositFlow.LapesForfeiture,
|
|
oPFDepositFlow.PFloanAsPerPayroll, oPFDepositFlow.PFLoanInstallmentRefund,
|
|
oPFDepositFlow.PFDeductionRefund, oPFDepositFlow.PaybleToBDCL, oPFDepositFlow.AddPFLoanInstallment,
|
|
oPFDepositFlow.AddPFOutstandigDeduction, oPFDepositFlow.CreatedBy, oPFDepositFlow.CreatedDate,
|
|
oPFDepositFlow.Prepareby, oPFDepositFlow.PrepareDate, DataReader.GetNullValue(oPFDepositFlow.CheckedBy),
|
|
DataReader.GetNullValue(oPFDepositFlow.CheckedDate), oPFDepositFlow.CheckedRemarks, oPFDepositFlow.ApprovedBy,
|
|
oPFDepositFlow.ApprovedDate, oPFDepositFlow.ApprovedRemarks);
|
|
|
|
tc.ExecuteNonQuery(sSQL);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Delete
|
|
|
|
internal static void Delete(TransactionContext tc, int id)
|
|
{
|
|
tc.ExecuteNonQuery("DELETE FROM PFDepositFlow WHERE PFDepositFlowID=%n", id);
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|