|
|
|
@@ -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;
|
|
|
|
|