bug fixed
This commit is contained in:
@@ -544,7 +544,71 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 8), ws.Cell(row, 14)).Style.NumberFormat.SetFormat("#,#");
|
||||
row++;
|
||||
}
|
||||
if (equipments.color == 2)
|
||||
// if (equipments.color == 2)
|
||||
// {
|
||||
// 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.BabyBlue;
|
||||
//
|
||||
// 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++;
|
||||
// }
|
||||
|
||||
foreach (var equipments1 in equipments.data)
|
||||
{
|
||||
if (equipments1.color == 2)
|
||||
{
|
||||
ws.Cell(row, 1).Value = null;
|
||||
ws.Cell(row, 2).Value = equipments.list;
|
||||
@@ -606,9 +670,10 @@ namespace rmutr_report.Controllers
|
||||
row++;
|
||||
}
|
||||
|
||||
foreach (var equipments1 in equipments.data)
|
||||
{
|
||||
if (equipments1.color == 3)
|
||||
|
||||
foreach (var equipments2 in equipments1.data)
|
||||
{
|
||||
if (equipments2.color == 3)
|
||||
{
|
||||
ws.Cell(row, 1).Value = null;
|
||||
ws.Cell(row, 2).Value = equipments1.faculty_name;
|
||||
@@ -670,9 +735,10 @@ namespace rmutr_report.Controllers
|
||||
row++;
|
||||
}
|
||||
|
||||
foreach (var equipments2 in equipments1.data)
|
||||
{
|
||||
if (equipments2.color == 4)
|
||||
|
||||
foreach (var equipment3 in equipments2.data)
|
||||
{
|
||||
if (equipment3.color == 4)
|
||||
{
|
||||
ws.Cell(row, 1).Value = null;
|
||||
ws.Cell(row, 2).Value = equipments2.list;
|
||||
@@ -733,9 +799,6 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 8), ws.Cell(row, 14)).Style.NumberFormat.SetFormat("#,#");
|
||||
row++;
|
||||
}
|
||||
|
||||
foreach (var equipment3 in equipments2.data)
|
||||
{
|
||||
ws.Cell(row, 1).Value = no;
|
||||
no++;
|
||||
ws.Cell(row, 2).Value = equipment3.list;
|
||||
@@ -1263,7 +1326,11 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 11), ws.Cell(row, 16)).Style.NumberFormat.SetFormat("#,#");
|
||||
row++;
|
||||
}
|
||||
if (buildings.color == 2)
|
||||
|
||||
|
||||
foreach (var buildings1 in buildings.data)
|
||||
{
|
||||
if (buildings1.color == 2)
|
||||
{
|
||||
ws.Cell(row, 1).Value = null;
|
||||
ws.Cell(row, 2).Value = buildings.list;
|
||||
@@ -1334,10 +1401,9 @@ namespace rmutr_report.Controllers
|
||||
row++;
|
||||
}
|
||||
|
||||
foreach (var buildings1 in buildings.data)
|
||||
{
|
||||
|
||||
if (buildings1.color == 3)
|
||||
foreach (var buildings2 in buildings1.data)
|
||||
{
|
||||
if (buildings2.color == 3)
|
||||
{
|
||||
ws.Cell(row, 1).Value = null;
|
||||
ws.Cell(row, 2).Value = buildings1.faculty_name;
|
||||
@@ -1412,10 +1478,11 @@ namespace rmutr_report.Controllers
|
||||
row++;
|
||||
}
|
||||
|
||||
foreach (var buildings2 in buildings1.data)
|
||||
{
|
||||
|
||||
if (buildings2.color == 4)
|
||||
|
||||
foreach (var building3 in buildings2.data)
|
||||
{
|
||||
if (building3.color == 4)
|
||||
{
|
||||
ws.Cell(row, 1).Value = null;
|
||||
ws.Cell(row, 2).Value = buildings2.list;
|
||||
@@ -1489,9 +1556,6 @@ namespace rmutr_report.Controllers
|
||||
.SetFormat("#,#");
|
||||
row++;
|
||||
}
|
||||
|
||||
foreach (var building3 in buildings2.data)
|
||||
{
|
||||
ws.Cell(row, 1).Value = no;
|
||||
no++;
|
||||
ws.Cell(row, 2).Value = building3.list;
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace rmutr_report.Models
|
||||
|
||||
public class summary_building_construction_detail3
|
||||
{
|
||||
//public int? no { get; set; }
|
||||
public int? color { get; set; }
|
||||
public string list { get; set; }
|
||||
public decimal? total { get; set; }
|
||||
public string lesser { get; set; }
|
||||
|
||||
@@ -55,7 +55,9 @@ namespace rmutr_report.Models
|
||||
|
||||
}
|
||||
public class summary_of_equipment_five_year_detail3
|
||||
{ public string list { get; set; }
|
||||
{
|
||||
public int? color { get; set; }
|
||||
public string list { get; set; }
|
||||
public string type_1 { get; set; }
|
||||
public string type_2 { get; set; }
|
||||
public string type_3 { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user