chore: 首次簽入 Thinkyu ASP.NET 專案
- 加入 Visual Studio / ASP.NET .gitignore - 排除建置輸出、IDE 設定、NuGet packages、大型 MSI 安裝檔
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Common;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using WebLib;
|
||||
|
||||
namespace Education
|
||||
{
|
||||
/// <summary>
|
||||
/// 通匯銀行資料
|
||||
/// </summary>
|
||||
public class BRML: DAC
|
||||
{
|
||||
public BRML()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
public BRML(DbConnection conn)
|
||||
: base(conn)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public NameValueList BankBranchList()
|
||||
{
|
||||
NameValueList result = new NameValueList();
|
||||
|
||||
NameValueList banks = new NameValueList();
|
||||
IDataList banklist = banks as IDataList;
|
||||
DbCommand cmdSelect = NewCommand("SELECT BCNUM AS Value, BCSNM as Name FROM BRML WHERE LEN(BCNUM) = 3");
|
||||
Select(cmdSelect, ref banklist);
|
||||
|
||||
foreach (NameValueItem bank in banks)
|
||||
{
|
||||
NameValueList branches = new NameValueList();
|
||||
IDataList branchlist = branches as IDataList;
|
||||
DbCommand cmdBranch = NewCommand("SELECT BCNUM AS Value, BCNAM as Name FROM BRML WHERE BCNUM LIKE @BCNUM AND LEN(BCNUM) > 3");
|
||||
AddParam(cmdBranch, "@BCNUM", $"{bank.Value}%");
|
||||
Select(cmdBranch, ref branchlist);
|
||||
|
||||
foreach (NameValueItem branch in branches)
|
||||
{
|
||||
result.Add($"{bank.Name}{branch.Name}", branch.Value);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user