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
+120
View File
@@ -0,0 +1,120 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using NPOI.SS.UserModel;
using WebLib;
using System.Data;
namespace Education.Report
{
public class 滿 : ReportBase
{
public DataTable Table;
public List<> List;
public List<滿調> 滿List;
public List<滿調> 滿List;
public List<> List;
public MemoryStream DoReport()
{
excel.WorkBook.RemoveSheetAt(0);
List.ForEach(c =>
{
var sheetName = $"{c.課程序號}-{c.課程名稱}".Replace(".", "-")
.Replace("\\", "-")
.Replace("/", "-")
.Replace("?", "-")
.Replace("*", "-")
.Replace("[", "-")
.Replace("]", "-");
if (sheetName.Length > 31)
sheetName = sheetName.Substring(0, 31);
sheet = workbook.CreateSheet(sheetName);
excel.Sheet = sheet;
var 滿List = 滿List.FindAll(x => x. == c.).ToList();
// 報表抬頭
excel.MergeCell(0, 2, 0, 5);
excel.SetCellValue(0, 2, "課程評價", bodyStyleCenter);
excel.SetRangeOuterBorder(0, 2, 0, 5, BorderStyle.Thin);
excel.MergeCell(0, 6, 0, 9);
excel.SetCellValue(0, 6, "其他評價", bodyStyleCenter);
excel.SetRangeOuterBorder(0, 6, 0, 9, BorderStyle.Thin);
excel.SetCellValue(1, 0, "員工編號", bodyStyleCenter);
excel.SetCellValue(1, 1, "學員姓名", bodyStyleCenter);
excel.SetCellValue(1, 2, "1.課程的實用性", bodyStyleCenter);
excel.SetCellValue(1, 3, "2.講師的授課方式", bodyStyleCenter);
excel.SetCellValue(1, 4, "3.講師的專業知識", bodyStyleCenter);
excel.SetCellValue(1, 5, "4.課程時數安排", bodyStyleCenter);
excel.SetCellValue(1, 6, "1.行政服務品質", bodyStyleCenter);
excel.SetCellValue(1, 7, "2.餐點及茶飲", bodyStyleCenter);
excel.SetCellValue(1, 8, "3.場地滿意度", bodyStyleCenter);
excel.SetCellValue(1, 9, "4.對整體活動表現", bodyStyleCenter);
excel.MergeCell(0, 10, 1, 10);
excel.SetCellValue(0, 10, "針對未來相關課程,煩請提供建議以做為我們後續課程之規劃", bodyStyleCenter);
excel.SetRangeOuterBorder(0, 10, 1, 10, BorderStyle.Thin);
excel.MergeCell(0, 11, 1, 11);
excel.SetCellValue(0, 11, "上課心得摘要", bodyStyleCenter);
excel.SetRangeOuterBorder(0, 11, 1, 11, BorderStyle.Thin);
excel.SetRowHeightInPoints(0, BodyRowHeight);
excel.SetRowHeightInPoints(1, BodyRowHeight * 3);
// 設定各欄寬度
excel.SetColumnWidthInChars(0, 12);
excel.SetColumnWidthInChars(1, 12);
excel.SetColumnWidthInChars(2, 10);
excel.SetColumnWidthInChars(3, 10);
excel.SetColumnWidthInChars(4, 10);
excel.SetColumnWidthInChars(5, 10);
excel.SetColumnWidthInChars(6, 10);
excel.SetColumnWidthInChars(7, 10);
excel.SetColumnWidthInChars(8, 10);
excel.SetColumnWidthInChars(9, 10);
excel.SetColumnWidthInChars(10, 50);
excel.SetColumnWidthInChars(11, 100);
// 報表內容
int row = 2;
foreach (DataRow r in Table.Rows)
{
int col = 0;
var = DAC.GetString(r["學員編號"]);
var = DAC.GetString(r["學員姓名"]);
var 滿List = 滿List.FindAll(x => x. == )
.OrderBy(x => x.)
.ToList();
var 滿List = 滿List.FindAll(x => x. == )
.OrderBy(x => x.)
.ToList();
var Item = List.FirstOrDefault(x => x. == );
excel.SetCellValue(row, col++, , bodyStyleCenter);
excel.SetCellValue(row, col++, , bodyStyleCenter);
for (var i = 0; i < 4; i++)
{
excel.SetCellValue(row, col++, 滿List.Count >= i + 1 ? DAC.GetString(滿List[i].) : "", bodyStyleCenter);
}
for (var i = 0; i < 4; i++)
{
excel.SetCellValue(row, col++, 滿List.Count >= i + 1 ? DAC.GetString(滿List[i].) : "", bodyStyleCenter);
}
excel.SetCellValue(row, col++, DAC.GetString(Item?.), bodyStyleLeft);
excel.SetCellValue(row, col++, DAC.GetString(Item?.), bodyStyleLeft);
row++;
}
});
MemoryStream ms = new MemoryStream();
workbook.Write(ms);
return ms;
}
}
}