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,154 @@
using System;
using System.Collections.Generic;
using System.Data;
using NPOI.SS.UserModel;
using System.IO;
using Wellan.Data;
using Wellan.Common;
/// <summary>
/// 各項法定提撥費用明細表 的摘要描述
/// </summary>
public class : ExcelReportBase
{
public ()
{
}
protected override void Init()
{
base.Init();
titleStyleCenterNoBorder.SetFont(bodyFont);
bodyStyleCenterNoBorder.SetFont(bodyFont);
bodyNumberStyleNoBorder.SetFont(bodyFont);
titleStyleRightNoBorder.SetFont(bodyFont);
titleStyleLeftNoBorder.SetFont(bodyFont);
}
public override MemoryStream ()
{
#region
var row = 0;
excel.MergeCell(row, 0, row, 14, BorderStyle.None);
excel.SetCellValue(row, 0, , headerStyle);
excel.SetRowHeight(row, 20);
row++;
excel.MergeCell(row, 0, row, 14, BorderStyle.None);
excel.SetCellValue(row, 0, string.Format("承辦{0}", ), headerStyle);
excel.SetRowHeight(row, 20);
row++;
excel.MergeCell(row, 0, row, 14, BorderStyle.None);
excel.SetCellValue(row, 0, string.Format("『{0}』", ), headerStyle);
excel.SetRowHeight(row, 20);
row++;
excel.MergeCell(row, 0, row, 14, BorderStyle.None);
excel.SetCellValue(row, 0, string.Format("{0}【{1}{2}】", , , ), headerStyle);
excel.SetRowHeight(row, 20);
row++;
excel.MergeCell(row, 5, row, 8, BorderStyle.None);
excel.SetCellValue(row, 5, "員工自負額", titleStyleCenterNoBorder);
excel.MergeCell(row, 9, row, 14, BorderStyle.None);
excel.SetCellValue(row, 9, "雇主負擔部分", titleStyleCenterNoBorder);
row++;
excel.SetCellValue(row, 0, "序號", titleStyleCenterNoBorder);
excel.SetCellValue(row, 1, "派遣者", titleStyleCenterNoBorder);
excel.SetCellValue(row, 2, "薪資", titleStyleCenterNoBorder);
excel.SetCellValue(row, 3, "投保等級", titleStyleCenterNoBorder);
excel.SetCellValue(row, 4, "到職天數", titleStyleCenterNoBorder);
excel.SetCellValue(row, 5, "勞保", titleStyleCenterNoBorder);
excel.SetCellValue(row, 6, "健保", titleStyleCenterNoBorder);
excel.SetCellValue(row, 7, "福利金", titleStyleCenterNoBorder);
excel.SetCellValue(row, 8, "勞退自提", titleStyleCenterNoBorder);
excel.SetCellValue(row, 9, "勞保", titleStyleCenterNoBorder);
excel.SetCellValue(row, 10, "職災保險", titleStyleCenterNoBorder);
excel.SetCellValue(row, 11, "就業保險", titleStyleCenterNoBorder);
excel.SetCellValue(row, 12, "工資墊償", titleStyleCenterNoBorder);
excel.SetCellValue(row, 13, "健保", titleStyleCenterNoBorder);
excel.SetCellValue(row, 14, "勞退提撥", titleStyleCenterNoBorder);
row++;
#endregion
#region
int beginRow = row;
int serial = 1;
foreach (DataRow r in .Tables[0].Rows)
{
excel.SetCellValue(row, 0, serial, bodyStyleCenterNoBorder);
excel.SetCellValue(row, 1, WDAC.GetStringValue(r["BPNME"]), bodyStyleCenterNoBorder);
excel.SetCellValue(row, 2, WDAC.GetInt32Value(r["SSP00"]) + WDAC.GetInt32Value(r["SSP02"]), bodyNumberStyleNoBorder);
excel.SetCellValue(row, 3, WDAC.GetInt32Value(r["SSL01"]), bodyNumberStyleNoBorder);
excel.SetCellValue(row, 4, WDAC.GetInt32Value(r["SSD02"]), bodyNumberStyleNoBorder);
excel.SetCellValue(row, 5, WDAC.GetInt32Value(r["SSS04"]), bodyNumberStyleNoBorder);
excel.SetCellValue(row, 6, WDAC.GetInt32Value(r["SSS05"]), bodyNumberStyleNoBorder);
excel.SetCellValue(row, 7, WDAC.GetInt32Value(r["SSS07"]), bodyNumberStyleNoBorder);
excel.SetCellValue(row, 8, WDAC.GetInt32Value(r["SSS06"]), bodyNumberStyleNoBorder);
excel.SetCellValue(row, 9, WDAC.GetInt32Value(r["SSH01"]), bodyNumberStyleNoBorder);
excel.SetCellValue(row, 10, WDAC.GetInt32Value(r["SSH02"]), bodyNumberStyleNoBorder);
excel.SetCellValue(row, 11, WDAC.GetInt32Value(r["SSH03"]), bodyNumberStyleNoBorder);
excel.SetCellValue(row, 12, WDAC.GetInt32Value(r["SSH04"]), bodyNumberStyleNoBorder);
excel.SetCellValue(row, 13, WDAC.GetInt32Value(r["SSH05"]), bodyNumberStyleNoBorder);
excel.SetCellValue(row, 14, WDAC.GetInt32Value(r["SSH06"]), bodyNumberStyleNoBorder);
row++;
serial++;
}
#endregion
#region
excel.MergeCell(row, 0, row, 1, BorderStyle.None);
excel.SetCellValue(row, 0, "合計", titleStyleLeftNoBorder);
excel.SetCellFormula(row, 5, String.Format("SUM({0}:{1})", excel.RCtoA1(beginRow, 5), excel.RCtoA1(row - 1, 5)), bodyNumberStyleNoBorder);
excel.SetCellFormula(row, 6, String.Format("SUM({0}:{1})", excel.RCtoA1(beginRow, 6), excel.RCtoA1(row - 1, 6)), bodyNumberStyleNoBorder);
excel.SetCellFormula(row, 7, String.Format("SUM({0}:{1})", excel.RCtoA1(beginRow, 7), excel.RCtoA1(row - 1, 7)), bodyNumberStyleNoBorder);
excel.SetCellFormula(row, 8, String.Format("SUM({0}:{1})", excel.RCtoA1(beginRow, 8), excel.RCtoA1(row - 1, 8)), bodyNumberStyleNoBorder);
excel.SetCellFormula(row, 9, String.Format("SUM({0}:{1})", excel.RCtoA1(beginRow, 9), excel.RCtoA1(row - 1, 9)), bodyNumberStyleNoBorder);
excel.SetCellFormula(row, 10, String.Format("SUM({0}:{1})", excel.RCtoA1(beginRow, 10), excel.RCtoA1(row - 1, 10)), bodyNumberStyleNoBorder);
excel.SetCellFormula(row, 11, String.Format("SUM({0}:{1})", excel.RCtoA1(beginRow, 11), excel.RCtoA1(row - 1, 11)), bodyNumberStyleNoBorder);
excel.SetCellFormula(row, 12, String.Format("SUM({0}:{1})", excel.RCtoA1(beginRow, 12), excel.RCtoA1(row - 1, 12)), bodyNumberStyleNoBorder);
excel.SetCellFormula(row, 13, String.Format("SUM({0}:{1})", excel.RCtoA1(beginRow, 13), excel.RCtoA1(row - 1, 13)), bodyNumberStyleNoBorder);
excel.SetCellFormula(row, 14, String.Format("SUM({0}:{1})", excel.RCtoA1(beginRow, 14), excel.RCtoA1(row - 1, 14)), bodyNumberStyleNoBorder);
row++;
excel.SetCellValue(row, 9, "雇主勞保", titleStyleRightNoBorder);
excel.MergeCell(row, 10, row, 11, BorderStyle.None);
excel.SetCellFormula(row, 10, String.Format("SUM({0}:{1})", excel.RCtoA1(beginRow, 9), excel.RCtoA1(row - 2, 11)), bodyNumberStyleNoBorder);
row++;
excel.MergeCell(row, 0, row, 4, BorderStyle.None);
excel.SetCellValue(row, 0, "承辦人:", titleStyleLeftNoBorder);
excel.MergeCell(row, 5, row, 9, BorderStyle.None);
excel.SetCellValue(row, 5, "業務主管:", titleStyleLeftNoBorder);
excel.MergeCell(row, 10, row, 14, BorderStyle.None);
excel.SetCellValue(row, 10, "公司章:", titleStyleLeftNoBorder);
#endregion
excel.SetColumnWidth(0, 6);
excel.SetColumnWidth(1, 10);
excel.SetColumnWidth(2, 10);
excel.SetColumnWidth(3, 10);
excel.SetColumnWidth(4, 10);
excel.SetColumnWidth(5, 10);
excel.SetColumnWidth(6, 10);
excel.SetColumnWidth(7, 10);
excel.SetColumnWidth(8, 10);
excel.SetColumnWidth(9, 10);
excel.SetColumnWidth(10, 10);
excel.SetColumnWidth(11, 10);
excel.SetColumnWidth(12, 10);
excel.SetColumnWidth(13, 10);
excel.SetColumnWidth(14, 10);
MemoryStream ms = new MemoryStream();
workbook.Write(ms);
return ms;
}
}