62 lines
1.7 KiB
C#
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; }
|
|
}
|
|
} |