62 lines
2.2 KiB
C#
62 lines
2.2 KiB
C#
|
|
using Ease.Core.DataAccess;
|
|||
|
|
using HRM.BO;
|
|||
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Data;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Threading.Tasks;
|
|||
|
|
|
|||
|
|
namespace HRM.DA
|
|||
|
|
{
|
|||
|
|
internal class FundBranchDA
|
|||
|
|
{
|
|||
|
|
private FundBranchDA()
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
internal static void Insert(TransactionContext tc, FundBranch item)
|
|||
|
|
{
|
|||
|
|
tc.ExecuteNonQuery(
|
|||
|
|
"INSERT INTO FM_BRANCH(BRANCHID, BRANCHCODE, BANKID, BRANCHNAME, RoutingNo, Address, CONTACTNO, FAX, CREATEDBY, CREATEDDATE, FundTypeID)" +
|
|||
|
|
" VALUES(%n, %s, %n, %s, %n, %s, %s, %s, %n, %d, %n)", item.ID, item.Code, item.BankID, item.Name,
|
|||
|
|
item.RoutingNo, item.Address, item.Telephone, item.FaxNo, item.CreatedBy, item.CreatedDate, item.FundTypeID);
|
|||
|
|
}
|
|||
|
|
internal static void Update(TransactionContext tc, FundBranch item)
|
|||
|
|
{
|
|||
|
|
tc.ExecuteNonQuery(
|
|||
|
|
"Update FM_BRANCH Set BRANCHCODE=%s, BANKID= %n, BRANCHNAME=%s, RoutingNo=%n, Address=%s, CONTACTNO=%s,FAX=%s, MODIFIEDBY=%n, MODIFIEDDATE=%D" +
|
|||
|
|
"Where BRANCHID = %n", item.Code, item.BankID, item.Name,
|
|||
|
|
item.RoutingNo, item.Address, item.Telephone,item.FaxNo, item.ModifiedBy, item.ModifiedDate, item.ID);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
internal static IDataReader Get(TransactionContext tc)
|
|||
|
|
{
|
|||
|
|
return tc.ExecuteReader("SELECT * FROM FM_BRANCH");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
internal static IDataReader Get(TransactionContext tc, int ID)
|
|||
|
|
{
|
|||
|
|
return tc.ExecuteReader("SELECT * FROM FM_BRANCH WHERE BRANCHID=%n", ID);
|
|||
|
|
}
|
|||
|
|
internal static IDataReader GetByFundTypeID(TransactionContext tc, int FundTypeID)
|
|||
|
|
{
|
|||
|
|
return tc.ExecuteReader("SELECT * FROM FM_BRANCH WHERE FundTypeID=%n", FundTypeID);
|
|||
|
|
}
|
|||
|
|
internal static IDataReader GetByBankID(TransactionContext tc, int bankID)
|
|||
|
|
{
|
|||
|
|
return tc.ExecuteReader("SELECT * FROM FM_BRANCH WHERE BankID=%n", bankID);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
internal static void Delete(TransactionContext tc, int ID)
|
|||
|
|
{
|
|||
|
|
tc.ExecuteNonQuery("DELETE FROM FM_BRANCH WHERE BRANCHID=%n", ID);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|