fix(kpi): don't number vision/values/uniqueness/identity as strategic issues
continuous-integration/drone/push Build is passing

Add is_reference_section flag to header_data/detail_kpi_data so the
kpi_performance_result and detail_kpi Excel exports render the 4
reference-indicator sections (วิสัยทัศน์/ค่านิยม/เอกลักษณ์/อัตลักษณ์)
with their bare category name instead of a "ประเด็นยุทธ์ศาสตร์ที่ N"
prefix, and skip them in the real strategic-issue numbering.
This commit is contained in:
Nut.ไปเรื่อย
2026-08-31 15:34:23 +07:00
parent 076f8ed4d7
commit 966d34d1fe
4 changed files with 46 additions and 43 deletions
+41 -41
View File
@@ -500,8 +500,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:H4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A4:H4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:H4").Style.Fill.BackgroundColor = XLColor.PurpleX11; ws.Range("A4:H4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("H4:H5").Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Range("H4:H5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues; string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
no++; if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true; ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder = ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None; XLBorderStyleValues.None;
@@ -516,8 +516,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:I4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A4:I4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:I4").Style.Fill.BackgroundColor = XLColor.PurpleX11; ws.Range("A4:I4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("I4:I5").Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Range("I4:I5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues; string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
no++; if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true; ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder = ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None; XLBorderStyleValues.None;
@@ -532,8 +532,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:J4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A4:J4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:J4").Style.Fill.BackgroundColor = XLColor.PurpleX11; ws.Range("A4:J4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("J4:J5").Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Range("J4:J5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues; string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
no++; if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true; ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder = ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None; XLBorderStyleValues.None;
@@ -548,8 +548,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:K4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A4:K4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:K4").Style.Fill.BackgroundColor = XLColor.PurpleX11; ws.Range("A4:K4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("K4:K5").Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Range("K4:K5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues; string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
no++; if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true; ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder = ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None; XLBorderStyleValues.None;
@@ -564,8 +564,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:L4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A4:L4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:L4").Style.Fill.BackgroundColor = XLColor.PurpleX11; ws.Range("A4:L4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("L4:L5").Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Range("L4:L5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues; string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
no++; if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true; ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder = ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None; XLBorderStyleValues.None;
@@ -580,8 +580,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:M4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A4:M4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:M4").Style.Fill.BackgroundColor = XLColor.PurpleX11; ws.Range("A4:M4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("M4:M5").Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Range("M4:M5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues; string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
no++; if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true; ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder = ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None; XLBorderStyleValues.None;
@@ -596,8 +596,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:N4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A4:N4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:N4").Style.Fill.BackgroundColor = XLColor.PurpleX11; ws.Range("A4:N4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("N4:N5").Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Range("N4:N5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues; string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
no++; if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true; ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder = ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None; XLBorderStyleValues.None;
@@ -612,8 +612,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:O4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A4:O4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:O4").Style.Fill.BackgroundColor = XLColor.PurpleX11; ws.Range("A4:O4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("O4:O5").Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Range("O4:O5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues; string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
no++; if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true; ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder = ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None; XLBorderStyleValues.None;
@@ -628,8 +628,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:P4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A4:P4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:P4").Style.Fill.BackgroundColor = XLColor.PurpleX11; ws.Range("A4:P4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("P4:P5").Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Range("P4:P5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues; string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
no++; if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true; ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder = ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None; XLBorderStyleValues.None;
@@ -644,8 +644,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:Q4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A4:Q4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:Q4").Style.Fill.BackgroundColor = XLColor.PurpleX11; ws.Range("A4:Q4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("Q4:Q5").Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Range("Q4:Q5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues; string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
no++; if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true; ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder = ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None; XLBorderStyleValues.None;
@@ -660,8 +660,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:R4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A4:R4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:R4").Style.Fill.BackgroundColor = XLColor.PurpleX11; ws.Range("A4:R4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("R4:R5").Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Range("R4:R5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues; string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
no++; if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true; ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder = ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None; XLBorderStyleValues.None;
@@ -676,8 +676,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:S4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A4:S4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:S4").Style.Fill.BackgroundColor = XLColor.PurpleX11; ws.Range("A4:S4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("S4:S5").Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Range("S4:S5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues; string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
no++; if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true; ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder = ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None; XLBorderStyleValues.None;
@@ -692,8 +692,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:T4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A4:T4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:T4").Style.Fill.BackgroundColor = XLColor.PurpleX11; ws.Range("A4:T4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("T4:T5").Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Range("T4:T5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues; string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
no++; if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true; ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder = ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None; XLBorderStyleValues.None;
@@ -708,8 +708,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:U4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A4:U4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:U4").Style.Fill.BackgroundColor = XLColor.PurpleX11; ws.Range("A4:U4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("U4:U5").Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Range("U4:U5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues; string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
no++; if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true; ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder = ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None; XLBorderStyleValues.None;
@@ -724,8 +724,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:V4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A4:V4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:V4").Style.Fill.BackgroundColor = XLColor.PurpleX11; ws.Range("A4:V4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("V4:V5").Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Range("V4:V5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues; string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
no++; if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true; ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder = ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None; XLBorderStyleValues.None;
@@ -740,8 +740,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:W4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A4:W4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:W4").Style.Fill.BackgroundColor = XLColor.PurpleX11; ws.Range("A4:W4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("W4:W5").Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Range("W4:W5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues; string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
no++; if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true; ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder = ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None; XLBorderStyleValues.None;
@@ -756,8 +756,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:X4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A4:X4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:X4").Style.Fill.BackgroundColor = XLColor.PurpleX11; ws.Range("A4:X4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("X4:X5").Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Range("X4:X5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues; string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
no++; if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true; ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder = ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None; XLBorderStyleValues.None;
@@ -772,8 +772,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:Y4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A4:Y4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:Y4").Style.Fill.BackgroundColor = XLColor.PurpleX11; ws.Range("A4:Y4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("X4:Y5").Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Range("X4:Y5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues; string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
no++; if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true; ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder = ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None; XLBorderStyleValues.None;
@@ -788,8 +788,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:Z4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A4:Z4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:Z4").Style.Fill.BackgroundColor = XLColor.PurpleX11; ws.Range("A4:Z4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("X4:Z5").Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Range("X4:Z5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues; string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
no++; if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true; ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder = ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None; XLBorderStyleValues.None;
@@ -804,8 +804,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:AA4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range("A4:AA4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:AA4").Style.Fill.BackgroundColor = XLColor.PurpleX11; ws.Range("A4:AA4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("X4:AA5").Style.Border.RightBorder = XLBorderStyleValues.Thin; ws.Range("X4:AA5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues; string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
no++; if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true; ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder = ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None; XLBorderStyleValues.None;
@@ -818,7 +818,7 @@ namespace rmutr_report.Controllers
// ws.Range("A4:W4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; // ws.Range("A4:W4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
// ws.Range("A4:W4").Style.Fill.BackgroundColor = XLColor.PurpleX11; // ws.Range("A4:W4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
// ws.Cell("W4").Style.Border.RightBorder = XLBorderStyleValues.Thin; // ws.Cell("W4").Style.Border.RightBorder = XLBorderStyleValues.Thin;
// string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues; // string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
// no++; // no++;
// ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true; // ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
// ws.Cell(row, 1).Style.Border.OutsideBorder = // ws.Cell(row, 1).Style.Border.OutsideBorder =
@@ -104,8 +104,8 @@ namespace rmutr_report.Controllers
{ {
foreach (var header in _kpi.header_data) foreach (var header in _kpi.header_data)
{ {
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no +" " + header.strategic_issues; string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no +" " + header.strategic_issues);
no++; if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true; ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
// ws.Cell(row, 2).Value = header.header_1; // ws.Cell(row, 2).Value = header.header_1;
ws.Cell(row, 1).Style.Fill.BackgroundColor = XLColor.PurpleX11; ws.Cell(row, 1).Style.Fill.BackgroundColor = XLColor.PurpleX11;
+1
View File
@@ -31,6 +31,7 @@ namespace rmutr_report.Models
{ {
public string year_range { get; set; } public string year_range { get; set; }
public string strategic_issues { get; set;} public string strategic_issues { get; set;}
public bool is_reference_section { get; set; }
//public string agency_name { get; set; } //public string agency_name { get; set; }
public List<detail_kpi_datas> data { get; set; } public List<detail_kpi_datas> data { get; set; }
} }
+2
View File
@@ -14,6 +14,8 @@ namespace rmutr_report.Models
{ {
public string strategic_issues { get; set; } public string strategic_issues { get; set; }
public bool is_reference_section { get; set; }
public List<detail_kpi_performance_result> data { get; set; } public List<detail_kpi_performance_result> data { get; set; }
} }