Files
thinkyu/branches/1150807/DAC/溝通記錄/DAC_檢附資料參考.cs
T
sryang 577060bc78 chore: 首次簽入 Thinkyu ASP.NET 專案
- 加入 Visual Studio / ASP.NET .gitignore
- 排除建置輸出、IDE 設定、NuGet packages、大型 MSI 安裝檔
2026-09-10 09:42:37 +08:00

62 lines
1.7 KiB
C#

using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Linq;
using System.Web;
using WebLib;
using System.ComponentModel;
namespace Education
{
[DataObject]
public class DAC_檢附資料參考 : DAC
{
private DAC_訓練溝通記錄歷程 items = new DAC_訓練溝通記錄歷程();
private DAC_BCLS BCLS = new DAC_BCLS();
public static string BSPAR = "檢附資料參考";
public DAC_檢附資料參考() : base()
{
}
public DAC_檢附資料參考(DbConnection conn) : base(conn)
{
BCLS.Connection = conn;
}
[DataObjectMethod(DataObjectMethodType.Select)]
public 檢附資料參考List SelectAll()
{
var result = new 檢附資料參考List();
foreach (var item in items)
{
result.Add(new 檢附資料參考Item()
{
BSPAR = BSPAR,
BSCLS = DAC.GetString(item.Value),
BSSCR = BCLS.Get類別名稱(BSPAR, item.Value),
TEXT = item.Name
});
}
return result;
}
[DataObjectMethod(DataObjectMethodType.Update)]
public void UpdateOne(檢附資料參考Item item)
{
BCLS.UpdateOne(item.BSPAR, item.BSCLS, item.BSSCR);
}
}
public class 檢附資料參考List : List<檢附資料參考Item>
{
}
public class 檢附資料參考Item
{
public string BSPAR { get; set; }
public string BSCLS { get; set; }
public string BSSCR { get; set; }
public string TEXT { get; set; }
}
}