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,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Education.Forms.
{
public class
{
public void WriteFile(int id, HttpContext cnx)
{
DAC_訓練溝通記錄附件 Dao訓練溝通記錄附件 = new DAC_訓練溝通記錄附件();
string = cnx.Server.MapPath(Education.PublicVariable.);
var item = Dao訓練溝通記錄附件.SelectOne(id).FirstOrDefault();
if (item != null)
{
string fileName = String.Format("{0}{1}\\{2:000000}.{3}", , item., item., item.);
string fileName1 = cnx.Server.UrlEncode(item.);
cnx.Response.ClearHeaders();
cnx.Response.Clear();
cnx.Response.Expires = 0;
cnx.Response.Buffer = true;
cnx.Response.AddHeader("Accept-Language", "zh-tw");
cnx.Response.AddHeader("content-disposition", String.Format("attachment; filename=\"{0}\"", fileName1));
cnx.Response.ContentType = item.ContentType;
cnx.Response.WriteFile(fileName);
cnx.Response.End();
}
}
}
}