6139 lines
419 KiB
C#
6139 lines
419 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Globalization;
|
||
using System.IO;
|
||
using System.Linq;
|
||
using ClosedXML;
|
||
using ClosedXML.Excel;
|
||
using FastReport;
|
||
using FastReport.Export.Csv;
|
||
using FastReport.Export.Mht;
|
||
using FastReport.Export.OoXML;
|
||
using FastReport.Export.Pdf;
|
||
using Microsoft.AspNetCore.Mvc;
|
||
using rmutr_report.Models;
|
||
using rmutr_report.Models.Hr;
|
||
using rmutr_report.Models.Personnel;
|
||
using Swashbuckle.AspNetCore.Annotations;
|
||
|
||
namespace rmutr_report.Controllers
|
||
{
|
||
[SwaggerTag("สำหรับรายงาน HR")]
|
||
public class PersonnelController : Controller
|
||
{
|
||
readonly Setting _setting;
|
||
|
||
public PersonnelController(Setting setting)
|
||
{
|
||
this._setting = setting;
|
||
}
|
||
|
||
[HttpPost, Route("reports/personnel_summary/{type}")]
|
||
[ApiExplorerSettings(GroupName = "reports")]
|
||
public IActionResult GetHrReport([FromRoute] string type, [FromBody] personnel_summary personnel_summarys)
|
||
{
|
||
foreach (var v in personnel_summarys.personnel_types)
|
||
{
|
||
if (v.count != null)
|
||
{
|
||
var total = personnel_summarys.personnel_types.Select(r => r.count).Sum(t => t.Value);
|
||
personnel_summarys.total_pertype = total;
|
||
}
|
||
else
|
||
{
|
||
return null;
|
||
}
|
||
}
|
||
|
||
var personnel_summaryss = new List<personnel_summary>() { personnel_summarys };
|
||
|
||
Report report = new Report();
|
||
report.Load(_setting.report_path + "personnel_summary.frx");
|
||
report.RegisterData(personnel_summaryss, "personnel_summary");
|
||
report.Prepare();
|
||
|
||
MemoryStream stream = new MemoryStream();
|
||
switch (type)
|
||
{
|
||
case "pdf":
|
||
PDFExport pdf = new PDFExport();
|
||
report.Export(pdf, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "application/pdf");
|
||
|
||
case "xls":
|
||
case "xlsx":
|
||
Excel2007Export excel = new Excel2007Export();
|
||
report.Export(excel, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "application/vnd.ms-excel");
|
||
break;
|
||
case "mht":
|
||
MHTExport mht = new MHTExport();
|
||
report.Export(mht, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "multipart/related");
|
||
break;
|
||
case "csv":
|
||
CSVExport csv = new CSVExport();
|
||
report.Export(csv, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "text/csv");
|
||
break;
|
||
}
|
||
|
||
return Ok();
|
||
}
|
||
|
||
[HttpPost, Route("reports/man_power/{type}")]
|
||
[ApiExplorerSettings(GroupName = "reports")]
|
||
public IActionResult GetManReport([FromRoute] string type, [FromBody] List<man_power> man_powers)
|
||
{
|
||
//var personnel_summaryss = new List<personnel_summary>() { personnel_summarys };
|
||
|
||
Report report = new Report();
|
||
report.Load(_setting.report_path + "man_power.frx");
|
||
report.RegisterData(man_powers, "man_power");
|
||
report.Prepare();
|
||
|
||
MemoryStream stream = new MemoryStream();
|
||
switch (type)
|
||
{
|
||
case "pdf":
|
||
PDFExport pdf = new PDFExport();
|
||
report.Export(pdf, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "application/pdf");
|
||
|
||
case "xls":
|
||
case "xlsx":
|
||
Excel2007Export excel = new Excel2007Export();
|
||
report.Export(excel, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "application/vnd.ms-excel");
|
||
break;
|
||
case "mht":
|
||
MHTExport mht = new MHTExport();
|
||
report.Export(mht, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "multipart/related");
|
||
break;
|
||
case "csv":
|
||
CSVExport csv = new CSVExport();
|
||
report.Export(csv, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "text/csv");
|
||
break;
|
||
}
|
||
|
||
return Ok();
|
||
}
|
||
|
||
[HttpPost, Route("reports/data_line_support/{type}")]
|
||
[ApiExplorerSettings(GroupName = "reports")]
|
||
public IActionResult GetDataLineReport([FromRoute] string type, [FromBody] data_line_support data_line_supports)
|
||
{
|
||
var data_line_supportss = new List<data_line_support>() { data_line_supports };
|
||
|
||
Report report = new Report();
|
||
report.Load(_setting.report_path + "data_line_support.frx");
|
||
report.RegisterData(data_line_supportss, "data_line_support");
|
||
report.Prepare();
|
||
|
||
MemoryStream stream = new MemoryStream();
|
||
switch (type)
|
||
{
|
||
case "pdf":
|
||
PDFExport pdf = new PDFExport();
|
||
report.Export(pdf, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "application/pdf");
|
||
|
||
case "xls":
|
||
case "xlsx":
|
||
Excel2007Export excel = new Excel2007Export();
|
||
report.Export(excel, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "application/vnd.ms-excel");
|
||
break;
|
||
case "mht":
|
||
MHTExport mht = new MHTExport();
|
||
report.Export(mht, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "multipart/related");
|
||
break;
|
||
case "csv":
|
||
CSVExport csv = new CSVExport();
|
||
report.Export(csv, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "text/csv");
|
||
break;
|
||
}
|
||
|
||
return Ok();
|
||
}
|
||
|
||
[HttpPost, Route("reports/data_line_academic/{type}")]
|
||
[ApiExplorerSettings(GroupName = "reports")]
|
||
public IActionResult GetDataLineAcaReport([FromRoute] string type,
|
||
[FromBody] data_line_academic data_line_academicss)
|
||
{
|
||
var _data_line_academics = new List<data_line_academic>() { data_line_academicss };
|
||
|
||
Report report = new Report();
|
||
report.Load(_setting.report_path + "data_line_academic.frx");
|
||
report.RegisterData(_data_line_academics, "data_line_academic");
|
||
report.Prepare();
|
||
|
||
MemoryStream stream = new MemoryStream();
|
||
switch (type)
|
||
{
|
||
case "pdf":
|
||
PDFExport pdf = new PDFExport();
|
||
report.Export(pdf, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "application/pdf");
|
||
|
||
case "xls":
|
||
case "xlsx":
|
||
Excel2007Export excel = new Excel2007Export();
|
||
report.Export(excel, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "application/vnd.ms-excel");
|
||
break;
|
||
case "mht":
|
||
MHTExport mht = new MHTExport();
|
||
report.Export(mht, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "multipart/related");
|
||
break;
|
||
case "csv":
|
||
CSVExport csv = new CSVExport();
|
||
report.Export(csv, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "text/csv");
|
||
break;
|
||
}
|
||
|
||
return Ok();
|
||
}
|
||
|
||
[HttpPost, Route("reports/qualifications_teacher/{type}")]
|
||
[ApiExplorerSettings(GroupName = "reports")]
|
||
public IActionResult GetQualificationsTeacherReport([FromRoute] string type,
|
||
[FromBody] qualifications_teacher qualifications_teachers)
|
||
{
|
||
var qualifications_teacherss = new List<qualifications_teacher>() { qualifications_teachers };
|
||
|
||
Report report = new Report();
|
||
report.Load(_setting.report_path + "qualifications_teacher.frx");
|
||
report.RegisterData(qualifications_teacherss, "qualifications_teacher");
|
||
report.Prepare();
|
||
|
||
MemoryStream stream = new MemoryStream();
|
||
switch (type)
|
||
{
|
||
case "pdf":
|
||
PDFExport pdf = new PDFExport();
|
||
report.Export(pdf, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "application/pdf");
|
||
|
||
case "xls":
|
||
case "xlsx":
|
||
Excel2007Export excel = new Excel2007Export();
|
||
report.Export(excel, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "application/vnd.ms-excel");
|
||
break;
|
||
case "mht":
|
||
MHTExport mht = new MHTExport();
|
||
report.Export(mht, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "multipart/related");
|
||
break;
|
||
case "csv":
|
||
CSVExport csv = new CSVExport();
|
||
report.Export(csv, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "text/csv");
|
||
break;
|
||
}
|
||
|
||
return Ok();
|
||
}
|
||
|
||
[HttpPost, Route("reports/academic_position/{type}")]
|
||
[ApiExplorerSettings(GroupName = "reports")]
|
||
public IActionResult GetAcademicPositionReport([FromRoute] string type,
|
||
[FromBody] academic_position _academic_position)
|
||
{
|
||
var academic_positions = new List<academic_position>() { _academic_position };
|
||
|
||
Report report = new Report();
|
||
report.Load(_setting.report_path + "academic_position.frx");
|
||
report.RegisterData(academic_positions, "academic_position");
|
||
report.Prepare();
|
||
|
||
MemoryStream stream = new MemoryStream();
|
||
switch (type)
|
||
{
|
||
case "pdf":
|
||
PDFExport pdf = new PDFExport();
|
||
report.Export(pdf, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "application/pdf");
|
||
|
||
case "xls":
|
||
case "xlsx":
|
||
Excel2007Export excel = new Excel2007Export();
|
||
report.Export(excel, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "application/vnd.ms-excel");
|
||
break;
|
||
case "mht":
|
||
MHTExport mht = new MHTExport();
|
||
report.Export(mht, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "multipart/related");
|
||
break;
|
||
case "csv":
|
||
CSVExport csv = new CSVExport();
|
||
report.Export(csv, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "text/csv");
|
||
break;
|
||
}
|
||
|
||
return Ok();
|
||
}
|
||
|
||
[HttpPost, Route("reports/postponement_compensation/{type}")]
|
||
[ApiExplorerSettings(GroupName = "reports")]
|
||
public IActionResult GetPostponementCompensationReport([FromRoute] string type,
|
||
[FromBody] postponement_compensation postponement_compensations)
|
||
{
|
||
if (postponement_compensations.get_promoted == true)
|
||
{
|
||
postponement_compensations.check_get_promoted = "/";
|
||
postponement_compensations.reason = "";
|
||
}
|
||
|
||
if (postponement_compensations.get_promoted == false)
|
||
{
|
||
postponement_compensations.check_get_promoted = "";
|
||
}
|
||
|
||
if (postponement_compensations.not_get_promoted == true)
|
||
{
|
||
postponement_compensations.check_not_get_promoted = "/";
|
||
}
|
||
|
||
if (postponement_compensations.not_get_promoted == false)
|
||
{
|
||
postponement_compensations.check_not_get_promoted = "";
|
||
}
|
||
|
||
string NumberText1 = postponement_compensations.data_date;
|
||
var str1 =
|
||
NumberText1.Replace('0', '๐').Replace('1', '๑').Replace('2', '๒').Replace('3', '๓')
|
||
.Replace('4', '๔').Replace('5', '๕').Replace('6', '๖').Replace('7', '๗').Replace('8', '๘')
|
||
.Replace('9', '๙');
|
||
postponement_compensations.data_date = str1;
|
||
string NumberText2 = postponement_compensations.start_date;
|
||
var str2 =
|
||
NumberText2.Replace('0', '๐').Replace('1', '๑').Replace('2', '๒').Replace('3', '๓')
|
||
.Replace('4', '๔').Replace('5', '๕').Replace('6', '๖').Replace('7', '๗').Replace('8', '๘')
|
||
.Replace('9', '๙');
|
||
postponement_compensations.start_date = str2;
|
||
string NumberText3 = postponement_compensations.end_date;
|
||
var str3 =
|
||
NumberText3.Replace('0', '๐').Replace('1', '๑').Replace('2', '๒').Replace('3', '๓')
|
||
.Replace('4', '๔').Replace('5', '๕').Replace('6', '๖').Replace('7', '๗').Replace('8', '๘')
|
||
.Replace('9', '๙');
|
||
postponement_compensations.end_date = str3;
|
||
string NumberText4 = postponement_compensations.base_calculation_date;
|
||
var str4 =
|
||
NumberText4.Replace('0', '๐').Replace('1', '๑').Replace('2', '๒').Replace('3', '๓')
|
||
.Replace('4', '๔').Replace('5', '๕').Replace('6', '๖').Replace('7', '๗').Replace('8', '๘')
|
||
.Replace('9', '๙');
|
||
postponement_compensations.base_calculation_date = str4;
|
||
string NumberText5 = postponement_compensations.director_date;
|
||
var str5 =
|
||
NumberText5.Replace('0', '๐').Replace('1', '๑').Replace('2', '๒').Replace('3', '๓')
|
||
.Replace('4', '๔').Replace('5', '๕').Replace('6', '๖').Replace('7', '๗').Replace('8', '๘')
|
||
.Replace('9', '๙');
|
||
postponement_compensations.director_date = str5;
|
||
foreach (var data in postponement_compensations.data)
|
||
{
|
||
if (data.base_calculation != null)
|
||
{
|
||
string NumberText = data.base_calculation.ToString();
|
||
var str =
|
||
NumberText.Replace('0', '๐').Replace('1', '๑').Replace('2', '๒').Replace('3', '๓')
|
||
.Replace('4', '๔').Replace('5', '๕').Replace('6', '๖').Replace('7', '๗').Replace('8', '๘')
|
||
.Replace('9', '๙');
|
||
if (str.Length == 4)
|
||
{
|
||
for (int i = 1; i <= str.Length - 1; i += 4)
|
||
{
|
||
postponement_compensations.money1 = str.Insert(i, ",");
|
||
}
|
||
}
|
||
else if (str.Length == 5)
|
||
{
|
||
for (int i = 2; i <= str.Length - 1; i += 5)
|
||
{
|
||
postponement_compensations.money1 = str.Insert(i, ",");
|
||
}
|
||
}
|
||
else
|
||
{
|
||
postponement_compensations.money1 = str;
|
||
}
|
||
}
|
||
|
||
if (data.compensation_slide != null)
|
||
{
|
||
string NumberText = data.compensation_slide.ToString();
|
||
var str =
|
||
NumberText.Replace('0', '๐').Replace('1', '๑').Replace('2', '๒').Replace('3', '๓')
|
||
.Replace('4', '๔').Replace('5', '๕').Replace('6', '๖').Replace('7', '๗').Replace('8', '๘')
|
||
.Replace('9', '๙');
|
||
if (str.Length == 4)
|
||
{
|
||
for (int i = 1; i <= str.Length - 1; i += 4)
|
||
{
|
||
postponement_compensations.money2 = str.Insert(i, ",");
|
||
}
|
||
}
|
||
else if (str.Length == 5)
|
||
{
|
||
for (int i = 2; i <= str.Length - 1; i += 5)
|
||
{
|
||
postponement_compensations.money2 = str.Insert(i, ",");
|
||
}
|
||
}
|
||
else
|
||
{
|
||
postponement_compensations.money2 = str;
|
||
}
|
||
}
|
||
|
||
if (data.compensation_receive != null)
|
||
{
|
||
string NumberText = data.compensation_receive.ToString();
|
||
var str =
|
||
NumberText.Replace('0', '๐').Replace('1', '๑').Replace('2', '๒').Replace('3', '๓')
|
||
.Replace('4', '๔').Replace('5', '๕').Replace('6', '๖').Replace('7', '๗').Replace('8', '๘')
|
||
.Replace('9', '๙');
|
||
if (str.Length == 4)
|
||
{
|
||
for (int i = 1; i <= str.Length - 1; i += 4)
|
||
{
|
||
postponement_compensations.money3 = str.Insert(i, ",");
|
||
}
|
||
}
|
||
else if (str.Length == 5)
|
||
{
|
||
for (int i = 2; i <= str.Length - 1; i += 5)
|
||
{
|
||
postponement_compensations.money3 = str.Insert(i, ",");
|
||
}
|
||
}
|
||
else
|
||
{
|
||
postponement_compensations.money3 = str;
|
||
}
|
||
}
|
||
|
||
string NumberText6 = data.percentage.ToString();
|
||
var str6 =
|
||
NumberText6.Replace('0', '๐').Replace('1', '๑').Replace('2', '๒').Replace('3', '๓')
|
||
.Replace('4', '๔').Replace('5', '๕').Replace('6', '๖').Replace('7', '๗').Replace('8', '๘')
|
||
.Replace('9', '๙');
|
||
postponement_compensations.percentage = str6;
|
||
}
|
||
|
||
var _postponement_compensations = new List<postponement_compensation>() { postponement_compensations };
|
||
|
||
Report report = new Report();
|
||
report.Load(_setting.report_path + "postponement_compensation.frx");
|
||
report.RegisterData(_postponement_compensations, "postponement_compensation");
|
||
report.Prepare();
|
||
|
||
MemoryStream stream = new MemoryStream();
|
||
switch (type)
|
||
{
|
||
case "pdf":
|
||
PDFExport pdf = new PDFExport();
|
||
report.Export(pdf, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "application/pdf");
|
||
|
||
case "xls":
|
||
case "xlsx":
|
||
Excel2007Export excel = new Excel2007Export();
|
||
report.Export(excel, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "application/vnd.ms-excel");
|
||
break;
|
||
case "mht":
|
||
MHTExport mht = new MHTExport();
|
||
report.Export(mht, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "multipart/related");
|
||
break;
|
||
case "csv":
|
||
CSVExport csv = new CSVExport();
|
||
report.Export(csv, stream);
|
||
stream.Seek(0, SeekOrigin.Begin);
|
||
return File(stream, "text/csv");
|
||
break;
|
||
}
|
||
|
||
return Ok();
|
||
}
|
||
|
||
[HttpPost, Route("reports/personnel_salary_government_employee/{type}")]
|
||
[ApiExplorerSettings(GroupName = "reports")]
|
||
public IActionResult GetPersonSalaryReport([FromRoute] string type,
|
||
[FromBody] personnel_salary_government_employee_root _personnel)
|
||
{
|
||
var workbook = new XLWorkbook();
|
||
var ws = workbook.Worksheets.Add("พนักงานราชการ");
|
||
if (_personnel.year == "2567")
|
||
{
|
||
_personnel.year = "2566";
|
||
}
|
||
|
||
ws.Range("A1:T1").Merge().Value = "รายละเอียดเงินเดือนและส่วนควบของพนักงานราชการ ประจำปีงบประมาณ พ.ศ. " +
|
||
_personnel.year;
|
||
ws.Cell("A1").Style.Alignment.WrapText = true;
|
||
ws.Range("A1:T1").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("A1:T1").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("A1:T1").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("A1:T1").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("A2:T2").Merge().Value = "มหาวิทยาลัยเทคโนโลยีราชมงคลรัตนโกสินทร์";
|
||
ws.Cell("A2").Style.Alignment.WrapText = true;
|
||
ws.Range("A2:T2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("A2:T2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("A2:T2").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("A2:T2").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("A3:T3").Merge().Value = "หน่วย : บาท";
|
||
ws.Cell("A3").Style.Alignment.WrapText = true;
|
||
ws.Range("A3:T3").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Range("A3:T3").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("A3:T3").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("A3:T3").Style.Font.FontSize = 16;
|
||
ws.Range("A4:A7").Merge().Value = "ลำดับที่";
|
||
ws.Cell("A4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("A4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("A4:A7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("A4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("A4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("B4:B7").Merge().Value = "เลขที่ตำแหน่ง";
|
||
ws.Cell("B4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("B4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("B4:B7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("B4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("B4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("C4:D7").Merge().Value = "ชื่อ- สกุล";
|
||
ws.Cell("C4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("C4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("C4:D7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("C4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("C4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("E4:E7").Merge().Value = "ชื่อตำแหน่ง";
|
||
ws.Cell("E4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("E4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("E4:E7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("E4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("E4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("F4:G7").Merge().Value = "สังกัด/พื้นที่";
|
||
ws.Cell("F4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("F4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("F4:G7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("F4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("F4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("H4:H7").Merge().Value = "เงินเดือน ณ 1 ต.ค. 64 - 30 ก.ย. 65";
|
||
ws.Cell("H4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("H4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("H4:H7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("H4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("H4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("I4:I6").Merge().Value = "ประมาณการเงินเดือน 1 ต.ค. 65- 30 ก.ย. 66";
|
||
ws.Cell("I4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("I4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("I4:I6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("I4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("I4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("J4:J6").Merge().Value = "เลื่อนขั้น 4% 1 ต.ค. 66- 30 ก.ย. 67";
|
||
ws.Cell("J4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("J4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("J4:J6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("J4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("J4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("K4:K6").Merge().Value = "รวม";
|
||
ws.Cell("K4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("K4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("K4:K6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("K4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("K4").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("L4:L6").Merge().Value = "เงินเดือน*12";
|
||
ws.Cell("L4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("L4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("L4:L6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("L4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("L4").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("L4:L6").Merge().Value = "เงินเดือน*12";
|
||
ws.Cell("L4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("L4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("L4:L6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("L4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("L4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("M4:S4").Merge().Value = "ส่วนควบงบดำเนินงาน";
|
||
ws.Cell("M4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("M4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("M4:S4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("M4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("M4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("M5:N6").Merge().Value = "เงินสมทบกองทุนประกันสังคม";
|
||
ws.Cell("M5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("M5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("M5:N6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("M5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("M5").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("O5:P6").Merge().Value = "เงินสมทบกองทุนเงินทดแทน";
|
||
ws.Cell("O5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("O5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("O5:P6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("O5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("O5").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("Q5:R5").Merge().Value = "อื่น ๆ";
|
||
ws.Cell("Q5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("Q5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("Q5:R5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("Q5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("Q5").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("Q6").Value = "ระบุรายการ";
|
||
ws.Cell("Q6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("Q6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("Q6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("Q6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("Q6").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("R6").Value = "จำนวนเงิน";
|
||
ws.Cell("R6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("R6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("R6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("R6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("R6").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("S5:S6").Merge().Value = "รวม";
|
||
ws.Cell("S5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("S5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("S5:S6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("S5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("S5").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("T4:T6").Merge().Value = "รวมเงินเดือนและส่วนควบ";
|
||
ws.Cell("T4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("T4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("T4:T6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("T4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("T4").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("U4:U6").Merge().Value = "รวมเงินเดือนและส่วนควบ*12เดือน";
|
||
ws.Cell("U4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("U4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("U4:U6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("U4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("U4").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("I7").Value = "-1";
|
||
ws.Cell("I7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("I7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("I7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("I7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("I7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("J7").Value = "-(2)";
|
||
ws.Cell("J7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("J7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("J7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("J7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("J7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("K7").Value = "(3) = (1) + (2)";
|
||
ws.Cell("K7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("K7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("K7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("K7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("K7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("L7").Value = "(3)*12";
|
||
ws.Cell("L7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("L7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("L7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("L7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("L7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("M7").Value = "(4)";
|
||
ws.Cell("M7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("M7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("M7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("M7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("M7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("N7").Value = "(4)*12";
|
||
ws.Cell("N7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("N7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("N7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("N7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("N7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("O7").Value = "(5)";
|
||
ws.Cell("O7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("O7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("O7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("O7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("O7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("P7").Value = "(5)*12";
|
||
ws.Cell("P7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("P7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("P7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("P7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("P7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("R7").Value = "(6)";
|
||
ws.Cell("R7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("R7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("R7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("R7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("R7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("S7").Value = "(7) = (4) ถึง (6)";
|
||
ws.Cell("S7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("S7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("S7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("S7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("S7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("T7").Value = "(8) = (3) + (7)";
|
||
ws.Cell("T7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("T7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("T7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("T7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("T7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("U7").Value = "(8)*12";
|
||
ws.Cell("U7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("U7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("U7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("Q7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("U7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("U7").Style.Font.SetBold().Font.FontSize = 12;
|
||
|
||
ws.Range("A4:U7").Style.Alignment.WrapText = true;
|
||
ws.Row(4).Height = 25;
|
||
ws.Row(5).Height = 25;
|
||
ws.Row(6).Height = 25;
|
||
ws.Column(1).Width = 10;
|
||
ws.Column(2).Width = 10;
|
||
ws.Column(3).Width = 20;
|
||
ws.Column(4).Width = 15;
|
||
ws.Column(5).Width = 15;
|
||
ws.Column(6).Width = 15;
|
||
ws.Column(7).Width = 15;
|
||
ws.Column(8).Width = 15;
|
||
ws.Column(9).Width = 15;
|
||
ws.Column(10).Width = 15;
|
||
ws.Column(11).Width = 15;
|
||
ws.Column(12).Width = 15;
|
||
ws.Column(13).Width = 15;
|
||
ws.Column(14).Width = 15;
|
||
ws.Column(15).Width = 15;
|
||
ws.Column(16).Width = 15;
|
||
ws.Column(17).Width = 15;
|
||
ws.Column(18).Width = 15;
|
||
ws.Column(19).Width = 15;
|
||
ws.Column(20).Width = 15;
|
||
ws.Column(21).Width = 15;
|
||
int row = 8;
|
||
int no = 1;
|
||
|
||
if (_personnel != null)
|
||
{
|
||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 5)).Merge().Value = "รวมงบประมาณทั้งสิ้น";
|
||
ws.Cell(row, 8).Value = _personnel.total_salary;
|
||
ws.Cell(row, 9).Value = _personnel.total_estimate_salary;
|
||
ws.Cell(row, 10).Value = _personnel.total_promote;
|
||
ws.Cell(row, 11).Value = _personnel.total;
|
||
ws.Cell(row, 12).Value = _personnel.total_salary_12;
|
||
ws.Cell(row, 13).Value = _personnel.total_social_security;
|
||
ws.Cell(row, 14).Value = _personnel.total_social_security_12;
|
||
ws.Cell(row, 15).Value = _personnel.total_social_compensation;
|
||
ws.Cell(row, 16).Value = _personnel.total_social_compensation_12;
|
||
ws.Cell(row, 17).Value = _personnel.total_another2;
|
||
ws.Cell(row, 18).Value = _personnel.total_quantity_money;
|
||
ws.Cell(row, 19).Value = _personnel.total2;
|
||
ws.Cell(row, 20).Value = _personnel.including_salary_and_fittings;
|
||
ws.Cell(row, 21).Value = _personnel.including_salary_and_fittings_12;
|
||
// ws.Cell(row, 22).Value = detail.special_compensation_2;
|
||
// ws.Cell(row, 23).Value = detail.special_compensation_3;
|
||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 4).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 7).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 8).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 9).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 12).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 13).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 14).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 15).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 16).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 17).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 18).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 19).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 20).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 21).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 21)).Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 21)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 21)).Style.Alignment.Vertical =
|
||
XLAlignmentVerticalValues.Center;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 21)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Center;
|
||
ws.Range(ws.Cell(row, 8), ws.Cell(row, 21)).SetDataType(XLDataType.Number);
|
||
ws.Range(ws.Cell(row, 8), ws.Cell(row, 21)).Style.NumberFormat.SetFormat("#,#");
|
||
row++;
|
||
foreach (var detail in _personnel.personnel_salary_government_employee)
|
||
{
|
||
ws.Range(ws.Cell(row, 2), ws.Cell(row, 6)).Merge().Value = detail.agency_category_name;
|
||
ws.Cell(row, 8).Value = detail.total_salary;
|
||
ws.Cell(row, 9).Value = detail.total_estimate_salary;
|
||
ws.Cell(row, 10).Value = detail.total_promote;
|
||
ws.Cell(row, 11).Value = detail.total;
|
||
ws.Cell(row, 12).Value = detail.total_salary_12;
|
||
ws.Cell(row, 13).Value = detail.total_social_security;
|
||
ws.Cell(row, 14).Value = detail.total_social_security_12;
|
||
ws.Cell(row, 15).Value = detail.total_social_compensation;
|
||
ws.Cell(row, 16).Value = detail.total_social_compensation_12;
|
||
ws.Cell(row, 17).Value = detail.total_another2;
|
||
ws.Cell(row, 18).Value = detail.total_quantity_money;
|
||
ws.Cell(row, 19).Value = detail.total2;
|
||
ws.Cell(row, 20).Value = detail.including_salary_and_fittings;
|
||
ws.Cell(row, 21).Value = detail.including_salary_and_fittings_12;
|
||
// ws.Cell(row, 22).Value = detail.special_compensation_2;
|
||
// ws.Cell(row, 23).Value = detail.special_compensation_3;
|
||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 4).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 7).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 8).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 9).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 12).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 13).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 14).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 15).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 16).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 17).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 18).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 19).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 20).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 21).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 21)).Style.Fill.BackgroundColor = XLColor.LightYellow;
|
||
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 21)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 21)).Style.Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 21)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 21)).Style.Alignment.Vertical =
|
||
XLAlignmentVerticalValues.Center;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 21)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Center;
|
||
ws.Range(ws.Cell(row, 8), ws.Cell(row, 21)).SetDataType(XLDataType.Number);
|
||
ws.Range(ws.Cell(row, 8), ws.Cell(row, 21)).Style.NumberFormat.SetFormat("#,#");
|
||
row++;
|
||
foreach (var deltail2 in detail.personnel_salary_government_employee_deltail)
|
||
{
|
||
if (deltail2.first_name_th != "รวม")
|
||
{
|
||
ws.Cell(row, 1).Value = no;
|
||
no++;
|
||
ws.Cell(row, 2).Value = deltail2.manpower;
|
||
ws.Cell(row, 3).Value = deltail2.first_name_th;
|
||
ws.Cell(row, 4).Value = deltail2.last_name_th;
|
||
//ws.Range(ws.Cell(row, 3), ws.Cell(row, 4)).Merge().Value = deltail2.full_name;
|
||
ws.Cell(row, 5).Value = deltail2.position;
|
||
ws.Cell(row, 6).Value = deltail2.parent_agency_name;
|
||
ws.Cell(row, 7).Value = deltail2.area;
|
||
ws.Cell(row, 8).Value = deltail2.salary;
|
||
ws.Cell(row, 9).Value = deltail2.estimate_salary;
|
||
ws.Cell(row, 10).Value = deltail2.promote;
|
||
ws.Cell(row, 11).Value = deltail2.total;
|
||
ws.Cell(row, 12).Value = deltail2.salary_12;
|
||
ws.Cell(row, 13).Value = deltail2.social_security;
|
||
ws.Cell(row, 14).Value = deltail2.social_security_12;
|
||
ws.Cell(row, 15).Value = deltail2.social_compensation;
|
||
ws.Cell(row, 16).Value = deltail2.social_compensation_12;
|
||
ws.Cell(row, 17).Value = deltail2.another2;
|
||
ws.Cell(row, 18).Value = deltail2.quantity_money;
|
||
ws.Cell(row, 19).Value = deltail2.total2;
|
||
ws.Cell(row, 20).Value = deltail2.including_salary_and_fittings;
|
||
ws.Cell(row, 21).Value = deltail2.including_salary_and_fittings_12;
|
||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 3).Style.Border.LeftBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 3).Style.Border.RightBorder = XLBorderStyleValues.None;
|
||
ws.Cell(row, 3).Style.Border.BottomBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 4).Style.Border.LeftBorder = XLBorderStyleValues.None;
|
||
ws.Cell(row, 4).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 4).Style.Border.BottomBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 7).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 8).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 9).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 12).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 13).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 14).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 15).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 16).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 17).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 18).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 19).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 20).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 21).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 21)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 21)).Style.Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 21)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 21)).Style.Alignment.Vertical =
|
||
XLAlignmentVerticalValues.Center;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 21)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Center;
|
||
ws.Range(ws.Cell(row, 8), ws.Cell(row, 21)).SetDataType(XLDataType.Number);
|
||
ws.Range(ws.Cell(row, 8), ws.Cell(row, 21)).Style.NumberFormat.SetFormat("#,#");
|
||
row++;
|
||
}
|
||
|
||
if (deltail2.first_name_th == "รวม")
|
||
{
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Merge().Value = deltail2.first_name_th;
|
||
ws.Cell(row, 5).Value = deltail2.position;
|
||
ws.Cell(row, 6).Value = deltail2.parent_agency_name;
|
||
ws.Cell(row, 7).Value = deltail2.area;
|
||
ws.Cell(row, 8).Value = deltail2.salary;
|
||
ws.Cell(row, 9).Value = deltail2.estimate_salary;
|
||
ws.Cell(row, 10).Value = deltail2.promote;
|
||
ws.Cell(row, 11).Value = deltail2.total;
|
||
ws.Cell(row, 12).Value = deltail2.salary_12;
|
||
ws.Cell(row, 13).Value = deltail2.social_security;
|
||
ws.Cell(row, 14).Value = deltail2.social_security_12;
|
||
ws.Cell(row, 15).Value = deltail2.social_compensation;
|
||
ws.Cell(row, 16).Value = deltail2.social_compensation_12;
|
||
ws.Cell(row, 17).Value = deltail2.another2;
|
||
ws.Cell(row, 18).Value = deltail2.quantity_money;
|
||
ws.Cell(row, 19).Value = deltail2.total2;
|
||
ws.Cell(row, 20).Value = deltail2.including_salary_and_fittings;
|
||
ws.Cell(row, 21).Value = deltail2.including_salary_and_fittings_12;
|
||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 4).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 7).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 8).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 9).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 12).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 13).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 14).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 15).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 16).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 17).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 18).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 19).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 20).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 21).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 21)).Style.Border.TopBorder =
|
||
XLBorderStyleValues.Double;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 21)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 21)).Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 21)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 21)).Style.Alignment.Vertical =
|
||
XLAlignmentVerticalValues.Center;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 21)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Center;
|
||
ws.Range(ws.Cell(row, 8), ws.Cell(row, 21)).SetDataType(XLDataType.Number);
|
||
ws.Range(ws.Cell(row, 8), ws.Cell(row, 21)).Style.NumberFormat.SetFormat("#,#");
|
||
}
|
||
}
|
||
|
||
if (detail.is_footer == true)
|
||
{
|
||
ws.Cell(row + 2, 1).Value =
|
||
"หมายเหตุ : ในกรณีที่เงินเดือนตุลาคม 2564 ยังไม่เลื่อนขั้นเงินเดือน ให้กรอกเงินเลื่อนขั้น 4% ในช่อง (2)";
|
||
ws.Cell(row + 2, 1).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Cell(row + 2, 1).Style.Font.FontSize = 16;
|
||
}
|
||
|
||
if (detail.is_footer == false)
|
||
{
|
||
ws.Cell(row, 1).Value = "";
|
||
}
|
||
}
|
||
}
|
||
|
||
using (var stream1 = new MemoryStream())
|
||
{
|
||
workbook.SaveAs(stream1);
|
||
var content = stream1.ToArray();
|
||
string date = DateTime.Now.ToString("yyyyMMddHHmmss");
|
||
return File(
|
||
content,
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||
"personnel_government_employee_" + date + ".xlsx");
|
||
}
|
||
}
|
||
|
||
|
||
[HttpPost, Route("reports/personnel_salary_government/{type}")]
|
||
[ApiExplorerSettings(GroupName = "reports")]
|
||
public IActionResult GetPersonSalaryGovernmentReport([FromRoute] string type,
|
||
[FromBody] personnel_salary_government_root _personnel)
|
||
{
|
||
var workbook = new XLWorkbook();
|
||
var ws = workbook.Worksheets.Add("ข้าราชการ");
|
||
if (_personnel.year == "2567")
|
||
{
|
||
_personnel.year = "2566";
|
||
}
|
||
|
||
ws.Range("A1:BF1").Merge().Value =
|
||
"รายละเอียดเงินเดือนและส่วนควบของข้าราชการพลเรือนในสถาบันอุดมศึกษา ประจำปีงบประมาณ พ.ศ. " +
|
||
_personnel.year;
|
||
ws.Cell("A1").Style.Alignment.WrapText = true;
|
||
ws.Range("A1:BF1").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("A1:BF1").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("A1:BF1").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("A1:BF1").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("A2:BF2").Merge().Value = "มหาวิทยาลัยเทคโนโลยีราชมงคลรัตนโกสินทร์";
|
||
ws.Cell("A2").Style.Alignment.WrapText = true;
|
||
ws.Range("A2:BF2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("A2:BF2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("A2:BF2").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("A2:BF2").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("A3:BF3").Merge().Value = "หน่วย : บาท";
|
||
ws.Cell("A3").Style.Alignment.WrapText = true;
|
||
ws.Range("A3:BF3").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Range("A3:BF3").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("A3:BF3").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("A3:BF3").Style.Font.FontSize = 16;
|
||
|
||
ws.Range("A4:A7").Merge().Value = "ลำดับที่";
|
||
ws.Cell("A4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("A4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("A4:A7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("A4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("A4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("B4:B7").Merge().Value = "เลขที่ตำแหน่ง";
|
||
ws.Cell("B4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("B4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("B4:B7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("B4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("B4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("C4:D7").Merge().Value = "ชื่อ- สกุล";
|
||
ws.Cell("C4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("C4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("C4:D7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("C4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("C4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("E4:F7").Merge().Value = "สังกัด/พื้นที่";
|
||
ws.Cell("E4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("E4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("E4:F7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("E4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("E4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("G4:G7").Merge().Value = "ชื่อตำแหน่ง";
|
||
ws.Cell("G4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("G4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("G4:G7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("G4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("G4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("H4:H7").Merge().Value = "ระดับตำแหน่ง";
|
||
ws.Cell("H4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("H4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("H4:H7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("H4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("H4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("I4:J5").Merge().Value = "ประเภท";
|
||
ws.Cell("I4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("I4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("I4:J5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("I4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("I4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("I6:I7").Merge().Value = "วิชาการ";
|
||
ws.Cell("I6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("I6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("I6:I7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("I6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("I6").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("I6").Style.Alignment.SetTextRotation(90);
|
||
|
||
ws.Range("J6:J7").Merge().Value = "สนับสนุน";
|
||
ws.Cell("J6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("J6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("J6:J7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("J6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("J6").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("J6").Style.Alignment.SetTextRotation(90);
|
||
|
||
ws.Range("K4:K7").Merge().Value = "ชื่อตำแหน่งบริหาร";
|
||
ws.Cell("K4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("K4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("K4:K7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("K4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("K4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("L4:L7").Merge().Value = "ชื่อตำแหน่งวิชาการ";
|
||
ws.Cell("L4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("L4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("L4:L7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("L4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("L4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("M4:N7").Merge().Value = "หนังสือคำสั่ง ก.พ.อ. และวันที่ดำรงตำแหน่งวิชาการ";
|
||
ws.Cell("M4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("M4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("M4:N7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("M4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("M4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("O4:O7").Merge().Value = "ปีที่เกษียณอายุราชการ";
|
||
ws.Cell("O4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("O4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("O4:O7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("O4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("O4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("P4:P6").Merge().Value = "เงินเดือน 1 เม.ย. 65";
|
||
ws.Cell("P4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("P4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("P4:P6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("P4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("P4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("Q4:Q6").Merge().Value = "ประมาณการเงินเดือน 1 ต.ค. 64 - 31 มี.ค. 65 (+3%)";
|
||
ws.Cell("Q4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("Q4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("Q4:Q6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("Q4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("Q4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("R4:R6").Merge().Value = "ประมาณการเงินเดือน 1 เม.ย. 65 - 30 ก.ย. 65 (+3%)";
|
||
ws.Cell("R4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("R4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("R4:R6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("R4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("R4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("S4:S6").Merge().Value = "ประมาณการเงินเดือน 1 ต.ค. 65 - 31 มี.ค. 66 (+3%)";
|
||
ws.Cell("S4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("S4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("S4:S6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("S4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("S4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("T4:U6").Merge().Value = "ประมาณการเงินเดือน 1 เม.ย. 66 - 30 ก.ย. 66 (+3%)";
|
||
ws.Cell("T4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("T4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("T4:U6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("T4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("T4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("V4:X5").Merge().Value = "ผู้เกษียณอายุราชการปี 2565 (1 ต.ค. 2565)";
|
||
ws.Cell("V4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("V4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("V4:X5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("V4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("V4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Cell("V6").Value = "ผู้เกษียณ";
|
||
ws.Cell("V6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("V6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("V6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("V6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("V6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("W6:X6").Merge().Value = "เงินเดือนต่อเดือน (ณ 1 ต.ค. 65) ประมาณการ 3%";
|
||
ws.Cell("W6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("W6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("W6:X6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("W6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("W6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("Y4:Y6").Merge().Value = "เงินเดือน หัก เงินเดือนผู้เกษียณ ต่อปี";
|
||
ws.Cell("Y4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("Y4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("Y4:Y6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("Y4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("Y4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("Z4:AH4").Merge().Value = "ส่วนควบงบบุคลากร";
|
||
ws.Cell("Z4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("Z4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("Z4:AH4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("Z4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("Z4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("Z5:AC5").Merge().Value = "เงินประจำตำแหน่งวิชาการ";
|
||
ws.Cell("Z5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("Z5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("Z5:AC5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("Z5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("Z5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AD5:AG5").Merge().Value = "เงินประจำตำแหน่งประเภทวิชาชีพเฉพาะ เชียวชาญเฉพาะ";
|
||
ws.Cell("AD5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AD5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AD5:AG5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AD5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AD5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("Z6:AA6").Merge().Value = "เงินประจำตำแหน่ง";
|
||
ws.Cell("Z6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("Z6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("Z6:AA6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("Z6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("Z6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AB6:AC6").Merge().Value = "ค่าตอบแทนรายเดือน (เทียบเท่าเงินประจำตำแหน่ง)";
|
||
ws.Cell("AB6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AB6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AB6:AC6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AB6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AB6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AD6:AE6").Merge().Value = "เงินประจำตำแหน่ง";
|
||
ws.Cell("AD6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AD6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AD6:AE6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AD6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AD6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AF6:AG6").Merge().Value = "ค่าตอบแทนรายเดือน (เทียบเท่าเงินประจำตำแหน่ง)";
|
||
ws.Cell("AF6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AF6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AF6:AG6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AF6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AF6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AH5:AH6").Merge().Value = "รวม";
|
||
ws.Cell("AH5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AH5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AH5:AH6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AH5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AH5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AI4:BE4").Merge().Value = "ส่วนควบงบดำเนินงาน";
|
||
ws.Cell("AI4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AI4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AI4:BE4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AI4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AI4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AI5:AL5").Merge().Value = "เงินประจำตำแหน่งบริหารที่มีวาระ";
|
||
ws.Cell("AI5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AI5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AI5:AL5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AI5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AI5").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("AI6:AJ6").Merge().Value = "เงินประจำตำแหน่ง";
|
||
ws.Cell("AI6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AI6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AI6:AJ6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AI6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AI6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AK6:AL6").Merge().Value = "ค่าตอบแทนรายเดือน (เทียบเท่าเงินประจำตำแหน่ง)";
|
||
ws.Cell("AK6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AK6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AK6:AL6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AK6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AK6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AM5:AP5").Merge().Value = "เงินประจำตำแหน่งบริหารไม่มีวาระ";
|
||
ws.Cell("AM5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AM5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AM5:AP5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AM5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AM5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AM6:AN6").Merge().Value = "เงินประจำตำแหน่ง";
|
||
ws.Cell("AM6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AM6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AM6:AN6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AM6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AM6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AO6:AP6").Merge().Value = "ค่าตอบแทนรายเดือน (เทียบเท่าเงินประจำตำแหน่ง)";
|
||
ws.Cell("AO6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AO6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AO6:AP6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AO6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AO6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AQ5:AQ6").Merge().Value = "ค่าเช่าบ้าน";
|
||
ws.Cell("AQ5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AQ5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AQ5:AQ6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AQ5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AQ5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AR5:AS6").Merge().Value = "ค่าตอบแทนเหมาจ่ายแทนการจัดหารถประจำตำแหน่ง";
|
||
ws.Cell("AR5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AR5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AR5:AS6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AR5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AR5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AT5:AV6").Merge().Value = "ค่าตอบแทนพิเศษที่ได้รับเงินเดือนเต็มขั้น";
|
||
ws.Cell("AT5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AT5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AT5:AV6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AT5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AT5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AW5:AW6").Merge().Value = "ค่าตอบแทนกำลังคนด้านสาธารณสุข";
|
||
ws.Cell("AW5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AW5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AW5:AW6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AW5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AW5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AX5:AX6").Merge().Value = "ค่าตอบแทนแพทย์ ทันตกรรม เภสัชที่ไม่ทำเวชปฎิบัติ";
|
||
ws.Cell("AX5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AX5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AX5:AX6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AX5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AX5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AY5:AY6").Merge().Value = "ค่าตอบแทนพิเศษสำหรับผู้ปฏิบัติงานในเขตพื้นที่พิเศษภาคใต้";
|
||
ws.Cell("AY5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AY5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AY5:AY6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AY5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AY5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AZ5:AZ6").Merge().Value = "ค่าตอบแทนพิเศษสำหรับการปฏิบัติงานประจำสำนักงานในพื้นที่พิเศษ (สปพ.)";
|
||
ws.Cell("AZ5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AZ5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AZ5:AZ6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AZ5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AZ5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("BA5:BA6").Merge().Value = "ค่าตอบแทนพิเศษสำหรับการสู้รบ (พสร.)";
|
||
ws.Cell("BA5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("BA5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("BA5:BA6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("BA5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("BA5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("BB5:BB6").Merge().Value = "ค่าตอบแทนพิเศษสำหรับครูการศึกษาพิเศษ";
|
||
ws.Cell("BB5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("BB5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("BB5:BB6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("BB5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("BB5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("BC5:BD5").Merge().Value = "อื่น ๆ";
|
||
ws.Cell("BC5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("BC5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("BC5:BD5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("BC5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("BC5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Cell("BC6").Value = "ระบุรายการ";
|
||
ws.Cell("BC6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("BC6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("BC6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("BC6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("BC6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Cell("BD6").Value = "จำนวนเงิน";
|
||
ws.Cell("BD6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("BD6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("BD6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("BD6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("BD6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("BE5:BE6").Merge().Value = "รวม";
|
||
ws.Cell("BE5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("BE5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("BE5:BE6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("BE5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("BE5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("BF4:BF6").Merge().Value = "รวมเงินเดือนและส่วนควบ";
|
||
ws.Cell("BF4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("BF4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("BF4:BF6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("BF4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("BF4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("BG4:BG6").Merge().Value = "รวมเงินเดือนและส่วนควบ*12เดือน";
|
||
ws.Cell("BG4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("BG4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("BG4:BG6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("BG4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("BG4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Cell("R7").Value = "(1)";
|
||
ws.Cell("R7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("R7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("R7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("R7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("R7").Style.Font.SetBold().Font.FontSize = 12;
|
||
|
||
ws.Cell("S7").Value = "(2)";
|
||
ws.Cell("S7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("S7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("S7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("S7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("S7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("T7").Value = "(3)";
|
||
ws.Cell("T7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("T7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("T7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("T7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("T7").Style.Font.SetBold().Font.FontSize = 12;
|
||
|
||
ws.Cell("U7").Value = "(3)*12";
|
||
ws.Cell("U7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("U7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("U7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("U7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("U7").Style.Font.SetBold().Font.FontSize = 12;
|
||
|
||
ws.Cell("W7").Value = "(4)";
|
||
ws.Cell("W7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("W7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("W7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("W7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("W7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("X7").Value = "(4)*12";
|
||
ws.Cell("X7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("X7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("X7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("X7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("X7").Style.Font.SetBold().Font.FontSize = 12;
|
||
|
||
ws.Cell("Y7").Value = "(3)*12 - (4)*12";
|
||
ws.Cell("Y7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("Y7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("Y7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("Y7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("Y7").Style.Font.SetBold().Font.FontSize = 12;
|
||
|
||
ws.Cell("Z7").Value = "(5)";
|
||
ws.Cell("Z7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("Z7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("Z7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("Z7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("Z7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AA7").Value = "(5)*12";
|
||
ws.Cell("AA7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AA7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AA7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AA7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AA7").Style.Font.SetBold().Font.FontSize = 12;
|
||
|
||
ws.Cell("AB7").Value = "(6)";
|
||
ws.Cell("AB7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AB7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AB7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AB7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AB7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AC7").Value = "(6)*12";
|
||
ws.Cell("AC7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AC7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AC7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AC7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AC7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AD7").Value = "(7)";
|
||
ws.Cell("AD7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AD7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AD7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AD7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AD7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AE7").Value = "(7)*12";
|
||
ws.Cell("AE7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AE7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AE7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AE7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AE7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AF7").Value = "(8)";
|
||
ws.Cell("AF7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AF7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AF7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AF7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AF7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AG7").Value = "(8)*12";
|
||
ws.Cell("AG7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AG7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AG7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AG7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AG7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AH7").Value = "(9) = (5) ถึง (8)";
|
||
ws.Cell("AH7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AH7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AH7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AH7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AH7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AI7").Value = "(10)";
|
||
ws.Cell("AI7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AI7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AI7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AI7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AI7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AJ7").Value = "(10)*12";
|
||
ws.Cell("AJ7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AJ7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AJ7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AJ7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AJ7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AK7").Value = "(11)";
|
||
ws.Cell("AK7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AK7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AK7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AK7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AK7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AL7").Value = "(11)*12";
|
||
ws.Cell("AL7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AL7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AL7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AL7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AL7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AM7").Value = "(12)";
|
||
ws.Cell("AM7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AM7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AM7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AM7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AM7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AN7").Value = "(12)*12";
|
||
ws.Cell("AN7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AN7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AN7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AN7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AN7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AO7").Value = "(13)";
|
||
ws.Cell("AO7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AO7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AO7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AO7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AO7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AP7").Value = "(13)*12";
|
||
ws.Cell("AP7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AP7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AP7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AP7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AP7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AQ7").Value = "(14)";
|
||
ws.Cell("AQ7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AQ7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AQ7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AQ7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AQ7").Style.Font.SetBold().Font.FontSize = 12;
|
||
|
||
ws.Cell("AR7").Value = "(15)";
|
||
ws.Cell("AR7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AR7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AR7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AR7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AR7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AS7").Value = "(15)*12";
|
||
ws.Cell("AS7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AS7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AS7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AS7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AS7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AU7").Value = "(16)";
|
||
ws.Cell("AU7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AU7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AU7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AU7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AU7").Style.Font.SetBold().Font.FontSize = 12;
|
||
|
||
ws.Cell("AV7").Value = "(16)*12";
|
||
ws.Cell("AV7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AV7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AV7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AV7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AV7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AW7").Value = "(17)";
|
||
ws.Cell("AW7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AW7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AW7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AW7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AW7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AX7").Value = "(18)";
|
||
ws.Cell("AX7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AX7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AX7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AX7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AX7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AY7").Value = "(19)";
|
||
ws.Cell("AY7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AY7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AY7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AY7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AY7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AZ7").Value = "(20)";
|
||
ws.Cell("AZ7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AZ7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AZ7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AZ7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AZ7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("BA7").Value = "(21)";
|
||
ws.Cell("BA7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("BA7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("BA7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("BA7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("BA7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("BB7").Value = "(22)";
|
||
ws.Cell("BB7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("BB7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("BB7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("BB7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("BB7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("BD7").Value = "(23)";
|
||
ws.Cell("BD7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("BD7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("BD7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("BD7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("BD7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("BE7").Value = "(24) = (10) ถึง (23)";
|
||
ws.Cell("BE7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("BE7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("BE7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("BE7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("BE7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("BF7").Value = "(25) = (3) + (9) + (24)";
|
||
ws.Cell("BF7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("BF7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("BF7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("BF7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("BF7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("BG7").Value = "(25)*12";
|
||
ws.Cell("BG7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("BG7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("BG7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("BG7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("BG7").Style.Font.SetBold().Font.FontSize = 12;
|
||
|
||
ws.Range("A4:BG7").Style.Alignment.WrapText = true;
|
||
ws.Row(4).Height = 45;
|
||
ws.Row(5).Height = 45;
|
||
ws.Row(6).Height = 45;
|
||
ws.Column(1).Width = 10;
|
||
ws.Column(2).Width = 10;
|
||
ws.Column(3).Width = 30;
|
||
ws.Column(4).Width = 30;
|
||
ws.Column(5).Width = 30;
|
||
ws.Column(6).Width = 30;
|
||
ws.Column(7).Width = 30;
|
||
ws.Column(8).Width = 30;
|
||
ws.Column(9).Width = 10;
|
||
ws.Column(10).Width = 10;
|
||
ws.Column(11).Width = 30;
|
||
ws.Column(12).Width = 30;
|
||
ws.Column(13).Width = 30;
|
||
ws.Column(14).Width = 15;
|
||
ws.Column(15).Width = 15;
|
||
ws.Column(16).Width = 15;
|
||
ws.Column(17).Width = 15;
|
||
ws.Column(18).Width = 15;
|
||
ws.Column(19).Width = 15;
|
||
ws.Column(20).Width = 15;
|
||
ws.Column(21).Width = 15;
|
||
ws.Column(22).Width = 15;
|
||
ws.Column(23).Width = 15;
|
||
ws.Column(24).Width = 15;
|
||
ws.Column(25).Width = 15;
|
||
ws.Column(26).Width = 15;
|
||
ws.Column(27).Width = 15;
|
||
ws.Column(28).Width = 15;
|
||
ws.Column(29).Width = 15;
|
||
ws.Column(30).Width = 15;
|
||
ws.Column(31).Width = 15;
|
||
ws.Column(32).Width = 15;
|
||
ws.Column(33).Width = 15;
|
||
ws.Column(34).Width = 15;
|
||
ws.Column(35).Width = 15;
|
||
ws.Column(36).Width = 15;
|
||
ws.Column(37).Width = 15;
|
||
ws.Column(38).Width = 15;
|
||
ws.Column(39).Width = 15;
|
||
ws.Column(40).Width = 15;
|
||
ws.Column(41).Width = 15;
|
||
ws.Column(42).Width = 15;
|
||
ws.Column(43).Width = 15;
|
||
ws.Column(44).Width = 15;
|
||
ws.Column(45).Width = 15;
|
||
ws.Column(46).Width = 15;
|
||
ws.Column(47).Width = 15;
|
||
ws.Column(48).Width = 15;
|
||
ws.Column(49).Width = 15;
|
||
ws.Column(50).Width = 15;
|
||
ws.Column(51).Width = 15;
|
||
ws.Column(52).Width = 15;
|
||
ws.Column(53).Width = 15;
|
||
ws.Column(54).Width = 15;
|
||
ws.Column(55).Width = 15;
|
||
ws.Column(56).Width = 15;
|
||
ws.Column(57).Width = 15;
|
||
ws.Column(58).Width = 15;
|
||
ws.Column(59).Width = 15;
|
||
|
||
int row = 8;
|
||
int no = 1;
|
||
|
||
if (_personnel != null)
|
||
{
|
||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 5)).Merge().Value = "รวมงบประมาณทั้งสิ้น";
|
||
ws.Cell(row, 16).Value = _personnel.salary;
|
||
ws.Cell(row, 17).Value = _personnel.estimated_salary_3_percent_1;
|
||
ws.Cell(row, 18).Value = _personnel.estimated_salary_3_percent_2;
|
||
ws.Cell(row, 19).Value = _personnel.estimated_salary_3_percent_3;
|
||
ws.Cell(row, 20).Value = _personnel.estimated_salary_3_percent_4;
|
||
ws.Cell(row, 21).Value = _personnel.estimated_salary_3_percent_sum;
|
||
ws.Cell(row, 22).Value = _personnel.retiree;
|
||
ws.Cell(row, 23).Value = _personnel.salary_per_month;
|
||
ws.Cell(row, 24).Value = _personnel.salary_per_month_12;
|
||
ws.Cell(row, 25).Value = _personnel.salary_minus_retirement_year;
|
||
ws.Cell(row, 26).Value = _personnel.position_money;
|
||
ws.Cell(row, 27).Value = _personnel.position_money_12;
|
||
ws.Cell(row, 28).Value = _personnel.compensation_monthly;
|
||
ws.Cell(row, 29).Value = _personnel.compensation_monthly_12;
|
||
ws.Cell(row, 30).Value = _personnel.position_money_2;
|
||
ws.Cell(row, 31).Value = _personnel.position_money_2_12;
|
||
ws.Cell(row, 32).Value = _personnel.compensation_monthly_2;
|
||
ws.Cell(row, 33).Value = _personnel.compensation_monthly_2_12;
|
||
ws.Cell(row, 34).Value = _personnel.total;
|
||
ws.Cell(row, 35).Value = _personnel.position_money_3;
|
||
ws.Cell(row, 36).Value = _personnel.position_money_3_12;
|
||
ws.Cell(row, 37).Value = _personnel.compensation_monthly_3;
|
||
ws.Cell(row, 38).Value = _personnel.compensation_monthly_3_12;
|
||
ws.Cell(row, 39).Value = _personnel.position_money_4;
|
||
ws.Cell(row, 40).Value = _personnel.position_money_4_12;
|
||
ws.Cell(row, 41).Value = _personnel.compensation_monthly_4;
|
||
ws.Cell(row, 42).Value = _personnel.compensation_monthly_4_12;
|
||
ws.Cell(row, 43).Value = _personnel.house_rent;
|
||
ws.Cell(row, 44).Value = _personnel.compensation_paid;
|
||
ws.Cell(row, 45).Value = _personnel.compensation_paid_12;
|
||
ws.Cell(row, 46).Value = _personnel.special_compensation_with_full_salary;
|
||
ws.Cell(row, 47).Value = _personnel.special_compensation;
|
||
|
||
ws.Cell(row, 48).Value = _personnel.special_compensation_12;
|
||
ws.Cell(row, 49).Value = _personnel.compensation_1;
|
||
ws.Cell(row, 50).Value = _personnel.compensation_2;
|
||
ws.Cell(row, 51).Value = _personnel.compensation_3;
|
||
ws.Cell(row, 52).Value = _personnel.compensation_4;
|
||
ws.Cell(row, 53).Value = _personnel.compensation_5;
|
||
ws.Cell(row, 54).Value = _personnel.compensation_6;
|
||
ws.Cell(row, 55).Value = _personnel.other;
|
||
ws.Cell(row, 56).Value = _personnel.other_price;
|
||
ws.Cell(row, 57).Value = _personnel.total_2;
|
||
ws.Cell(row, 58).Value = _personnel.total_including_salary_and_fittings;
|
||
ws.Cell(row, 59).Value = _personnel.total_including_salary_and_fittings_12;
|
||
//ws.Cell(row, 59).Value = _personnel.total_including_salary_and_fittings;
|
||
//ws.Cell(row, 60).Value = _personnel.total_including_salary_and_fittings_12;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.LeftBorder = XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Alignment.Vertical =
|
||
XLAlignmentVerticalValues.Center;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Center;
|
||
ws.Range(ws.Cell(row, 5), ws.Cell(row, 8)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Left;
|
||
ws.Range(ws.Cell(row, 9), ws.Cell(row, 10)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Center;
|
||
ws.Range(ws.Cell(row, 11), ws.Cell(row, 15)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Left;
|
||
ws.Range(ws.Cell(row, 16), ws.Cell(row, 59)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Right;
|
||
ws.Range(ws.Cell(row, 16), ws.Cell(row, 45)).Style.NumberFormat.SetFormat("#,#");
|
||
ws.Range(ws.Cell(row, 46), ws.Cell(row, 54)).Style.NumberFormat.SetFormat("#,#");
|
||
ws.Range(ws.Cell(row, 56), ws.Cell(row, 59)).Style.NumberFormat.SetFormat("#,#");
|
||
row++;
|
||
foreach (var detail in _personnel.personnel_salary_government)
|
||
{
|
||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 5)).Merge().Value = detail.agency_category_name;
|
||
ws.Cell(row, 16).Value = detail.salary;
|
||
ws.Cell(row, 17).Value = detail.estimated_salary_3_percent_1;
|
||
ws.Cell(row, 18).Value = detail.estimated_salary_3_percent_2;
|
||
ws.Cell(row, 19).Value = detail.estimated_salary_3_percent_3;
|
||
ws.Cell(row, 20).Value = detail.estimated_salary_3_percent_4;
|
||
ws.Cell(row, 21).Value = detail.estimated_salary_3_percent_sum;
|
||
ws.Cell(row, 22).Value = detail.retiree;
|
||
ws.Cell(row, 23).Value = detail.salary_per_month;
|
||
ws.Cell(row, 24).Value = detail.salary_per_month_12;
|
||
ws.Cell(row, 25).Value = detail.salary_minus_retirement_year;
|
||
ws.Cell(row, 26).Value = detail.position_money;
|
||
ws.Cell(row, 27).Value = detail.position_money_12;
|
||
ws.Cell(row, 28).Value = detail.compensation_monthly;
|
||
ws.Cell(row, 29).Value = detail.compensation_monthly_12;
|
||
ws.Cell(row, 30).Value = detail.position_money_2;
|
||
ws.Cell(row, 31).Value = detail.position_money_2_12;
|
||
ws.Cell(row, 32).Value = detail.compensation_monthly_2;
|
||
ws.Cell(row, 33).Value = detail.compensation_monthly_2_12;
|
||
ws.Cell(row, 34).Value = detail.total;
|
||
ws.Cell(row, 35).Value = detail.position_money_3;
|
||
ws.Cell(row, 36).Value = detail.position_money_3_12;
|
||
ws.Cell(row, 37).Value = detail.compensation_monthly_3;
|
||
ws.Cell(row, 38).Value = detail.compensation_monthly_3_12;
|
||
ws.Cell(row, 39).Value = detail.position_money_4;
|
||
ws.Cell(row, 40).Value = detail.position_money_4_12;
|
||
ws.Cell(row, 41).Value = detail.compensation_monthly_4;
|
||
ws.Cell(row, 42).Value = detail.compensation_monthly_4_12;
|
||
ws.Cell(row, 43).Value = detail.house_rent;
|
||
ws.Cell(row, 44).Value = detail.compensation_paid;
|
||
ws.Cell(row, 45).Value = detail.compensation_paid_12;
|
||
ws.Cell(row, 46).Value = detail.special_compensation_with_full_salary;
|
||
ws.Cell(row, 47).Value = detail.special_compensation;
|
||
ws.Cell(row, 48).Value = detail.special_compensation_12;
|
||
ws.Cell(row, 49).Value = detail.compensation_1;
|
||
ws.Cell(row, 50).Value = detail.compensation_2;
|
||
ws.Cell(row, 51).Value = detail.compensation_3;
|
||
ws.Cell(row, 52).Value = detail.compensation_4;
|
||
ws.Cell(row, 53).Value = detail.compensation_5;
|
||
ws.Cell(row, 54).Value = detail.compensation_6;
|
||
ws.Cell(row, 55).Value = detail.other;
|
||
ws.Cell(row, 56).Value = detail.other_price;
|
||
ws.Cell(row, 57).Value = detail.total_2;
|
||
ws.Cell(row, 58).Value = detail.total_including_salary_and_fittings;
|
||
ws.Cell(row, 59).Value = detail.total_including_salary_and_fittings_12;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.LeftBorder = XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Fill.BackgroundColor = XLColor.LightYellow;
|
||
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Alignment.Vertical =
|
||
XLAlignmentVerticalValues.Center;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 8)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Left;
|
||
ws.Range(ws.Cell(row, 9), ws.Cell(row, 10)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Center;
|
||
ws.Range(ws.Cell(row, 11), ws.Cell(row, 15)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Left;
|
||
ws.Range(ws.Cell(row, 16), ws.Cell(row, 59)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Right;
|
||
ws.Range(ws.Cell(row, 16), ws.Cell(row, 45)).Style.NumberFormat.SetFormat("#,#");
|
||
ws.Range(ws.Cell(row, 46), ws.Cell(row, 54)).Style.NumberFormat.SetFormat("#,#");
|
||
ws.Range(ws.Cell(row, 56), ws.Cell(row, 59)).Style.NumberFormat.SetFormat("#,#");
|
||
row++;
|
||
foreach (var detail2 in detail.personnel_salary_deltails)
|
||
{
|
||
CultureInfo culture = new CultureInfo("th-TH");
|
||
if (detail2.first_name_th != "รวม")
|
||
{
|
||
ws.Cell(row, 1).Value = no;
|
||
no++;
|
||
ws.Cell(row, 2).Value = detail2.manpower;
|
||
ws.Cell(row, 3).Value = detail2.prefix + detail2.first_name_th;
|
||
ws.Cell(row, 4).Value = detail2.last_name_th;
|
||
ws.Cell(row, 5).Value = detail2.parent_agency_name;
|
||
ws.Cell(row, 6).Value = detail2.area;
|
||
ws.Cell(row, 7).Value = detail2.position;
|
||
ws.Cell(row, 8).Value = detail2.position_level;
|
||
if (detail2.is_academic_line == true)
|
||
{
|
||
ws.Cell(row, 9).Value = "/";
|
||
}
|
||
|
||
if (detail2.is_academic_line == false)
|
||
{
|
||
ws.Cell(row, 9).Value = "";
|
||
}
|
||
|
||
if (detail2.is_support_line == true)
|
||
{
|
||
ws.Cell(row, 10).Value = "/";
|
||
}
|
||
|
||
if (detail2.is_support_line == false)
|
||
{
|
||
ws.Cell(row, 10).Value = "";
|
||
}
|
||
|
||
ws.Cell(row, 11).Value = detail2.management_position_name;
|
||
ws.Cell(row, 12).Value = detail2.position_name;
|
||
ws.Cell(row, 13).Value = detail2.assign_no + " " + detail2.assign_document_date;
|
||
if (detail2.assign_effective_date != null)
|
||
{
|
||
ws.Cell(row, 14).Value =
|
||
detail2.assign_effective_date.Value.ToString("dd MMMM yyyy", culture);
|
||
}
|
||
|
||
if (detail2.assign_effective_date == null)
|
||
{
|
||
ws.Cell(row, 14).Value = null;
|
||
}
|
||
|
||
ws.Cell(row, 15).Value = detail2.retire_year;
|
||
ws.Cell(row, 16).Value = detail2.salary;
|
||
ws.Cell(row, 17).Value = detail2.estimated_salary_3_percent_1;
|
||
ws.Cell(row, 18).Value = detail2.estimated_salary_3_percent_2;
|
||
ws.Cell(row, 19).Value = detail2.estimated_salary_3_percent_3;
|
||
ws.Cell(row, 20).Value = detail2.estimated_salary_3_percent_4;
|
||
ws.Cell(row, 21).Value = detail2.estimated_salary_3_percent_sum;
|
||
ws.Cell(row, 22).Value = detail2.retiree;
|
||
ws.Cell(row, 23).Value = detail2.salary_per_month;
|
||
ws.Cell(row, 24).Value = detail2.salary_per_month_12;
|
||
ws.Cell(row, 25).Value = detail2.salary_minus_retirement_year;
|
||
ws.Cell(row, 26).Value = detail2.position_money;
|
||
ws.Cell(row, 27).Value = detail2.position_money_12;
|
||
ws.Cell(row, 28).Value = detail2.compensation_monthly;
|
||
ws.Cell(row, 29).Value = detail2.compensation_monthly_12;
|
||
ws.Cell(row, 30).Value = detail2.position_money_2;
|
||
ws.Cell(row, 31).Value = detail2.position_money_2_12;
|
||
ws.Cell(row, 32).Value = detail2.compensation_monthly_2;
|
||
ws.Cell(row, 33).Value = detail2.compensation_monthly_2_12;
|
||
ws.Cell(row, 34).Value = detail2.total;
|
||
ws.Cell(row, 35).Value = detail2.position_money_3;
|
||
ws.Cell(row, 36).Value = detail2.position_money_3_12;
|
||
ws.Cell(row, 37).Value = detail2.compensation_monthly_3;
|
||
ws.Cell(row, 38).Value = detail2.compensation_monthly_3_12;
|
||
ws.Cell(row, 39).Value = detail2.position_money_4;
|
||
ws.Cell(row, 40).Value = detail2.position_money_4_12;
|
||
ws.Cell(row, 41).Value = detail2.compensation_monthly_4;
|
||
ws.Cell(row, 42).Value = detail2.compensation_monthly_4_12;
|
||
ws.Cell(row, 43).Value = detail2.house_rent;
|
||
ws.Cell(row, 44).Value = detail2.compensation_paid;
|
||
ws.Cell(row, 45).Value = detail2.compensation_paid_12;
|
||
ws.Cell(row, 46).Value = detail2.special_compensation_with_full_salary;
|
||
ws.Cell(row, 47).Value = detail2.special_compensation;
|
||
ws.Cell(row, 48).Value = detail2.special_compensation_12;
|
||
ws.Cell(row, 49).Value = detail2.compensation_1;
|
||
ws.Cell(row, 50).Value = detail2.compensation_2;
|
||
ws.Cell(row, 51).Value = detail2.compensation_3;
|
||
ws.Cell(row, 52).Value = detail2.compensation_4;
|
||
ws.Cell(row, 53).Value = detail2.compensation_5;
|
||
ws.Cell(row, 54).Value = detail2.compensation_6;
|
||
ws.Cell(row, 55).Value = detail2.other;
|
||
ws.Cell(row, 56).Value = detail2.other_price;
|
||
ws.Cell(row, 57).Value = detail2.total_2;
|
||
ws.Cell(row, 58).Value = detail2.total_including_salary_and_fittings;
|
||
ws.Cell(row, 59).Value = detail2.total_including_salary_and_fittings_12;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.OutsideBorder =
|
||
XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.LeftBorder =
|
||
XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.RightBorder =
|
||
XLBorderStyleValues.Thin;
|
||
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Alignment.Vertical =
|
||
XLAlignmentVerticalValues.Center;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Center;
|
||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 8)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Left;
|
||
ws.Range(ws.Cell(row, 9), ws.Cell(row, 10)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Center;
|
||
ws.Range(ws.Cell(row, 11), ws.Cell(row, 14)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Left;
|
||
ws.Cell(row, 15).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Center;
|
||
ws.Range(ws.Cell(row, 16), ws.Cell(row, 59)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Right;
|
||
ws.Range(ws.Cell(row, 16), ws.Cell(row, 59)).Style.NumberFormat.SetFormat("#,#");
|
||
ws.Cell(row, 21).Style.Fill.BackgroundColor = XLColor.LightGreen;
|
||
ws.Cell(row, 27).Style.Fill.BackgroundColor = XLColor.LightGreen;
|
||
ws.Cell(row, 29).Style.Fill.BackgroundColor = XLColor.LightGreen;
|
||
ws.Cell(row, 31).Style.Fill.BackgroundColor = XLColor.LightYellow;
|
||
ws.Cell(row, 36).Style.Fill.BackgroundColor = XLColor.LightGreen;
|
||
ws.Cell(row, 38).Style.Fill.BackgroundColor = XLColor.LightGreen;
|
||
ws.Cell(row, 40).Style.Fill.BackgroundColor = XLColor.LightYellow;
|
||
ws.Cell(row, 42).Style.Fill.BackgroundColor = XLColor.LightBlue;
|
||
ws.Cell(row, 45).Style.Fill.BackgroundColor = XLColor.LightGreen;
|
||
ws.Cell(row, 48).Style.Fill.BackgroundColor = XLColor.LightGreen;
|
||
ws.Cell(row, 59).Style.Fill.BackgroundColor = XLColor.LightGreen;
|
||
|
||
row++;
|
||
}
|
||
|
||
if (detail2.first_name_th == "รวม")
|
||
{
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Merge().Value = detail2.first_name_th;
|
||
ws.Cell(row, 16).Value = detail2.salary;
|
||
ws.Cell(row, 17).Value = detail2.estimated_salary_3_percent_1;
|
||
ws.Cell(row, 18).Value = detail2.estimated_salary_3_percent_2;
|
||
ws.Cell(row, 19).Value = detail2.estimated_salary_3_percent_3;
|
||
ws.Cell(row, 20).Value = detail2.estimated_salary_3_percent_4;
|
||
ws.Cell(row, 21).Value = detail2.estimated_salary_3_percent_sum;
|
||
ws.Cell(row, 22).Value = detail2.retiree;
|
||
ws.Cell(row, 23).Value = detail2.salary_per_month;
|
||
ws.Cell(row, 24).Value = detail2.salary_per_month_12;
|
||
ws.Cell(row, 25).Value = detail2.salary_minus_retirement_year;
|
||
ws.Cell(row, 26).Value = detail2.position_money;
|
||
ws.Cell(row, 27).Value = detail2.position_money_12;
|
||
ws.Cell(row, 28).Value = detail2.compensation_monthly;
|
||
ws.Cell(row, 29).Value = detail2.compensation_monthly_12;
|
||
ws.Cell(row, 30).Value = detail2.position_money_2;
|
||
ws.Cell(row, 31).Value = detail2.position_money_2_12;
|
||
ws.Cell(row, 32).Value = detail2.compensation_monthly_2;
|
||
ws.Cell(row, 33).Value = detail2.compensation_monthly_2_12;
|
||
ws.Cell(row, 34).Value = detail2.total;
|
||
ws.Cell(row, 35).Value = detail2.position_money_3;
|
||
ws.Cell(row, 36).Value = detail2.position_money_3_12;
|
||
ws.Cell(row, 37).Value = detail2.compensation_monthly_3;
|
||
ws.Cell(row, 38).Value = detail2.compensation_monthly_3_12;
|
||
ws.Cell(row, 39).Value = detail2.position_money_4;
|
||
ws.Cell(row, 40).Value = detail2.position_money_4_12;
|
||
ws.Cell(row, 41).Value = detail2.compensation_monthly_4;
|
||
ws.Cell(row, 42).Value = detail2.compensation_monthly_4_12;
|
||
ws.Cell(row, 43).Value = detail2.house_rent;
|
||
ws.Cell(row, 44).Value = detail2.compensation_paid;
|
||
ws.Cell(row, 45).Value = detail2.compensation_paid_12;
|
||
ws.Cell(row, 46).Value = detail2.special_compensation_with_full_salary;
|
||
ws.Cell(row, 47).Value = detail2.special_compensation;
|
||
ws.Cell(row, 48).Value = detail2.special_compensation_12;
|
||
ws.Cell(row, 49).Value = detail2.compensation_1;
|
||
ws.Cell(row, 50).Value = detail2.compensation_2;
|
||
ws.Cell(row, 51).Value = detail2.compensation_3;
|
||
ws.Cell(row, 52).Value = detail2.compensation_4;
|
||
ws.Cell(row, 53).Value = detail2.compensation_5;
|
||
ws.Cell(row, 54).Value = detail2.compensation_6;
|
||
ws.Cell(row, 55).Value = detail2.other;
|
||
ws.Cell(row, 56).Value = detail2.other_price;
|
||
ws.Cell(row, 57).Value = detail2.total_2;
|
||
ws.Cell(row, 58).Value = detail2.total_including_salary_and_fittings;
|
||
ws.Cell(row, 59).Value = detail2.total_including_salary_and_fittings_12;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.OutsideBorder =
|
||
XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.LeftBorder =
|
||
XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.RightBorder =
|
||
XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.TopBorder =
|
||
XLBorderStyleValues.Double;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Style.Alignment.Vertical =
|
||
XLAlignmentVerticalValues.Center;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Center;
|
||
ws.Range(ws.Cell(row, 16), ws.Cell(row, 59)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Right;
|
||
ws.Range(ws.Cell(row, 16), ws.Cell(row, 59)).Style.NumberFormat.SetFormat("#,#");
|
||
}
|
||
}
|
||
|
||
if (detail.is_footer == true)
|
||
{
|
||
var imagePath = _setting.report_path + @"Picture1.png";
|
||
ws.AddPicture(imagePath).MoveTo(ws.Cell(row + 1, 2)).WithSize(72, 30);
|
||
ws.Cell(row + 1, 3).Value = "= ผู้เกษียณอายุราชการประจำปีงบประมาณ พ.ศ. 2565 (1 ต.ค. 2564)";
|
||
var imagePath2 = _setting.report_path + @"Picture2.png";
|
||
ws.AddPicture(imagePath2).MoveTo(ws.Cell(row + 2, 2)).WithSize(72, 30);
|
||
ws.Cell(row + 2, 3).Value =
|
||
"= อัตราที่จะเสนอขอยุบเลิก ในปีงบประมาณ พ.ศ. 2565 และขอรับจัดสรรอัตราทดแทนเป็นพนักงานมหาวิทยาลัย ในปีงบประมาณ พ.ศ. 2566";
|
||
ws.Cell(row + 1, 3).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Cell(row + 1, 3).Style.Font.FontSize = 16;
|
||
ws.Cell(row + 2, 3).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Cell(row + 2, 3).Style.Font.FontSize = 16;
|
||
}
|
||
|
||
if (detail.is_footer == false)
|
||
{
|
||
ws.Cell(row, 3).Value = "";
|
||
}
|
||
}
|
||
}
|
||
|
||
using (var stream1 = new MemoryStream())
|
||
{
|
||
workbook.SaveAs(stream1);
|
||
var content = stream1.ToArray();
|
||
string date = DateTime.Now.ToString("yyyyMMddHHmmss");
|
||
return File(
|
||
content,
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||
"personnel_government_" + date + ".xlsx");
|
||
}
|
||
}
|
||
|
||
|
||
[HttpPost, Route("reports/personnel_salary_permanent/{type}")]
|
||
[ApiExplorerSettings(GroupName = "reports")]
|
||
public IActionResult GetPersonSalaryReport([FromRoute] string type,
|
||
[FromBody] personnel_salary_permanent_root _personnel)
|
||
{
|
||
var workbook = new XLWorkbook();
|
||
var ws = workbook.Worksheets.Add("ลูกจ้างประจํา");
|
||
if (_personnel.year == "2567")
|
||
{
|
||
_personnel.year = "2566";
|
||
}
|
||
|
||
ws.Range("A1:AA1").Merge().Value = "รายละเอียดค่าจ้างและส่วนควบของลูกจ้างประจำ ประจำปีงบประมาณ พ.ศ." +
|
||
_personnel.year;
|
||
ws.Cell("A1").Style.Alignment.WrapText = true;
|
||
ws.Range("A1:AA1").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("A1:AA1").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("A1:AA1").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("A1:AA1").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("A2:AA2").Merge().Value = "มหาวิทยาลัยเทคโนโลยีราชมงคลรัตนโกสินทร์";
|
||
ws.Cell("A2").Style.Alignment.WrapText = true;
|
||
ws.Range("A2:AA2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("A2:AA2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("A2:AA2").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("A2:AA2").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("A3:AA3").Merge().Value = "หน่วย : บาท";
|
||
ws.Cell("A3").Style.Alignment.WrapText = true;
|
||
ws.Range("A3:AA3").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Range("A3:AA3").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("A3:AA3").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("A3:AA3").Style.Font.FontSize = 16;
|
||
ws.Range("A4:A7").Merge().Value = "ลำดับที่";
|
||
ws.Cell("A4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("A4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("A4:A7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("A4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("A4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("B4:B7").Merge().Value = "เลขที่ตำแหน่ง";
|
||
ws.Cell("B4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("B4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("B4:B7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("B4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("B4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("C4:D7").Merge().Value = "ชื่อ- สกุล";
|
||
ws.Cell("C4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("C4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("C4:D7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("C4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("C4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("E4:E7").Merge().Value = "ชื่อตำแหน่ง";
|
||
ws.Cell("E4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("E4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("E4:E7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("E4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("E4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("F4:G7").Merge().Value = "สังกัด/พื้นที่";
|
||
ws.Cell("F4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("F4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("F4:G7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("F4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("F4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("H4:H6").Merge().Value = "ค่าจ้าง ณ 1 ต.ค. 64 - 30 ก.ย. 64";
|
||
ws.Cell("H4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("H4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("H4:H6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("H4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("H4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("I4:I6").Merge().Value = "ประมาณการเลื่อนขั้น 1 ขั้น ณ 1 ต.ค. 64 - 30 ก.ย. 65";
|
||
ws.Cell("I4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("I4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("I4:I6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("I4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("I4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("J4:J6").Merge().Value = "ประมาณการเลื่อนขั้น 1 ขั้น 1 เม.ย. 65 - 30 ก.ย. 65";
|
||
ws.Cell("J4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("J4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("J4:J6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("J4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("J4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("K4:K6").Merge().Value = "ประมาณการเลื่อนขั้น 1 ขั้น 1 ต.ค. 65 - 31 มี.ค. 66";
|
||
ws.Cell("K4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("K4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("K4:K6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("K4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("K4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("L4:L6").Merge().Value = "ประมาณการเลื่อนขั้น 1 ขั้น 1 เม.ย. 66 - 30 ก.ย. 66";
|
||
ws.Cell("L4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("L4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("L4:L6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("L4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("L4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("M4:M6").Merge().Value = "ค่าจ้างปีงบประมาณ พ.ศ. 2565 12 เดือน";
|
||
ws.Cell("M4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("M4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("M4:M6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("M4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("M4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("N4:P5").Merge().Value = "ผู้เกษียณอายุราชการปี 2565";
|
||
ws.Cell("N4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("N4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("N4:P5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("N4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("N4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Cell("N6").Value = "ผู้เกษียณ";
|
||
ws.Cell("N6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("M5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("N6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("M5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("M5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("O6:P6").Merge().Value = "ค่าจ้างต่อเดือน";
|
||
ws.Cell("O6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("O6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("O6:P6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("O6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("O6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("Q4:Q6").Merge().Value = "เงินเดือน หัก เงินเดือนผู้เกษียณ ต่อปี";
|
||
ws.Cell("Q4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("Q4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("Q4:Q6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("Q4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("Q4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("R4:Z4").Merge().Value = "ส่วนควบงบดำเนินงาน";
|
||
ws.Cell("R4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("R4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("R4:Z4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("R4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("R4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("R5:S6").Merge().Value = "ค่าตอบแทนพิเศษที่ได้รับเงินเดือนเต็มขั้น (ประมาณการ 1 ขั้น)";
|
||
ws.Cell("R5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("R5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("R5:S6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("R5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("R5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("T5:T6").Merge().Value = "เงินเดือนเต็มขั้น หักผู้เกษียณ ต่อปี";
|
||
ws.Cell("T5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("T5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("T5:T6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("T5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("T5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("U5:U6").Merge().Value = "ค่าตอบแทนพิเศษสำหรับผู้ปฏิบัติงานในเขตพื้นที่พิเศษภาคใต้";
|
||
ws.Cell("U5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("U5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("T4:U6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("U5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("U5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("V5:V6").Merge().Value = "ค่าตอบแทนพิเศษสำหรับการปฏิบัติงานประจำสำนักงานในพื้นที่พิเศษ (สปพ.)";
|
||
ws.Cell("V5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("V5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("V5:V6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("V5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("V5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("W5:W6").Merge().Value = "ค่าตอบแทนพิเศษสำหรับการสู้รบ (พสร.)";
|
||
ws.Cell("W5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("W5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("W5:W6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("W5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("W5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("X5:Y5").Merge().Value = "อื่น ๆ";
|
||
ws.Cell("X5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("X5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("X5:Y5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("X5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("X5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Cell("X6").Value = "ระบุรายการ";
|
||
ws.Cell("X6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("X6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("X6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("X6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("X6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Cell("Y6").Value = "จำนวนเงิน";
|
||
ws.Cell("Y6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("Y6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("Y6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("Y6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("Y6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
|
||
ws.Range("Z5:Z6").Merge().Value = "รวม";
|
||
ws.Cell("Z5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("Z5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("Z5:Z6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("Z5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("Z5").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("AA4:AA6").Merge().Value = "รวมค่าจ้างและส่วนควบ";
|
||
ws.Cell("AA4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AA4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AA4:AA6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AA4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AA4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
|
||
ws.Cell("J7").Value = "(1)";
|
||
ws.Cell("J7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("J7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("J7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("J7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("J7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("K7").Value = "(2)";
|
||
ws.Cell("K7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("K7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("K7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("K7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("K7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("L7").Value = "(3)";
|
||
ws.Cell("L7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("L7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("L7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("L7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("L7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("M7").Value = "(3)*12";
|
||
ws.Cell("M7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("M7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("M7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("M7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("M7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("N7").Value = "";
|
||
ws.Cell("N7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("N7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("N7").Style.Border.BottomBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("N7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("N7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("O7").Value = "(4)";
|
||
ws.Cell("O7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("O7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("O7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("O7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("O7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("P7").Value = "(4)*12";
|
||
ws.Cell("P7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("P7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("P7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("P7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("P7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("R7").Value = "(5)";
|
||
ws.Cell("R7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("R7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("R7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("R7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("R7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("S7").Value = "(5)*12";
|
||
ws.Cell("S7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("S7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("S7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("S7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("S7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("T7").Value = "(5.1)";
|
||
ws.Cell("T7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("T7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("T7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("T7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("T7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("U7").Value = "(6)";
|
||
ws.Cell("U7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("U7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("U7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
//ws.Cell("Q7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("U7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("U7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("V7").Value = "(7)";
|
||
ws.Cell("V7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("V7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("V7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
//ws.Cell("V7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("V7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("V7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("W7").Value = "(8)";
|
||
ws.Cell("W7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("W7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("W7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("X7").Style.Border.BottomBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("W7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("W7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("Y7").Value = "(9)";
|
||
ws.Cell("Y7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("Y7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("Y7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("Y7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("Y7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("Z7").Value = "(10) = (5) ถึง (9)";
|
||
ws.Cell("Z7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("Z7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("Z7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("Z7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("Z7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Cell("AA7").Value = "(11) = (3) + (10)";
|
||
ws.Cell("AA7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AA7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("AA7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AA7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AA7").Style.Font.SetBold().Font.FontSize = 12;
|
||
ws.Range("A4:AA7").Style.Alignment.WrapText = true;
|
||
ws.Row(4).Height = 40;
|
||
ws.Row(5).Height = 60;
|
||
ws.Row(6).Height = 60;
|
||
ws.Column(1).Width = 10;
|
||
ws.Column(2).Width = 10;
|
||
ws.Column(3).Width = 20;
|
||
ws.Column(4).Width = 20;
|
||
ws.Column(5).Width = 30;
|
||
ws.Column(6).Width = 30;
|
||
ws.Column(7).Width = 20;
|
||
ws.Column(8).Width = 15;
|
||
ws.Column(9).Width = 15;
|
||
ws.Column(10).Width = 15;
|
||
ws.Column(11).Width = 15;
|
||
ws.Column(12).Width = 15;
|
||
ws.Column(13).Width = 15;
|
||
ws.Column(14).Width = 15;
|
||
ws.Column(15).Width = 15;
|
||
ws.Column(16).Width = 15;
|
||
ws.Column(17).Width = 15;
|
||
ws.Column(18).Width = 15;
|
||
ws.Column(19).Width = 15;
|
||
ws.Column(20).Width = 15;
|
||
ws.Column(21).Width = 15;
|
||
ws.Column(22).Width = 15;
|
||
ws.Column(23).Width = 15;
|
||
ws.Column(24).Width = 15;
|
||
ws.Column(25).Width = 15;
|
||
ws.Column(26).Width = 15;
|
||
ws.Column(27).Width = 15;
|
||
int row = 8;
|
||
int no = 1;
|
||
|
||
if (_personnel != null)
|
||
{
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Merge().Value = "รวมงบประมาณทั้งสิ้น";
|
||
ws.Cell(row, 8).Value = _personnel.salary;
|
||
ws.Cell(row, 9).Value = _personnel.estimate_promote_1;
|
||
ws.Cell(row, 10).Value = _personnel.estimate_promote_2;
|
||
ws.Cell(row, 11).Value = _personnel.estimate_promote_3;
|
||
ws.Cell(row, 12).Value = _personnel.estimate_promote_4;
|
||
ws.Cell(row, 13).Value = _personnel.salary_next_year_12;
|
||
ws.Cell(row, 14).Value = _personnel.retiree;
|
||
ws.Cell(row, 15).Value = _personnel.salary_per_month;
|
||
ws.Cell(row, 16).Value = _personnel.salary_per_month_12;
|
||
ws.Cell(row, 17).Value = _personnel.retirement_salary_per_year;
|
||
ws.Cell(row, 18).Value = _personnel.special_compensation;
|
||
ws.Cell(row, 19).Value = _personnel.special_compensation_12;
|
||
ws.Cell(row, 20).Value = _personnel.full_salary;
|
||
ws.Cell(row, 21).Value = _personnel.special_compensation_1;
|
||
ws.Cell(row, 22).Value = _personnel.special_compensation_2;
|
||
ws.Cell(row, 23).Value = _personnel.special_compensation_3;
|
||
ws.Cell(row, 24).Value = _personnel.other;
|
||
ws.Cell(row, 25).Value = _personnel.other_price;
|
||
ws.Cell(row, 26).Value = _personnel.total;
|
||
ws.Cell(row, 27).Value = _personnel.total_wages_and_fittings;
|
||
//ws.Cell(row, 28).Value = _personnel.total_wages_and_fittings_12;
|
||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 4).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 7).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 8).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 9).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 12).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 13).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 14).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 15).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 16).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 17).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 18).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 19).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 20).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 21).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 22).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 23).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 24).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 25).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 26).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 27).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.Vertical =
|
||
XLAlignmentVerticalValues.Center;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 7)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Center;
|
||
ws.Range(ws.Cell(row, 8), ws.Cell(row, 27)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Right;
|
||
//ws.Range(ws.Cell(row, 8), ws.Cell(row, 27)).SetDataType(XLDataType.Number);
|
||
ws.Range(ws.Cell(row, 8), ws.Cell(row, 27)).Style.NumberFormat.SetFormat("#,#");
|
||
row++;
|
||
foreach (var detail in _personnel.personnel_salary_permanent)
|
||
{
|
||
ws.Range(ws.Cell(row, 2), ws.Cell(row, 6)).Merge().Value = detail.agency_category_name;
|
||
ws.Cell(row, 8).Value = detail.salary;
|
||
ws.Cell(row, 9).Value = detail.estimate_promote_1;
|
||
ws.Cell(row, 10).Value = detail.estimate_promote_2;
|
||
ws.Cell(row, 11).Value = detail.estimate_promote_3;
|
||
ws.Cell(row, 12).Value = detail.estimate_promote_4;
|
||
ws.Cell(row, 13).Value = detail.salary_next_year_12;
|
||
ws.Cell(row, 14).Value = detail.retiree;
|
||
ws.Cell(row, 15).Value = detail.salary_per_month;
|
||
ws.Cell(row, 16).Value = detail.salary_per_month_12;
|
||
ws.Cell(row, 17).Value = detail.retirement_salary_per_year;
|
||
ws.Cell(row, 18).Value = detail.special_compensation;
|
||
ws.Cell(row, 19).Value = detail.special_compensation_12;
|
||
ws.Cell(row, 20).Value = detail.full_salary;
|
||
ws.Cell(row, 21).Value = detail.special_compensation_1;
|
||
ws.Cell(row, 22).Value = detail.special_compensation_2;
|
||
ws.Cell(row, 23).Value = detail.special_compensation_3;
|
||
ws.Cell(row, 24).Value = detail.other;
|
||
ws.Cell(row, 25).Value = detail.other_price;
|
||
ws.Cell(row, 26).Value = detail.total;
|
||
ws.Cell(row, 27).Value = detail.total_wages_and_fittings;
|
||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 4).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 7).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 8).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 9).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 12).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 13).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 14).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 15).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 16).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 17).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 18).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 19).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 20).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 21).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 22).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 23).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 24).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 25).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 26).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 27).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.Vertical =
|
||
XLAlignmentVerticalValues.Center;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 7)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Center;
|
||
ws.Range(ws.Cell(row, 8), ws.Cell(row, 27)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Right;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Fill.BackgroundColor = XLColor.LightYellow;
|
||
ws.Range(ws.Cell(row, 8), ws.Cell(row, 27)).Style.NumberFormat.SetFormat("#,#");
|
||
row++;
|
||
foreach (var detail2 in detail.personnel_salary_deltails)
|
||
{
|
||
if (detail2.first_name_th != "รวม")
|
||
{
|
||
ws.Cell(row, 1).Value = no;
|
||
no++;
|
||
ws.Cell(row, 2).Value = detail2.manpower;
|
||
ws.Cell(row, 3).Value = detail2.first_name_th;
|
||
ws.Cell(row, 4).Value = detail2.last_name_th;
|
||
//ws.Range(ws.Cell(row, 3), ws.Cell(row, 4)).Merge().Value = detail2.full_name;
|
||
ws.Cell(row, 5).Value = detail2.position;
|
||
ws.Cell(row, 6).Value = detail2.parent_agency_name;
|
||
ws.Cell(row, 7).Value = detail2.area;
|
||
ws.Cell(row, 8).Value = detail2.salary;
|
||
ws.Cell(row, 9).Value = detail2.estimate_promote_1;
|
||
ws.Cell(row, 10).Value = detail2.estimate_promote_2;
|
||
ws.Cell(row, 11).Value = detail2.estimate_promote_3;
|
||
ws.Cell(row, 12).Value = detail2.estimate_promote_4;
|
||
ws.Cell(row, 13).Value = detail2.salary_next_year_12;
|
||
ws.Cell(row, 14).Value = detail2.retiree;
|
||
ws.Cell(row, 15).Value = detail2.salary_per_month;
|
||
ws.Cell(row, 16).Value = detail2.salary_per_month_12;
|
||
ws.Cell(row, 17).Value = detail2.retirement_salary_per_year;
|
||
ws.Cell(row, 18).Value = detail2.special_compensation;
|
||
ws.Cell(row, 19).Value = detail2.special_compensation_12;
|
||
ws.Cell(row, 20).Value = detail2.full_salary;
|
||
ws.Cell(row, 21).Value = detail2.special_compensation_1;
|
||
ws.Cell(row, 22).Value = detail2.special_compensation_2;
|
||
ws.Cell(row, 23).Value = detail2.special_compensation_3;
|
||
ws.Cell(row, 24).Value = detail2.other;
|
||
ws.Cell(row, 25).Value = detail2.other_price;
|
||
ws.Cell(row, 26).Value = detail2.total;
|
||
ws.Cell(row, 27).Value = detail2.total_wages_and_fittings;
|
||
//ws.Cell(row, 28).Value = _personnel.total_wages_and_fittings_12;
|
||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 4).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 7).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 8).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 9).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 12).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 13).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 14).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 15).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 16).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 17).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 18).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 19).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 20).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 21).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 22).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 23).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 24).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 25).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 26).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 27).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.Vertical =
|
||
XLAlignmentVerticalValues.Center;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Center;
|
||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 7)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Left;
|
||
ws.Range(ws.Cell(row, 8), ws.Cell(row, 27)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Right;
|
||
//ws.Range(ws.Cell(row, 8), ws.Cell(row, 21)).SetDataType(XLDataType.Number);
|
||
ws.Range(ws.Cell(row, 8), ws.Cell(row, 27)).Style.NumberFormat.SetFormat("#,#");
|
||
row++;
|
||
}
|
||
|
||
if (detail2.first_name_th == "รวม")
|
||
{
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 3)).Merge().Value = detail2.first_name_th;
|
||
|
||
ws.Cell(row, 8).Value = detail2.salary;
|
||
ws.Cell(row, 9).Value = detail2.estimate_promote_1;
|
||
ws.Cell(row, 10).Value = detail2.estimate_promote_2;
|
||
ws.Cell(row, 11).Value = detail2.estimate_promote_3;
|
||
ws.Cell(row, 12).Value = detail2.estimate_promote_4;
|
||
ws.Cell(row, 13).Value = detail2.salary_next_year_12;
|
||
ws.Cell(row, 14).Value = detail2.retiree;
|
||
ws.Cell(row, 15).Value = detail2.salary_per_month;
|
||
ws.Cell(row, 16).Value = detail2.salary_per_month_12;
|
||
ws.Cell(row, 17).Value = detail2.retirement_salary_per_year;
|
||
ws.Cell(row, 18).Value = detail2.special_compensation;
|
||
ws.Cell(row, 19).Value = detail2.special_compensation_12;
|
||
ws.Cell(row, 20).Value = detail2.full_salary;
|
||
ws.Cell(row, 21).Value = detail2.special_compensation_1;
|
||
ws.Cell(row, 22).Value = detail2.special_compensation_2;
|
||
ws.Cell(row, 23).Value = detail2.special_compensation_3;
|
||
ws.Cell(row, 24).Value = detail2.other;
|
||
ws.Cell(row, 25).Value = detail2.other_price;
|
||
ws.Cell(row, 26).Value = detail2.total;
|
||
ws.Cell(row, 27).Value = detail2.total_wages_and_fittings;
|
||
//ws.Cell(row, 28).Value = _personnel.total_wages_and_fittings_12;
|
||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 4).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 7).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 8).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 9).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 12).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 13).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 14).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 15).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 16).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 17).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 18).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 19).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 20).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 21).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 22).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 23).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 24).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 25).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 26).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 27).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.TopBorder =
|
||
XLBorderStyleValues.Double;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.Vertical =
|
||
XLAlignmentVerticalValues.Center;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Center;
|
||
// ws.Range(ws.Cell(row, 3), ws.Cell(row, 7)).Style.Alignment.Horizontal =
|
||
// XLAlignmentHorizontalValues.Left;
|
||
ws.Range(ws.Cell(row, 8), ws.Cell(row, 27)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Right;
|
||
//ws.Range(ws.Cell(row, 8), ws.Cell(row, 21)).SetDataType(XLDataType.Number);
|
||
ws.Range(ws.Cell(row, 8), ws.Cell(row, 27)).Style.NumberFormat.SetFormat("#,#");
|
||
}
|
||
}
|
||
|
||
if (detail.is_footer == true)
|
||
{
|
||
ws.Cell(row + 1, 1).Value = "หมายเหตุ : ";
|
||
ws.Cell(row + 2, 1).Value =
|
||
"1. ในกรณีที่ค่าจ้างตุลาคม 2564 ยังไม่เลื่อนขั้น ให้กรอกเงินเลื่อนขั้น 3% ในช่อง (2)";
|
||
ws.Cell(row + 3, 1).Value =
|
||
"2. ในช่อง (4) ให้กรอกค่าจ้างต่อเดือนของผู้เกษียณรวมปรับเลื่อนขั้นแล้ว ไม่รวมส่วนควบของผู้เกษียณ (เท่ากับช่อง (3))";
|
||
var imagePath = _setting.report_path + @"Picture3.png";
|
||
ws.AddPicture(imagePath).MoveTo(ws.Cell(row + 4, 3)).WithSize(50, 20);
|
||
ws.Cell(row + 4, 1).Value = " เลขที่ตำแหน่งที่เป็น";
|
||
ws.Cell(row + 4, 3).Value = " เกษียณอายุราชการ ณ วันที่ 1 ตุลาคม 2564";
|
||
var imagePath2 = _setting.report_path + @"Picture4.png";
|
||
ws.AddPicture(imagePath2).MoveTo(ws.Cell(row + 5, 3)).WithSize(50, 20);
|
||
ws.Cell(row + 5, 1).Value = " การเลื่อนขั้นเต็มขั้น";
|
||
var imagePath3 = _setting.report_path + @"Picture5.png";
|
||
ws.AddPicture(imagePath3).MoveTo(ws.Cell(row + 6, 3)).WithSize(50, 20);
|
||
ws.Cell(row + 6, 1).Value = " เลขที่ตำแหน่งที่เป็น";
|
||
ws.Cell(row + 6, 3).Value = " อัตราว่างระหว่างปีงบประมาณ พ.ศ. 2564 จากการเสียชีวิต";
|
||
ws.Cell(row + 1, 1).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Cell(row + 1, 1).Style.Font.FontSize = 16;
|
||
ws.Cell(row + 2, 1).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Cell(row + 2, 1).Style.Font.FontSize = 16;
|
||
ws.Cell(row + 3, 1).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Cell(row + 3, 1).Style.Font.FontSize = 16;
|
||
ws.Cell(row + 4, 1).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Cell(row + 4, 1).Style.Font.FontSize = 16;
|
||
ws.Cell(row + 4, 3).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Cell(row + 4, 3).Style.Font.FontSize = 16;
|
||
ws.Cell(row + 5, 1).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Cell(row + 5, 1).Style.Font.FontSize = 16;
|
||
ws.Cell(row + 6, 1).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Cell(row + 6, 1).Style.Font.FontSize = 16;
|
||
ws.Cell(row + 6, 3).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Cell(row + 6, 3).Style.Font.FontSize = 16;
|
||
}
|
||
|
||
if (detail.is_footer == false)
|
||
{
|
||
ws.Cell(row, 3).Value = "";
|
||
}
|
||
}
|
||
}
|
||
|
||
|
||
using (var stream1 = new MemoryStream())
|
||
{
|
||
workbook.SaveAs(stream1);
|
||
var content = stream1.ToArray();
|
||
string date = DateTime.Now.ToString("yyyyMMddHHmmss");
|
||
return File(
|
||
content,
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||
"personnel_permanent_" + date + ".xlsx");
|
||
}
|
||
}
|
||
|
||
// [HttpPost, Route("reports/personnel_salary_temporary/{type}")]
|
||
// [ApiExplorerSettings(GroupName = "reports")]
|
||
// public IActionResult GetTemporaryReport([FromRoute] string type,
|
||
// [FromBody] personnel_salary_temporary_root _personnel)
|
||
// {
|
||
// var workbook = new XLWorkbook();
|
||
// var ws = workbook.Worksheets.Add("ลูกจ้างชั่วคราว");
|
||
// if (_personnel.year == "2567")
|
||
// {
|
||
// _personnel.year = "2566";
|
||
// }
|
||
//
|
||
// ws.Range("A1:T1").Merge().Value = "รายละเอียดค่าจ้างและส่วนควบของลูกจ้างชั่วคราว ประจำปีงบประมาณ พ.ศ." +
|
||
// _personnel.year;
|
||
// ws.Cell("A1").Style.Alignment.WrapText = true;
|
||
// ws.Range("A1:T1").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Range("A1:T1").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Range("A1:T1").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Range("A1:T1").Style.Font.SetBold().Font.FontSize = 16;
|
||
// ws.Range("A2:T2").Merge().Value = "มหาวิทยาลัยเทคโนโลยีราชมงคลรัตนโกสินทร์";
|
||
// ws.Cell("A2").Style.Alignment.WrapText = true;
|
||
// ws.Range("A2:T2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Range("A2:T2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Range("A2:T2").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Range("A2:T2").Style.Font.SetBold().Font.FontSize = 16;
|
||
// ws.Range("A3:T3").Merge().Value = "หน่วย : บาท";
|
||
// ws.Cell("A3").Style.Alignment.WrapText = true;
|
||
// ws.Range("A3:T3").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
// ws.Range("A3:T3").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Range("A3:T3").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Range("A3:T3").Style.Font.FontSize = 16;
|
||
// ws.Range("A4:A7").Merge().Value = "ลำดับที่";
|
||
// ws.Cell("A4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("A4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Range("A4:A7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("A4").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("A4").Style.Font.SetBold().Font.FontSize = 16;
|
||
//
|
||
// ws.Range("B4:C7").Merge().Value = "ชื่อ- สกุล";
|
||
// ws.Cell("B4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("B4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Range("B4:C7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("B4").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("B4").Style.Font.SetBold().Font.FontSize = 16;
|
||
//
|
||
// ws.Range("D4:D7").Merge().Value = "ชื่อตำแหน่ง";
|
||
// ws.Cell("D4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("D4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Range("D4:D7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("D4").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("D4").Style.Font.SetBold().Font.FontSize = 16;
|
||
//
|
||
// ws.Range("E4:F7").Merge().Value = "สังกัด";
|
||
// ws.Cell("E4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("E4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Range("E4:F7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("E4").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("E4").Style.Font.SetBold().Font.FontSize = 16;
|
||
//
|
||
// ws.Range("G4:H6").Merge().Value = "ค่าจ้าง ณ 1 ต.ค. 64 - 30 ก.ย. 65";
|
||
// ws.Cell("G4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("G4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Range("G4:H6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("G4").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("G4").Style.Font.SetBold().Font.FontSize = 16;
|
||
//
|
||
// ws.Range("I4:J6").Merge().Value = "ค่าจ้าง 1 ต.ค. 65 - 30 ก.ย. 66";
|
||
// ws.Cell("I4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("I4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Range("I4:J6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("I4").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("I4").Style.Font.SetBold().Font.FontSize = 16;
|
||
//
|
||
// ws.Range("J4:J6").Merge().Value = "ประมาณการเลื่อนขั้น 1 ขั้น 1 เม.ย. 65 - 30 ก.ย. 65";
|
||
// ws.Cell("J4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("J4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Range("J4:J6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("J4").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("J4").Style.Font.SetBold().Font.FontSize = 16;
|
||
//
|
||
// ws.Range("K4:S4").Merge().Value = "ส่วนควบงบดำเนินงาน";
|
||
// ws.Cell("K4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("K4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Range("K4:S4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("K4").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("K4").Style.Font.SetBold().Font.FontSize = 16;
|
||
//
|
||
// ws.Range("K5:L6").Merge().Value = "ค่าเช่าบ้าน";
|
||
// ws.Cell("K5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("K5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Range("K5:L6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("K5").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("K5").Style.Font.SetBold().Font.FontSize = 16;
|
||
//
|
||
// ws.Range("M5:N6").Merge().Value = "เงินสมทบกองทุนประกันสังคม";
|
||
// ws.Cell("M5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("M5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Range("M5:N6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("M5").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("M5").Style.Font.SetBold().Font.FontSize = 16;
|
||
//
|
||
// ws.Range("O5:P6").Merge().Value = "เงินสมทบกองทุนเงินทดแทน";
|
||
// ws.Cell("O5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("O5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Range("O5:P6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("O5").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("O5").Style.Font.SetBold().Font.FontSize = 16;
|
||
//
|
||
// ws.Range("Q5:R5").Merge().Value = "อื่น ๆ";
|
||
// ws.Cell("Q5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("Q5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Range("Q5:R5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("Q5").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("Q5").Style.Font.SetBold().Font.FontSize = 16;
|
||
//
|
||
// ws.Cell("Q6").Value = "ระบุรายการ";
|
||
// ws.Cell("Q6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("Q6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Cell("Q6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("Q6").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("Q6").Style.Font.SetBold().Font.FontSize = 16;
|
||
//
|
||
// ws.Cell("R6").Value = "จำนวนเงิน";
|
||
// ws.Cell("R6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("R6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Cell("R6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("R6").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("R6").Style.Font.SetBold().Font.FontSize = 16;
|
||
//
|
||
//
|
||
// ws.Range("S5:S6").Merge().Value = "รวม";
|
||
// ws.Cell("S5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("S5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Range("S5:S6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("S5").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("S5").Style.Font.SetBold().Font.FontSize = 16;
|
||
// ws.Range("T4:T6").Merge().Value = "รวมค่าจ้างและส่วนควบ";
|
||
// ws.Cell("T4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("T4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Range("T4:T6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("T4").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("T4").Style.Font.SetBold().Font.FontSize = 16;
|
||
//
|
||
// ws.Cell("H7").Value = "*12";
|
||
// ws.Cell("H7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("H7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Cell("H7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("H7").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("H7").Style.Font.SetBold().Font.FontSize = 12;
|
||
// ws.Cell("I7").Value = "(1)";
|
||
// ws.Cell("I7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("I7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Cell("I7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("I7").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("I7").Style.Font.SetBold().Font.FontSize = 12;
|
||
// ws.Cell("J7").Value = "(1)*12";
|
||
// ws.Cell("J7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("J7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Cell("J7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("J7").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("J7").Style.Font.SetBold().Font.FontSize = 12;
|
||
// ws.Cell("K7").Value = "(2)";
|
||
// ws.Cell("K7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("K7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Cell("K7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("K7").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("K7").Style.Font.SetBold().Font.FontSize = 12;
|
||
// ws.Cell("L7").Value = "(2)*12";
|
||
// ws.Cell("L7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("L7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Cell("L7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("L7").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("L7").Style.Font.SetBold().Font.FontSize = 12;
|
||
// ws.Cell("M7").Value = "(3)";
|
||
// ws.Cell("M7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("M7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Cell("M7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("M7").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("M7").Style.Font.SetBold().Font.FontSize = 12;
|
||
// ws.Cell("N7").Value = "(3)*12";
|
||
// ws.Cell("N7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("N7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Cell("N7").Style.Border.BottomBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("N7").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("N7").Style.Font.SetBold().Font.FontSize = 12;
|
||
// ws.Cell("O7").Value = "(4)";
|
||
// ws.Cell("O7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("O7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Cell("O7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("O7").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("O7").Style.Font.SetBold().Font.FontSize = 12;
|
||
// ws.Cell("P7").Value = "(4)*12";
|
||
// ws.Cell("P7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("P7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Cell("P7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("P7").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("P7").Style.Font.SetBold().Font.FontSize = 12;
|
||
// ws.Cell("R7").Value = "(5)";
|
||
// ws.Cell("R7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("R7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Cell("R7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("R7").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("R7").Style.Font.SetBold().Font.FontSize = 12;
|
||
// ws.Cell("S7").Value = "(6) = (2) ถึง (5)";
|
||
// ws.Cell("S7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("S7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Cell("S7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("S7").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("S7").Style.Font.SetBold().Font.FontSize = 12;
|
||
// ws.Cell("T7").Value = "(7) = (1) + (6)";
|
||
// ws.Cell("T7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
// ws.Cell("T7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Cell("T7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell("T7").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("T7").Style.Font.SetBold().Font.FontSize = 12;
|
||
//
|
||
// ws.Range("A4:T7").Style.Alignment.WrapText = true;
|
||
// ws.Row(4).Height = 40;
|
||
// ws.Row(5).Height = 40;
|
||
// ws.Row(6).Height = 40;
|
||
// ws.Column(1).Width = 10;
|
||
// ws.Column(2).Width = 10;
|
||
// ws.Column(3).Width = 20;
|
||
// ws.Column(4).Width = 20;
|
||
// ws.Column(5).Width = 30;
|
||
// ws.Column(6).Width = 30;
|
||
// ws.Column(7).Width = 20;
|
||
// ws.Column(8).Width = 15;
|
||
// ws.Column(9).Width = 15;
|
||
// ws.Column(10).Width = 15;
|
||
// ws.Column(11).Width = 15;
|
||
// ws.Column(12).Width = 15;
|
||
// ws.Column(13).Width = 15;
|
||
// ws.Column(14).Width = 15;
|
||
// ws.Column(15).Width = 15;
|
||
// ws.Column(16).Width = 15;
|
||
// ws.Column(17).Width = 15;
|
||
// ws.Column(18).Width = 15;
|
||
//
|
||
// int row = 8;
|
||
// int no = 1;
|
||
//
|
||
// if (_personnel != null)
|
||
// {
|
||
// foreach (var detail in _personnel.personnel_salary_temporary)
|
||
// {
|
||
// ws.Range(ws.Cell(row, 2), ws.Cell(row, 6)).Merge().Value = detail.agency_category_name;
|
||
// ws.Cell(row, 8).Value = detail.salary;
|
||
// ws.Cell(row, 9).Value = detail.salary_12;
|
||
// ws.Cell(row, 10).Value = detail.salary2_12;
|
||
// ws.Cell(row, 11).Value = detail.house_rent;
|
||
// ws.Cell(row, 12).Value = detail.house_rent_12;
|
||
// ws.Cell(row, 13).Value = detail.salary_next_year_12;
|
||
// ws.Cell(row, 14).Value = detail.retiree;
|
||
// ws.Cell(row, 15).Value = detail.salary_per_month;
|
||
// ws.Cell(row, 16).Value = detail.salary_per_month_12;
|
||
// ws.Cell(row, 17).Value = detail.retirement_salary_per_year;
|
||
// ws.Cell(row, 18).Value = detail.special_compensation;
|
||
//
|
||
// ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 4).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 7).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 8).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 9).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 12).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 13).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 14).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 15).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 16).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 17).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 18).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
//
|
||
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.FontName =
|
||
// "TH SarabunPSK";
|
||
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.SetBold().Font.FontSize = 16;
|
||
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.WrapText = true;
|
||
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.Vertical =
|
||
// XLAlignmentVerticalValues.Center;
|
||
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 7)).Style.Alignment.Horizontal =
|
||
// XLAlignmentHorizontalValues.Center;
|
||
// ws.Range(ws.Cell(row, 8), ws.Cell(row, 27)).Style.Alignment.Horizontal =
|
||
// XLAlignmentHorizontalValues.Right;
|
||
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Fill.BackgroundColor = XLColor.LightYellow;
|
||
// ws.Range(ws.Cell(row, 8), ws.Cell(row, 27)).Style.NumberFormat.SetFormat("#,#");
|
||
// row++;
|
||
// foreach (var detail2 in detail.personnel_salary_deltails)
|
||
// {
|
||
// if (detail2.first_name_th != "รวม")
|
||
// {
|
||
// ws.Cell(row, 1).Value = no;
|
||
// no++;
|
||
// ws.Cell(row, 2).Value = detail2.manpower;
|
||
// ws.Cell(row, 3).Value = detail2.first_name_th;
|
||
// ws.Cell(row, 4).Value = detail2.last_name_th;
|
||
// //ws.Range(ws.Cell(row, 3), ws.Cell(row, 4)).Merge().Value = detail2.full_name;
|
||
// ws.Cell(row, 5).Value = detail2.position;
|
||
// ws.Cell(row, 6).Value = detail2.parent_agency_name;
|
||
// ws.Cell(row, 7).Value = detail2.area;
|
||
// ws.Cell(row, 8).Value = detail2.salary;
|
||
// ws.Cell(row, 9).Value = detail2.estimate_promote_1;
|
||
// ws.Cell(row, 10).Value = detail2.estimate_promote_2;
|
||
// ws.Cell(row, 11).Value = detail2.estimate_promote_3;
|
||
// ws.Cell(row, 12).Value = detail2.estimate_promote_4;
|
||
// ws.Cell(row, 13).Value = detail2.salary_next_year_12;
|
||
// ws.Cell(row, 14).Value = detail2.retiree;
|
||
// ws.Cell(row, 15).Value = detail2.salary_per_month;
|
||
// ws.Cell(row, 16).Value = detail2.salary_per_month_12;
|
||
// ws.Cell(row, 17).Value = detail2.retirement_salary_per_year;
|
||
// ws.Cell(row, 18).Value = detail2.special_compensation;
|
||
// ws.Cell(row, 19).Value = detail2.special_compensation_12;
|
||
// ws.Cell(row, 20).Value = detail2.full_salary;
|
||
// ws.Cell(row, 21).Value = detail2.special_compensation_1;
|
||
// ws.Cell(row, 22).Value = detail2.special_compensation_2;
|
||
// ws.Cell(row, 23).Value = detail2.special_compensation_3;
|
||
// ws.Cell(row, 24).Value = detail2.other;
|
||
// ws.Cell(row, 25).Value = detail2.other_price;
|
||
// ws.Cell(row, 26).Value = detail2.total;
|
||
// ws.Cell(row, 27).Value = detail2.total_wages_and_fittings;
|
||
// //ws.Cell(row, 28).Value = _personnel.total_wages_and_fittings_12;
|
||
// ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 4).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 7).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 8).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 9).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 12).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 13).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 14).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 15).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 16).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 17).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 18).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 19).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 20).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 21).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 22).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 23).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 24).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 25).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 26).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 27).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
//
|
||
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.FontName =
|
||
// "TH SarabunPSK";
|
||
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.FontSize = 16;
|
||
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.WrapText = true;
|
||
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.Vertical =
|
||
// XLAlignmentVerticalValues.Center;
|
||
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
|
||
// XLAlignmentHorizontalValues.Center;
|
||
// ws.Range(ws.Cell(row, 3), ws.Cell(row, 7)).Style.Alignment.Horizontal =
|
||
// XLAlignmentHorizontalValues.Left;
|
||
// ws.Range(ws.Cell(row, 8), ws.Cell(row, 27)).Style.Alignment.Horizontal =
|
||
// XLAlignmentHorizontalValues.Right;
|
||
// //ws.Range(ws.Cell(row, 8), ws.Cell(row, 21)).SetDataType(XLDataType.Number);
|
||
// ws.Range(ws.Cell(row, 8), ws.Cell(row, 27)).Style.NumberFormat.SetFormat("#,#");
|
||
// row++;
|
||
// }
|
||
//
|
||
// if (detail2.first_name_th == "รวม")
|
||
// {
|
||
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 3)).Merge().Value = detail2.first_name_th;
|
||
//
|
||
// ws.Cell(row, 8).Value = detail2.salary;
|
||
// ws.Cell(row, 9).Value = detail2.estimate_promote_1;
|
||
// ws.Cell(row, 10).Value = detail2.estimate_promote_2;
|
||
// ws.Cell(row, 11).Value = detail2.estimate_promote_3;
|
||
// ws.Cell(row, 12).Value = detail2.estimate_promote_4;
|
||
// ws.Cell(row, 13).Value = detail2.salary_next_year_12;
|
||
// ws.Cell(row, 14).Value = detail2.retiree;
|
||
// ws.Cell(row, 15).Value = detail2.salary_per_month;
|
||
// ws.Cell(row, 16).Value = detail2.salary_per_month_12;
|
||
// ws.Cell(row, 17).Value = detail2.retirement_salary_per_year;
|
||
// ws.Cell(row, 18).Value = detail2.special_compensation;
|
||
// ws.Cell(row, 19).Value = detail2.special_compensation_12;
|
||
// ws.Cell(row, 20).Value = detail2.full_salary;
|
||
// ws.Cell(row, 21).Value = detail2.special_compensation_1;
|
||
// ws.Cell(row, 22).Value = detail2.special_compensation_2;
|
||
// ws.Cell(row, 23).Value = detail2.special_compensation_3;
|
||
// ws.Cell(row, 24).Value = detail2.other;
|
||
// ws.Cell(row, 25).Value = detail2.other_price;
|
||
// ws.Cell(row, 26).Value = detail2.total;
|
||
// ws.Cell(row, 27).Value = detail2.total_wages_and_fittings;
|
||
// //ws.Cell(row, 28).Value = _personnel.total_wages_and_fittings_12;
|
||
// ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 4).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 7).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 8).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 9).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 12).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 13).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 14).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 15).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 16).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 17).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 18).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 19).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 20).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 21).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 22).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 23).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 24).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 25).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 26).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Cell(row, 27).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
//
|
||
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.TopBorder =
|
||
// XLBorderStyleValues.Double;
|
||
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.FontName =
|
||
// "TH SarabunPSK";
|
||
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.SetBold().Font.FontSize = 16;
|
||
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.WrapText = true;
|
||
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.Vertical =
|
||
// XLAlignmentVerticalValues.Center;
|
||
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Style.Alignment.Horizontal =
|
||
// XLAlignmentHorizontalValues.Center;
|
||
// // ws.Range(ws.Cell(row, 3), ws.Cell(row, 7)).Style.Alignment.Horizontal =
|
||
// // XLAlignmentHorizontalValues.Left;
|
||
// ws.Range(ws.Cell(row, 8), ws.Cell(row, 27)).Style.Alignment.Horizontal =
|
||
// XLAlignmentHorizontalValues.Right;
|
||
// //ws.Range(ws.Cell(row, 8), ws.Cell(row, 21)).SetDataType(XLDataType.Number);
|
||
// ws.Range(ws.Cell(row, 8), ws.Cell(row, 27)).Style.NumberFormat.SetFormat("#,#");
|
||
// }
|
||
// }
|
||
// }
|
||
// }
|
||
//
|
||
//
|
||
// using (var stream1 = new MemoryStream())
|
||
// {
|
||
// workbook.SaveAs(stream1);
|
||
// var content = stream1.ToArray();
|
||
// string date = DateTime.Now.ToString("yyyyMMddHHmmss");
|
||
// return File(
|
||
// content,
|
||
// "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||
// "personnel_temporary_" + date + ".xlsx");
|
||
// }
|
||
// }
|
||
|
||
[HttpPost, Route("reports/personnel_salary_university/{type}")]
|
||
[ApiExplorerSettings(GroupName = "reports")]
|
||
public IActionResult GetPersonSalaryUniversityReport([FromRoute] string type,
|
||
[FromBody] personnel_salary_university_root _personnel)
|
||
{
|
||
var workbook = new XLWorkbook();
|
||
var ws = workbook.Worksheets.Add("พนักงานมหาวิทยาลัย");
|
||
if (_personnel.year == "2567")
|
||
{
|
||
_personnel.year = "2566";
|
||
}
|
||
|
||
ws.Range("A1:AV1").Merge().Value =
|
||
"รายละเอียดค่าจ้างและส่วนควบพนักงานมหาวิทยาลัย ประจำปีงบประมาณ พ.ศ. " +
|
||
_personnel.year + " (ทดแทดอัตราเดิม/อัตราใหม่)";
|
||
ws.Cell("A1").Style.Alignment.WrapText = true;
|
||
ws.Range("A1:AV1").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("A1:AV1").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("A1:AV1").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("A1:AV1").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("A2:AV2").Merge().Value = "มหาวิทยาลัยเทคโนโลยีราชมงคลรัตนโกสินทร์";
|
||
ws.Cell("A2").Style.Alignment.WrapText = true;
|
||
ws.Range("A2:AV2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("A2:AV2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("A2:AV2").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("A2:AV2").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("A3:AV3").Merge().Value = "หน่วย : บาท";
|
||
ws.Cell("A3").Style.Alignment.WrapText = true;
|
||
ws.Range("A3:AV3").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Range("A3:AV3").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("A3:AV3").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("A3:AV3").Style.Font.FontSize = 16;
|
||
|
||
ws.Range("A4:A7").Merge().Value = "ลำดับที่";
|
||
ws.Cell("A4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("A4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("A4:A7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("A4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("A4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("B4:B7").Merge().Value = "เลขที่ตำแหน่ง";
|
||
ws.Cell("B4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("B4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("B4:B7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("B4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("B4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("C4:D7").Merge().Value = "ชื่อ- สกุล";
|
||
ws.Cell("C4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("C4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("C4:D7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("C4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("C4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("E4:F7").Merge().Value = "สังกัด";
|
||
ws.Cell("E4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("E4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("E4:F7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("E4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("E4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("G4:G7").Merge().Value = "ตำแหน่ง";
|
||
ws.Cell("G4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("G4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("G4:G7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("G4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("G4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("H4:H7").Merge().Value = "ระดับตำแหน่ง";
|
||
ws.Cell("H4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("H4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("H4:H7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("H4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("H4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("I4:J5").Merge().Value = "ประเภท";
|
||
ws.Cell("I4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("I4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("I4:J5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("I4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("I4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("I6:I7").Merge().Value = "สาย ก";
|
||
ws.Cell("I6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("I6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("I6:I7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("I6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("I6").Style.Font.SetBold().Font.FontSize = 16;
|
||
//ws.Cell("I6").Style.Alignment.SetTextRotation(90);
|
||
|
||
ws.Range("J6:J7").Merge().Value = "สาย ข และ ค";
|
||
ws.Cell("J6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("J6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("J6:J7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("J6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("J6").Style.Font.SetBold().Font.FontSize = 16;
|
||
//ws.Cell("J6").Style.Alignment.SetTextRotation(90);
|
||
|
||
ws.Range("K4:K7").Merge().Value = "ชื่อตำแหน่งบริหาร";
|
||
ws.Cell("K4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("K4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("K4:K7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("K4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("K4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("L4:L7").Merge().Value = "ชื่อตำแหน่งวิชาการ";
|
||
ws.Cell("L4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("L4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("L4:L7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("L4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("L4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("M4:M7").Merge().Value = "หนังสือคำสั่ง ก.พ.อ. และวันที่ดำรงตำแหน่งวิชาการ";
|
||
ws.Cell("M4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("M4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("M4:M7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("M4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("M4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("N4:N7").Merge().Value = "คุณวุฒิที่ใช้จ้าง";
|
||
ws.Cell("N4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("N4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("N4:N7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("N4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("N4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("O4:O7").Merge().Value = "คุณวุฒิที่ได้รับจากสำนักงบประมาณ";
|
||
ws.Cell("O4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("O4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("O4:O7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("O4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("O4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("P4:P7").Merge().Value = "ค่าจ้างต.ค. 64 (1 ต.ค. 63 - 30 ก.ย. 64)";
|
||
ws.Cell("P4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("P4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("P4:P7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("P4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("P4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("Q4:Q7").Merge().Value = "ค่าจ้างต.ค. 65 (1 ต.ค. 64 - 30 ก.ย. 65) (+4%)";
|
||
ws.Cell("Q4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("Q4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("Q4:Q7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("Q4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("Q4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("R4:R7").Merge().Value = "ค่าจ้างต.ค. 66 (1 ต.ค. 65 - 30 ก.ย. 66) (+4%)";
|
||
ws.Cell("R4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("R4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("R4:R7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("R4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("R4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("S4:AE4").Merge().Value = "ค่าจ้างพนักงานมหาวิทยาลัย";
|
||
ws.Cell("S4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("S4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("S4:AE4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("S4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("S4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("S5:S7").Merge().Value = "ค่าจ้างต.ค. 64";
|
||
ws.Cell("S5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("S5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("S5:S7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("S5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("S5").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("S5:S7").Style.Font.FontColor = XLColor.Blue;
|
||
//ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Fill.BackgroundColor = XLColor.LightYellow;
|
||
|
||
|
||
ws.Range("T5:T7").Merge().Value = "ค่าจ้างพ.ย. 64";
|
||
ws.Cell("T5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("T5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("T5:T7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("T5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("T5").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("T5:T7").Style.Font.FontColor = XLColor.Blue;
|
||
|
||
|
||
ws.Range("U5:U7").Merge().Value = "ค่าจ้างธ.ค. 64";
|
||
ws.Cell("U5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("U5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("U5:U7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("U5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("U5").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("U5:U7").Style.Font.FontColor = XLColor.Blue;
|
||
|
||
ws.Range("V5:V7").Merge().Value = "รวมค่าจ้างต.ค.-ธ.ค. 64 (รวมเลื่อนขั้น ณ 1 ต.ค. 64)";
|
||
ws.Cell("V5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("V5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("V5:V7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("V5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("V5").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("V5:V7").Style.Font.FontColor = XLColor.Blue;
|
||
|
||
ws.Range("W5:W7").Merge().Value = "เลื่อนขั้นครั้งที่ 2";
|
||
ws.Cell("W5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("W5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("W5:W7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("W5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("W5").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("W5:W7").Style.Font.FontColor = XLColor.Blue;
|
||
|
||
ws.Range("X5:X7").Merge().Value = "รวมเงินเดือน";
|
||
ws.Cell("X5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("X5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("X5:X7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("X5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("X5").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("X5:X7").Style.Font.FontColor = XLColor.Blue;
|
||
|
||
ws.Range("Y5:AD5").Merge().Value = "สวัสดิการ";
|
||
ws.Cell("Y5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("Y5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("Y5:AD5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("Y5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("Y5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("Y6:Y7").Merge().Value = "สมทบกองทุนประกันสังคม";
|
||
ws.Cell("Y6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("Y6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("Y6:Y7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("Y6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("Y6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("Z6:Z7").Merge().Value = "กองทุนทดแทน";
|
||
ws.Cell("Z6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("Z6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("Z6:Z7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("Z6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("Z6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AA6:AA7").Merge().Value = "กองทุนสำรองเลี้ยงชีพ";
|
||
ws.Cell("AA6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AA6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AA6:AA7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AA6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AA6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AB6:AB7").Merge().Value = "เงินส่งเสริมคุณภาพชีวิต";
|
||
ws.Cell("AB6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AB6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AB6:AB7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AB6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AB6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AC6:AC7").Merge().Value = "ค่าธรรมเนียม";
|
||
ws.Cell("AC6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AC6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AC6:AC7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AC6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AC6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AD6:AD7").Merge().Value = "รวมสวัสดิการ";
|
||
ws.Cell("AD6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AD6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AD6:AD7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AD6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AD6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AE5:AE7").Merge().Value = "รวมเงินเดือน + สวัสดิการ";
|
||
ws.Cell("AE5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AE5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AE5:AE7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AE5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AE5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AF4:AF7").Merge().Value = "วันเกิด";
|
||
ws.Cell("AF4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AF4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AF4:AF7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AF4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AF4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AG4:AH5").Merge().Value = "ผู้เกษียณอายุราชการปี 2565 (1 ต.ค. 2565)";
|
||
ws.Cell("AG4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AG4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AG4:AH5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AG4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AG4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AG6:AG7").Merge().Value = "ผู้เกษียณ";
|
||
ws.Cell("AG6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AG6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AG6:AG7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AG6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AG6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AH6:AH7").Merge().Value = "ค่าจ้างต่อเดือน";
|
||
ws.Cell("AH6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AH6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AH6:AH7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AH6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AH6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AI4:AP4").Merge().Value = "ส่วนควบงบดำเนินงาน";
|
||
ws.Cell("AI4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AI4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AI4:AP4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AI4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AI4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AI5:AJ5").Merge().Value = "เงินประจำตำแหน่งบริหารที่มีวาระ";
|
||
ws.Cell("AI5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AI5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AI5:AJ5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AI5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AI5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AI6:AI7").Merge().Value = "เงินประจำตำแหน่ง";
|
||
ws.Cell("AI6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AI6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AI6:AI7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AI6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AI6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AJ6:AJ7").Merge().Value = "ค่าตอบแทนรายเดือน (เทียบเท่าเงินประจำตำแหน่ง)";
|
||
ws.Cell("AJ6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AJ6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AJ6:AJ7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AJ6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AJ6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AK5:AL5").Merge().Value = "เงินประจำตำแหน่งบริหารไม่มีวาระ";
|
||
ws.Cell("AK5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AK5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AK5:AL5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AK5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AK5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AK6:AK7").Merge().Value = "เงินประจำตำแหน่ง";
|
||
ws.Cell("AK6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AK6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AK6:AK7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AK6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AK6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AL6:AL7").Merge().Value = "ค่าตอบแทนรายเดือน (เทียบเท่าเงินประจำตำแหน่ง)";
|
||
ws.Cell("AL6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AL6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AL6:AL7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AL6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AL6").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("AL6:AL7").Style.Fill.BackgroundColor = XLColor.Orange;
|
||
|
||
ws.Range("AM5:AM7").Merge().Value = "ค่าตอบแทนเหมาจ่ายแทนการจัดหารถประจำตำแหน่ง";
|
||
ws.Cell("AM5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AM5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AM5:AM7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AM5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AM5").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("AM5:AM7").Style.Fill.BackgroundColor = XLColor.Orange;
|
||
|
||
ws.Range("AN5:AO5").Merge().Value = "อื่น ๆ";
|
||
ws.Cell("AN5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AN5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AN5:AO5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AN5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AN5").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("AN5:AO5").Style.Fill.BackgroundColor = XLColor.Orange;
|
||
|
||
ws.Range("AN6:AN7").Merge().Value = "ระบุรายการ";
|
||
ws.Cell("AN6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AN6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AN6:AN7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AN6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AN6").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("AN6:AN7").Style.Fill.BackgroundColor = XLColor.Orange;
|
||
|
||
ws.Range("AO6:AO7").Merge().Value = "จำนวนเงิน";
|
||
ws.Cell("AO6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AO6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AO6:AO7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AO6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AO6").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("AO6:AO7").Style.Fill.BackgroundColor = XLColor.Orange;
|
||
|
||
ws.Range("AP5:AP7").Merge().Value = "รวม";
|
||
ws.Cell("AP5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AP5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AP5:AP7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AP5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AP5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AQ4:AU4").Merge().Value = "ส่วนควบงบเงินอุดหนุน";
|
||
ws.Cell("AQ4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AQ4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AQ4:AU4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AQ4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AQ4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AQ5:AR5").Merge().Value = "เงินประจำตำแหน่งวิชาการ";
|
||
ws.Cell("AQ5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AQ5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AQ5:AR5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AQ5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AQ5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AQ6:AQ7").Merge().Value = "เงินประจำตำแหน่ง";
|
||
ws.Cell("AQ6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AQ6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AQ6:AQ7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AQ6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AQ6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AR6:AR7").Merge().Value = "ค่าตอบแทนรายเดือน (เทียบเท่าเงินประจำตำแหน่ง)";
|
||
ws.Cell("AR6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AR6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AR6:AR7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AR6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AR6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AS5:AT5").Merge().Value = "เงินประจำตำแหน่งประเภทวิชาชีพเฉพาะ เชียวชาญเฉพาะ";
|
||
ws.Cell("AS5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AS5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AS5:AT5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AS5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AS5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AS6:AS7").Merge().Value = "เงินประจำตำแหน่ง";
|
||
ws.Cell("AS6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AS6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AS6:AS7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AS6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AS6").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("AS6:AS7").Style.Fill.BackgroundColor = XLColor.Orange;
|
||
|
||
ws.Range("AT6:AT7").Merge().Value = "ค่าตอบแทนรายเดือน (เทียบเท่าเงินประจำตำแหน่ง)";
|
||
ws.Cell("AT6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AT6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AT6:AT7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AT6").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AT6").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AU5:AU7").Merge().Value = "รวม";
|
||
ws.Cell("AU5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AU5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AU5:AU7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AU5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AU5").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("AV4:AV7").Merge().Value = "รวมค่าจ้างและส่วนควบ";
|
||
ws.Cell("AV4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("AV4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("AV4:AV7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("AV4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("AV4").Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Range("A4:AV7").Style.Alignment.WrapText = true;
|
||
ws.Row(4).Height = 45;
|
||
ws.Row(5).Height = 45;
|
||
ws.Row(6).Height = 45;
|
||
ws.Column(1).Width = 10;
|
||
ws.Column(2).Width = 10;
|
||
ws.Column(3).Width = 30;
|
||
ws.Column(4).Width = 30;
|
||
ws.Column(5).Width = 30;
|
||
ws.Column(6).Width = 30;
|
||
ws.Column(7).Width = 30;
|
||
ws.Column(8).Width = 30;
|
||
ws.Column(9).Width = 10;
|
||
ws.Column(10).Width = 10;
|
||
ws.Column(11).Width = 30;
|
||
ws.Column(12).Width = 30;
|
||
ws.Column(13).Width = 30;
|
||
ws.Column(14).Width = 15;
|
||
ws.Column(15).Width = 15;
|
||
ws.Column(16).Width = 15;
|
||
ws.Column(17).Width = 15;
|
||
ws.Column(18).Width = 15;
|
||
ws.Column(19).Width = 15;
|
||
ws.Column(20).Width = 15;
|
||
ws.Column(21).Width = 15;
|
||
ws.Column(22).Width = 15;
|
||
ws.Column(23).Width = 15;
|
||
ws.Column(24).Width = 15;
|
||
ws.Column(25).Width = 15;
|
||
ws.Column(26).Width = 15;
|
||
ws.Column(27).Width = 15;
|
||
ws.Column(28).Width = 15;
|
||
ws.Column(29).Width = 15;
|
||
ws.Column(30).Width = 15;
|
||
ws.Column(31).Width = 15;
|
||
ws.Column(32).Width = 15;
|
||
ws.Column(33).Width = 15;
|
||
ws.Column(34).Width = 15;
|
||
ws.Column(35).Width = 15;
|
||
ws.Column(36).Width = 15;
|
||
ws.Column(37).Width = 15;
|
||
ws.Column(38).Width = 15;
|
||
ws.Column(39).Width = 15;
|
||
ws.Column(40).Width = 15;
|
||
ws.Column(41).Width = 15;
|
||
ws.Column(42).Width = 15;
|
||
ws.Column(43).Width = 15;
|
||
ws.Column(44).Width = 15;
|
||
ws.Column(45).Width = 15;
|
||
ws.Column(46).Width = 15;
|
||
ws.Column(47).Width = 15;
|
||
ws.Column(48).Width = 15;
|
||
int row = 8;
|
||
int no = 1;
|
||
|
||
if (_personnel != null)
|
||
{
|
||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 5)).Merge().Value = "รวมทั้งสิ้น";
|
||
//ws.Cell(row, 16).Value = _personnel.salary;
|
||
ws.Cell(row, 17).Value = _personnel.wages1;
|
||
ws.Cell(row, 18).Value = _personnel.wages2;
|
||
ws.Cell(row, 19).Value = _personnel.wages3;
|
||
ws.Cell(row, 20).Value = _personnel.wages4;
|
||
ws.Cell(row, 21).Value = _personnel.wages5;
|
||
ws.Cell(row, 22).Value = _personnel.total_wages;
|
||
ws.Cell(row, 23).Value = _personnel.promote;
|
||
ws.Cell(row, 24).Value = _personnel.total_salary;
|
||
ws.Cell(row, 25).Value = _personnel.welfare_benefit1;
|
||
ws.Cell(row, 26).Value = _personnel.welfare_benefit2;
|
||
ws.Cell(row, 27).Value = _personnel.welfare_benefit3;
|
||
ws.Cell(row, 28).Value = _personnel.welfare_benefit4;
|
||
ws.Cell(row, 29).Value = _personnel.welfare_benefit5;
|
||
ws.Cell(row, 30).Value = _personnel.total_welfare_benefit;
|
||
ws.Cell(row, 31).Value = _personnel.total_salary_welfare_benefit;
|
||
ws.Cell(row, 32).Value = _personnel.birth_date;
|
||
ws.Cell(row, 33).Value = _personnel.retiree;
|
||
ws.Cell(row, 34).Value = _personnel.salary_per_month;
|
||
ws.Cell(row, 35).Value = _personnel.position_money;
|
||
ws.Cell(row, 36).Value = _personnel.monthly_remuneration;
|
||
ws.Cell(row, 37).Value = _personnel.position_money_2;
|
||
ws.Cell(row, 38).Value = _personnel.monthly_remuneration_2;
|
||
ws.Cell(row, 39).Value = _personnel.compensation;
|
||
ws.Cell(row, 40).Value = _personnel.other;
|
||
ws.Cell(row, 41).Value = _personnel.other_price;
|
||
ws.Cell(row, 42).Value = _personnel.total;
|
||
ws.Cell(row, 43).Value = _personnel.position_money_3;
|
||
ws.Cell(row, 44).Value = _personnel.monthly_remuneration_3;
|
||
ws.Cell(row, 45).Value = _personnel.position_money_4;
|
||
ws.Cell(row, 46).Value = _personnel.monthly_remuneration_4;
|
||
ws.Cell(row, 47).Value = _personnel.total2;
|
||
ws.Cell(row, 48).Value = _personnel.total_wage;
|
||
// ws.Cell(row, 49).Value = _personnel.compensation_1;
|
||
// ws.Cell(row, 50).Value = _personnel.compensation_2;
|
||
// ws.Cell(row, 51).Value = _personnel.compensation_3;
|
||
// ws.Cell(row, 52).Value = _personnel.compensation_4;
|
||
// ws.Cell(row, 53).Value = _personnel.compensation_5;
|
||
// ws.Cell(row, 54).Value = _personnel.compensation_6;
|
||
// ws.Cell(row, 55).Value = _personnel.other;
|
||
// ws.Cell(row, 56).Value = _personnel.other_price;
|
||
// ws.Cell(row, 57).Value = _personnel.total_2;
|
||
// ws.Cell(row, 58).Value = _personnel.total_including_salary_and_fittings;
|
||
// ws.Cell(row, 59).Value = _personnel.total_including_salary_and_fittings_12;
|
||
//ws.Cell(row, 59).Value = _personnel.total_including_salary_and_fittings;
|
||
//ws.Cell(row, 60).Value = _personnel.total_including_salary_and_fittings_12;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.OutsideBorder =
|
||
XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.LeftBorder =
|
||
XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.RightBorder =
|
||
XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.TopBorder =
|
||
XLBorderStyleValues.Double;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 16)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Center;
|
||
ws.Range(ws.Cell(row, 17), ws.Cell(row, 48)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Right;
|
||
ws.Range(ws.Cell(row, 17), ws.Cell(row, 48)).Style.NumberFormat.SetFormat("#,#");
|
||
row++;
|
||
foreach (var detail in _personnel.personnel_salary_university)
|
||
{
|
||
ws.Range(ws.Cell(row, 2), ws.Cell(row, 6)).Merge().Value = detail.agency_category_name;
|
||
// ws.Cell(row, 1).Value = no;
|
||
// no++;
|
||
// ws.Cell(row, 2).Value = detail.manpower;
|
||
// ws.Cell(row, 3).Value = detail.first_name_th;
|
||
// ws.Cell(row, 4).Value = detail.last_name_th;
|
||
// ws.Cell(row, 5).Value = detail.parent_agency_name;
|
||
// ws.Cell(row, 6).Value = detail.area;
|
||
// ws.Cell(row, 7).Value = detail.position;
|
||
// ws.Cell(row, 8).Value = detail.salary;
|
||
// if (detail2.is_academic_line == true)
|
||
// {
|
||
// ws.Cell(row, 9).Value = "/";
|
||
// }
|
||
//
|
||
// if (detail2.is_academic_line == false)
|
||
// {
|
||
// ws.Cell(row, 9).Value = "";
|
||
// }
|
||
//
|
||
// if (detail2.is_support_line == true)
|
||
// {
|
||
// ws.Cell(row, 10).Value = "/";
|
||
// }
|
||
//
|
||
// if (detail2.is_support_line == false)
|
||
// {
|
||
// ws.Cell(row, 10).Value = "";
|
||
// }
|
||
//
|
||
// ws.Cell(row, 11).Value = detail.management_position_name;
|
||
// ws.Cell(row, 12).Value = detail.position_name;
|
||
// ws.Cell(row, 13).Value = detail.assign_no_plus_assign_effective_date;
|
||
// ws.Cell(row, 14).Value = detail.education_level;
|
||
// ws.Cell(row, 15).Value = detail.education_of_manpower;
|
||
// ws.Cell(row, 16).Value = detail.salary2;
|
||
ws.Cell(row, 17).Value = detail.wages1;
|
||
ws.Cell(row, 18).Value = detail.wages2;
|
||
ws.Cell(row, 19).Value = detail.wages3;
|
||
ws.Cell(row, 20).Value = detail.wages4;
|
||
ws.Cell(row, 21).Value = detail.wages5;
|
||
ws.Cell(row, 22).Value = detail.total_wages;
|
||
ws.Cell(row, 23).Value = detail.promote;
|
||
ws.Cell(row, 24).Value = detail.total_salary;
|
||
ws.Cell(row, 25).Value = detail.welfare_benefit1;
|
||
ws.Cell(row, 26).Value = detail.welfare_benefit2;
|
||
ws.Cell(row, 27).Value = detail.welfare_benefit3;
|
||
ws.Cell(row, 28).Value = detail.welfare_benefit4;
|
||
ws.Cell(row, 29).Value = detail.welfare_benefit5;
|
||
ws.Cell(row, 30).Value = detail.total_welfare_benefit;
|
||
ws.Cell(row, 31).Value = detail.total_salary_welfare_benefit;
|
||
ws.Cell(row, 32).Value = detail.birth_date;
|
||
ws.Cell(row, 33).Value = detail.retiree;
|
||
ws.Cell(row, 34).Value = detail.salary_per_month;
|
||
ws.Cell(row, 35).Value = detail.position_money;
|
||
ws.Cell(row, 36).Value = detail.monthly_remuneration;
|
||
ws.Cell(row, 37).Value = detail.position_money_2;
|
||
ws.Cell(row, 38).Value = detail.monthly_remuneration_2;
|
||
ws.Cell(row, 39).Value = detail.compensation;
|
||
ws.Cell(row, 40).Value = detail.other;
|
||
ws.Cell(row, 41).Value = detail.other_price;
|
||
ws.Cell(row, 42).Value = detail.total;
|
||
ws.Cell(row, 43).Value = detail.position_money_3;
|
||
ws.Cell(row, 44).Value = detail.monthly_remuneration_3;
|
||
ws.Cell(row, 45).Value = detail.position_money_4;
|
||
ws.Cell(row, 46).Value = detail.monthly_remuneration_4;
|
||
ws.Cell(row, 47).Value = detail.total2;
|
||
ws.Cell(row, 48).Value = detail.total_wage;
|
||
// ws.Cell(row, 49).Value = detail.compensation_1;
|
||
// ws.Cell(row, 50).Value = detail.compensation_2;
|
||
// ws.Cell(row, 51).Value = detail.compensation_3;
|
||
// ws.Cell(row, 52).Value = detail.compensation_4;
|
||
// ws.Cell(row, 53).Value = detail.compensation_5;
|
||
// ws.Cell(row, 54).Value = detail.compensation_6;
|
||
// ws.Cell(row, 55).Value = detail.other;
|
||
// ws.Cell(row, 56).Value = detail.other_price;
|
||
// ws.Cell(row, 57).Value = detail.total_2;
|
||
// ws.Cell(row, 58).Value = detail.total_including_salary_and_fittings;
|
||
// ws.Cell(row, 59).Value = detail.total_including_salary_and_fittings_12;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.LeftBorder = XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Fill.BackgroundColor = XLColor.LightYellow;
|
||
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.OutsideBorder =
|
||
XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.LeftBorder =
|
||
XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.RightBorder =
|
||
XLBorderStyleValues.Thin;
|
||
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.TopBorder =
|
||
// XLBorderStyleValues.Double;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row, 2), ws.Cell(row, 6)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Left;
|
||
ws.Range(ws.Cell(row, 7), ws.Cell(row, 16)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Center;
|
||
ws.Range(ws.Cell(row, 17), ws.Cell(row, 48)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Right;
|
||
ws.Range(ws.Cell(row, 17), ws.Cell(row, 31)).Style.NumberFormat.SetFormat("#,#");
|
||
ws.Range(ws.Cell(row, 33), ws.Cell(row, 39)).Style.NumberFormat.SetFormat("#,#");
|
||
ws.Range(ws.Cell(row, 41), ws.Cell(row, 48)).Style.NumberFormat.SetFormat("#,#");
|
||
|
||
row++;
|
||
foreach (var detail2 in detail.personnel_salary_university_deltail)
|
||
{
|
||
CultureInfo culture = new CultureInfo("th-TH");
|
||
if (detail2.first_name_th != "รวมมีคนครองกับอัตราว่าง")
|
||
{
|
||
ws.Cell(row, 1).Value = no;
|
||
no++;
|
||
ws.Cell(row, 2).Value = detail2.manpower;
|
||
ws.Cell(row, 3).Value = detail2.first_name_th;
|
||
ws.Cell(row, 4).Value = detail2.last_name_th;
|
||
ws.Cell(row, 5).Value = detail2.parent_agency_name;
|
||
ws.Cell(row, 6).Value = detail2.area;
|
||
ws.Cell(row, 7).Value = detail2.position;
|
||
ws.Cell(row, 8).Value = detail2.position_level;
|
||
if (detail2.is_academic_line == true)
|
||
{
|
||
ws.Cell(row, 9).Value = "/";
|
||
}
|
||
|
||
if (detail2.is_academic_line == false)
|
||
{
|
||
ws.Cell(row, 9).Value = "";
|
||
}
|
||
|
||
if (detail2.is_support_line == true)
|
||
{
|
||
ws.Cell(row, 10).Value = "/";
|
||
}
|
||
|
||
if (detail2.is_support_line == false)
|
||
{
|
||
ws.Cell(row, 10).Value = "";
|
||
}
|
||
|
||
ws.Cell(row, 11).Value = detail2.management_position_name;
|
||
ws.Cell(row, 12).Value = detail2.position_name;
|
||
ws.Cell(row, 13).Value = detail2.assign_no_plus_assign_effective_date;
|
||
ws.Cell(row, 14).Value = detail2.education_level;
|
||
ws.Cell(row, 15).Value = detail2.education_of_manpower;
|
||
ws.Cell(row, 16).Value = detail2.salary;
|
||
ws.Cell(row, 17).Value = detail2.wages1;
|
||
ws.Cell(row, 18).Value = detail2.wages2;
|
||
ws.Cell(row, 19).Value = detail2.wages3;
|
||
ws.Cell(row, 20).Value = detail2.wages4;
|
||
ws.Cell(row, 21).Value = detail2.wages5;
|
||
ws.Cell(row, 22).Value = detail2.total_wages;
|
||
ws.Cell(row, 23).Value = detail2.promote;
|
||
ws.Cell(row, 24).Value = detail2.total_salary;
|
||
ws.Cell(row, 25).Value = detail2.welfare_benefit1;
|
||
ws.Cell(row, 26).Value = detail2.welfare_benefit2;
|
||
ws.Cell(row, 27).Value = detail2.welfare_benefit3;
|
||
ws.Cell(row, 28).Value = detail2.welfare_benefit4;
|
||
ws.Cell(row, 29).Value = detail2.welfare_benefit5;
|
||
ws.Cell(row, 30).Value = detail2.total_welfare_benefit;
|
||
ws.Cell(row, 31).Value = detail2.total_salary_welfare_benefit;
|
||
ws.Cell(row, 32).Value = detail2.birth_date;
|
||
ws.Cell(row, 33).Value = detail2.retiree;
|
||
ws.Cell(row, 34).Value = detail2.salary_per_month;
|
||
ws.Cell(row, 35).Value = detail2.position_money;
|
||
ws.Cell(row, 36).Value = detail2.monthly_remuneration;
|
||
ws.Cell(row, 37).Value = detail2.position_money_2;
|
||
ws.Cell(row, 38).Value = detail2.monthly_remuneration_2;
|
||
ws.Cell(row, 39).Value = detail2.compensation;
|
||
ws.Cell(row, 40).Value = detail2.other;
|
||
ws.Cell(row, 41).Value = detail2.other_price;
|
||
ws.Cell(row, 42).Value = detail2.total;
|
||
ws.Cell(row, 43).Value = detail2.position_money_3;
|
||
ws.Cell(row, 44).Value = detail2.monthly_remuneration_3;
|
||
ws.Cell(row, 45).Value = detail2.position_money_4;
|
||
ws.Cell(row, 46).Value = detail2.monthly_remuneration_4;
|
||
ws.Cell(row, 47).Value = detail2.total2;
|
||
ws.Cell(row, 48).Value = detail2.total_wage;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.OutsideBorder =
|
||
XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.LeftBorder =
|
||
XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.RightBorder =
|
||
XLBorderStyleValues.Thin;
|
||
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.TopBorder =
|
||
// XLBorderStyleValues.Double;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 16)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Center;
|
||
ws.Range(ws.Cell(row, 17), ws.Cell(row, 48)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Right;
|
||
ws.Range(ws.Cell(row, 17), ws.Cell(row, 31)).Style.NumberFormat.SetFormat("#,#");
|
||
ws.Range(ws.Cell(row, 33), ws.Cell(row, 39)).Style.NumberFormat.SetFormat("#,#");
|
||
ws.Range(ws.Cell(row, 41), ws.Cell(row, 48)).Style.NumberFormat.SetFormat("#,#");
|
||
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
|
||
// XLAlignmentHorizontalValues.Center;
|
||
// ws.Range(ws.Cell(row, 3), ws.Cell(row, 8)).Style.Alignment.Horizontal =
|
||
// XLAlignmentHorizontalValues.Left;
|
||
// ws.Range(ws.Cell(row, 9), ws.Cell(row, 10)).Style.Alignment.Horizontal =
|
||
// XLAlignmentHorizontalValues.Center;
|
||
// ws.Range(ws.Cell(row, 11), ws.Cell(row, 14)).Style.Alignment.Horizontal =
|
||
// XLAlignmentHorizontalValues.Left;
|
||
// ws.Cell(row, 15).Style.Alignment.Horizontal =
|
||
// XLAlignmentHorizontalValues.Center;
|
||
// ws.Range(ws.Cell(row, 16), ws.Cell(row, 59)).Style.Alignment.Horizontal =
|
||
// XLAlignmentHorizontalValues.Right;
|
||
// ws.Range(ws.Cell(row, 16), ws.Cell(row, 59)).Style.NumberFormat.SetFormat("#,#");
|
||
// ws.Cell(row, 21).Style.Fill.BackgroundColor = XLColor.LightGreen;
|
||
// ws.Cell(row, 27).Style.Fill.BackgroundColor = XLColor.LightGreen;
|
||
// ws.Cell(row, 29).Style.Fill.BackgroundColor = XLColor.LightGreen;
|
||
// ws.Cell(row, 31).Style.Fill.BackgroundColor = XLColor.LightYellow;
|
||
// ws.Cell(row, 36).Style.Fill.BackgroundColor = XLColor.LightGreen;
|
||
// ws.Cell(row, 38).Style.Fill.BackgroundColor = XLColor.LightGreen;
|
||
// ws.Cell(row, 40).Style.Fill.BackgroundColor = XLColor.LightYellow;
|
||
// ws.Cell(row, 42).Style.Fill.BackgroundColor = XLColor.LightBlue;
|
||
// ws.Cell(row, 45).Style.Fill.BackgroundColor = XLColor.LightGreen;
|
||
// ws.Cell(row, 48).Style.Fill.BackgroundColor = XLColor.LightGreen;
|
||
// ws.Cell(row, 59).Style.Fill.BackgroundColor = XLColor.LightGreen;
|
||
//
|
||
row++;
|
||
}
|
||
|
||
if (detail2.first_name_th == "รวมมีคนครองกับอัตราว่าง")
|
||
{
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Merge().Value = detail2.first_name_th;
|
||
ws.Cell(row, 17).Value = detail2.wages1;
|
||
ws.Cell(row, 18).Value = detail2.wages2;
|
||
ws.Cell(row, 19).Value = detail2.wages3;
|
||
ws.Cell(row, 20).Value = detail2.wages4;
|
||
ws.Cell(row, 21).Value = detail2.wages5;
|
||
ws.Cell(row, 22).Value = detail2.total_wages;
|
||
ws.Cell(row, 23).Value = detail2.promote;
|
||
ws.Cell(row, 24).Value = detail2.total_salary;
|
||
ws.Cell(row, 25).Value = detail2.welfare_benefit1;
|
||
ws.Cell(row, 26).Value = detail2.welfare_benefit2;
|
||
ws.Cell(row, 27).Value = detail2.welfare_benefit3;
|
||
ws.Cell(row, 28).Value = detail2.welfare_benefit4;
|
||
ws.Cell(row, 29).Value = detail2.welfare_benefit5;
|
||
ws.Cell(row, 30).Value = detail2.total_welfare_benefit;
|
||
ws.Cell(row, 31).Value = detail2.total_salary_welfare_benefit;
|
||
ws.Cell(row, 32).Value = detail2.birth_date;
|
||
ws.Cell(row, 33).Value = detail2.retiree;
|
||
ws.Cell(row, 34).Value = detail2.salary_per_month;
|
||
ws.Cell(row, 35).Value = detail2.position_money;
|
||
ws.Cell(row, 36).Value = detail2.monthly_remuneration;
|
||
ws.Cell(row, 37).Value = detail2.position_money_2;
|
||
ws.Cell(row, 38).Value = detail2.monthly_remuneration_2;
|
||
ws.Cell(row, 39).Value = detail2.compensation;
|
||
ws.Cell(row, 40).Value = detail2.other;
|
||
ws.Cell(row, 41).Value = detail2.other_price;
|
||
ws.Cell(row, 42).Value = detail2.total;
|
||
ws.Cell(row, 43).Value = detail2.position_money_3;
|
||
ws.Cell(row, 44).Value = detail2.monthly_remuneration_3;
|
||
ws.Cell(row, 45).Value = detail2.position_money_4;
|
||
ws.Cell(row, 46).Value = detail2.monthly_remuneration_4;
|
||
ws.Cell(row, 47).Value = detail2.total2;
|
||
ws.Cell(row, 48).Value = detail2.total_wage;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.OutsideBorder =
|
||
XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.LeftBorder =
|
||
XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.RightBorder =
|
||
XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.TopBorder =
|
||
XLBorderStyleValues.Double;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 16)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Center;
|
||
ws.Range(ws.Cell(row, 17), ws.Cell(row, 48)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Right;
|
||
ws.Range(ws.Cell(row, 17), ws.Cell(row, 31)).Style.NumberFormat.SetFormat("#,#");
|
||
ws.Range(ws.Cell(row, 33), ws.Cell(row, 39)).Style.NumberFormat.SetFormat("#,#");
|
||
ws.Range(ws.Cell(row, 41), ws.Cell(row, 48)).Style.NumberFormat.SetFormat("#,#");
|
||
}
|
||
}
|
||
|
||
// if (detail.is_footer == true)
|
||
// {
|
||
// var imagePath = _setting.report_path + @"Picture1.png";
|
||
// ws.AddPicture(imagePath).MoveTo(ws.Cell(row + 1, 2)).WithSize(72, 30);
|
||
// ws.Cell(row + 1, 3).Value = "= ผู้เกษียณอายุราชการประจำปีงบประมาณ พ.ศ. 2565 (1 ต.ค. 2564)";
|
||
// var imagePath2 = _setting.report_path + @"Picture2.png";
|
||
// ws.AddPicture(imagePath2).MoveTo(ws.Cell(row + 2, 2)).WithSize(72, 30);
|
||
// ws.Cell(row + 2, 3).Value =
|
||
// "= อัตราที่จะเสนอขอยุบเลิก ในปีงบประมาณ พ.ศ. 2565 และขอรับจัดสรรอัตราทดแทนเป็นพนักงานมหาวิทยาลัย ในปีงบประมาณ พ.ศ. 2566";
|
||
// ws.Cell(row + 1, 3).Style.Font.FontName =
|
||
// "TH SarabunPSK";
|
||
// ws.Cell(row + 1, 3).Style.Font.FontSize = 16;
|
||
// ws.Cell(row + 2, 3).Style.Font.FontName =
|
||
// "TH SarabunPSK";
|
||
// ws.Cell(row + 2, 3).Style.Font.FontSize = 16;
|
||
// }
|
||
//
|
||
// if (detail.is_footer == false)
|
||
// {
|
||
// ws.Cell(row, 3).Value = "";
|
||
// }
|
||
}
|
||
}
|
||
|
||
using (var stream1 = new MemoryStream())
|
||
{
|
||
workbook.SaveAs(stream1);
|
||
var content = stream1.ToArray();
|
||
string date = DateTime.Now.ToString("yyyyMMddHHmmss");
|
||
return File(
|
||
content,
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||
"personnel_salary_university_" + date + ".xlsx");
|
||
}
|
||
}
|
||
|
||
|
||
[HttpPost, Route("reports/set_personnel_budget/{type}")]
|
||
[ApiExplorerSettings(GroupName = "reports")]
|
||
public IActionResult GetSetPersonBudgetReport([FromRoute] string type,
|
||
[FromBody] set_personnel_budget personnel)
|
||
{
|
||
var workbook = new XLWorkbook();
|
||
var ws = workbook.Worksheets.Add("6.1ค่าตอบแทนพนักงานราชการ");
|
||
|
||
ws.Range("A1:S1").Merge().Value = "การตั้งงบประมาณค่าใช้จ่ายบุคลากร ของพนักงานราชการ ปีงบประมาณ พ.ศ. " +
|
||
personnel.academic_year_name_th;
|
||
ws.Cell("A1").Style.Alignment.WrapText = true;
|
||
ws.Range("A1:S1").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("A1:S1").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("A1").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("A1").Style.Font.FontSize = 16;
|
||
ws.Cell("A1").Style.Font.Bold = true;
|
||
ws.Cell("A4").Value = "กระทรวง : ";
|
||
ws.Cell("A4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("A4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("A4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("A4").Style.Font.FontSize = 16;
|
||
ws.Cell("A4").Style.Font.Bold = true;
|
||
ws.Range("B4:F4").Merge().Value = personnel.ministry_name_th;
|
||
ws.Range("B4:F4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Range("B4:F4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("B4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("B4").Style.Font.FontSize = 16;
|
||
ws.Range("B4:F4").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
|
||
ws.Cell("A5").Value = "หน่วยงาน : ";
|
||
ws.Cell("A5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("A5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("A5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("A5").Style.Font.FontSize = 16;
|
||
ws.Cell("A5").Style.Font.Bold = true;
|
||
|
||
ws.Range("B5:F5").Merge().Value = "มหาวิทยาลัยเทคโนโลยีราชมงคลรัตนโกสินทร์";
|
||
ws.Range("B5:F5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Range("B5:F5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("B5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("B5").Style.Font.FontSize = 16;
|
||
ws.Range("B5:F5").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
|
||
ws.Cell("A8").Value = "สรุป เสนอตั้งงบประมาณ";
|
||
ws.Cell("A8").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("A8").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("A8").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("A8").Style.Font.FontSize = 16;
|
||
ws.Cell("A8").Style.Font.Bold = true;
|
||
ws.Cell("A8").Style.Font.Underline = XLFontUnderlineValues.Single;
|
||
ws.Cell("D8").Value = "จำนวน";
|
||
ws.Cell("D8").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("D8").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("D8").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("D8").Style.Font.FontSize = 16;
|
||
ws.Cell("D8").Style.Font.Bold = true;
|
||
ws.Range("E8:F8").Merge().Value = personnel.total_propose_budget1;
|
||
ws.Range("E8:F8").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Range("E8:F8").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("E8:F8").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("E8:F8").Style.Font.FontSize = 16;
|
||
ws.Range("E8:F8").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
ws.Cell("H8").Value = "งบประมาณ";
|
||
ws.Cell("H8").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("H8").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("H8").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("H8").Style.Font.FontSize = 16;
|
||
ws.Cell("H8").Style.Font.Bold = true;
|
||
ws.Range("I8:J8").Merge().Value = personnel.budget1;
|
||
ws.Range("I8:J8").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Range("I8:J8").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("I8:J8").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("I8:J8").Style.Font.FontSize = 16;
|
||
ws.Range("I8:J8").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
ws.Cell("K8").Value = "ล้านบาท (รวมส่วนควบและค่าใช้จ่ายตามสิทธิ)";
|
||
ws.Cell("K8").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("K8").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("K8").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("K8").Style.Font.FontSize = 16;
|
||
ws.Cell("K8").Style.Font.Bold = true;
|
||
ws.Cell("A9").Value = "ประกอบด้วย";
|
||
ws.Cell("A9").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("A9").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("A9").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("A9").Style.Font.FontSize = 16;
|
||
ws.Cell("A9").Style.Font.Bold = true;
|
||
// ws.Cell("A10").Value = "ส่วนที่ 1";
|
||
// ws.Cell("A10").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
// ws.Cell("A10").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
// ws.Cell("A10").Style.Font.FontName = "TH SarabunPSK";
|
||
// ws.Cell("A10").Style.Font.FontSize = 16;
|
||
// ws.Cell("A10").Style.Font.Underline = XLFontUnderlineValues.Single;
|
||
ws.Range("A10:C10").Merge().Value = "ส่วนที่ 1 แบบคำนวณค่าตอบแทนพนักงานราชการ";
|
||
ws.Range("A10:C10").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Range("A10:C10").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("A10:C10").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("A10:C10").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("A10:C10").Style.Font.Underline = XLFontUnderlineValues.Single;
|
||
|
||
ws.Cell("D10").Value = "จำนวน";
|
||
ws.Cell("D10").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("D10").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("D10").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("D10").Style.Font.FontSize = 16;
|
||
ws.Cell("D10").Style.Font.Bold = true;
|
||
ws.Range("E10:F10").Merge().Value = personnel.total_propose_budget1;
|
||
ws.Range("E10:F10").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Range("E10:F10").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("E10:F10").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("E10:F10").Style.Font.FontSize = 16;
|
||
ws.Range("E10:F10").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
ws.Cell("H8").Value = "งบประมาณ";
|
||
ws.Cell("H8").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("H8").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("H8").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("H8").Style.Font.FontSize = 16;
|
||
ws.Cell("H8").Style.Font.Bold = true;
|
||
ws.Range("I10:J10").Merge().Value = personnel.budget1;
|
||
ws.Range("I10:J10").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Range("I10:J10").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("I10:J10").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("I10:J10").Style.Font.FontSize = 16;
|
||
ws.Range("I10:J10").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
ws.Cell("K10").Value = "ล้านบาท (ไม่รวมส่วนควบ)";
|
||
ws.Cell("K10").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("K10").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("K10").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("K10").Style.Font.FontSize = 16;
|
||
ws.Cell("K10").Style.Font.Bold = true;
|
||
ws.Cell("A12").Value = "พรบ.ปี " + personnel.year1;
|
||
ws.Cell("A12").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("A12").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("A12").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("A12").Style.Font.FontSize = 16;
|
||
ws.Cell("A12").Style.Font.Bold = true;
|
||
ws.Cell("B12").Value = personnel.act_old1;
|
||
ws.Cell("B12").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("B12").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("B12").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("B12").Style.Font.FontSize = 16;
|
||
ws.Cell("B12").Style.Font.Bold = true;
|
||
ws.Cell("C12").Value = "ลบ.";
|
||
ws.Cell("C12").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("C12").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("C12").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("C12").Style.Font.FontSize = 16;
|
||
ws.Cell("C12").Style.Font.Bold = true;
|
||
ws.Cell("D12").Value = "เบิกจ่ายปี งปม." + personnel.year1;
|
||
ws.Cell("D12").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("D12").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("D12").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("D12").Style.Font.FontSize = 16;
|
||
ws.Cell("D12").Style.Font.Bold = true;
|
||
ws.Cell("F12").Value = personnel.disbursement_year_act_old1;
|
||
ws.Cell("F12").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("F12").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("F12").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("F12").Style.Font.FontSize = 16;
|
||
ws.Cell("F12").Style.Font.Bold = true;
|
||
ws.Cell("G12").Value = "ลบ.";
|
||
ws.Cell("G12").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("G12").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("G12").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("G12").Style.Font.FontSize = 16;
|
||
ws.Cell("G12").Style.Font.Bold = true;
|
||
ws.Cell("H12").Value = "คิดเป็นร้อยละ";
|
||
ws.Cell("H12").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("H12").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("H12").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("H12").Style.Font.FontSize = 16;
|
||
ws.Cell("H12").Style.Font.Bold = true;
|
||
ws.Cell("I12").Value = personnel.disbursement_year_act_old1_percent;
|
||
ws.Cell("I12").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("I12").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("I12").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("I12").Style.Font.FontSize = 16;
|
||
ws.Cell("I12").Style.Font.Bold = true;
|
||
ws.Cell("J12").Value = "คงเหลือ";
|
||
ws.Cell("J12").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("J12").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("J12").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("J12").Style.Font.FontSize = 16;
|
||
ws.Cell("J12").Style.Font.Bold = true;
|
||
ws.Cell("K12").Value = personnel.remaining_act_old1;
|
||
ws.Cell("K12").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("K12").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("K12").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("K12").Style.Font.FontSize = 16;
|
||
ws.Cell("K12").Style.Font.Bold = true;
|
||
ws.Cell("L12").Value = "ลบ.";
|
||
ws.Cell("L12").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("L12").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("L12").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("L12").Style.Font.FontSize = 16;
|
||
ws.Cell("L12").Style.Font.Bold = true;
|
||
ws.Cell("M12").Value = "คิดเป็นร้อยละ";
|
||
ws.Cell("M12").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("M12").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("M12").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("M12").Style.Font.FontSize = 16;
|
||
ws.Cell("M12").Style.Font.Bold = true;
|
||
ws.Cell("N12").Value = personnel.remaining_act_old1_percent;
|
||
ws.Cell("N12").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("N12").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("N12").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("N12").Style.Font.FontSize = 16;
|
||
ws.Cell("N12").Style.Font.Bold = true;
|
||
ws.Cell("A13").Value = "พรบ.ปี " + personnel.year2;
|
||
ws.Cell("A13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("A13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("A13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("A13").Style.Font.FontSize = 16;
|
||
ws.Cell("A13").Style.Font.Bold = true;
|
||
ws.Cell("B13").Value = personnel.act_old2;
|
||
ws.Cell("B13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("B13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("B13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("B13").Style.Font.FontSize = 16;
|
||
ws.Cell("B13").Style.Font.Bold = true;
|
||
ws.Cell("C13").Value = "ลบ.";
|
||
ws.Cell("C13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("C13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("C13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("C13").Style.Font.FontSize = 16;
|
||
ws.Cell("C13").Style.Font.Bold = true;
|
||
ws.Cell("D13").Value = "จ่ายจริง " + personnel.actually_paid_month;
|
||
ws.Cell("D13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("D13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("D13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("D13").Style.Font.FontSize = 16;
|
||
ws.Cell("D13").Style.Font.Bold = true;
|
||
ws.Cell("F13").Value = personnel.actually_paid;
|
||
ws.Cell("F13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("F13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("F13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("F13").Style.Font.FontSize = 16;
|
||
ws.Cell("F13").Style.Font.Bold = true;
|
||
ws.Cell("G13").Value = "ลบ.";
|
||
ws.Cell("G13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("G13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("G13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("G13").Style.Font.FontSize = 16;
|
||
ws.Cell("G13").Style.Font.Bold = true;
|
||
ws.Cell("H13").Value = "คิดเป็นร้อยละ";
|
||
ws.Cell("H13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("H13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("H13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("H13").Style.Font.FontSize = 16;
|
||
ws.Cell("H13").Style.Font.Bold = true;
|
||
ws.Cell("I13").Value = personnel.actually_paid_percent;
|
||
ws.Cell("I13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("I13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("I13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("I13").Style.Font.FontSize = 16;
|
||
ws.Cell("I13").Style.Font.Bold = true;
|
||
ws.Cell("J13").Value = "คงเหลือ";
|
||
ws.Cell("J13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("J13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("J13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("J13").Style.Font.FontSize = 16;
|
||
ws.Cell("J13").Style.Font.Bold = true;
|
||
ws.Cell("K13").Value = personnel.remaining_act_old2;
|
||
ws.Cell("K13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("K13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("K13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("K13").Style.Font.FontSize = 16;
|
||
ws.Cell("K13").Style.Font.Bold = true;
|
||
ws.Cell("L13").Value = "ลบ.";
|
||
ws.Cell("L13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("L13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("L13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("L13").Style.Font.FontSize = 16;
|
||
ws.Cell("L13").Style.Font.Bold = true;
|
||
ws.Cell("M13").Value = "คิดเป็นร้อยละ";
|
||
ws.Cell("M13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("M13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("M13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("M13").Style.Font.FontSize = 16;
|
||
ws.Cell("M13").Style.Font.Bold = true;
|
||
ws.Cell("N13").Value = personnel.remaining_act_old2_percent;
|
||
ws.Cell("N13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("N13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("N13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("N13").Style.Font.FontSize = 16;
|
||
ws.Cell("N13").Style.Font.Bold = true;
|
||
|
||
ws.Cell("A14").Value = "(ไม่รวมส่วนควบเงินเดือน)";
|
||
ws.Cell("A14").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("A14").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("A14").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("A14").Style.Font.FontSize = 16;
|
||
ws.Cell("B14").Value = personnel.not_include_salary1;
|
||
ws.Cell("B14").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("B14").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("B14").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("B14").Style.Font.FontSize = 16;
|
||
ws.Cell("C14").Value = "ลบ.";
|
||
ws.Cell("C14").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("C14").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("C14").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("C14").Style.Font.FontSize = 16;
|
||
ws.Cell("D14").Value = "(ไม่รวมส่วนควบเงินเดือน)";
|
||
ws.Cell("D14").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("D14").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("D14").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("D14").Style.Font.FontSize = 16;
|
||
ws.Cell("F14").Value = personnel.not_include_salary2;
|
||
ws.Cell("F14").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("F14").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("F14").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("F14").Style.Font.FontSize = 16;
|
||
ws.Cell("G14").Value = "ลบ.";
|
||
ws.Cell("G14").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("G14").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("G14").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("G14").Style.Font.FontSize = 16;
|
||
ws.Cell("S14").Value = "หน่วย : ล้านบาท (ทศนิยม 4 ตำแหน่ง)";
|
||
ws.Cell("S14").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("S14").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("S14").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("S14").Style.Font.SetBold().Font.FontSize = 16;
|
||
//ws.Range("N4:N6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Row(4).Height = 30;
|
||
// ws.Row(5).Height = 30;
|
||
// ws.Row(6).Height = 30;
|
||
ws.Column(1).Width = 30;
|
||
ws.Column(2).Width = 12;
|
||
ws.Column(3).Width = 12;
|
||
ws.Column(4).Width = 12;
|
||
ws.Column(5).Width = 12;
|
||
ws.Column(6).Width = 12;
|
||
ws.Column(7).Width = 12;
|
||
ws.Column(8).Width = 12;
|
||
ws.Column(9).Width = 12;
|
||
ws.Column(10).Width = 12;
|
||
ws.Column(11).Width = 12;
|
||
ws.Column(12).Width = 12;
|
||
ws.Column(13).Width = 12;
|
||
ws.Column(14).Width = 12;
|
||
ws.Column(15).Width = 12;
|
||
ws.Column(16).Width = 12;
|
||
ws.Column(17).Width = 40;
|
||
int row = 18;
|
||
//int no = 1;
|
||
|
||
if (personnel != null)
|
||
{
|
||
ws.Range("A15:D17").Merge().Value = "รายการ";
|
||
ws.Range("A15:D17").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("A15:D17").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("A15:D17").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("A15:D17").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("A15:D17").Style.Fill.BackgroundColor = XLColor.Orange;
|
||
ws.Range("A15:D17").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Range("E15:F15").Merge().Value = "งปม. " + personnel.year_table1;
|
||
ws.Range("E15:F15").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("E15:F15").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("E15:F15").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("E15:F15").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("E15:F15").Style.Fill.BackgroundColor = XLColor.LightGreen;
|
||
ws.Range("E15:F15").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Range("E16:F16").Merge().Value = "พ.ร.บ.";
|
||
ws.Range("E16:F16").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("E16:F16").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("E16:F16").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("E16:F16").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("E16:F16").Style.Fill.BackgroundColor = XLColor.LightGreen;
|
||
ws.Range("E16:F16").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("E17").Value = "อัตรา";
|
||
ws.Cell("E17").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("E17").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("E17").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("E17").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("E17").Style.Fill.BackgroundColor = XLColor.LightGreen;
|
||
ws.Cell("E17").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
|
||
ws.Cell("F17").Value = "งบประมาณ";
|
||
ws.Cell("F17").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("F17").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("F17").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("F17").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("F17").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("F17").Style.Fill.BackgroundColor = XLColor.LightGreen;
|
||
ws.Range("G15:J15").Merge().Value = "งปม. " + personnel.year_table2 + "(จ่ายจริง " +
|
||
personnel.actually_paid_month + ")";
|
||
ws.Range("G15:J15").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("G15:J15").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("G15:J15").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("G15:J15").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("G15:J15").Style.Fill.BackgroundColor = XLColor.LightBlue;
|
||
ws.Range("G15:J15").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Range("G16:H16").Merge().Value = "คำขอ";
|
||
ws.Range("G16:H16").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("G16:H16").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("G16:H16").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("G16:H16").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("G16:H16").Style.Fill.BackgroundColor = XLColor.LightBlue;
|
||
ws.Range("G16:H16").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Range("I16:J16").Merge().Value = "ข้อเสนอ";
|
||
ws.Range("I16:J16").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("I16:J16").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("I16:J16").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("I16:J16").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("I16:J16").Style.Fill.BackgroundColor = XLColor.LightBlue;
|
||
ws.Range("I16:J16").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("G17").Value = "อัตรา";
|
||
ws.Cell("G17").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("G17").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("G17").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("G17").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("G17").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("G17").Style.Fill.BackgroundColor = XLColor.LightBlue;
|
||
ws.Cell("H17").Value = "งบประมาณ";
|
||
ws.Cell("H17").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("H17").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("H17").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("H17").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("H17").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("H17").Style.Fill.BackgroundColor = XLColor.LightBlue;
|
||
ws.Cell("I17").Value = "อัตรา";
|
||
ws.Cell("I17").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("I17").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("I17").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("I17").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("I17").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("I17").Style.Fill.BackgroundColor = XLColor.LightBlue;
|
||
ws.Cell("J17").Value = "งบประมาณ";
|
||
ws.Cell("J17").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("J17").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("J17").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("J17").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("J17").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("J17").Style.Fill.BackgroundColor = XLColor.LightBlue;
|
||
ws.Range("K15:P15").Merge().Value = "MTEF";
|
||
ws.Range("K15:P15").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("K15:P15").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("K15:P15").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("K15:P15").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("K15:P15").Style.Fill.BackgroundColor = XLColor.LightYellow;
|
||
ws.Range("K15:P15").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Range("K16:L16").Merge().Value = personnel.year_table3;
|
||
ws.Range("K16:L16").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("K16:L16").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("K16:L16").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("K16:L16").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("K16:L16").Style.Fill.BackgroundColor = XLColor.LightYellow;
|
||
ws.Range("K16:L16").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Range("M16:N16").Merge().Value = personnel.year_table4;
|
||
ws.Range("M16:N16").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("M16:N16").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("M16:N16").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("M16:N16").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("M16:N16").Style.Fill.BackgroundColor = XLColor.LightYellow;
|
||
ws.Range("M16:N16").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Range("O16:P16").Merge().Value = personnel.year_table5;
|
||
ws.Range("O16:P16").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("O16:P16").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("O16:P16").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("O16:P16").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("O16:P16").Style.Fill.BackgroundColor = XLColor.LightYellow;
|
||
ws.Range("O16:P16").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("K17").Value = "อัตรา";
|
||
ws.Cell("K17").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("K17").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("K17").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("K17").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("K17").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("K17").Style.Fill.BackgroundColor = XLColor.LightYellow;
|
||
ws.Cell("L17").Value = "งบประมาณ";
|
||
ws.Cell("L17").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("L17").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("L17").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("L17").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("L17").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("L17").Style.Fill.BackgroundColor = XLColor.LightYellow;
|
||
ws.Cell("M17").Value = "อัตรา";
|
||
ws.Cell("M17").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("M17").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("M17").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("M17").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("M17").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("M17").Style.Fill.BackgroundColor = XLColor.LightYellow;
|
||
ws.Cell("N17").Value = "งบประมาณ";
|
||
ws.Cell("N17").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("N17").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("N17").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("N17").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("N17").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("N17").Style.Fill.BackgroundColor = XLColor.LightYellow;
|
||
ws.Cell("O17").Value = "อัตรา";
|
||
ws.Cell("O17").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("O17").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("O17").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("O17").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("O17").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("O17").Style.Fill.BackgroundColor = XLColor.LightYellow;
|
||
ws.Cell("P17").Value = "งบประมาณ";
|
||
ws.Cell("P17").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("P17").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("P17").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("P17").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("P17").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("P17").Style.Fill.BackgroundColor = XLColor.LightYellow;
|
||
ws.Range("Q15:S17").Merge().Value = "คำชี้แจง";
|
||
ws.Range("Q15:S17").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("Q15:S17").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("Q15:S17").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("Q15:S17").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("Q15:S17").Style.Fill.BackgroundColor = XLColor.Orange;
|
||
ws.Range("Q15:S17").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
|
||
foreach (var detail in personnel.set_personnel_budget_details)
|
||
{
|
||
if (detail.is_bold == true)
|
||
{
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Merge().Value = detail.topic;
|
||
ws.Cell(row, 5).Value = detail.act_rate;
|
||
ws.Cell(row, 6).Value = detail.act_budget;
|
||
ws.Cell(row, 7).Value = detail.request_rate;
|
||
ws.Cell(row, 8).Value = detail.request_budget;
|
||
ws.Cell(row, 9).Value = detail.offer_rate;
|
||
ws.Cell(row, 10).Value = detail.offer_budget;
|
||
ws.Cell(row, 11).Value = detail.year1_rate;
|
||
ws.Cell(row, 12).Value = detail.year1_budget;
|
||
ws.Cell(row, 13).Value = detail.year2_rate;
|
||
ws.Cell(row, 14).Value = detail.year2_budget;
|
||
ws.Cell(row, 15).Value = detail.year3_rate;
|
||
ws.Cell(row, 16).Value = detail.year3_budget;
|
||
ws.Range(ws.Cell(row, 17), ws.Cell(row, 19)).Merge().Value = detail.remark;
|
||
|
||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 4).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 7).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 8).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 9).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 12).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 13).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 14).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 15).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 16).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 17).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 18).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 19).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Alignment.Vertical =
|
||
XLAlignmentVerticalValues.Center;
|
||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 4).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 6).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 7).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 8).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 9).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 10).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 11).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 12).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 13).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 14).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 15).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 16).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 17).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
|
||
row++;
|
||
}
|
||
|
||
if (detail.is_bold == false)
|
||
{
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Merge().Value = detail.topic;
|
||
ws.Cell(row, 5).Value = detail.act_rate;
|
||
ws.Cell(row, 6).Value = detail.act_budget;
|
||
ws.Cell(row, 7).Value = detail.request_rate;
|
||
ws.Cell(row, 8).Value = detail.request_budget;
|
||
ws.Cell(row, 9).Value = detail.offer_rate;
|
||
ws.Cell(row, 10).Value = detail.offer_budget;
|
||
ws.Cell(row, 11).Value = detail.year1_rate;
|
||
ws.Cell(row, 12).Value = detail.year1_budget;
|
||
ws.Cell(row, 13).Value = detail.year2_rate;
|
||
ws.Cell(row, 14).Value = detail.year2_budget;
|
||
ws.Cell(row, 15).Value = detail.year3_rate;
|
||
ws.Cell(row, 16).Value = detail.year3_budget;
|
||
ws.Range(ws.Cell(row, 17), ws.Cell(row, 19)).Merge().Value = detail.remark;
|
||
|
||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 4).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 7).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 8).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 9).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 12).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 13).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 14).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 15).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 16).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 17).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 18).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 19).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Cell(row, 1).Style.Font.FontSize = 16;
|
||
|
||
ws.Range(ws.Cell(row, 5), ws.Cell(row, 17)).Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Alignment.Vertical =
|
||
XLAlignmentVerticalValues.Center;
|
||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 4).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 6).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 7).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 8).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 9).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 10).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 11).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 12).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 13).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 14).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 15).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 16).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 17).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
|
||
row++;
|
||
}
|
||
}
|
||
}
|
||
|
||
using (var stream1 = new MemoryStream())
|
||
{
|
||
workbook.SaveAs(stream1);
|
||
var content = stream1.ToArray();
|
||
string date = DateTime.Now.ToString("yyyyMMddHHmmss");
|
||
return File(
|
||
content,
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||
"personnel_" + date + ".xlsx");
|
||
}
|
||
}
|
||
|
||
[HttpPost, Route("reports/personnel_expense_budget/{type}")]
|
||
[ApiExplorerSettings(GroupName = "reports")]
|
||
public IActionResult GetSetPersonExBudgetReport([FromRoute] string type,
|
||
[FromBody] personnel_expense_budget personnel)
|
||
{
|
||
var workbook = new XLWorkbook();
|
||
var ws = workbook.Worksheets.Add("1.เงินเดือน เลื่อนในงบกลาง");
|
||
|
||
ws.Range("A1:U1").Merge().Value = "ข้อมูลการตั้งงบประมาณค่าใช้จ่ายบุคลากร ปีงบประมาณ พ.ศ. " +
|
||
personnel.academic_year_name_th;
|
||
ws.Cell("A1").Style.Alignment.WrapText = true;
|
||
ws.Range("A2:U2").Merge().Value = "สำหรับส่วนราชการทั่วไป , มหาวิทยาลัย (เฉพาะข้าราชการ)";
|
||
ws.Range("A3:U3").Merge().Value = "(กรณีเงินเลื่อนขั้นอยู่ในงบกลาง และมีการเลื่อนเงินเดือนปีละ 2 ครั้ง)";
|
||
ws.Range("A1:U3").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("A1:U3").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("A1:U3").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("A1:U3").Style.Font.FontSize = 16;
|
||
ws.Range("A1:U3").Style.Font.Bold = true;
|
||
ws.Cell("A4").Value = "กระทรวง : ";
|
||
ws.Cell("A4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("A4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("A4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("A4").Style.Font.FontSize = 16;
|
||
ws.Cell("A4").Style.Font.Bold = true;
|
||
ws.Range("B4:F4").Merge().Value = personnel.ministry_name_th;
|
||
ws.Range("B4:F4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Range("B4:F4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("B4").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("B4").Style.Font.FontSize = 16;
|
||
ws.Range("B4:F4").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
|
||
ws.Cell("A5").Value = "หน่วยงาน : ";
|
||
ws.Cell("A5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("A5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("A5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("A5").Style.Font.FontSize = 16;
|
||
ws.Cell("A5").Style.Font.Bold = true;
|
||
|
||
ws.Range("B5:F5").Merge().Value = personnel.agency_name_th;
|
||
ws.Range("B5:F5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Range("B5:F5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("B5").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("B5").Style.Font.FontSize = 16;
|
||
ws.Range("B5:F5").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
|
||
ws.Cell("A7").Value = "กรอบอัตรากำลัง";
|
||
ws.Cell("A7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("A7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("A7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("A7").Style.Font.FontSize = 16;
|
||
ws.Cell("A7").Style.Font.Bold = true;
|
||
ws.Cell("A7").Style.Font.FontColor = XLColor.Red;
|
||
ws.Cell("A7").Style.Font.Underline = XLFontUnderlineValues.Single;
|
||
|
||
ws.Cell("B7").Value = "จำนวน";
|
||
ws.Cell("B7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("B7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("B7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("B7").Style.Font.FontSize = 16;
|
||
ws.Cell("B7").Style.Font.Bold = true;
|
||
ws.Cell("B7").Style.Font.FontColor = XLColor.Red;
|
||
|
||
ws.Cell("C7").Value = personnel.rate_frame_total;
|
||
ws.Cell("C7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("C7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("C7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("C7").Style.Font.FontSize = 16;
|
||
ws.Cell("C7").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
ws.Cell("C7").Style.Font.FontColor = XLColor.Red;
|
||
|
||
ws.Cell("D7").Value = "อัตรา";
|
||
ws.Cell("D7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("D7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("D7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("D7").Style.Font.FontSize = 16;
|
||
ws.Cell("D7").Style.Font.Bold = true;
|
||
ws.Cell("D7").Style.Font.FontColor = XLColor.Red;
|
||
|
||
ws.Cell("E7").Value = "ประกอบด้วย";
|
||
ws.Cell("E7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("E7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("E7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("E7").Style.Font.FontSize = 16;
|
||
ws.Cell("E7").Style.Font.Bold = true;
|
||
ws.Cell("E7").Style.Font.FontColor = XLColor.Red;
|
||
|
||
ws.Range("F7:G7").Merge().Value = "(1) อัตราที่มีคนครอง";
|
||
ws.Range("F7:G7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Range("F7:G7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("F7:G7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("F7:G7").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("F7:G7").Style.Font.FontColor = XLColor.Red;
|
||
//ws.Range("F7:G7").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
ws.Cell("H7").Value = personnel.rate_frame_owner;
|
||
ws.Cell("H7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("H7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("H7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("H7").Style.Font.FontSize = 16;
|
||
ws.Cell("H7").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
ws.Cell("H7").Style.Font.FontColor = XLColor.Red;
|
||
|
||
ws.Cell("I7").Value = "อัตรา";
|
||
ws.Cell("I7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("I7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("I7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("I7").Style.Font.FontSize = 16;
|
||
ws.Cell("I7").Style.Font.Bold = true;
|
||
ws.Cell("I7").Style.Font.FontColor = XLColor.Red;
|
||
|
||
ws.Range("J7:K7").Merge().Value = "(2) อัตราว่างมีเงิน";
|
||
ws.Range("J7:K7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Range("J7:K7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("J7:K7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("J7:K7").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("J7:K7").Style.Font.FontColor = XLColor.Red;
|
||
ws.Cell("L7").Value = personnel.rate_frame_free;
|
||
ws.Cell("L7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("L7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("L7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("L7").Style.Font.FontSize = 16;
|
||
ws.Cell("L7").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
ws.Cell("L7").Style.Font.FontColor = XLColor.Red;
|
||
ws.Cell("M7").Value = "อัตรา";
|
||
ws.Cell("M7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("M7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("M7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("M7").Style.Font.FontSize = 16;
|
||
ws.Cell("M7").Style.Font.Bold = true;
|
||
ws.Cell("M7").Style.Font.FontColor = XLColor.Red;
|
||
|
||
ws.Range("N7:O7").Merge().Value = "(3) อัตราว่างไม่มีเงิน";
|
||
ws.Range("N7:O7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Range("N7:O7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("N7:O7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("N7:O7").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("N7:O7").Style.Font.FontColor = XLColor.Red;
|
||
ws.Cell("P7").Value = personnel.rate_frame_not_free;
|
||
ws.Cell("P7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("P7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("P7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("P7").Style.Font.FontSize = 16;
|
||
ws.Cell("P7").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
ws.Cell("P7").Style.Font.FontColor = XLColor.Red;
|
||
ws.Cell("Q7").Value = "อัตรา";
|
||
ws.Cell("Q7").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("Q7").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("Q7").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("Q7").Style.Font.FontSize = 16;
|
||
ws.Cell("Q7").Style.Font.Bold = true;
|
||
ws.Cell("Q7").Style.Font.FontColor = XLColor.Red;
|
||
|
||
ws.Cell("A8").Value = "สรุป เสนอตั้งงบประมาณ";
|
||
ws.Cell("A8").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("A8").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("A8").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("A8").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("A8").Style.Font.Underline = XLFontUnderlineValues.Single;
|
||
|
||
ws.Cell("D8").Value = "จำนวน";
|
||
ws.Cell("D8").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("D8").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("D8").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("D8").Style.Font.FontSize = 16;
|
||
ws.Cell("D8").Style.Font.Bold = true;
|
||
|
||
ws.Range("E8:F8").Merge().Value = personnel.budget_proposal_summary;
|
||
ws.Range("E8:F8").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Range("E8:F8").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("E8:F8").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("E8:F8").Style.Font.FontSize = 16;
|
||
ws.Range("E8:F8").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
ws.Cell("G8").Value = "อัตรา";
|
||
ws.Cell("G8").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("G8").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("G8").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("G8").Style.Font.FontSize = 16;
|
||
ws.Cell("G8").Style.Font.Bold = true;
|
||
|
||
ws.Cell("H8").Value = "งบประมาณ";
|
||
ws.Cell("H8").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("H8").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("H8").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("H8").Style.Font.FontSize = 16;
|
||
ws.Cell("H8").Style.Font.Bold = true;
|
||
|
||
ws.Range("I8:J8").Merge().Value = personnel.budget_summary;
|
||
ws.Range("I8:J8").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Range("I8:J8").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("I8:J8").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("I8:J8").Style.Font.FontSize = 16;
|
||
ws.Range("I8:J8").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
ws.Cell("K8").Value = "ล้านบาท (รวมส่วนควบและค่าใช้จ่ายตามสิทธิ)";
|
||
ws.Cell("K8").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("K8").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("K8").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("K8").Style.Font.FontSize = 16;
|
||
ws.Cell("K8").Style.Font.Bold = true;
|
||
|
||
ws.Cell("A9").Value = "ประกอบด้วย";
|
||
ws.Cell("A9").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("A9").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("A9").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("A9").Style.Font.FontSize = 16;
|
||
ws.Cell("A9").Style.Font.Bold = false;
|
||
|
||
ws.Cell("A10").Value = "แบบคำนวณเงินเดือน";
|
||
ws.Cell("A10").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("A10").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("A10").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("A10").Style.Font.FontSize = 16;
|
||
ws.Cell("A10").Style.Font.Bold = true;
|
||
ws.Cell("D10").Value = "จำนวนรวมทั้งสิ้น";
|
||
ws.Cell("D10").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("D10").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("D10").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("D10").Style.Font.FontSize = 16;
|
||
ws.Cell("D10").Style.Font.Bold = true;
|
||
ws.Range("E10:F10").Merge().Value = personnel.salary_calculation;
|
||
ws.Range("E10:F10").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Range("E10:F10").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("E10:F10").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("E10:F10").Style.Font.FontSize = 16;
|
||
ws.Range("E10:F10").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
ws.Cell("G10").Value = "อัตรา";
|
||
ws.Cell("G10").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("G10").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("G10").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("G10").Style.Font.FontSize = 16;
|
||
ws.Cell("G10").Style.Font.Bold = true;
|
||
ws.Cell("H10").Value = "งบประมาณ";
|
||
ws.Cell("H10").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("H10").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("H10").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("H10").Style.Font.FontSize = 16;
|
||
ws.Cell("H10").Style.Font.Bold = true;
|
||
|
||
ws.Range("I10:J10").Merge().Value = personnel.salary_calculation_budget;
|
||
ws.Range("I10:J10").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Range("I10:J10").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("I10:J10").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("I10:J10").Style.Font.FontSize = 16;
|
||
ws.Range("I10:J10").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
ws.Cell("K10").Value = "ล้านบาท (ไม่รวมส่วนควบ)";
|
||
ws.Cell("K10").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("K10").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("K10").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("K10").Style.Font.FontSize = 16;
|
||
ws.Cell("K10").Style.Font.Bold = true;
|
||
|
||
|
||
ws.Cell("A11").Value = "พรบ.ปี 2564";
|
||
ws.Cell("A11").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("A11").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("A11").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("A11").Style.Font.FontSize = 16;
|
||
ws.Cell("A11").Style.Font.Bold = true;
|
||
|
||
ws.Cell("B11").Value = personnel.act_1;
|
||
ws.Cell("B11").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("B11").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("B11").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("B11").Style.Font.FontSize = 16;
|
||
ws.Cell("B11").Style.Font.Bold = true;
|
||
ws.Cell("B11").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
|
||
|
||
ws.Cell("C11").Value = "ลบ.";
|
||
ws.Cell("C11").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("C11").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("C11").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("C11").Style.Font.FontSize = 16;
|
||
ws.Cell("C11").Style.Font.Bold = true;
|
||
|
||
ws.Cell("D11").Value = "(1) เบิกจ่ายปี งปม.64";
|
||
ws.Cell("D11").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("D11").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("D11").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("D11").Style.Font.FontSize = 16;
|
||
ws.Cell("D11").Style.Font.Bold = true;
|
||
|
||
ws.Cell("F11").Value = personnel.act_1_disbursement_year;
|
||
ws.Cell("F11").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("F11").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("F11").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("F11").Style.Font.FontSize = 16;
|
||
ws.Cell("F11").Style.Font.Bold = true;
|
||
ws.Cell("F11").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
|
||
ws.Cell("G11").Value = "ลบ.";
|
||
ws.Cell("G11").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("G11").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("G11").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("G11").Style.Font.FontSize = 16;
|
||
ws.Cell("G11").Style.Font.Bold = true;
|
||
|
||
ws.Cell("H11").Value = "คิดเป็นร้อยละ";
|
||
ws.Cell("H11").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("H11").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("H11").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("H11").Style.Font.FontSize = 16;
|
||
ws.Cell("H11").Style.Font.Bold = true;
|
||
|
||
ws.Cell("I11").Value = personnel.act_1_disbursement_year_percentage;
|
||
ws.Cell("I11").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("I11").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("I11").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("I11").Style.Font.FontSize = 16;
|
||
ws.Cell("I11").Style.Font.Bold = true;
|
||
ws.Cell("I11").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
|
||
ws.Cell("J11").Value = "คงเหลือ";
|
||
ws.Cell("J11").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("J11").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("J11").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("J11").Style.Font.FontSize = 16;
|
||
ws.Cell("J11").Style.Font.Bold = true;
|
||
ws.Cell("K11").Value = personnel.act_1_remaining;
|
||
ws.Cell("K11").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("K11").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("K11").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("K11").Style.Font.FontSize = 16;
|
||
ws.Cell("K11").Style.Font.Bold = true;
|
||
ws.Cell("K11").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
ws.Cell("L11").Value = "ลบ.";
|
||
ws.Cell("L11").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("L11").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("L11").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("L11").Style.Font.FontSize = 16;
|
||
ws.Cell("L11").Style.Font.Bold = true;
|
||
|
||
ws.Cell("M11").Value = "คิดเป็นร้อยละ";
|
||
ws.Cell("M11").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("M11").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("M11").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("M11").Style.Font.FontSize = 16;
|
||
ws.Cell("M11").Style.Font.Bold = true;
|
||
ws.Cell("N11").Value = personnel.act_1_remaining_percentage;
|
||
ws.Cell("N11").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("N11").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("N11").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("N11").Style.Font.FontSize = 16;
|
||
ws.Cell("N11").Style.Font.Bold = true;
|
||
ws.Cell("N11").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
|
||
ws.Cell("D12").Value = "(2) ใช้เงินเลื่อนขั้น (งบกลาง)";
|
||
ws.Cell("D12").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("D12").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("D12").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("D12").Style.Font.FontSize = 16;
|
||
ws.Cell("D12").Style.Font.Bold = true;
|
||
ws.Cell("F12").Value = personnel.money_to_advance;
|
||
ws.Cell("F12").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("F12").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("F12").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("F12").Style.Font.FontSize = 16;
|
||
ws.Cell("F12").Style.Font.Bold = true;
|
||
ws.Cell("F12").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
ws.Cell("G12").Value = "ลบ.";
|
||
ws.Cell("G12").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("G12").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("G12").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("G12").Style.Font.FontSize = 16;
|
||
ws.Cell("G12").Style.Font.Bold = true;
|
||
|
||
ws.Cell("H12").Value = "คิดเป็นร้อยละ";
|
||
ws.Cell("H12").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("H12").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("H12").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("H12").Style.Font.FontSize = 16;
|
||
ws.Cell("H12").Style.Font.Bold = true;
|
||
ws.Cell("I12").Value = personnel.money_to_advance_percentage;
|
||
ws.Cell("I12").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("I12").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("I12").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("I12").Style.Font.FontSize = 16;
|
||
ws.Cell("I12").Style.Font.Bold = true;
|
||
ws.Cell("I12").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
ws.Cell("J12").Value = "ของ พรบ. ปี 2565";
|
||
ws.Cell("J12").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("J12").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("J12").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("J12").Style.Font.FontSize = 16;
|
||
ws.Cell("J12").Style.Font.Bold = true;
|
||
|
||
|
||
ws.Cell("A13").Value = "พรบ.ปี 2565";
|
||
ws.Cell("A13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("A13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("A13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("A13").Style.Font.FontSize = 16;
|
||
ws.Cell("A13").Style.Font.Bold = true;
|
||
|
||
ws.Cell("B13").Value = personnel.act_2;
|
||
ws.Cell("B13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("B13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("B13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("B13").Style.Font.FontSize = 16;
|
||
ws.Cell("B13").Style.Font.Bold = true;
|
||
ws.Cell("B13").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
|
||
ws.Cell("C13").Value = "ลบ.";
|
||
ws.Cell("C13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("C13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("C13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("C13").Style.Font.FontSize = 16;
|
||
ws.Cell("C13").Style.Font.Bold = true;
|
||
ws.Cell("D13").Value = "จ่ายจริง ต.ค.64 - พ.ย.64";
|
||
ws.Cell("D13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("D13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("D13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("D13").Style.Font.FontSize = 16;
|
||
ws.Cell("D13").Style.Font.Bold = true;
|
||
ws.Cell("F13").Value = personnel.act_2_actually_aid;
|
||
ws.Cell("F13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("F13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("F13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("F13").Style.Font.FontSize = 16;
|
||
ws.Cell("F13").Style.Font.Bold = true;
|
||
ws.Cell("F13").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
|
||
ws.Cell("G13").Value = "ลบ.";
|
||
ws.Cell("G13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("G13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("G13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("G13").Style.Font.FontSize = 16;
|
||
ws.Cell("G13").Style.Font.Bold = true;
|
||
ws.Cell("H13").Value = "คิดเป็นร้อยละ";
|
||
ws.Cell("H13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("H13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("H13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("H13").Style.Font.FontSize = 16;
|
||
ws.Cell("H13").Style.Font.Bold = true;
|
||
|
||
ws.Cell("I13").Value = personnel.act_2_actually_aid_percentage;
|
||
ws.Cell("I13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("I13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("I13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("I13").Style.Font.FontSize = 16;
|
||
ws.Cell("I13").Style.Font.Bold = true;
|
||
ws.Cell("I13").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
|
||
ws.Cell("J13").Value = "คงเหลือ";
|
||
ws.Cell("J13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("J13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("J13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("J13").Style.Font.FontSize = 16;
|
||
ws.Cell("J13").Style.Font.Bold = true;
|
||
ws.Cell("K13").Value = personnel.act_2_remaining;
|
||
ws.Cell("K13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("K13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("K13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("K13").Style.Font.FontSize = 16;
|
||
ws.Cell("K13").Style.Font.Bold = true;
|
||
ws.Cell("K13").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
|
||
ws.Cell("L13").Value = "ลบ.";
|
||
ws.Cell("L13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("L13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("L13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("L13").Style.Font.FontSize = 16;
|
||
ws.Cell("L13").Style.Font.Bold = true;
|
||
ws.Cell("M13").Value = "คิดเป็นร้อยละ";
|
||
ws.Cell("M13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("M13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("M13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("M13").Style.Font.FontSize = 16;
|
||
ws.Cell("M13").Style.Font.Bold = true;
|
||
ws.Cell("N13").Value = personnel.act_2_remaining_percentage;
|
||
ws.Cell("N13").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("N13").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("N13").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("N13").Style.Font.FontSize = 16;
|
||
ws.Cell("N13").Style.Font.Bold = true;
|
||
ws.Cell("N13").Style.Border.BottomBorder = XLBorderStyleValues.Dotted;
|
||
|
||
ws.Cell("A14").Value = "(ไม่รวมส่วนควบ)";
|
||
ws.Cell("A14").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("A14").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("A14").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("A14").Style.Font.FontSize = 16;
|
||
|
||
ws.Cell("D14").Value = "(ไม่รวมส่วนควบ)";
|
||
ws.Cell("D14").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("D14").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("D14").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("D14").Style.Font.FontSize = 16;
|
||
ws.Cell("A15").Value = "เฉลี่ยต่อเดือน";
|
||
ws.Cell("A15").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("A15").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("A15").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("A15").Style.Font.FontSize = 16;
|
||
ws.Cell("B15").Value = personnel.average_per_month_1;
|
||
ws.Cell("B15").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("B15").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("B15").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("B15").Style.Font.FontSize = 16;
|
||
|
||
ws.Cell("C15").Value = "ลบ.";
|
||
ws.Cell("C15").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("C15").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("C15").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("C15").Style.Font.FontSize = 16;
|
||
ws.Cell("E15").Value = "เฉลี่ยต่อเดือน";
|
||
ws.Cell("E15").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("E15").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("E15").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("E15").Style.Font.FontSize = 16;
|
||
ws.Cell("F15").Value = personnel.average_per_month_2;
|
||
ws.Cell("F15").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("F15").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("F15").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("F15").Style.Font.FontSize = 16;
|
||
|
||
ws.Cell("G15").Value = "ลบ.";
|
||
ws.Cell("G15").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell("G15").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("G15").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("G15").Style.Font.FontSize = 16;
|
||
|
||
ws.Cell("U15").Value = "หน่วย : ล้านบาท (ทศนิยม 4 ตำแหน่ง)";
|
||
ws.Cell("U15").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell("U15").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("U15").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("U15").Style.Font.SetBold().Font.FontSize = 16;
|
||
//ws.Range("N4:N6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
// ws.Row(4).Height = 30;
|
||
// ws.Row(5).Height = 30;
|
||
// ws.Row(6).Height = 30;
|
||
ws.Column(1).Width = 40;
|
||
ws.Column(2).Width = 12;
|
||
ws.Column(3).Width = 12;
|
||
ws.Column(4).Width = 12;
|
||
ws.Column(5).Width = 12;
|
||
ws.Column(6).Width = 12;
|
||
ws.Column(7).Width = 12;
|
||
ws.Column(8).Width = 12;
|
||
ws.Column(9).Width = 12;
|
||
ws.Column(10).Width = 12;
|
||
ws.Column(11).Width = 12;
|
||
ws.Column(12).Width = 12;
|
||
ws.Column(13).Width = 12;
|
||
ws.Column(14).Width = 12;
|
||
ws.Column(15).Width = 12;
|
||
ws.Column(16).Width = 12;
|
||
ws.Column(17).Width = 12;
|
||
ws.Column(18).Width = 12;
|
||
ws.Column(19).Width = 30;
|
||
ws.Column(20).Width = 12;
|
||
ws.Column(21).Width = 30;
|
||
|
||
int row = 19;
|
||
int headtable = 19;
|
||
|
||
if (personnel != null)
|
||
{
|
||
ws.Range("A16:D18").Merge().Value = "รายการ";
|
||
ws.Range("A16:D18").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("A16:D18").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("A16:D18").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("A16:D18").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("A16:D18").Style.Fill.BackgroundColor = XLColor.FromArgb(214, 220, 228);
|
||
ws.Range("A16:D18").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
|
||
ws.Range("E16:F16").Merge().Value = "งปม. 2565";
|
||
ws.Range("E16:F16").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("E16:F16").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("E16:F16").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("E16:F16").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("E16:F16").Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
|
||
ws.Range("E16:F16").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
|
||
ws.Range("E17:F17").Merge().Value = "พ.ร.บ.";
|
||
ws.Range("E17:F17").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("E17:F17").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("E17:F17").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("E17:F17").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("E17:F17").Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
|
||
ws.Range("E17:F17").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("E18").Value = "อัตรา";
|
||
ws.Cell("E18").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("E18").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("E18").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("E18").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("E18").Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
|
||
ws.Cell("E18").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
|
||
ws.Cell("F18").Value = "งบประมาณ";
|
||
ws.Cell("F18").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("F18").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("F18").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("F18").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("F18").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("F18").Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
|
||
|
||
ws.Range("G16:J16").Merge().Value = "งปม. 2566 (จ่ายจริง ต.ค.- ธ.ค. 64)";
|
||
ws.Range("G16:J16").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("G16:J16").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("G16:J16").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("G16:J16").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("G16:J16").Style.Fill.BackgroundColor = XLColor.FromArgb(214, 220, 228);
|
||
ws.Range("G16:J16").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Range("G17:H17").Merge().Value = "คำขอ";
|
||
ws.Range("G17:H17").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("G17:H17").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("G17:H17").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("G17:H17").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("G17:H17").Style.Fill.BackgroundColor = XLColor.FromArgb(214, 220, 228);
|
||
ws.Range("G17:H17").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Range("I17:J17").Merge().Value = "ข้อเสนอ";
|
||
ws.Range("I17:J17").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("I17:J17").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("I17:J17").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("I17:J17").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("I17:J17").Style.Fill.BackgroundColor = XLColor.FromArgb(214, 220, 228);
|
||
ws.Range("I17:J17").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("G18").Value = "อัตรา";
|
||
ws.Cell("G18").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("G18").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("G18").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("G18").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("G18").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("G18").Style.Fill.BackgroundColor = XLColor.FromArgb(214, 220, 228);
|
||
ws.Cell("H18").Value = "งบประมาณ";
|
||
ws.Cell("H18").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("H18").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("H18").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("H18").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("H18").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("H18").Style.Fill.BackgroundColor = XLColor.FromArgb(214, 220, 228);
|
||
ws.Cell("I18").Value = "อัตรา";
|
||
ws.Cell("I18").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("I18").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("I18").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("I18").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("I18").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("I18").Style.Fill.BackgroundColor = XLColor.FromArgb(214, 220, 228);
|
||
ws.Cell("J18").Value = "งบประมาณ";
|
||
ws.Cell("J18").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("J18").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("J18").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("J18").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("J18").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("J18").Style.Fill.BackgroundColor = XLColor.FromArgb(214, 220, 228);
|
||
|
||
ws.Range("K16:P16").Merge().Value = "MTEF";
|
||
ws.Range("K16:P16").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("K16:P16").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("K16:P16").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("K16:P16").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("K16:P16").Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
|
||
ws.Range("K16:P16").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Range("K17:L17").Merge().Value = "2567";
|
||
ws.Range("K17:L17").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("K17:L17").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("K17:L17").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("K17:L17").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("K17:L17").Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
|
||
ws.Range("K17:L17").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Range("M17:N17").Merge().Value = "2568";
|
||
ws.Range("M17:N17").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("M17:N17").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("M17:N17").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("M17:N17").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("M17:N17").Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
|
||
ws.Range("M17:N17").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Range("O17:P17").Merge().Value = "2569";
|
||
ws.Range("O17:P17").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("O17:P17").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("O17:P17").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("O17:P17").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("O17:P17").Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
|
||
ws.Range("O17:P17").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("K18").Value = "อัตรา";
|
||
ws.Cell("K18").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("K18").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("K18").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("K18").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("K18").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("K18").Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
|
||
ws.Cell("L18").Value = "งบประมาณ";
|
||
ws.Cell("L18").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("L18").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("L18").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("L18").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("L18").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("L18").Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
|
||
ws.Cell("M18").Value = "อัตรา";
|
||
ws.Cell("M18").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("M18").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("M18").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("M18").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("M18").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("M18").Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
|
||
ws.Cell("N18").Value = "งบประมาณ";
|
||
ws.Cell("N18").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("N18").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("N18").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("N18").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("N18").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("N18").Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
|
||
ws.Cell("O18").Value = "อัตรา";
|
||
ws.Cell("O18").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("O18").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("O18").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("O18").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("O18").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("O18").Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
|
||
ws.Cell("P18").Value = "งบประมาณ";
|
||
ws.Cell("P18").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell("P18").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell("P18").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell("P18").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell("P18").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell("P18").Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
|
||
ws.Range("Q16:U18").Merge().Value = "คำชี้แจง";
|
||
ws.Range("Q16:U18").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Range("Q16:U18").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Range("Q16:U18").Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range("Q16:U18").Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range("Q16:U18").Style.Fill.BackgroundColor = XLColor.FromArgb(214, 220, 228);
|
||
ws.Range("Q16:U18").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
|
||
foreach (var detail in personnel.personnel_expense_budget_details)
|
||
{
|
||
if (detail.is_bold == true)
|
||
{
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Merge().Value = detail.topic;
|
||
ws.Cell(row, 5).Value = detail.act_rate;
|
||
ws.Cell(row, 6).Value = detail.act_budget;
|
||
ws.Cell(row, 7).Value = detail.request_rate;
|
||
ws.Cell(row, 8).Value = detail.request_budget;
|
||
ws.Cell(row, 9).Value = detail.offer_rate;
|
||
ws.Cell(row, 10).Value = detail.offer_budget;
|
||
ws.Cell(row, 11).Value = detail.year1_rate;
|
||
ws.Cell(row, 12).Value = detail.year1_budget;
|
||
ws.Cell(row, 13).Value = detail.year2_rate;
|
||
ws.Cell(row, 14).Value = detail.year2_budget;
|
||
ws.Cell(row, 15).Value = detail.year3_rate;
|
||
ws.Cell(row, 16).Value = detail.year3_budget;
|
||
ws.Range(ws.Cell(row, 17), ws.Cell(row, 21)).Merge().Value = detail.remark;
|
||
|
||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 4).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 7).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 8).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 9).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 12).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 13).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 14).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 15).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 16).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 17).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 17), ws.Cell(row, 21)).Merge().Style.Border.OutsideBorder =
|
||
XLBorderStyleValues.Thin;
|
||
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Alignment.Vertical =
|
||
XLAlignmentVerticalValues.Center;
|
||
ws.Range(ws.Cell(row, 5), ws.Cell(row, 16)).Style.NumberFormat.SetFormat("#,#");
|
||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 4).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 6).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 7).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 8).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 9).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 10).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 11).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 12).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 13).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 14).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 15).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 16).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 17).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
|
||
row++;
|
||
}
|
||
|
||
if (detail.is_bold == false)
|
||
{
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Merge().Value = detail.topic;
|
||
ws.Cell(row, 5).Value = detail.act_rate;
|
||
ws.Cell(row, 6).Value = detail.act_budget;
|
||
ws.Cell(row, 7).Value = detail.request_rate;
|
||
ws.Cell(row, 8).Value = detail.request_budget;
|
||
ws.Cell(row, 9).Value = detail.offer_rate;
|
||
ws.Cell(row, 10).Value = detail.offer_budget;
|
||
ws.Cell(row, 11).Value = detail.year1_rate;
|
||
ws.Cell(row, 12).Value = detail.year1_budget;
|
||
ws.Cell(row, 13).Value = detail.year2_rate;
|
||
ws.Cell(row, 14).Value = detail.year2_budget;
|
||
ws.Cell(row, 15).Value = detail.year3_rate;
|
||
ws.Cell(row, 16).Value = detail.year3_budget;
|
||
ws.Range(ws.Cell(row, 17), ws.Cell(row, 21)).Merge().Value = detail.remark;
|
||
|
||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 4).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 7).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 8).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 9).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 12).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 13).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 14).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 15).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 16).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row, 17).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Range(ws.Cell(row, 17), ws.Cell(row, 21)).Merge().Style.Border.OutsideBorder =
|
||
XLBorderStyleValues.Thin;
|
||
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Alignment.Vertical =
|
||
XLAlignmentVerticalValues.Center;
|
||
ws.Range(ws.Cell(row, 5), ws.Cell(row, 16)).Style.NumberFormat.SetFormat("#,#");
|
||
|
||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 4).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 6).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 7).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 8).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 9).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 10).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 11).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 12).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 13).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 14).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 15).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 16).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row, 17).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
|
||
row++;
|
||
}
|
||
|
||
foreach (var detail2 in detail.personnel_expense_budget_details_2)
|
||
{
|
||
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, 7).Value = "ล้านบาท";
|
||
ws.Cell(row + 1, 7).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell(row + 1, 7).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell(row + 1, 7).Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell(row + 1, 7).Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell(row + 1, 19).Value = "หน่วย : ล้านบาท (ทศนิยม 4 ตำแหน่ง)";
|
||
ws.Cell(row + 1, 19).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row + 1, 19).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell(row + 1, 19).Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell(row + 1, 19).Style.Font.SetBold().Font.FontSize = 16;
|
||
|
||
ws.Cell(row + 3, 1).Value = "ประเภท";
|
||
ws.Cell(row + 3, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell(row + 3, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell(row + 3, 1).Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell(row + 3, 1).Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell(row + 2, 1).Style.Fill.BackgroundColor = XLColor.FromArgb(214, 220, 228);
|
||
ws.Cell(row + 3, 1).Style.Fill.BackgroundColor = XLColor.FromArgb(214, 220, 228);
|
||
ws.Cell(row + 4, 1).Style.Fill.BackgroundColor = XLColor.FromArgb(214, 220, 228);
|
||
ws.Cell(row + 4, 1).Style.Border.BottomBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row + 2, 1).Style.Border.TopBorder = XLBorderStyleValues.Thin;
|
||
|
||
ws.Cell(row + 3, 3).Value = "รายการ";
|
||
ws.Cell(row + 3, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
ws.Cell(row + 3, 3).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||
ws.Cell(row + 3, 3).Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Cell(row + 3, 3).Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Cell(row + 2, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
|
||
ws.Cell(row + 2, 3).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
|
||
ws.Cell(row + 2, 4).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
|
||
ws.Cell(row + 3, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(172, 185, 202);
|
||
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.Range(ws.Cell(row + 3, 9), ws.Cell(row + 3, 10)).Merge().Value = "2567";
|
||
ws.Range(ws.Cell(row + 3, 9), ws.Cell(row + 3, 10)).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Center;
|
||
ws.Range(ws.Cell(row + 3, 9), ws.Cell(row + 3, 10)).Style.Alignment.Vertical =
|
||
XLAlignmentVerticalValues.Center;
|
||
ws.Range(ws.Cell(row + 3, 9), ws.Cell(row + 3, 10)).Style.Font.FontName = "TH SarabunPSK";
|
||
ws.Range(ws.Cell(row + 3, 9), ws.Cell(row + 3, 10)).Style.Font.SetBold().Font.FontSize = 16;
|
||
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, 9), ws.Cell(row + 3, 10)).Style.Border.OutsideBorder =
|
||
XLBorderStyleValues.Thin;
|
||
|
||
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.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Center;
|
||
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.Font.FontName = "TH SarabunPSK";
|
||
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)).Style.Fill.BackgroundColor =
|
||
XLColor.FromArgb(172, 185, 202);
|
||
ws.Range(ws.Cell(row + 3, 11), ws.Cell(row + 3, 12)).Style.Border.OutsideBorder =
|
||
XLBorderStyleValues.Thin;
|
||
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.Horizontal =
|
||
XLAlignmentHorizontalValues.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.SetBold().Font.FontSize =
|
||
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.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 == "รวมทั้งสิ้น")
|
||
{
|
||
ws.Cell(row + 5, 2).Value = "รวมทั้งสิ้น";
|
||
ws.Cell(row + 5, 5).Value = detail2.request_rate;
|
||
ws.Cell(row + 5, 6).Value = detail2.request_budget;
|
||
ws.Cell(row + 5, 7).Value = detail2.offer_rate;
|
||
ws.Cell(row + 5, 8).Value = detail2.offer_budget;
|
||
ws.Cell(row + 5, 9).Value = detail2.year1_rate;
|
||
ws.Cell(row + 5, 10).Value = detail2.year1_budget;
|
||
ws.Cell(row + 5, 11).Value = detail2.year2_rate;
|
||
ws.Cell(row + 5, 12).Value = detail2.year2_budget;
|
||
ws.Cell(row + 5, 13).Value = detail2.year3_rate;
|
||
ws.Cell(row + 5, 14).Value = detail2.year3_budget;
|
||
// ws.Cell(row, 15).Value = detail.year3_rate;
|
||
// 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.Cell(row + 5, 1).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.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.TopBorder =
|
||
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, 7).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row + 5, 8).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row + 5, 9).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row + 5, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row + 5, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row + 5, 12).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row + 5, 13).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row + 5, 14).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
|
||
ws.Range(ws.Cell(row + 5, 15), ws.Cell(row + 5, 19)).Merge().Style.Border.OutsideBorder =
|
||
XLBorderStyleValues.Thin;
|
||
|
||
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row, 19)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row, 19)).Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row, 19)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row, 19)).Style.Alignment.Vertical =
|
||
XLAlignmentVerticalValues.Center;
|
||
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.Cell(row + 5, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row + 5, 6).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row + 5, 7).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row + 5, 8).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row + 5, 9).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row + 5, 10).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row + 5, 11).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row + 5, 12).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, 15).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
}
|
||
|
||
if (detail2.is_bold == true)
|
||
{
|
||
ws.Cell(row + 5, 1).Value = detail2.type;
|
||
//ws.Cell(row+5, 2).Value = detail2.list;
|
||
ws.Cell(row + 5, 5).Value = detail2.request_rate;
|
||
ws.Cell(row + 5, 6).Value = detail2.request_budget;
|
||
ws.Cell(row + 5, 7).Value = detail2.offer_rate;
|
||
ws.Cell(row + 5, 8).Value = detail2.offer_budget;
|
||
ws.Cell(row + 5, 9).Value = detail2.year1_rate;
|
||
ws.Cell(row + 5, 10).Value = detail2.year1_budget;
|
||
ws.Cell(row + 5, 11).Value = detail2.year2_rate;
|
||
ws.Cell(row + 5, 12).Value = detail2.year2_budget;
|
||
ws.Cell(row + 5, 13).Value = detail2.year3_rate;
|
||
ws.Cell(row + 5, 14).Value = detail2.year3_budget;
|
||
// ws.Cell(row, 15).Value = detail.year3_rate;
|
||
// 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, 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.BottomBorder =
|
||
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, 7).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row + 5, 8).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row + 5, 9).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row + 5, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row + 5, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row + 5, 12).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row + 5, 13).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row + 5, 14).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
|
||
ws.Range(ws.Cell(row + 5, 15), ws.Cell(row + 5, 19)).Merge().Style.Border.OutsideBorder =
|
||
XLBorderStyleValues.Thin;
|
||
|
||
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row, 19)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row, 19)).Style.Font.SetBold().Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row, 19)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row, 19)).Style.Alignment.Vertical =
|
||
XLAlignmentVerticalValues.Center;
|
||
ws.Range(ws.Cell(row + 5, 5), ws.Cell(row + 5, 14)).Style.NumberFormat.SetFormat("#,#");
|
||
ws.Cell(row + 5, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
ws.Cell(row + 5, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||
|
||
ws.Cell(row + 5, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row + 5, 6).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row + 5, 7).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row + 5, 8).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row + 5, 9).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row + 5, 10).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row + 5, 11).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row + 5, 12).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, 15).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
|
||
|
||
row++;
|
||
}
|
||
|
||
if (detail2.is_bold == false)
|
||
{
|
||
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, 6).Value = detail2.request_budget;
|
||
ws.Cell(row + 5, 7).Value = detail2.offer_rate;
|
||
ws.Cell(row + 5, 8).Value = detail2.offer_budget;
|
||
ws.Cell(row + 5, 9).Value = detail2.year1_rate;
|
||
ws.Cell(row + 5, 10).Value = detail2.year1_budget;
|
||
ws.Cell(row + 5, 11).Value = detail2.year2_rate;
|
||
ws.Cell(row + 5, 12).Value = detail2.year2_budget;
|
||
ws.Cell(row + 5, 13).Value = detail2.year3_rate;
|
||
ws.Cell(row + 5, 14).Value = detail2.year3_budget;
|
||
// ws.Cell(row, 15).Value = detail.year3_rate;
|
||
// 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.Cell(row + 5, 1).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, 4).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, 7).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row + 5, 8).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row + 5, 9).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row + 5, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row + 5, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row + 5, 12).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row + 5, 13).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
ws.Cell(row + 5, 14).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||
|
||
ws.Range(ws.Cell(row + 5, 15), ws.Cell(row + 5, 19)).Merge().Style.Border.OutsideBorder =
|
||
XLBorderStyleValues.Thin;
|
||
|
||
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row + 5, 19)).Style.Font.FontName =
|
||
"TH SarabunPSK";
|
||
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row + 5, 19)).Style.Font.FontSize = 16;
|
||
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row + 5, 19)).Style.Alignment.WrapText = true;
|
||
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row + 5, 19)).Style.Alignment.Vertical =
|
||
XLAlignmentVerticalValues.Center;
|
||
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.Cell(row + 5, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row + 5, 6).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row + 5, 7).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row + 5, 8).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row + 5, 9).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row + 5, 10).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row + 5, 11).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||
ws.Cell(row + 5, 12).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, 15).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||
|
||
|
||
row++;
|
||
}
|
||
}
|
||
}
|
||
|
||
ws.Cell(row + 6, 1).Value = "หมายเหตุ : " + personnel.remark;
|
||
ws.Cell(row + 6, 1).Style.Alignment.Horizontal =
|
||
XLAlignmentHorizontalValues.Left;
|
||
ws.Cell(row + 6, 1).Style.Alignment.Vertical =
|
||
XLAlignmentVerticalValues.Center;
|
||
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.SetBold().Font.FontSize = 16;
|
||
}
|
||
|
||
using (var stream1 = new MemoryStream())
|
||
{
|
||
workbook.SaveAs(stream1);
|
||
var content = stream1.ToArray();
|
||
string date = DateTime.Now.ToString("yyyyMMddHHmmss");
|
||
return File(
|
||
content,
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||
"personnel_expense_budget" + date + ".xlsx");
|
||
}
|
||
}
|
||
}
|
||
} |