update
This commit is contained in:
@@ -484,6 +484,67 @@ namespace rmutr_report.Controllers
|
||||
foreach (var equipments in summary_of_equipments.header_data)
|
||||
{
|
||||
if (equipments.color == 1)
|
||||
{
|
||||
ws.Cell(row, 1).Value = null;
|
||||
ws.Cell(row, 2).Value = equipments.list;
|
||||
ws.Cell(row, 3).Value = null;
|
||||
ws.Cell(row, 4).Value = null;
|
||||
ws.Cell(row, 5).Value = null;
|
||||
ws.Cell(row, 6).Value = null;
|
||||
ws.Cell(row, 7).Value = null;
|
||||
ws.Cell(row, 8).Value = equipments.unit_price;
|
||||
ws.Cell(row, 9).Value = equipments.price_1;
|
||||
ws.Cell(row, 10).Value = equipments.price_2;
|
||||
ws.Cell(row, 11).Value = equipments.price_3;
|
||||
ws.Cell(row, 12).Value = equipments.price_4;
|
||||
ws.Cell(row, 13).Value = equipments.price_5;
|
||||
ws.Cell(row, 14).Value = null;
|
||||
ws.Cell(row, 15).Value = null;
|
||||
ws.Cell(row, 16).Value = null;
|
||||
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.Range(ws.Cell(row, 1), ws.Cell(row, 16)).Style.Font.FontName =
|
||||
"TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 16)).Style.Font.FontSize = 12;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 16)).Style.Alignment.WrapText = true;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 16)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 16)).Style.Fill.BackgroundColor = XLColor.OrangeColorWheel;
|
||||
|
||||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell(row, 4).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell(row, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell(row, 6).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
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.Left;
|
||||
ws.Cell(row, 16).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Range(ws.Cell(row, 8), ws.Cell(row, 14)).Style.NumberFormat.SetFormat("#,#");
|
||||
row++;
|
||||
}
|
||||
if (equipments.color == 2)
|
||||
{
|
||||
ws.Cell(row, 1).Value = null;
|
||||
ws.Cell(row, 2).Value = equipments.list;
|
||||
@@ -547,7 +608,7 @@ namespace rmutr_report.Controllers
|
||||
|
||||
foreach (var equipments1 in equipments.data)
|
||||
{
|
||||
if (equipments1.color == 2)
|
||||
if (equipments1.color == 3)
|
||||
{
|
||||
ws.Cell(row, 1).Value = null;
|
||||
ws.Cell(row, 2).Value = equipments1.faculty_name;
|
||||
@@ -611,7 +672,7 @@ namespace rmutr_report.Controllers
|
||||
|
||||
foreach (var equipments2 in equipments1.data)
|
||||
{
|
||||
if (equipments2.color == 3)
|
||||
if (equipments2.color == 4)
|
||||
{
|
||||
ws.Cell(row, 1).Value = null;
|
||||
ws.Cell(row, 2).Value = equipments2.list;
|
||||
@@ -1132,7 +1193,77 @@ namespace rmutr_report.Controllers
|
||||
ws.Range("H4:S4").Style.Fill.BackgroundColor = XLColor.Gainsboro;
|
||||
foreach (var buildings in summary_building_constructions.header_data)
|
||||
{
|
||||
if (buildings.color == 1)
|
||||
if (buildings.color == 1)
|
||||
{
|
||||
ws.Cell(row, 1).Value = null;
|
||||
ws.Cell(row, 2).Value = buildings.list;
|
||||
ws.Cell(row, 3).Value = null;
|
||||
ws.Cell(row, 4).Value = null;
|
||||
ws.Cell(row, 5).Value = null;
|
||||
ws.Cell(row, 6).Value = null;
|
||||
ws.Cell(row, 7).Value = null;
|
||||
ws.Cell(row, 8).Value = null;
|
||||
ws.Cell(row, 9).Value = null;
|
||||
ws.Cell(row, 10).Value = null;
|
||||
ws.Cell(row, 11).Value = buildings.budget;
|
||||
ws.Cell(row, 12).Value = buildings.price_1;
|
||||
ws.Cell(row, 13).Value = buildings.price_2;
|
||||
ws.Cell(row, 14).Value = buildings.price_3;
|
||||
ws.Cell(row, 15).Value = buildings.price_4;
|
||||
ws.Cell(row, 16).Value = buildings.price_5;
|
||||
ws.Cell(row, 17).Value = null;
|
||||
ws.Cell(row, 18).Value = null;
|
||||
ws.Cell(row, 19).Value = null;
|
||||
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, 19)).Style.Font.FontName =
|
||||
"TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 19)).Style.Font.FontSize = 11;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 19)).Style.Alignment.WrapText = true;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 19)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 19)).Style.Fill.BackgroundColor =
|
||||
XLColor.OrangeColorWheel;
|
||||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell(row, 4).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell(row, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell(row, 6).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell(row, 7).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Cell(row, 8).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell(row, 9).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell(row, 10).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
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.Center;
|
||||
ws.Cell(row, 18).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell(row, 19).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Range(ws.Cell(row, 11), ws.Cell(row, 16)).Style.NumberFormat.SetFormat("#,#");
|
||||
row++;
|
||||
}
|
||||
if (buildings.color == 2)
|
||||
{
|
||||
ws.Cell(row, 1).Value = null;
|
||||
ws.Cell(row, 2).Value = buildings.list;
|
||||
@@ -1206,7 +1337,7 @@ namespace rmutr_report.Controllers
|
||||
foreach (var buildings1 in buildings.data)
|
||||
{
|
||||
|
||||
if (buildings1.color == 2)
|
||||
if (buildings1.color == 3)
|
||||
{
|
||||
ws.Cell(row, 1).Value = null;
|
||||
ws.Cell(row, 2).Value = buildings1.faculty_name;
|
||||
@@ -1284,7 +1415,7 @@ namespace rmutr_report.Controllers
|
||||
foreach (var buildings2 in buildings1.data)
|
||||
{
|
||||
|
||||
if (buildings2.color == 3)
|
||||
if (buildings2.color == 4)
|
||||
{
|
||||
ws.Cell(row, 1).Value = null;
|
||||
ws.Cell(row, 2).Value = buildings2.list;
|
||||
|
||||
Reference in New Issue
Block a user