bug fixed

This commit is contained in:
kamonwan taengsuk
2022-10-28 12:02:19 +07:00
parent 2758ea46c3
commit 8a5c27d6ae
3 changed files with 8 additions and 5 deletions

View File

@@ -118,7 +118,7 @@ namespace rmutr_report.Controllers
int col = 1;
int row = 3;
int no = 1;
int rowno = 1;
foreach (var kpis in _kpi)
{
if (_kpi != null)
@@ -165,12 +165,14 @@ namespace rmutr_report.Controllers
row++;
}
var data = kpis.header_data.Select(d => d.data).ToList();
foreach (var detail in data)
{
foreach (var data1 in detail)
{
ws.Cell(row, 2).Value = data1.row;
ws.Cell(row, 2).Value = rowno;
ws.Cell(row, 3).Value = data1.name;
ws.Cell(row, 4).Value = data1.unit;
ws.Cell(row, 5).Value = data1.value;
@@ -210,6 +212,7 @@ namespace rmutr_report.Controllers
ws.Cell(row, 8).Style.Border.RightBorder = XLBorderStyleValues.Thin;
ws.Cell(row, 8).Style.Alignment.WrapText = true;
row++;
rowno++;
}
//row++;
}

View File

@@ -558,7 +558,7 @@ namespace rmutr_report.Controllers
ws.Row(4).Height = 30;
ws.Row(5).Height = 30;
ws.Row(6).Height = 30;
ws.Column(1).Width = 10;
ws.Column(1).Width = 9;
ws.Column(2).Width = 40;
ws.Column(3).Width = 5;
ws.Column(4).Width = 5;
@@ -576,7 +576,7 @@ namespace rmutr_report.Controllers
ws.Column(16).Width = 5;
ws.Column(17).Width = 15;
ws.Column(18).Width = 15;
ws.Column(19).Width = 40;
ws.Column(19).Width = 50;
int row = 7;
int no = 1;

View File

@@ -21,7 +21,7 @@ namespace rmutr_report.Models
public class kpi_data_details
{
public int? row { get; set; }
//public int? row { get; set; }
public string name { get; set; }
public string unit { get; set; }
public int? value { get; set; }