Bug Fixed
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
kamonwan taengsuk
2024-08-29 15:15:39 +07:00
parent 62e9bfb30a
commit e9e51a0dfc
14 changed files with 128 additions and 91 deletions

View File

@@ -469,31 +469,31 @@ namespace rmutr_report.Controllers
ws.Cell("A1").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; ws.Cell("A1").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Cell("A1").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell("A1").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("A1").Style.Font.FontName = "TH SarabunPSK"; ws.Cell("A1").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("A1").Style.Font.FontSize = 16; ws.Cell("A1").Style.Font.FontSize = 14;
ws.Cell("A1").Style.Font.Bold = true; ws.Cell("A1").Style.Font.Bold = true;
ws.Cell("A2").Value = personnel.agency_name_th; ws.Cell("A2").Value = personnel.agency_name_th;
ws.Cell("A2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; ws.Cell("A2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Cell("A2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell("A2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("A2").Style.Font.FontName = "TH SarabunPSK"; ws.Cell("A2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("A2").Style.Font.FontSize = 16; ws.Cell("A2").Style.Font.FontSize = 14;
ws.Cell("A2").Style.Font.Bold = true; ws.Cell("A2").Style.Font.Bold = true;
ws.Cell("F2").Value = "แผนพื้นฐาน"; ws.Cell("F2").Value = "แผนพื้นฐาน";
ws.Cell("F2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Cell("F2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("F2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell("F2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("F2").Style.Font.FontName = "TH SarabunPSK"; ws.Cell("F2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("F2").Style.Font.FontSize = 16; ws.Cell("F2").Style.Font.FontSize = 14;
ws.Cell("F2").Style.Font.Bold = true; ws.Cell("F2").Style.Font.Bold = true;
//ws.Cell("K12").Style.NumberFormat.Format = "#,##0.0000"; //ws.Cell("K12").Style.NumberFormat.Format = "#,##0.0000";
ws.Column(1).Width = 30; ws.Column(1).Width = 40;
ws.Column(2).Width = 10; ws.Column(2).Width = 15;
ws.Column(3).Width = 10; ws.Column(3).Width = 15;
ws.Column(4).Width = 10; ws.Column(4).Width = 15;
ws.Column(5).Width = 10; ws.Column(5).Width = 15;
ws.Column(6).Width = 10; ws.Column(6).Width = 15;
ws.Column(7).Width = 10; ws.Column(7).Width = 15;
int row = 6; int row = 6;
//int no = 1; //int no = 1;
@@ -3619,14 +3619,26 @@ namespace rmutr_report.Controllers
{ {
var workbook = new XLWorkbook(); var workbook = new XLWorkbook();
var ws = workbook.Worksheets.Add("Sheet1"); var ws = workbook.Worksheets.Add("Sheet1");
ws.Column(1).Width = 30;
ws.Column(2).Width = 20;
ws.Column(3).Width = 20;
ws.Column(4).Width = 20;
ws.Column(5).Width = 20;
ws.Column(6).Width = 20;
ws.Column(8).Width = 20;
ws.Column(9).Width = 20;
ws.Column(10).Width = 20;
ws.Column(11).Width = 20;
ws.Column(12).Width = 20;
ws.Cell("A1").Value = "งบประมาณแผ่นดิน ปีงบประมาณ พ.ศ. "+requestSummary.budget_year+" (คำขอ)"; ws.Cell("A1").Value = "งบประมาณแผ่นดิน ปีงบประมาณ พ.ศ. "+requestSummary.budget_year+" (คำขอ)";
ws.Cell("A1").Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Cell("A1").Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Cell("A1").Style.Font.FontSize = 16; ws.Cell("A1").Style.Font.FontSize = 14;
ws.Cell("A2").Value = "มหาวิทยาลัยเทคโนโลยีราชมงคลรัตนโกสินทร์"; ws.Cell("A2").Value = "มหาวิทยาลัยเทคโนโลยีราชมงคลรัตนโกสินทร์";
ws.Cell("A2").Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Cell("A2").Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Cell("A2").Style.Font.FontSize = 16; ws.Cell("A2").Style.Font.FontSize = 14;
ws.Columns().AdjustToContents();
int col = 2; int col = 2;
int cols = 2; int cols = 2;
int rowheads = 3; int rowheads = 3;
@@ -3646,36 +3658,36 @@ namespace rmutr_report.Controllers
ws.Range("A3:A5").Merge().Value = "งบรายจ่าย"; ws.Range("A3:A5").Merge().Value = "งบรายจ่าย";
ws.Cell(3, 2).Value = "งบประมาณ " + requestSummary.budget_year + " (คำขอ)"; ws.Cell(3, 2).Value = "งบประมาณ " + requestSummary.budget_year + " (คำขอ)";
ws.Cell(4, 2).Value = i.budget_plan_name; ws.Cell(4, 2).Value = i.budget_plan_name;
ws.Cell(5, 2).Value = i.value; ws.Cell(5, 2).Value = i.value??0;
ws.Cell(4, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Cell(4, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(4, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(4, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(4, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(4, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(4, 2).Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Cell(4, 2).Style.Border.RightBorder = XLBorderStyleValues.Thin;
ws.Cell(4, 2).Style.Font.FontName = "TH SarabunPSK"; ws.Cell(4, 2).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(4, 2).Style.Font.FontSize = 16; ws.Cell(4, 2).Style.Font.FontSize = 14;
ws.Cell(4, 2).Style.Alignment.WrapText = true; ws.Cell(4, 2).Style.Alignment.WrapText = true;
ws.Cell("A3").Style.Alignment.WrapText = true; ws.Cell("A3").Style.Alignment.WrapText = true;
ws.Cell("A3").Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Cell("A3").Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Cell("A3").Style.Font.FontSize = 16; ws.Cell("A3").Style.Font.FontSize = 14;
ws.Range("A3:A5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A3:A5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A3:A5").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204); ws.Range("A3:A5").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
ws.Range("A3:A5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Range("A3:A5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(3, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(3, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(3, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204); ws.Cell(3, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
ws.Cell(3, 2).Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Cell(3, 2).Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Cell(3, 2).Style.Font.FontSize = 16; ws.Cell(3, 2).Style.Font.FontSize = 14;
ws.Cell(3, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(3, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(4, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(4, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(4, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204); ws.Cell(4, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
ws.Cell(4, 2).Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Cell(4, 2).Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Cell(4, 2).Style.Font.FontSize = 16; ws.Cell(4, 2).Style.Font.FontSize = 14;
ws.Cell(4, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(4, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(5, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(5, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(5, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204); ws.Cell(5, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
ws.Cell(5, 2).Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Cell(5, 2).Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Cell(5, 2).Style.Font.FontSize = 16; ws.Cell(5, 2).Style.Font.FontSize = 14;
ws.Cell(5, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(5, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
} }
@@ -3685,7 +3697,7 @@ namespace rmutr_report.Controllers
ws.Cell(row, 1).Value = detail.rowno + detail.list; ws.Cell(row, 1).Value = detail.rowno + detail.list;
foreach (var budgetPlan in detail.plans) foreach (var budgetPlan in detail.plans)
{ {
ws.Cell(row, 2).Value = budgetPlan.value; ws.Cell(row, 2).Value = budgetPlan.value??0;
} }
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
@@ -3697,7 +3709,7 @@ namespace rmutr_report.Controllers
XLBorderStyleValues.Thin; XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Font.SetBold().Font.FontName = ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Font.SetBold().Font.FontName =
"TH SarabunPSK"; "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Font.FontSize = 16; ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Fill.BackgroundColor = ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Fill.BackgroundColor =
XLColor.FromArgb(204, 153, 255); XLColor.FromArgb(204, 153, 255);
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -3711,13 +3723,13 @@ namespace rmutr_report.Controllers
ws.Cell(row, 1).Value = detail2.list; ws.Cell(row, 1).Value = detail2.list;
foreach (var budgetPlan in detail2.plans) foreach (var budgetPlan in detail2.plans)
{ {
ws.Cell(row, 2).Value = budgetPlan.value; ws.Cell(row, 2).Value = budgetPlan.value??0;
} }
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 16; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Fill.BackgroundColor = XLColor.FromArgb(153, 204, 255); ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Fill.BackgroundColor = XLColor.FromArgb(153, 204, 255);
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -3728,13 +3740,13 @@ namespace rmutr_report.Controllers
ws.Cell(row, 1).Value = detail2.list; ws.Cell(row, 1).Value = detail2.list;
foreach (var budgetPlan in detail2.plans) foreach (var budgetPlan in detail2.plans)
{ {
ws.Cell(row, 2).Value = budgetPlan.value; ws.Cell(row, 2).Value = budgetPlan.value??0;
} }
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 16; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Fill.BackgroundColor =XLColor.FromArgb(255, 204, 153); ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Fill.BackgroundColor =XLColor.FromArgb(255, 204, 153);
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -3745,13 +3757,13 @@ namespace rmutr_report.Controllers
ws.Cell(row, 1).Value = detail2.rowno + detail2.list; ws.Cell(row, 1).Value = detail2.rowno + detail2.list;
foreach (var budgetPlan in detail2.plans) foreach (var budgetPlan in detail2.plans)
{ {
ws.Cell(row, 2).Value = budgetPlan.value; ws.Cell(row, 2).Value = budgetPlan.value??0;
} }
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontName = "TH SarabunPSK"; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 16; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 255, 204); ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 255, 204);
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -3762,13 +3774,13 @@ namespace rmutr_report.Controllers
ws.Cell(row, 1).Value = detail2.rowno + detail2.list; ws.Cell(row, 1).Value = detail2.rowno + detail2.list;
foreach (var budgetPlan in detail2.plans) foreach (var budgetPlan in detail2.plans)
{ {
ws.Cell(row, 2).Value = budgetPlan.value; ws.Cell(row, 2).Value = budgetPlan.value??0;
} }
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontName = "TH SarabunPSK"; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 16; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 14;
// ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 204, 153); // ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 204, 153);
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -3781,14 +3793,14 @@ namespace rmutr_report.Controllers
ws.Cell(row, 1).Value = detail3.rowno+detail3.list; ws.Cell(row, 1).Value = detail3.rowno+detail3.list;
foreach (var budgetPlan in detail3.plans) foreach (var budgetPlan in detail3.plans)
{ {
ws.Cell(row, 2).Value = budgetPlan.value; ws.Cell(row, 2).Value = budgetPlan.value??0;
} }
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Cell(row,2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Cell(row,2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 16; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 14;
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
row++; row++;
@@ -3810,7 +3822,7 @@ namespace rmutr_report.Controllers
ws.Range("A3:A5").Merge().Value = "งบรายจ่าย"; ws.Range("A3:A5").Merge().Value = "งบรายจ่าย";
ws.Range(ws.Cell(rowheads, cols), ws.Cell(rowheads , cols+ countbudgetplan - 1)).Merge().Value = "งบประมาณ " + requestSummary.budget_year + " (คำขอ)"; ws.Range(ws.Cell(rowheads, cols), ws.Cell(rowheads , cols+ countbudgetplan - 1)).Merge().Value = "งบประมาณ " + requestSummary.budget_year + " (คำขอ)";
ws.Cell(rowhead, col).Value = i.budget_plan_name; ws.Cell(rowhead, col).Value = i.budget_plan_name;
ws.Cell(rowvalue, col).Value = i.value; ws.Cell(rowvalue, col).Value = i.value??0;
ws.Range(ws.Cell(rowheads, cols), ws.Cell(rowheads , cols+ countbudgetplan - 1)).Style ws.Range(ws.Cell(rowheads, cols), ws.Cell(rowheads , cols+ countbudgetplan - 1)).Style
.Border .Border
.OutsideBorder = XLBorderStyleValues.Thin; .OutsideBorder = XLBorderStyleValues.Thin;
@@ -3825,20 +3837,20 @@ namespace rmutr_report.Controllers
ws.Cell(rowhead, col).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(rowhead, col).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(rowhead, col).Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Cell(rowhead, col).Style.Border.RightBorder = XLBorderStyleValues.Thin;
ws.Cell(rowhead, col).Style.Font.FontName = "TH SarabunPSK"; ws.Cell(rowhead, col).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(rowhead, col).Style.Font.FontSize = 16; ws.Cell(rowhead, col).Style.Font.FontSize = 14;
ws.Cell(rowhead, col).Style.Alignment.WrapText = true; ws.Cell(rowhead, col).Style.Alignment.WrapText = true;
ws.Cell(rowhead, col).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204); ws.Cell(rowhead, col).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
ws.Cell("A3").Style.Alignment.WrapText = true; ws.Cell("A3").Style.Alignment.WrapText = true;
ws.Cell("A3").Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Cell("A3").Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Cell("A3").Style.Font.FontSize = 16; ws.Cell("A3").Style.Font.FontSize = 14;
ws.Range("A3:A5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A3:A5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A3:A5").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204); ws.Range("A3:A5").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
ws.Range("A3:A5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Range("A3:A5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(rowvalue, col).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(rowvalue, col).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(rowvalue, col).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204); ws.Cell(rowvalue, col).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
ws.Cell(rowvalue, col).Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Cell(rowvalue, col).Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Cell(rowvalue, col).Style.Font.FontSize = 16; ws.Cell(rowvalue, col).Style.Font.FontSize = 14;
ws.Cell(rowvalue, col).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Cell(rowvalue, col).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(rowvalue, col).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(rowvalue, col).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(rowvalue, col).Style.NumberFormat.SetFormat("#,#"); ws.Cell(rowvalue, col).Style.NumberFormat.SetFormat("#,#");
@@ -3860,17 +3872,17 @@ namespace rmutr_report.Controllers
XLBorderStyleValues.Thin; XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Font.SetBold().Font.FontName = ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Font.SetBold().Font.FontName =
"TH SarabunPSK"; "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Font.FontSize = 16; ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Fill.BackgroundColor = ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Fill.BackgroundColor =
XLColor.FromArgb(204, 153, 255); XLColor.FromArgb(204, 153, 255);
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
foreach (var budgetPlan in detail.plans) foreach (var budgetPlan in detail.plans)
{ {
ws.Cell(row, col2).Value = budgetPlan.value; ws.Cell(row, col2).Value = budgetPlan.value??0;
ws.Cell(row, col2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, col2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, col2).Style.Fill.BackgroundColor = XLColor.FromArgb(204, 153, 255); ws.Cell(row, col2).Style.Fill.BackgroundColor = XLColor.FromArgb(204, 153, 255);
ws.Cell(row, col2).Style.Font.FontName = "TH SarabunPSK"; ws.Cell(row, col2).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row, col2).Style.Font.SetBold().Font.FontSize = 16; ws.Cell(row, col2).Style.Font.SetBold().Font.FontSize = 14;
ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#"); ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#");
ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
@@ -3889,17 +3901,17 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 16; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Fill.BackgroundColor = XLColor.FromArgb(153, 204, 255); ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Fill.BackgroundColor = XLColor.FromArgb(153, 204, 255);
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
col2 = 2; col2 = 2;
foreach (var budgetPlan in detail2.plans) foreach (var budgetPlan in detail2.plans)
{ {
ws.Cell(row, col2).Value = budgetPlan.value; ws.Cell(row, col2).Value = budgetPlan.value??0;
ws.Cell(row, col2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, col2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, col2).Style.Fill.BackgroundColor = XLColor.FromArgb(153, 204, 255); ws.Cell(row, col2).Style.Fill.BackgroundColor = XLColor.FromArgb(153, 204, 255);
ws.Cell(row, col2).Style.Font.FontName = "TH SarabunPSK"; ws.Cell(row, col2).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row, col2).Style.Font.SetBold().Font.FontSize = 16; ws.Cell(row, col2).Style.Font.SetBold().Font.FontSize = 14;
ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#"); ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#");
ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
@@ -3917,17 +3929,17 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontName = "TH SarabunPSK"; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 16; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Fill.BackgroundColor =XLColor.FromArgb(255, 204, 153); ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Fill.BackgroundColor =XLColor.FromArgb(255, 204, 153);
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
col2 = 2; col2 = 2;
foreach (var budgetPlan in detail2.plans) foreach (var budgetPlan in detail2.plans)
{ {
ws.Cell(row, col2).Value = budgetPlan.value; ws.Cell(row, col2).Value = budgetPlan.value??0;
ws.Cell(row, col2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, col2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, col2).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 204, 153); ws.Cell(row, col2).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 204, 153);
ws.Cell(row, col2).Style.Font.FontName = "TH SarabunPSK"; ws.Cell(row, col2).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row, col2).Style.Font.FontSize = 16; ws.Cell(row, col2).Style.Font.FontSize = 14;
ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#"); ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#");
ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
@@ -3946,17 +3958,17 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontName = "TH SarabunPSK"; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 16; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 255, 204); ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 255, 204);
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
col2 = 2; col2 = 2;
foreach (var budgetPlan in detail2.plans) foreach (var budgetPlan in detail2.plans)
{ {
ws.Cell(row, col2).Value = budgetPlan.value; ws.Cell(row, col2).Value = budgetPlan.value??0;
ws.Cell(row, col2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, col2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, col2).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 255, 204); ws.Cell(row, col2).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 255, 204);
ws.Cell(row, col2).Style.Font.FontName = "TH SarabunPSK"; ws.Cell(row, col2).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row, col2).Style.Font.FontSize = 16; ws.Cell(row, col2).Style.Font.FontSize = 14;
ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#"); ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#");
ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
@@ -3976,17 +3988,17 @@ namespace rmutr_report.Controllers
ws.Cell(row,2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Cell(row,2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontName = "TH SarabunPSK"; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 16; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 14;
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#"); ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#");
col2 = 2; col2 = 2;
foreach (var budgetPlan in detail2.plans) foreach (var budgetPlan in detail2.plans)
{ {
ws.Cell(row, col2).Value = budgetPlan.value; ws.Cell(row, col2).Value = budgetPlan.value??0;
ws.Cell(row, col2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, col2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, col2).Style.Font.FontName = "TH SarabunPSK"; ws.Cell(row, col2).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row, col2).Style.Font.FontSize = 16; ws.Cell(row, col2).Style.Font.FontSize = 14;
ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
@@ -4007,15 +4019,15 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 16; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 14;
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
col2 = 2; col2 = 2;
foreach (var budgetPlan in detail3.plans) foreach (var budgetPlan in detail3.plans)
{ {
ws.Cell(row, col2).Value = budgetPlan.value; ws.Cell(row, col2).Value = budgetPlan.value??0;
ws.Cell(row, col2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, col2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, col2).Style.Font.FontName = "TH SarabunPSK"; ws.Cell(row, col2).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row, col2).Style.Font.SetBold().Font.FontSize = 16; ws.Cell(row, col2).Style.Font.SetBold().Font.FontSize = 14;
ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#"); ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#");
@@ -4052,14 +4064,23 @@ namespace rmutr_report.Controllers
{ {
var workbook = new XLWorkbook(); var workbook = new XLWorkbook();
var ws = workbook.Worksheets.Add("Sheet1"); var ws = workbook.Worksheets.Add("Sheet1");
ws.Column(1).Width = 30;
ws.Column(2).Width = 20;
ws.Column(3).Width = 20;
ws.Column(4).Width = 20;
ws.Column(5).Width = 20;
ws.Column(6).Width = 20;
ws.Column(8).Width = 20;
ws.Column(9).Width = 20;
ws.Column(10).Width = 20;
ws.Column(11).Width = 20;
ws.Column(12).Width = 20;
ws.Cell("A1").Value = "งบประมาณแผ่นดิน ปีงบประมาณ พ.ศ. "+requestSummary.budget_year+" (คำขอ)"; ws.Cell("A1").Value = "งบประมาณแผ่นดิน ปีงบประมาณ พ.ศ. "+requestSummary.budget_year+" (คำขอ)";
ws.Cell("A1").Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Cell("A1").Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Cell("A1").Style.Font.FontSize = 16; ws.Cell("A1").Style.Font.FontSize = 14;
ws.Cell("A2").Value = "มหาวิทยาลัยเทคโนโลยีราชมงคลรัตนโกสินทร์"; ws.Cell("A2").Value = "มหาวิทยาลัยเทคโนโลยีราชมงคลรัตนโกสินทร์";
ws.Cell("A2").Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Cell("A2").Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Cell("A2").Style.Font.FontSize = 16; ws.Cell("A2").Style.Font.FontSize = 14;
ws.Columns().AdjustToContents();
int col = 2; int col = 2;
int cols = 2; int cols = 2;
int rowheads = 3; int rowheads = 3;
@@ -4079,35 +4100,35 @@ namespace rmutr_report.Controllers
ws.Range("A3:A5").Merge().Value = "งบรายจ่าย"; ws.Range("A3:A5").Merge().Value = "งบรายจ่าย";
ws.Cell(3, 2).Value = "งบประมาณ " + requestSummary.budget_year + " (คำขอ)"; ws.Cell(3, 2).Value = "งบประมาณ " + requestSummary.budget_year + " (คำขอ)";
ws.Cell(4, 2).Value = i.budget_plan_name; ws.Cell(4, 2).Value = i.budget_plan_name;
ws.Cell(5, 2).Value = i.value; ws.Cell(5, 2).Value = i.value??0;
ws.Cell(4, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Cell(4, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(4, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(4, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(4, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(4, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(4, 2).Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Cell(4, 2).Style.Border.RightBorder = XLBorderStyleValues.Thin;
ws.Cell(4, 2).Style.Font.FontName = "TH SarabunPSK"; ws.Cell(4, 2).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(4, 2).Style.Font.FontSize = 16; ws.Cell(4, 2).Style.Font.FontSize = 14;
ws.Cell(4, 2).Style.Alignment.WrapText = true; ws.Cell(4, 2).Style.Alignment.WrapText = true;
ws.Cell("A3").Style.Alignment.WrapText = true; ws.Cell("A3").Style.Alignment.WrapText = true;
ws.Cell("A3").Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Cell("A3").Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Cell("A3").Style.Font.FontSize = 16; ws.Cell("A3").Style.Font.FontSize = 14;
ws.Range("A3:A5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A3:A5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A3:A5").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204); ws.Range("A3:A5").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
ws.Cell(3, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(3, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(3, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204); ws.Cell(3, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
ws.Cell(3, 2).Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Cell(3, 2).Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Cell(3, 2).Style.Font.FontSize = 16; ws.Cell(3, 2).Style.Font.FontSize = 14;
ws.Cell(3, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(3, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(4, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(4, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(4, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204); ws.Cell(4, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
ws.Cell(4, 2).Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Cell(4, 2).Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Cell(4, 2).Style.Font.FontSize = 16; ws.Cell(4, 2).Style.Font.FontSize = 14;
ws.Cell(4, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(4, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(5, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(5, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(5, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204); ws.Cell(5, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
ws.Cell(5, 2).Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Cell(5, 2).Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Cell(5, 2).Style.Font.FontSize = 16; ws.Cell(5, 2).Style.Font.FontSize = 14;
ws.Cell(5, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(5, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
} }
@@ -4117,7 +4138,7 @@ namespace rmutr_report.Controllers
ws.Cell(row, 1).Value = detail.rowno + detail.list; ws.Cell(row, 1).Value = detail.rowno + detail.list;
foreach (var budgetPlan in detail.plans) foreach (var budgetPlan in detail.plans)
{ {
ws.Cell(row, 2).Value = budgetPlan.value; ws.Cell(row, 2).Value = budgetPlan.value??0;
} }
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
@@ -4129,7 +4150,7 @@ namespace rmutr_report.Controllers
XLBorderStyleValues.Thin; XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Font.SetBold().Font.FontName = ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Font.SetBold().Font.FontName =
"TH SarabunPSK"; "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Font.FontSize = 16; ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Fill.BackgroundColor = ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Fill.BackgroundColor =
XLColor.FromArgb(204, 153, 255); XLColor.FromArgb(204, 153, 255);
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -4141,13 +4162,13 @@ namespace rmutr_report.Controllers
ws.Cell(row, 1).Value = detail2.rowno + detail2.list; ws.Cell(row, 1).Value = detail2.rowno + detail2.list;
foreach (var budgetPlan in detail2.plans) foreach (var budgetPlan in detail2.plans)
{ {
ws.Cell(row, 2).Value = budgetPlan.value; ws.Cell(row, 2).Value = budgetPlan.value??0;
} }
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 16; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 14;
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
row++; row++;
@@ -4158,14 +4179,14 @@ namespace rmutr_report.Controllers
ws.Cell(row, 1).Value = detail3.rowno+detail3.list; ws.Cell(row, 1).Value = detail3.rowno+detail3.list;
foreach (var budgetPlan in detail3.plans) foreach (var budgetPlan in detail3.plans)
{ {
ws.Cell(row, 2).Value = budgetPlan.value; ws.Cell(row, 2).Value = budgetPlan.value??0;
} }
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Cell(row,2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Cell(row,2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontName = "TH SarabunPSK"; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 16; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 14;
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
row++; row++;
@@ -4187,7 +4208,7 @@ namespace rmutr_report.Controllers
ws.Range("A3:A5").Merge().Value = "งบรายจ่าย"; ws.Range("A3:A5").Merge().Value = "งบรายจ่าย";
ws.Range(ws.Cell(rowheads, cols), ws.Cell(rowheads , cols+ countbudgetplan - 1)).Merge().Value = "งบประมาณ " + requestSummary.budget_year + " (คำขอ)"; ws.Range(ws.Cell(rowheads, cols), ws.Cell(rowheads , cols+ countbudgetplan - 1)).Merge().Value = "งบประมาณ " + requestSummary.budget_year + " (คำขอ)";
ws.Cell(rowhead, col).Value = i.budget_plan_name; ws.Cell(rowhead, col).Value = i.budget_plan_name;
ws.Cell(rowvalue, col).Value = i.value; ws.Cell(rowvalue, col).Value = i.value??0;
ws.Range(ws.Cell(rowheads, cols), ws.Cell(rowheads , cols+ countbudgetplan - 1)).Style ws.Range(ws.Cell(rowheads, cols), ws.Cell(rowheads , cols+ countbudgetplan - 1)).Style
.Border .Border
.OutsideBorder = XLBorderStyleValues.Thin; .OutsideBorder = XLBorderStyleValues.Thin;
@@ -4202,20 +4223,20 @@ namespace rmutr_report.Controllers
ws.Cell(rowhead, col).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(rowhead, col).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(rowhead, col).Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Cell(rowhead, col).Style.Border.RightBorder = XLBorderStyleValues.Thin;
ws.Cell(rowhead, col).Style.Font.FontName = "TH SarabunPSK"; ws.Cell(rowhead, col).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(rowhead, col).Style.Font.FontSize = 16; ws.Cell(rowhead, col).Style.Font.FontSize = 14;
ws.Cell(rowhead, col).Style.Alignment.WrapText = true; ws.Cell(rowhead, col).Style.Alignment.WrapText = true;
ws.Cell(rowhead, col).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204); ws.Cell(rowhead, col).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
ws.Cell("A3").Style.Alignment.WrapText = true; ws.Cell("A3").Style.Alignment.WrapText = true;
ws.Cell("A3").Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Cell("A3").Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Cell("A3").Style.Font.FontSize = 16; ws.Cell("A3").Style.Font.FontSize = 14;
ws.Range("A3:A5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A3:A5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A3:A5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Range("A3:A5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range("A3:A5").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204); ws.Range("A3:A5").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
ws.Cell(rowvalue, col).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(rowvalue, col).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(rowvalue, col).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204); ws.Cell(rowvalue, col).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
ws.Cell(rowvalue, col).Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Cell(rowvalue, col).Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Cell(rowvalue, col).Style.Font.FontSize = 16; ws.Cell(rowvalue, col).Style.Font.FontSize = 14;
ws.Cell(rowvalue, col).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Cell(rowvalue, col).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(rowvalue, col).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(rowvalue, col).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(rowvalue, col).Style.NumberFormat.SetFormat("#,#"); ws.Cell(rowvalue, col).Style.NumberFormat.SetFormat("#,#");
@@ -4237,17 +4258,17 @@ namespace rmutr_report.Controllers
XLBorderStyleValues.Thin; XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Font.SetBold().Font.FontName = ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Font.SetBold().Font.FontName =
"TH SarabunPSK"; "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Font.FontSize = 16; ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Fill.BackgroundColor = ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Fill.BackgroundColor =
XLColor.FromArgb(204, 153, 255); XLColor.FromArgb(204, 153, 255);
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
foreach (var budgetPlan in detail.plans) foreach (var budgetPlan in detail.plans)
{ {
ws.Cell(row, col2).Value = budgetPlan.value; ws.Cell(row, col2).Value = budgetPlan.value??0;
ws.Cell(row, col2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, col2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, col2).Style.Fill.BackgroundColor = XLColor.FromArgb(204, 153, 255); ws.Cell(row, col2).Style.Fill.BackgroundColor = XLColor.FromArgb(204, 153, 255);
ws.Cell(row, col2).Style.Font.FontName = "TH SarabunPSK"; ws.Cell(row, col2).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row, col2).Style.Font.SetBold().Font.FontSize = 16; ws.Cell(row, col2).Style.Font.SetBold().Font.FontSize = 14;
ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#"); ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#");
ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
@@ -4263,15 +4284,15 @@ namespace rmutr_report.Controllers
ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 16; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 14;
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
col2 = 2; col2 = 2;
foreach (var budgetPlan in detail2.plans) foreach (var budgetPlan in detail2.plans)
{ {
ws.Cell(row, col2).Value = budgetPlan.value; ws.Cell(row, col2).Value = budgetPlan.value??0;
ws.Cell(row, col2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, col2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, col2).Style.Font.FontName = "TH SarabunPSK"; ws.Cell(row, col2).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row, col2).Style.Font.SetBold().Font.FontSize = 16; ws.Cell(row, col2).Style.Font.SetBold().Font.FontSize = 14;
ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#"); ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#");
ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
@@ -4292,15 +4313,15 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontName = "TH SarabunPSK"; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 16; ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 14;
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
col2 = 2; col2 = 2;
foreach (var budgetPlan in detail3.plans) foreach (var budgetPlan in detail3.plans)
{ {
ws.Cell(row, col2).Value = budgetPlan.value; ws.Cell(row, col2).Value = budgetPlan.value??0;
ws.Cell(row, col2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, col2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, col2).Style.Font.FontName = "TH SarabunPSK"; ws.Cell(row, col2).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row, col2).Style.Font.FontSize = 16; ws.Cell(row, col2).Style.Font.FontSize = 14;
ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#"); ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#");
ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;

View File

@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("rmutr_report")] [assembly: System.Reflection.AssemblyCompanyAttribute("rmutr_report")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+da8805020d3aac23490c9d2a0b621d651ee44921")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+62e9bfb30a3bed3a981fe95309ce278814246723")]
[assembly: System.Reflection.AssemblyProductAttribute("rmutr_report")] [assembly: System.Reflection.AssemblyProductAttribute("rmutr_report")]
[assembly: System.Reflection.AssemblyTitleAttribute("rmutr_report")] [assembly: System.Reflection.AssemblyTitleAttribute("rmutr_report")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@@ -1 +1 @@
fb341293279b66bfac2dcb8964beca0310d8356768610a72c001a0b0c99d163a 1bb41e6f4b06ecaa87f57dc005b3418170b56de7020a3a6f92c599064fe85d3a

View File

@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("rmutr_report")] [assembly: System.Reflection.AssemblyCompanyAttribute("rmutr_report")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+da8805020d3aac23490c9d2a0b621d651ee44921")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+62e9bfb30a3bed3a981fe95309ce278814246723")]
[assembly: System.Reflection.AssemblyProductAttribute("rmutr_report")] [assembly: System.Reflection.AssemblyProductAttribute("rmutr_report")]
[assembly: System.Reflection.AssemblyTitleAttribute("rmutr_report")] [assembly: System.Reflection.AssemblyTitleAttribute("rmutr_report")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@@ -1 +1 @@
fb341293279b66bfac2dcb8964beca0310d8356768610a72c001a0b0c99d163a 1bb41e6f4b06ecaa87f57dc005b3418170b56de7020a3a6f92c599064fe85d3a

View File

@@ -1 +1 @@
486197f055fb5d72cad81ec325faa738048e295edd4b24fa7153c34679c68bad 192b703773404149b4c61b2bb384b9eed1f398f96db14013a8f9abceeb6da1cb

View File

@@ -3056,6 +3056,22 @@
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory> <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<OriginalItemSpec>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\reports\summary_invest_approve.frx))</OriginalItemSpec> <OriginalItemSpec>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\reports\summary_invest_approve.frx))</OriginalItemSpec>
</StaticWebAsset> </StaticWebAsset>
<StaticWebAsset Include="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\reports\summary_invest_approvev2.frx))">
<SourceType>Package</SourceType>
<SourceId>rmutr_report</SourceId>
<ContentRoot>$(MSBuildThisFileDirectory)..\staticwebassets\</ContentRoot>
<BasePath>_content/rmutr_report</BasePath>
<RelativePath>reports\summary_invest_approvev2.frx</RelativePath>
<AssetKind></AssetKind>
<AssetMode></AssetMode>
<AssetRole></AssetRole>
<RelatedAsset></RelatedAsset>
<AssetTraitName></AssetTraitName>
<AssetTraitValue></AssetTraitValue>
<CopyToOutputDirectory></CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<OriginalItemSpec>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\reports\summary_invest_approvev2.frx))</OriginalItemSpec>
</StaticWebAsset>
<StaticWebAsset Include="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\reports\summary_invest_preview.frx))"> <StaticWebAsset Include="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\reports\summary_invest_preview.frx))">
<SourceType>Package</SourceType> <SourceType>Package</SourceType>
<SourceId>rmutr_report</SourceId> <SourceId>rmutr_report</SourceId>

View File

@@ -1 +1 @@
c50bede8becdc099c2f6e83e533c61274065063dd9f82764a97f4e0ec79d5558 b77baecdf45cb80236438e8a223568cbd6e07fc272289f2130dc9e2d455d9160

View File

@@ -1 +1 @@
17249025111686656 17249123958142058

View File

@@ -1 +1 @@
17249123958142058 17249193125237173