using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Common;
using WebLib;
namespace Education
{
public class DAC_GetData : DAC
{
public DAC_GetData()
: base()
{ }
public DAC_GetData(DbConnection conn)
: base(conn)
{ }
public 場地 取得選定場地(int 課程企劃id)
{
DAC_場地 Dao場地 = new DAC_場地(conn);
DAC_訓練課程企劃 Dao訓練課程企劃 = new DAC_訓練課程企劃(conn);
int 場地編號 = Dao訓練課程企劃.Select選定場地(課程企劃id);
if (場地編號 > 0)
{
場地List d = Dao場地.SelectOne(場地編號);
if (d.Count > 0)
return d[0];
}
else
{
string 場地名稱 = Dao訓練課程企劃.Select選定場地名稱(課程企劃id);
if (!string.IsNullOrEmpty(場地名稱))
{
場地 result = new 場地();
result.場地名稱 = 場地名稱;
return result;
}
}
return new 場地();
}
public 講師 取得選定講師(int 課程企劃id, int 課程序號)
{
DAC_講師 Dao講師 = new DAC_講師(conn);
DAC_訓練課程企劃 Dao訓練課程企劃 = new DAC_訓練課程企劃(conn);
int 講師編號 = Dao訓練課程企劃.Select選定講師(課程企劃id, 課程序號);
if (講師編號 > 0)
{
講師List d = Dao講師.SelectOne(講師編號);
if (d.Count > 0)
return d[0];
}
else
{
string 講師姓名 = Dao訓練課程企劃.Select選定講師名稱(課程企劃id, 課程序號);
if (!string.IsNullOrEmpty(講師姓名))
{
講師 result = new 講師();
result.姓名 = 講師姓名;
return result;
}
}
return new 講師();
}
public 講師 取得選定講師(object 課程企劃id, object 課程序號)
{
return 取得選定講師(DAC.GetInt32(課程企劃id), DAC.GetInt32(課程序號));
}
public string 取得檢附資料參考(string id)
{
return new DAC_BCLS().Get類別名稱(DAC_檢附資料參考.BSPAR, id).Replace("\r\n", "
").Replace("\r", "
").Replace("\n", "
");
}
}
}