chore: 首次簽入 Thinkyu ASP.NET 專案

- 加入 Visual Studio / ASP.NET .gitignore
- 排除建置輸出、IDE 設定、NuGet packages、大型 MSI 安裝檔
This commit is contained in:
2026-09-10 09:42:37 +08:00
commit 577060bc78
2496 changed files with 501389 additions and 0 deletions
@@ -0,0 +1,76 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.IO;
using WebLib;
namespace Education.Forms.
{
public partial class : FormBase
{
protected void Page_Load(object sender, EventArgs e)
{
FunctionName = "學員簽到表列印";
lbMessage.Text = "";
RegisterPostbackTrigger(.SearchButton);
}
protected void ds已截止未上課_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao訓練課程企劃;
}
protected void ds報名學員_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao課程報名;
}
protected void btn列印_Click(object sender, EventArgs e)
{
if (. == 0)
{
lbMessage.Text = "請選擇課程企劃";
return;
}
// 準備資料
int Id = .;
List Data = Dao訓練課程企劃.SelectOne(Id);
DAC_訓練課程內容 Dao訓練課程內容 = new DAC_訓練課程內容(conn);
DataTable Data = Dao訓練課程內容.Select上課講師(Id);
string = "";
foreach (DataRow r in Data.Rows)
{
+= DAC.GetString(r["講師姓名"]) + "、";
}
if (.Length > 0)
= .Substring(0, .Length - 1);
DataTable dt = Dao課程報名.Select確定報名學員名單(Id);
if (dt.Rows.Count == 0)
{
lbMessage.Text = "此課程目前沒有指定必修人員,也沒有選修人員報名,不需列印學員簽到表";
return;
}
// 報表產出
Report. report = new Report.();
report. = CompanyName;
report. = .Get訓練日期Str(Data[0]., Data[0].);
report. = Data[0].;
report. = GetData.(Id).;
report. = ;
report. = Dao員工.Get員工姓名(Data[0].);
report.List = Dao訓練課程內容.Select訓練日期List(Id);
report.data = dt;
MemoryStream ms = report.DoReport();
ResponseWriteStream(ms, String.Format("{0:yyyyMMdd}_{1}_學員簽到表.xlsx", Data[0]., Data[0].));
}
}
}