79 lines
2.6 KiB
C#
79 lines
2.6 KiB
C#
using HRM.BO;
|
|
using Ease.Core.DataAccess;
|
|
using System;
|
|
using System.Data;
|
|
|
|
|
|
namespace HRM.DA
|
|
{
|
|
#region LoanSettlementDA
|
|
|
|
public class LoanSettlementDA
|
|
{
|
|
#region Constructor
|
|
|
|
private LoanSettlementDA()
|
|
{
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Get
|
|
|
|
internal static IDataReader Get(TransactionContext tc, int id)
|
|
{
|
|
return tc.ExecuteReader("SELECT * FROM LoanSettlement WHERE LoanSettlementID=%n", id);
|
|
}
|
|
|
|
internal static IDataReader Get(TransactionContext tc)
|
|
{
|
|
return tc.ExecuteReader("SELECT * FROM LoanSettlement");
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Insert
|
|
|
|
internal static void Insert(TransactionContext tc, LoanSettlement oLoanSettlement)
|
|
{
|
|
tc.ExecuteNonQuery("INSERT INTO LoanSettlement(LoanSettlementID, LoanIssueID, WFStatus," +
|
|
" BankID, BranchID, ChequeNo,AccountNo,SubmitDate,Remarks," +
|
|
" CreatedBy, CreationDate)" +
|
|
" VALUES(%n, %n, %n, %n, %n,%s,%s,%d,%s,%n,%d)",
|
|
oLoanSettlement.ID, oLoanSettlement.LoanIssueID,
|
|
oLoanSettlement.WFStatus, oLoanSettlement.BankID, oLoanSettlement.BranchID,
|
|
oLoanSettlement.ChequeNo, oLoanSettlement.AccountNo, oLoanSettlement.SubmitDate,
|
|
oLoanSettlement.Remarks, DataReader.GetNullValue(oLoanSettlement.CreatedBy),
|
|
DataReader.GetNullValue(oLoanSettlement.CreatedDate));
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Update
|
|
|
|
internal static void Update(TransactionContext tc, LoanSettlement oLoanSettlement)
|
|
{
|
|
tc.ExecuteNonQuery("UPDATE LoanSettlement SET( LoanIssueID=%n,WFStatus=%n,BankID=%n," +
|
|
" BranchID=%n,ChequeNo=%s,AccountNo=%s,SubmitDate=%d,Remarks=%s," +
|
|
" ModifiedBy=%n,ModifiedDate=%d WHERE LoanSettlementID=%n)" +
|
|
oLoanSettlement.LoanIssueID, oLoanSettlement.WFStatus, oLoanSettlement.BankID,
|
|
oLoanSettlement.BranchID, oLoanSettlement.ChequeNo, oLoanSettlement.AccountNo,
|
|
oLoanSettlement.SubmitDate, oLoanSettlement.Remarks,
|
|
DataReader.GetNullValue(oLoanSettlement.ModifiedBy),
|
|
DataReader.GetNullValue(oLoanSettlement.ModifiedDate), oLoanSettlement.ID);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Delete
|
|
|
|
internal static void Delete(TransactionContext tc, int id)
|
|
{
|
|
tc.ExecuteNonQuery("DELETE FROM LoanSettlement WHERE LoanSettlementID=%n", id);
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
} |