This commit is contained in:
kamonwan taengsuk
2023-06-15 17:10:32 +07:00
parent 13755a4ce0
commit f719a1a22f

View File

@@ -5662,271 +5662,294 @@ namespace rmutr_report.Controllers
foreach (var detail2 in detail.personnel_expense_budget_details_2) foreach (var detail2 in detail.personnel_expense_budget_details_2)
{ {
if (detail2.is_header==true) if (detail2.is_header == true)
{ {
ws.Cell(row + 1, 1).Value = "ส่วนที่ 2 เงินเพิ่มอื่นที่จ่ายควบกับเงินเดือน";
ws.Cell(row + 1, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Cell(row + 1, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(row + 1, 1).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 1, 1).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 1, 4).Value = "งบประมาณ";
ws.Cell(row + 1, 4).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 1, 4).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(row + 1, 4).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 1, 4).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 1, 6).Value = personnel.other_additional;
ws.Cell(row + 1, 6).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row + 1, 6).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(row + 1, 6).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 1, 6).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 1, 1).Value = "ส่วนที่ 2 เงินเพิ่มอื่นที่จ่ายควบกับเงินเดือน"; ws.Cell(row + 1, 7).Value = "ล้านบาท";
ws.Cell(row + 1, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; ws.Cell(row + 1, 7).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Cell(row + 1, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(row + 1, 7).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(row + 1, 1).Style.Font.FontName = "TH SarabunPSK"; ws.Cell(row + 1, 7).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 1, 1).Style.Font.SetBold().Font.FontSize = 16; ws.Cell(row + 1, 7).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 1, 4).Value = "งบประมาณ"; ws.Cell(row + 1, 19).Value = "หน่วย : ล้านบาท (ทศนิยม 4 ตำแหน่ง)";
ws.Cell(row + 1, 4).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right; ws.Cell(row + 1, 19).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 1, 4).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(row + 1, 19).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(row + 1, 4).Style.Font.FontName = "TH SarabunPSK"; ws.Cell(row + 1, 19).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 1, 4).Style.Font.SetBold().Font.FontSize = 16; ws.Cell(row + 1, 19).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 1, 6).Value = personnel.other_additional;
ws.Cell(row + 1, 6).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row + 1, 6).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(row + 1, 6).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 1, 6).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 1, 7).Value = "ล้านบาท"; ws.Cell(row + 3, 1).Value = "ประเภท";
ws.Cell(row + 1, 7).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; ws.Cell(row + 3, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row + 1, 7).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(row + 3, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(row + 1, 7).Style.Font.FontName = "TH SarabunPSK"; ws.Cell(row + 3, 1).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 1, 7).Style.Font.SetBold().Font.FontSize = 16; ws.Cell(row + 3, 1).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 1, 19).Value = "หน่วย : ล้านบาท (ทศนิยม 4 ตำแหน่ง)"; ws.Cell(row + 2, 1).Style.Fill.BackgroundColor = XLColor.FromArgb(214, 220, 228);
ws.Cell(row + 1, 19).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right; ws.Cell(row + 3, 1).Style.Fill.BackgroundColor = XLColor.FromArgb(214, 220, 228);
ws.Cell(row + 1, 19).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(row + 4, 1).Style.Fill.BackgroundColor = XLColor.FromArgb(214, 220, 228);
ws.Cell(row + 1, 19).Style.Font.FontName = "TH SarabunPSK"; ws.Cell(row + 4, 1).Style.Border.BottomBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 1, 19).Style.Font.SetBold().Font.FontSize = 16; ws.Cell(row + 2, 1).Style.Border.TopBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 3, 1).Value = "ประเภท"; ws.Cell(row + 3, 3).Value = "รายการ";
ws.Cell(row + 3, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Cell(row + 3, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row + 3, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Cell(row + 3, 3).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(row + 3, 1).Style.Font.FontName = "TH SarabunPSK"; ws.Cell(row + 3, 3).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 3, 1).Style.Font.SetBold().Font.FontSize = 16; ws.Cell(row + 3, 3).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 2, 1).Style.Fill.BackgroundColor = XLColor.FromArgb(214, 220, 228); ws.Cell(row + 2, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 3, 1).Style.Fill.BackgroundColor = XLColor.FromArgb(214, 220, 228); ws.Cell(row + 2, 3).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 4, 1).Style.Fill.BackgroundColor = XLColor.FromArgb(214, 220, 228); ws.Cell(row + 2, 4).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 4, 1).Style.Border.BottomBorder = XLBorderStyleValues.Thin; ws.Cell(row + 3, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 2, 1).Style.Border.TopBorder = XLBorderStyleValues.Thin; ws.Cell(row + 3, 3).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 3, 4).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 4, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 4, 3).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 4, 4).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 4, 3).Style.Border.BottomBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 2, 2).Style.Border.TopBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 2, 3).Style.Border.TopBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 2, 4).Style.Border.TopBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 2, 5), ws.Cell(row + 2, 8)).Merge().Value = "งปม. 2566";
ws.Range(ws.Cell(row + 2, 5), ws.Cell(row + 2, 8)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row + 2, 5), ws.Cell(row + 2, 8)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 2, 5), ws.Cell(row + 2, 8)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 2, 5), ws.Cell(row + 2, 8)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 2, 5), ws.Cell(row + 2, 8)).Style.Fill.BackgroundColor =
XLColor.FromArgb(214, 220, 228);
ws.Range(ws.Cell(row + 2, 5), ws.Cell(row + 2, 8)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 3, 5), ws.Cell(row + 3, 6)).Merge().Value = "คำขอ";
ws.Range(ws.Cell(row + 3, 5), ws.Cell(row + 3, 6)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row + 3, 5), ws.Cell(row + 3, 6)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 3, 5), ws.Cell(row + 3, 6)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 3, 5), ws.Cell(row + 3, 6)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 3, 5), ws.Cell(row + 3, 6)).Style.Fill.BackgroundColor =
XLColor.FromArgb(214, 220, 228);
ws.Range(ws.Cell(row + 3, 5), ws.Cell(row + 3, 6)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 3, 7), ws.Cell(row + 3, 8)).Merge().Value = "ข้อเสนอ";
ws.Range(ws.Cell(row + 3, 7), ws.Cell(row + 3, 8)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row + 3, 7), ws.Cell(row + 3, 8)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 3, 7), ws.Cell(row + 3, 8)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 3, 7), ws.Cell(row + 3, 8)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 3, 7), ws.Cell(row + 3, 8)).Style.Fill.BackgroundColor =
XLColor.FromArgb(214, 220, 228);
ws.Range(ws.Cell(row + 3, 7), ws.Cell(row + 3, 8)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 4, 5).Value = "อัตรา";
ws.Cell(row + 4, 5).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row + 4, 5).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row + 4, 5).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 4, 5).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 4, 5).Style.Fill.BackgroundColor =
XLColor.FromArgb(214, 220, 228);
ws.Cell(row + 4, 5).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 4, 6).Value = "งบประมาณ";
ws.Cell(row + 4, 6).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row + 4, 6).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row + 4, 6).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 4, 6).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 4, 6).Style.Fill.BackgroundColor =
XLColor.FromArgb(214, 220, 228);
ws.Cell(row + 4, 6).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 4, 7).Value = "อัตรา";
ws.Cell(row + 4, 7).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row + 4, 7).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row + 4, 7).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 4, 7).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 4, 7).Style.Fill.BackgroundColor =
XLColor.FromArgb(214, 220, 228);
ws.Cell(row + 4, 7).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 4, 8).Value = "งบประมาณ";
ws.Cell(row + 4, 8).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row + 4, 8).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row + 4, 8).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 4, 8).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 4, 8).Style.Fill.BackgroundColor =
XLColor.FromArgb(214, 220, 228);
ws.Cell(row + 4, 8).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 2, 9), ws.Cell(row + 2, 14)).Merge().Value = "MTEF";
ws.Range(ws.Cell(row + 2, 9), ws.Cell(row + 2, 14)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row + 2, 9), ws.Cell(row + 2, 14)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 2, 9), ws.Cell(row + 2, 14)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 2, 9), ws.Cell(row + 2, 14)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 2, 9), ws.Cell(row + 2, 14)).Style.Fill.BackgroundColor =
XLColor.FromArgb(172, 185, 202);
ws.Range(ws.Cell(row + 2, 9), ws.Cell(row + 2, 14)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 3, 3).Value = "รายการ"; ws.Range(ws.Cell(row + 3, 9), ws.Cell(row + 3, 10)).Merge().Value = "2567";
ws.Cell(row + 3, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range(ws.Cell(row + 3, 9), ws.Cell(row + 3, 10)).Style.Alignment.Horizontal =
ws.Cell(row + 3, 3).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; XLAlignmentHorizontalValues.Center;
ws.Cell(row + 3, 3).Style.Font.FontName = "TH SarabunPSK"; ws.Range(ws.Cell(row + 3, 9), ws.Cell(row + 3, 10)).Style.Alignment.Vertical =
ws.Cell(row + 3, 3).Style.Font.SetBold().Font.FontSize = 16; XLAlignmentVerticalValues.Center;
ws.Cell(row + 2, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202); ws.Range(ws.Cell(row + 3, 9), ws.Cell(row + 3, 10)).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 2, 3).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202); ws.Range(ws.Cell(row + 3, 9), ws.Cell(row + 3, 10)).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 2, 4).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202); ws.Range(ws.Cell(row + 3, 9), ws.Cell(row + 3, 10)).Style.Fill.BackgroundColor =
ws.Cell(row + 3, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202); XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 3, 3).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202); ws.Range(ws.Cell(row + 3, 9), ws.Cell(row + 3, 10)).Style.Border.OutsideBorder =
ws.Cell(row + 3, 4).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202); XLBorderStyleValues.Thin;
ws.Cell(row + 4, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 4, 3).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 4, 4).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 4, 3).Style.Border.BottomBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 2, 2).Style.Border.TopBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 2, 3).Style.Border.TopBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 2, 4).Style.Border.TopBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 2, 5), ws.Cell(row + 2, 8)).Merge().Value = "งปม. 2566";
ws.Range(ws.Cell(row + 2, 5), ws.Cell(row + 2, 8)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row + 2, 5), ws.Cell(row + 2, 8)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 2, 5), ws.Cell(row + 2, 8)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 2, 5), ws.Cell(row + 2, 8)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 2, 5), ws.Cell(row + 2, 8)).Style.Fill.BackgroundColor =
XLColor.FromArgb(214, 220, 228);
ws.Range(ws.Cell(row + 2, 5), ws.Cell(row + 2, 8)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 3, 5), ws.Cell(row + 3, 6)).Merge().Value = "คำขอ";
ws.Range(ws.Cell(row + 3, 5), ws.Cell(row + 3, 6)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row + 3, 5), ws.Cell(row + 3, 6)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 3, 5), ws.Cell(row + 3, 6)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 3, 5), ws.Cell(row + 3, 6)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 3, 5), ws.Cell(row + 3, 6)).Style.Fill.BackgroundColor =
XLColor.FromArgb(214, 220, 228);
ws.Range(ws.Cell(row + 3, 5), ws.Cell(row + 3, 6)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 3, 7), ws.Cell(row + 3, 8)).Merge().Value = "ข้อเสนอ";
ws.Range(ws.Cell(row + 3, 7), ws.Cell(row + 3, 8)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row + 3, 7), ws.Cell(row + 3, 8)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 3, 7), ws.Cell(row + 3, 8)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 3, 7), ws.Cell(row + 3, 8)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 3, 7), ws.Cell(row + 3, 8)).Style.Fill.BackgroundColor =
XLColor.FromArgb(214, 220, 228);
ws.Range(ws.Cell(row + 3, 7), ws.Cell(row + 3, 8)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 4, 5).Value = "อัตรา";
ws.Cell(row + 4, 5).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row + 4, 5).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row + 4, 5).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 4, 5).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 4, 5).Style.Fill.BackgroundColor =
XLColor.FromArgb(214, 220, 228);
ws.Cell(row + 4, 5).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 4, 6).Value = "งบประมาณ";
ws.Cell(row + 4, 6).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row + 4, 6).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row + 4, 6).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 4, 6).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 4, 6).Style.Fill.BackgroundColor =
XLColor.FromArgb(214, 220, 228);
ws.Cell(row + 4, 6).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 4, 7).Value = "อัตรา";
ws.Cell(row + 4, 7).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row + 4, 7).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row + 4, 7).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 4, 7).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 4, 7).Style.Fill.BackgroundColor =
XLColor.FromArgb(214, 220, 228);
ws.Cell(row + 4, 7).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 4, 8).Value = "งบประมาณ";
ws.Cell(row + 4, 8).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row + 4, 8).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row + 4, 8).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 4, 8).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 4, 8).Style.Fill.BackgroundColor =
XLColor.FromArgb(214, 220, 228);
ws.Cell(row + 4, 8).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 2, 9), ws.Cell(row + 2, 14)).Merge().Value = "MTEF";
ws.Range(ws.Cell(row + 2, 9), ws.Cell(row + 2, 14)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row + 2, 9), ws.Cell(row + 2, 14)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 2, 9), ws.Cell(row + 2, 14)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 2, 9), ws.Cell(row + 2, 14)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 2, 9), ws.Cell(row + 2, 14)).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
ws.Range(ws.Cell(row + 2, 9), ws.Cell(row + 2, 14)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 3, 9), ws.Cell(row + 3, 10)).Merge().Value = "2567"; ws.Range(ws.Cell(row + 3, 11), ws.Cell(row + 3, 12)).Merge().Value = "2568";
ws.Range(ws.Cell(row + 3, 9), ws.Cell(row + 3, 10)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range(ws.Cell(row + 3, 11), ws.Cell(row + 3, 12)).Style.Alignment.Horizontal =
ws.Range(ws.Cell(row + 3, 9), ws.Cell(row + 3, 10)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row + 3, 9), ws.Cell(row + 3, 10)).Style.Font.FontName = "TH SarabunPSK"; ws.Range(ws.Cell(row + 3, 11), ws.Cell(row + 3, 12)).Style.Alignment.Vertical =
ws.Range(ws.Cell(row + 3, 9), ws.Cell(row + 3, 10)).Style.Font.SetBold().Font.FontSize = 16; XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 3, 9), ws.Cell(row + 3, 10)).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202); ws.Range(ws.Cell(row + 3, 11), ws.Cell(row + 3, 12)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 3, 9), ws.Cell(row + 3, 10)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Range(ws.Cell(row + 3, 11), ws.Cell(row + 3, 12)).Style.Font.SetBold().Font.FontSize =
16;
ws.Range(ws.Cell(row + 3, 11), ws.Cell(row + 3, 12)).Merge().Value = "2568"; ws.Range(ws.Cell(row + 3, 11), ws.Cell(row + 3, 12)).Style.Fill.BackgroundColor =
ws.Range(ws.Cell(row + 3, 11), ws.Cell(row + 3, 12)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; XLColor.FromArgb(172, 185, 202);
ws.Range(ws.Cell(row + 3, 11), ws.Cell(row + 3, 12)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Range(ws.Cell(row + 3, 11), ws.Cell(row + 3, 12)).Style.Border.OutsideBorder =
ws.Range(ws.Cell(row + 3, 11), ws.Cell(row + 3, 12)).Style.Font.FontName = "TH SarabunPSK"; XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 3, 11), ws.Cell(row + 3, 12)).Style.Font.SetBold().Font.FontSize = 16; ws.Range(ws.Cell(row + 3, 13), ws.Cell(row + 3, 14)).Merge().Value = "2569";
ws.Range(ws.Cell(row + 3, 11), ws.Cell(row + 3, 12)).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202); ws.Range(ws.Cell(row + 3, 13), ws.Cell(row + 3, 14)).Style.Alignment.Horizontal =
ws.Range(ws.Cell(row + 3,11), ws.Cell(row + 3, 12)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row + 3, 13), ws.Cell(row + 3, 14)).Merge().Value = "2569"; ws.Range(ws.Cell(row + 3, 13), ws.Cell(row + 3, 14)).Style.Alignment.Vertical =
ws.Range(ws.Cell(row + 3, 13), ws.Cell(row + 3, 14)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 3, 13), ws.Cell(row + 3, 14)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Range(ws.Cell(row + 3, 13), ws.Cell(row + 3, 14)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 3, 13), ws.Cell(row + 3, 14)).Style.Font.FontName = "TH SarabunPSK"; ws.Range(ws.Cell(row + 3, 13), ws.Cell(row + 3, 14)).Style.Font.SetBold().Font.FontSize =
ws.Range(ws.Cell(row + 3, 13), ws.Cell(row + 3, 14)).Style.Font.SetBold().Font.FontSize = 16; 16;
ws.Range(ws.Cell(row + 3, 13), ws.Cell(row + 3, 14)).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202); ws.Range(ws.Cell(row + 3, 13), ws.Cell(row + 3, 14)).Style.Fill.BackgroundColor =
ws.Range(ws.Cell(row + 3,13), ws.Cell(row + 3, 14)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; XLColor.FromArgb(172, 185, 202);
ws.Range(ws.Cell(row + 3, 13), ws.Cell(row + 3, 14)).Style.Border.OutsideBorder =
ws.Cell(row + 4, 9).Value = "อัตรา"; XLBorderStyleValues.Thin;
ws.Cell(row + 4, 9).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row + 4, 9).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row + 4, 9).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 4, 9).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 4, 9).Style.Fill.BackgroundColor =
XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 4, 9).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 4, 10).Value = "งบประมาณ";
ws.Cell(row + 4, 10).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row + 4, 10).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row + 4, 10).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 4, 10).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 4, 10).Style.Fill.BackgroundColor =
XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 4, 10).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 4, 11).Value = "อัตรา";
ws.Cell(row + 4, 11).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row + 4, 11).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row + 4, 11).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 4, 11).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 4, 11).Style.Fill.BackgroundColor =
XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 4, 11).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 4, 12).Value = "งบประมาณ";
ws.Cell(row + 4, 12).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row + 4, 12).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row + 4, 12).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 4, 12).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 4, 12).Style.Fill.BackgroundColor =
XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 4, 12).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 4, 13).Value = "อัตรา";
ws.Cell(row + 4, 13).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row + 4, 13).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row + 4, 13).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 4, 13).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 4, 13).Style.Fill.BackgroundColor =
XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 4, 13).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 4, 14).Value = "งบประมาณ";
ws.Cell(row + 4, 14).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row + 4, 14).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row + 4, 14).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 4, 14).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 4, 14).Style.Fill.BackgroundColor =
XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 4, 14).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 2, 15), ws.Cell(row + 4, 19)).Merge().Value = "คำชี้แจง";
ws.Range(ws.Cell(row + 2, 15), ws.Cell(row + 4, 19)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row + 2, 15), ws.Cell(row + 4, 19)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 2, 15), ws.Cell(row + 4, 19)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 2, 15), ws.Cell(row + 4, 19)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 2, 15), ws.Cell(row + 4, 19)).Style.Fill.BackgroundColor = XLColor.FromArgb(214, 220, 228);
ws.Range(ws.Cell(row + 2, 15), ws.Cell(row + 4, 19)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 4, 9).Value = "อัตรา";
ws.Cell(row + 4, 9).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row + 4, 9).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row + 4, 9).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 4, 9).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 4, 9).Style.Fill.BackgroundColor =
XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 4, 9).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 4, 10).Value = "งบประมาณ";
ws.Cell(row + 4, 10).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row + 4, 10).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row + 4, 10).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 4, 10).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 4, 10).Style.Fill.BackgroundColor =
XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 4, 10).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 4, 11).Value = "อัตรา";
ws.Cell(row + 4, 11).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row + 4, 11).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row + 4, 11).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 4, 11).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 4, 11).Style.Fill.BackgroundColor =
XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 4, 11).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 4, 12).Value = "งบประมาณ";
ws.Cell(row + 4, 12).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row + 4, 12).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row + 4, 12).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 4, 12).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 4, 12).Style.Fill.BackgroundColor =
XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 4, 12).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 4, 13).Value = "อัตรา";
ws.Cell(row + 4, 13).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row + 4, 13).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row + 4, 13).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 4, 13).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 4, 13).Style.Fill.BackgroundColor =
XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 4, 13).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 4, 14).Value = "งบประมาณ";
ws.Cell(row + 4, 14).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row + 4, 14).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row + 4, 14).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 4, 14).Style.Font.SetBold().Font.FontSize = 16;
ws.Cell(row + 4, 14).Style.Fill.BackgroundColor =
XLColor.FromArgb(172, 185, 202);
ws.Cell(row + 4, 14).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 2, 15), ws.Cell(row + 4, 19)).Merge().Value = "คำชี้แจง";
ws.Range(ws.Cell(row + 2, 15), ws.Cell(row + 4, 19)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row + 2, 15), ws.Cell(row + 4, 19)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 2, 15), ws.Cell(row + 4, 19)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 2, 15), ws.Cell(row + 4, 19)).Style.Font.SetBold().Font.FontSize =
16;
ws.Range(ws.Cell(row + 2, 15), ws.Cell(row + 4, 19)).Style.Fill.BackgroundColor =
XLColor.FromArgb(214, 220, 228);
ws.Range(ws.Cell(row + 2, 15), ws.Cell(row + 4, 19)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
} }
if (detail2.is_bold == true && detail2.list == "รวมทั้งสิ้น") if (detail2.is_bold == true && detail2.list == "รวมทั้งสิ้น")
{ {
ws.Cell(row+5, 2).Value = "รวมทั้งสิ้น"; ws.Cell(row + 5, 2).Value = "รวมทั้งสิ้น";
ws.Cell(row+5, 5).Value = detail2.request_rate; ws.Cell(row + 5, 5).Value = detail2.request_rate;
ws.Cell(row+5, 6).Value = detail2.request_budget; ws.Cell(row + 5, 6).Value = detail2.request_budget;
ws.Cell(row+5, 7).Value = detail2.offer_rate; ws.Cell(row + 5, 7).Value = detail2.offer_rate;
ws.Cell(row+5, 8).Value = detail2.offer_budget; ws.Cell(row + 5, 8).Value = detail2.offer_budget;
ws.Cell(row+5, 9).Value = detail2.year1_rate; ws.Cell(row + 5, 9).Value = detail2.year1_rate;
ws.Cell(row+5, 10).Value = detail2.year1_budget; ws.Cell(row + 5, 10).Value = detail2.year1_budget;
ws.Cell(row+5, 11).Value = detail2.year2_rate; ws.Cell(row + 5, 11).Value = detail2.year2_rate;
ws.Cell(row+5, 12).Value = detail2.year2_budget; ws.Cell(row + 5, 12).Value = detail2.year2_budget;
ws.Cell(row+5, 13).Value = detail2.year3_rate; ws.Cell(row + 5, 13).Value = detail2.year3_rate;
ws.Cell(row+5, 14).Value = detail2.year3_budget; ws.Cell(row + 5, 14).Value = detail2.year3_budget;
// ws.Cell(row, 15).Value = detail.year3_rate; // ws.Cell(row, 15).Value = detail.year3_rate;
// ws.Cell(row, 16).Value = detail.year3_budget; // ws.Cell(row, 16).Value = detail.year3_budget;
ws.Range(ws.Cell(row+5, 15), ws.Cell(row+5, 19)).Merge().Value = detail2.remark; ws.Range(ws.Cell(row + 5, 15), ws.Cell(row + 5, 19)).Merge().Value = detail2.remark;
//ws.Cell(row + 5, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; //ws.Cell(row + 5, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
// ws.Cell(row + 5, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; // ws.Cell(row + 5, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
// ws.Cell(row + 5, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; // ws.Cell(row + 5, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row + 5, 4)).Style.Border.BottomBorder = XLBorderStyleValues.Thin; ws.Range(ws.Cell(row + 5, 1), ws.Cell(row + 5, 4)).Style.Border.BottomBorder =
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row + 5, 4)).Style.Border.TopBorder = XLBorderStyleValues.Thin; XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row + 5, 4)).Style.Border.TopBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 5, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row + 5, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 5, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row + 5, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -5949,7 +5972,8 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row, 19)).Style.Alignment.Vertical = ws.Range(ws.Cell(row + 5, 1), ws.Cell(row, 19)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center; XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 5, 5), ws.Cell(row + 5, 14)).Style.NumberFormat.SetFormat("#,#"); ws.Range(ws.Cell(row + 5, 5), ws.Cell(row + 5, 14)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row + 5, 4)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Range(ws.Cell(row + 5, 1), ws.Cell(row + 5, 4)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row + 5, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right; ws.Cell(row + 5, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 6).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right; ws.Cell(row + 5, 6).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
@@ -5962,28 +5986,30 @@ namespace rmutr_report.Controllers
ws.Cell(row + 5, 13).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right; ws.Cell(row + 5, 13).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 14).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right; ws.Cell(row + 5, 14).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 15).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; ws.Cell(row + 5, 15).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
} }
if (detail2.is_bold == true) if (detail2.is_bold == true)
{ {
ws.Cell(row+5, 1).Value = detail2.type; ws.Cell(row + 5, 1).Value = detail2.type;
//ws.Cell(row+5, 2).Value = detail2.list; //ws.Cell(row+5, 2).Value = detail2.list;
ws.Cell(row+5, 5).Value = detail2.request_rate; ws.Cell(row + 5, 5).Value = detail2.request_rate;
ws.Cell(row+5, 6).Value = detail2.request_budget; ws.Cell(row + 5, 6).Value = detail2.request_budget;
ws.Cell(row+5, 7).Value = detail2.offer_rate; ws.Cell(row + 5, 7).Value = detail2.offer_rate;
ws.Cell(row+5, 8).Value = detail2.offer_budget; ws.Cell(row + 5, 8).Value = detail2.offer_budget;
ws.Cell(row+5, 9).Value = detail2.year1_rate; ws.Cell(row + 5, 9).Value = detail2.year1_rate;
ws.Cell(row+5, 10).Value = detail2.year1_budget; ws.Cell(row + 5, 10).Value = detail2.year1_budget;
ws.Cell(row+5, 11).Value = detail2.year2_rate; ws.Cell(row + 5, 11).Value = detail2.year2_rate;
ws.Cell(row+5, 12).Value = detail2.year2_budget; ws.Cell(row + 5, 12).Value = detail2.year2_budget;
ws.Cell(row+5, 13).Value = detail2.year3_rate; ws.Cell(row + 5, 13).Value = detail2.year3_rate;
ws.Cell(row+5, 14).Value = detail2.year3_budget; ws.Cell(row + 5, 14).Value = detail2.year3_budget;
// ws.Cell(row, 15).Value = detail.year3_rate; // ws.Cell(row, 15).Value = detail.year3_rate;
// ws.Cell(row, 16).Value = detail.year3_budget; // ws.Cell(row, 16).Value = detail.year3_budget;
ws.Range(ws.Cell(row+5, 15), ws.Cell(row+5, 19)).Merge().Value = detail2.remark; ws.Range(ws.Cell(row + 5, 15), ws.Cell(row + 5, 19)).Merge().Value = detail2.remark;
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row + 5, 4)).Style.Border.TopBorder = XLBorderStyleValues.Thin; ws.Range(ws.Cell(row + 5, 1), ws.Cell(row + 5, 4)).Style.Border.TopBorder =
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row + 5, 4)).Style.Border.BottomBorder = XLBorderStyleValues.Thin; XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row + 5, 4)).Style.Border.BottomBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 5, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row + 5, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 5, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row + 5, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -6024,22 +6050,23 @@ namespace rmutr_report.Controllers
row++; row++;
} }
if (detail2.is_bold == false) if (detail2.is_bold == false)
{ {
ws.Range(ws.Cell(row+5, 2), ws.Cell(row+5, 4)).Merge().Value = detail2.list; ws.Range(ws.Cell(row + 5, 2), ws.Cell(row + 5, 4)).Merge().Value = detail2.list;
ws.Cell(row+5, 5).Value = detail2.request_rate; ws.Cell(row + 5, 5).Value = detail2.request_rate;
ws.Cell(row+5, 6).Value = detail2.request_budget; ws.Cell(row + 5, 6).Value = detail2.request_budget;
ws.Cell(row+5, 7).Value = detail2.offer_rate; ws.Cell(row + 5, 7).Value = detail2.offer_rate;
ws.Cell(row+5, 8).Value = detail2.offer_budget; ws.Cell(row + 5, 8).Value = detail2.offer_budget;
ws.Cell(row+5, 9).Value = detail2.year1_rate; ws.Cell(row + 5, 9).Value = detail2.year1_rate;
ws.Cell(row+5, 10).Value = detail2.year1_budget; ws.Cell(row + 5, 10).Value = detail2.year1_budget;
ws.Cell(row+5, 11).Value = detail2.year2_rate; ws.Cell(row + 5, 11).Value = detail2.year2_rate;
ws.Cell(row+5, 12).Value = detail2.year2_budget; ws.Cell(row + 5, 12).Value = detail2.year2_budget;
ws.Cell(row+5, 13).Value = detail2.year3_rate; ws.Cell(row + 5, 13).Value = detail2.year3_rate;
ws.Cell(row+5, 14).Value = detail2.year3_budget; ws.Cell(row + 5, 14).Value = detail2.year3_budget;
// ws.Cell(row, 15).Value = detail.year3_rate; // ws.Cell(row, 15).Value = detail.year3_rate;
// ws.Cell(row, 16).Value = detail.year3_budget; // ws.Cell(row, 16).Value = detail.year3_budget;
ws.Range(ws.Cell(row+5, 15), ws.Cell(row+5, 19)).Merge().Value = detail2.remark; ws.Range(ws.Cell(row + 5, 15), ws.Cell(row + 5, 19)).Merge().Value = detail2.remark;
ws.Cell(row + 5, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row + 5, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 5, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row + 5, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -6066,7 +6093,8 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row + 5, 19)).Style.Alignment.Vertical = ws.Range(ws.Cell(row + 5, 1), ws.Cell(row + 5, 19)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center; XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 5, 5), ws.Cell(row + 5, 14)).Style.NumberFormat.SetFormat("#,#"); ws.Range(ws.Cell(row + 5, 5), ws.Cell(row + 5, 14)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row + 5, 2), ws.Cell(row + 5, 4)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; ws.Range(ws.Cell(row + 5, 2), ws.Cell(row + 5, 4)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Left;
ws.Cell(row + 5, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right; ws.Cell(row + 5, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 6).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right; ws.Cell(row + 5, 6).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
@@ -6083,15 +6111,15 @@ namespace rmutr_report.Controllers
row++; row++;
} }
} }
} }
ws.Cell(row + 6, 1).Value = "หมายเหตุ : " + personnel.remark; ws.Cell(row + 6, 1).Value = "หมายเหตุ : " + personnel.remark;
ws.Cell(row + 6, 1).Style.Alignment.Horizontal = ws.Cell(row + 6, 1).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Left; XLAlignmentHorizontalValues.Left;
ws.Cell(row + 6, 1).Style.Alignment.Vertical = ws.Cell(row + 6, 1).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center; XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 6, 1), ws.Cell(row+6, 19)).Style.Alignment.WrapText = true; ws.Range(ws.Cell(row + 6, 1), ws.Cell(row + 6, 19)).Style.Alignment.WrapText = true;
ws.Cell(row + 6, 1).Style.Font.FontName = "TH SarabunPSK"; ws.Cell(row + 6, 1).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 6, 1).Style.Font.SetBold().Font.FontSize = 16; ws.Cell(row + 6, 1).Style.Font.SetBold().Font.FontSize = 16;
} }