bug fixed
This commit is contained in:
@@ -150,7 +150,8 @@ namespace rmutr_report.Controllers
|
||||
decimal? sum5 = header.male5 + header.female5;
|
||||
decimal? sum6 = header.male6 + header.female6;
|
||||
|
||||
decimal? sumroom = header.room1 + header.room2 +header.room3 + header.room4 +header.room5 + header.room6;
|
||||
decimal? sumroom = header.room1 + header.room2 + header.room3 + header.room4 + header.room5 +
|
||||
header.room6;
|
||||
|
||||
|
||||
if (header.filter == 1)
|
||||
@@ -181,9 +182,11 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 24).Value = header.female6;
|
||||
ws.Cell(row, 25).Value = sum6;
|
||||
ws.Cell(row, 26).Value = header.room6;
|
||||
ws.Cell(row, 27).Value = header.male7;
|
||||
ws.Cell(row, 28).Value = header.female7;
|
||||
ws.Cell(row, 29).Value = sum1+sum2+sum3+sum4+sum5+sum6;
|
||||
ws.Cell(row, 27).Value = header.male1 + header.male2 + header.male3 + header.male4 +
|
||||
header.male5 + header.male6;
|
||||
ws.Cell(row, 28).Value = header.female1 + header.female2 + header.female3 + header.female4 +
|
||||
header.female5 + header.female6;
|
||||
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
|
||||
ws.Cell(row, 30).Value = sumroom;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
|
||||
@@ -197,8 +200,10 @@ namespace rmutr_report.Controllers
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.NumberFormat.SetFormat("#,#");
|
||||
row++;
|
||||
}
|
||||
|
||||
@@ -232,9 +237,11 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 24).Value = detail.female6;
|
||||
ws.Cell(row, 25).Value = sum6;
|
||||
ws.Cell(row, 26).Value = detail.room6;
|
||||
ws.Cell(row, 27).Value = detail.male7;
|
||||
ws.Cell(row, 28).Value = detail.female7;
|
||||
ws.Cell(row, 29).Value = sum1+sum2+sum3+sum4+sum5+sum6;
|
||||
ws.Cell(row, 27).Value = detail.male1 + detail.male2 + detail.male3 + detail.male4 +
|
||||
detail.male5 + detail.male6;
|
||||
ws.Cell(row, 28).Value = detail.female1 + detail.female2 + detail.female3 + detail.female4 +
|
||||
detail.female5 + detail.female6;
|
||||
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
|
||||
ws.Cell(row, 30).Value = sumroom;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
|
||||
@@ -248,8 +255,11 @@ namespace rmutr_report.Controllers
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.NumberFormat.SetFormat("#,#");
|
||||
rowno++;
|
||||
row++;
|
||||
}
|
||||
@@ -283,9 +293,11 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 24).Value = header.female6;
|
||||
ws.Cell(row, 25).Value = sum6;
|
||||
ws.Cell(row, 26).Value = header.room6;
|
||||
ws.Cell(row, 27).Value = header.male7;
|
||||
ws.Cell(row, 28).Value = header.female7;
|
||||
ws.Cell(row, 29).Value = sum1+sum2+sum3+sum4+sum5+sum6;
|
||||
ws.Cell(row, 27).Value = header.male1 + header.male2 + header.male3 + header.male4 +
|
||||
header.male5 + header.male6;
|
||||
ws.Cell(row, 28).Value = header.female1 + header.female2 + header.female3 + header.female4 +
|
||||
header.female5 + header.female6;
|
||||
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
|
||||
ws.Cell(row, 30).Value = sumroom;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
|
||||
@@ -299,8 +311,11 @@ namespace rmutr_report.Controllers
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.NumberFormat.SetFormat("#,#");
|
||||
|
||||
row++;
|
||||
}
|
||||
|
||||
@@ -318,8 +333,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 10).Value = header.room2;
|
||||
ws.Cell(row, 11).Value = header.male3;
|
||||
ws.Cell(row, 12).Value = header.female3;
|
||||
ws.Cell(row, 13).Value = header.total3;
|
||||
ws.Cell(row, 14).Value = sum3;
|
||||
ws.Cell(row, 13).Value = sum3;
|
||||
ws.Cell(row, 14).Value = header.room3;
|
||||
ws.Cell(row, 15).Value = header.male4;
|
||||
ws.Cell(row, 16).Value = header.female4;
|
||||
ws.Cell(row, 17).Value = sum4;
|
||||
@@ -332,9 +347,11 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 24).Value = header.female6;
|
||||
ws.Cell(row, 25).Value = sum6;
|
||||
ws.Cell(row, 26).Value = header.room6;
|
||||
ws.Cell(row, 27).Value = header.male7;
|
||||
ws.Cell(row, 28).Value = header.female7;
|
||||
ws.Cell(row, 29).Value = sum1+sum2+sum3+sum4+sum5+sum6;
|
||||
ws.Cell(row, 27).Value = header.male1 + header.male2 + header.male3 + header.male4 +
|
||||
header.male5 + header.male6;
|
||||
ws.Cell(row, 28).Value = header.female1 + header.female2 + header.female3 + header.female4 +
|
||||
header.female5 + header.female6;
|
||||
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
|
||||
ws.Cell(row, 30).Value = sumroom;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
|
||||
@@ -348,8 +365,11 @@ namespace rmutr_report.Controllers
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.NumberFormat.SetFormat("#,#");
|
||||
|
||||
row++;
|
||||
}
|
||||
|
||||
@@ -381,13 +401,16 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 24).Value = header.female6;
|
||||
ws.Cell(row, 25).Value = sum6;
|
||||
ws.Cell(row, 26).Value = header.room6;
|
||||
ws.Cell(row, 27).Value = header.male7;
|
||||
ws.Cell(row, 28).Value = header.female7;
|
||||
ws.Cell(row, 29).Value = sum1+sum2+sum3+sum4+sum5+sum6;
|
||||
ws.Cell(row, 27).Value = header.male1 + header.male2 + header.male3 + header.male4 +
|
||||
header.male5 + header.male6;
|
||||
ws.Cell(row, 28).Value = header.female1 + header.female2 + header.female3 + header.female4 +
|
||||
header.female5 + header.female6;
|
||||
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
|
||||
ws.Cell(row, 30).Value = sumroom;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Fill.BackgroundColor = XLColor.BabyBlue;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Fill.BackgroundColor =
|
||||
XLColor.BabyBlue;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Fill.BackgroundColor = XLColor.BabyBlue;
|
||||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
@@ -395,10 +418,14 @@ namespace rmutr_report.Controllers
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.NumberFormat.SetFormat("#,#");
|
||||
|
||||
row++;
|
||||
}
|
||||
|
||||
if (header.filter == (decimal?) 4.1)
|
||||
{
|
||||
foreach (var detail in header.data)
|
||||
@@ -429,9 +456,11 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 24).Value = detail.female6;
|
||||
ws.Cell(row, 25).Value = sum6;
|
||||
ws.Cell(row, 26).Value = detail.room6;
|
||||
ws.Cell(row, 27).Value = detail.male7;
|
||||
ws.Cell(row, 28).Value = detail.female7;
|
||||
ws.Cell(row, 29).Value = sum1+sum2+sum3+sum4+sum5+sum6;
|
||||
ws.Cell(row, 27).Value = detail.male1 + detail.male2 + detail.male3 + detail.male4 +
|
||||
detail.male5 + detail.male6;
|
||||
ws.Cell(row, 28).Value = detail.female1 + detail.female2 + detail.female3 + detail.female4 +
|
||||
detail.female5 + detail.female6;
|
||||
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
|
||||
ws.Cell(row, 30).Value = sumroom;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
|
||||
@@ -445,13 +474,18 @@ namespace rmutr_report.Controllers
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.NumberFormat.SetFormat("#,#");
|
||||
|
||||
rowno++;
|
||||
row++;
|
||||
}
|
||||
//rowno++;
|
||||
}
|
||||
|
||||
if (header.filter == (decimal?) 4.2)
|
||||
{
|
||||
foreach (var detail in header.data)
|
||||
@@ -462,7 +496,8 @@ namespace rmutr_report.Controllers
|
||||
decimal? sums4 = detail.male4 + detail.female4;
|
||||
decimal? sums5 = detail.male5 + detail.female5;
|
||||
decimal? sums6 = detail.male6 + detail.female6;
|
||||
decimal? sumsroom = detail.room1 + detail.room2 +detail.room3 + detail.room4 +detail.room5 + detail.room6;
|
||||
decimal? sumsroom = detail.room1 + detail.room2 + detail.room3 + detail.room4 +
|
||||
detail.room5 + detail.room6;
|
||||
ws.Cell(row, 1).Value = detail.name;
|
||||
ws.Cell(row, 2).Value = null;
|
||||
ws.Cell(row, 3).Value = detail.male1;
|
||||
@@ -489,22 +524,30 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 24).Value = detail.female6;
|
||||
ws.Cell(row, 25).Value = sums6;
|
||||
ws.Cell(row, 26).Value = detail.room6;
|
||||
ws.Cell(row, 27).Value = detail.male7;
|
||||
ws.Cell(row, 28).Value = detail.female7;
|
||||
ws.Cell(row, 29).Value = sums1+sums2+sums3+sums4+sums5+sums6;
|
||||
ws.Cell(row, 27).Value = detail.male1 + detail.male2 + detail.male3 + detail.male4 +
|
||||
detail.male5 + detail.male6;
|
||||
ws.Cell(row, 28).Value = detail.female1 + detail.female2 + detail.female3 + detail.female4 +
|
||||
detail.female5 + detail.female6;
|
||||
ws.Cell(row, 29).Value = sums1 + sums2 + sums3 + sums4 + sums5 + sums6;
|
||||
ws.Cell(row, 30).Value = sumsroom;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
|
||||
// ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
// ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Horizontal =
|
||||
XLAlignmentHorizontalValues.Left;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Horizontal =
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.NumberFormat.SetFormat("#,#");
|
||||
|
||||
row++;
|
||||
}
|
||||
}
|
||||
@@ -537,9 +580,11 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 24).Value = header.female6;
|
||||
ws.Cell(row, 25).Value = sum6;
|
||||
ws.Cell(row, 26).Value = header.room6;
|
||||
ws.Cell(row, 27).Value = header.male7;
|
||||
ws.Cell(row, 28).Value = header.female7;
|
||||
ws.Cell(row, 29).Value = sum1+sum2+sum3+sum4+sum5+sum6;
|
||||
ws.Cell(row, 27).Value = header.male1 + header.male2 + header.male3 + header.male4 +
|
||||
header.male5 + header.male6;
|
||||
ws.Cell(row, 28).Value = header.female1 + header.female2 + header.female3 + header.female4 +
|
||||
header.female5 + header.female6;
|
||||
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
|
||||
ws.Cell(row, 30).Value = sumroom;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
|
||||
@@ -552,10 +597,14 @@ namespace rmutr_report.Controllers
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.NumberFormat.SetFormat("#,#");
|
||||
|
||||
row++;
|
||||
}
|
||||
|
||||
if (header.filter == (decimal?) 5.1)
|
||||
{
|
||||
foreach (var detail in header.data)
|
||||
@@ -594,14 +643,18 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 24).Value = detail.female6;
|
||||
ws.Cell(row, 25).Value = sums6;
|
||||
ws.Cell(row, 26).Value = detail.room6;
|
||||
ws.Cell(row, 27).Value = detail.male7;
|
||||
ws.Cell(row, 28).Value = detail.female7;
|
||||
ws.Cell(row, 29).Value = sums1+sums2+sums3+sums4+sums5+sums6;
|
||||
ws.Cell(row, 27).Value = detail.male1 + detail.male2 + detail.male3 + detail.male4 +
|
||||
detail.male5 + detail.male6;
|
||||
ws.Cell(row, 28).Value = detail.female1 + detail.female2 + detail.female3 + detail.female4 +
|
||||
detail.female5 + detail.female6;
|
||||
ws.Cell(row, 29).Value = sums1 + sums2 + sums3 + sums4 + sums5 + sums6;
|
||||
ws.Cell(row, 30).Value = sumsroom;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Horizontal =
|
||||
XLAlignmentHorizontalValues.Left;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
// ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
// ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
// ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
@@ -610,8 +663,12 @@ namespace rmutr_report.Controllers
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.NumberFormat.SetFormat("#,#");
|
||||
|
||||
row++;
|
||||
}
|
||||
}
|
||||
@@ -644,9 +701,11 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 24).Value = header.female6;
|
||||
ws.Cell(row, 25).Value = sum6;
|
||||
ws.Cell(row, 26).Value = header.room6;
|
||||
ws.Cell(row, 27).Value = header.male7;
|
||||
ws.Cell(row, 28).Value = header.female7;
|
||||
ws.Cell(row, 29).Value = sum1+sum2+sum3+sum4+sum5+sum6;
|
||||
ws.Cell(row, 27).Value = header.male1 + header.male2 + header.male3 + header.male4 +
|
||||
header.male5 + header.male6;
|
||||
ws.Cell(row, 28).Value = header.female1 + header.female2 + header.female3 + header.female4 +
|
||||
header.female5 + header.female6;
|
||||
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
|
||||
ws.Cell(row, 30).Value = sumroom;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
|
||||
@@ -659,8 +718,11 @@ namespace rmutr_report.Controllers
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.NumberFormat.SetFormat("#,#");
|
||||
|
||||
row++;
|
||||
}
|
||||
|
||||
@@ -702,9 +764,11 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 24).Value = detail.female6;
|
||||
ws.Cell(row, 25).Value = sums6;
|
||||
ws.Cell(row, 26).Value = detail.room6;
|
||||
ws.Cell(row, 27).Value = detail.male7;
|
||||
ws.Cell(row, 28).Value = detail.female7;
|
||||
ws.Cell(row, 29).Value = sums1+sums2+sums3+sums4+sums5+sums6;
|
||||
ws.Cell(row, 27).Value = detail.male1 + detail.male2 + detail.male3 + detail.male4 +
|
||||
detail.male5 + detail.male6;
|
||||
ws.Cell(row, 28).Value = detail.female1 + detail.female2 + detail.female3 + detail.female4 +
|
||||
detail.female5 + detail.female6;
|
||||
ws.Cell(row, 29).Value = sums1 + sums2 + sums3 + sums4 + sums5 + sums6;
|
||||
ws.Cell(row, 30).Value = sumsroom;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
|
||||
@@ -716,12 +780,17 @@ namespace rmutr_report.Controllers
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.NumberFormat.SetFormat("#,#");
|
||||
|
||||
rowno++;
|
||||
row++;
|
||||
}
|
||||
}
|
||||
|
||||
if (header.filter == 0)
|
||||
{
|
||||
ws.Cell(row, 1).Value = null;
|
||||
@@ -765,7 +834,8 @@ namespace rmutr_report.Controllers
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
row++;
|
||||
}
|
||||
|
||||
@@ -149,7 +149,8 @@ namespace rmutr_report.Controllers
|
||||
decimal? sum4 = header.male4 + header.female4;
|
||||
decimal? sum5 = header.male5 + header.female5;
|
||||
decimal? sum6 = header.male6 + header.female6;
|
||||
decimal? sumroom = header.room1 + header.room2 +header.room3 + header.room4 +header.room5 + header.room6;
|
||||
decimal? sumroom = header.room1 + header.room2 + header.room3 + header.room4 + header.room5 +
|
||||
header.room6;
|
||||
|
||||
if (header.filter == 1)
|
||||
{
|
||||
@@ -179,9 +180,13 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 24).Value = header.female6;
|
||||
ws.Cell(row, 25).Value = sum6;
|
||||
ws.Cell(row, 26).Value = header.room6;
|
||||
ws.Cell(row, 27).Value = header.male7;
|
||||
ws.Cell(row, 28).Value = header.female7;
|
||||
ws.Cell(row, 29).Value = sum1+sum2+sum3+sum4+sum5+sum6;
|
||||
ws.Cell(row, 27).Value = header.male1 + header.male2 + header.male3 + header.male4 +
|
||||
header.male5 + header.male6;
|
||||
|
||||
ws.Cell(row, 28).Value = header.female1 + header.female2 + header.female3 + header.female4 +
|
||||
header.female5 + header.female6;
|
||||
|
||||
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
|
||||
ws.Cell(row, 30).Value = sumroom;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
|
||||
@@ -195,8 +200,11 @@ namespace rmutr_report.Controllers
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.NumberFormat.SetFormat("#,#");
|
||||
|
||||
row++;
|
||||
}
|
||||
|
||||
@@ -280,9 +288,13 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 24).Value = header.female6;
|
||||
ws.Cell(row, 25).Value = sum6;
|
||||
ws.Cell(row, 26).Value = header.room6;
|
||||
ws.Cell(row, 27).Value = header.male7;
|
||||
ws.Cell(row, 28).Value = header.female7;
|
||||
ws.Cell(row, 29).Value = sum1+sum2+sum3+sum4+sum5+sum6;
|
||||
ws.Cell(row, 27).Value = header.male1 + header.male2 + header.male3 + header.male4 +
|
||||
header.male5 + header.male6;
|
||||
|
||||
ws.Cell(row, 28).Value = header.female1 + header.female2 + header.female3 + header.female4 +
|
||||
header.female5 + header.female6;
|
||||
|
||||
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
|
||||
ws.Cell(row, 30).Value = sumroom;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
|
||||
@@ -296,8 +308,11 @@ namespace rmutr_report.Controllers
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.NumberFormat.SetFormat("#,#");
|
||||
|
||||
row++;
|
||||
}
|
||||
|
||||
@@ -329,9 +344,13 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 24).Value = header.female6;
|
||||
ws.Cell(row, 25).Value = sum6;
|
||||
ws.Cell(row, 26).Value = header.room6;
|
||||
ws.Cell(row, 27).Value = header.male7;
|
||||
ws.Cell(row, 28).Value = header.female7;
|
||||
ws.Cell(row, 29).Value = sum1+sum2+sum3+sum4+sum5+sum6;
|
||||
ws.Cell(row, 27).Value = header.male1 + header.male2 + header.male3 + header.male4 +
|
||||
header.male5 + header.male6;
|
||||
|
||||
ws.Cell(row, 28).Value = header.female1 + header.female2 + header.female3 + header.female4 +
|
||||
header.female5 + header.female6;
|
||||
|
||||
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
|
||||
ws.Cell(row, 30).Value = sumroom;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
|
||||
@@ -345,9 +364,12 @@ namespace rmutr_report.Controllers
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.Underline = XLFontUnderlineValues.Single;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.NumberFormat.SetFormat("#,#");
|
||||
|
||||
row++;
|
||||
}
|
||||
|
||||
@@ -379,9 +401,13 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 24).Value = header.female6;
|
||||
ws.Cell(row, 25).Value = sum6;
|
||||
ws.Cell(row, 26).Value = header.room6;
|
||||
ws.Cell(row, 27).Value = header.male7;
|
||||
ws.Cell(row, 28).Value = header.female7;
|
||||
ws.Cell(row, 29).Value = sum1+sum2+sum3+sum4+sum5+sum6;
|
||||
ws.Cell(row, 27).Value = header.male1 + header.male2 + header.male3 + header.male4 +
|
||||
header.male5 + header.male6;
|
||||
|
||||
ws.Cell(row, 28).Value = header.female1 + header.female2 + header.female3 + header.female4 +
|
||||
header.female5 + header.female6;
|
||||
|
||||
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
|
||||
ws.Cell(row, 30).Value = sumroom;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
|
||||
@@ -393,8 +419,11 @@ namespace rmutr_report.Controllers
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.NumberFormat.SetFormat("#,#");
|
||||
|
||||
row++;
|
||||
}
|
||||
//
|
||||
@@ -476,9 +505,13 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 24).Value = header.female6;
|
||||
ws.Cell(row, 25).Value = sum6;
|
||||
ws.Cell(row, 26).Value = header.room6;
|
||||
ws.Cell(row, 27).Value = header.male7;
|
||||
ws.Cell(row, 28).Value = header.female7;
|
||||
ws.Cell(row, 29).Value = sum1+sum2+sum3+sum4+sum5+sum6;
|
||||
ws.Cell(row, 27).Value = header.male1 + header.male2 + header.male3 + header.male4 +
|
||||
header.male5 + header.male6;
|
||||
|
||||
ws.Cell(row, 28).Value = header.female1 + header.female2 + header.female3 + header.female4 +
|
||||
header.female5 + header.female6;
|
||||
|
||||
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
|
||||
ws.Cell(row, 30).Value = sumroom;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
|
||||
@@ -492,10 +525,14 @@ namespace rmutr_report.Controllers
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.NumberFormat.SetFormat("#,#");
|
||||
|
||||
row++;
|
||||
}
|
||||
|
||||
if (header.filter == 6)
|
||||
{
|
||||
ws.Cell(row, 1).Value = header.header_name;
|
||||
@@ -524,13 +561,18 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 24).Value = header.female6;
|
||||
ws.Cell(row, 25).Value = sum5;
|
||||
ws.Cell(row, 26).Value = header.room6;
|
||||
ws.Cell(row, 27).Value = header.male7;
|
||||
ws.Cell(row, 28).Value = header.female7;
|
||||
ws.Cell(row, 29).Value = sum1+sum2+sum3+sum4+sum5+sum6;
|
||||
ws.Cell(row, 27).Value = header.male1 + header.male2 + header.male3 + header.male4 +
|
||||
header.male5 + header.male6;
|
||||
|
||||
ws.Cell(row, 28).Value = header.female1 + header.female2 + header.female3 + header.female4 +
|
||||
header.female5 + header.female6;
|
||||
|
||||
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
|
||||
ws.Cell(row, 30).Value = sumroom;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Fill.BackgroundColor = XLColor.MintGreen;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Fill.BackgroundColor =
|
||||
XLColor.MintGreen;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Fill.BackgroundColor = XLColor.MintGreen;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Font.Bold = true;
|
||||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
@@ -539,8 +581,11 @@ namespace rmutr_report.Controllers
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.NumberFormat.SetFormat("#,#");
|
||||
|
||||
row++;
|
||||
}
|
||||
|
||||
@@ -582,24 +627,34 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 24).Value = detail.female6;
|
||||
ws.Cell(row, 25).Value = sums6;
|
||||
ws.Cell(row, 26).Value = detail.room6;
|
||||
ws.Cell(row, 27).Value = detail.male7;
|
||||
ws.Cell(row, 28).Value = detail.female7;
|
||||
ws.Cell(row, 29).Value = sums1+sums2+sums3+sums4+sums5+sums6;
|
||||
ws.Cell(row, 27).Value = detail.male1 + detail.male2 + detail.male3 + detail.male4 +
|
||||
detail.male5 + detail.male6;
|
||||
|
||||
ws.Cell(row, 28).Value = detail.female1 + detail.female2 + detail.female3 + detail.female4 +
|
||||
detail.female5 + detail.female6;
|
||||
ws.Cell(row, 29).Value = sums1 + sums2 + sums3 + sums4 + sums5 + sums6;
|
||||
ws.Cell(row, 30).Value = sumsroom;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Horizontal =
|
||||
XLAlignmentHorizontalValues.Left;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Horizontal =
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.NumberFormat.SetFormat("#,#");
|
||||
|
||||
//rowno++;
|
||||
row++;
|
||||
}
|
||||
}
|
||||
|
||||
if (header.filter == 7)
|
||||
{
|
||||
ws.Cell(row, 1).Value = header.header_name;
|
||||
@@ -628,13 +683,18 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 24).Value = header.female6;
|
||||
ws.Cell(row, 25).Value = sum6;
|
||||
ws.Cell(row, 26).Value = header.room6;
|
||||
ws.Cell(row, 27).Value = header.male7;
|
||||
ws.Cell(row, 28).Value = header.female7;
|
||||
ws.Cell(row, 29).Value = sum1+sum2+sum3+sum4+sum5+sum6;
|
||||
ws.Cell(row, 27).Value = header.male1 + header.male2 + header.male3 + header.male4 +
|
||||
header.male5 + header.male6;
|
||||
|
||||
ws.Cell(row, 28).Value = header.female1 + header.female2 + header.female3 + header.female4 +
|
||||
header.female5 + header.female6;
|
||||
|
||||
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
|
||||
ws.Cell(row, 30).Value = sumroom;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Fill.BackgroundColor = XLColor.BabyBlue;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Fill.BackgroundColor =
|
||||
XLColor.BabyBlue;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Fill.BackgroundColor = XLColor.BabyBlue;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Font.Bold = true;
|
||||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
@@ -643,8 +703,11 @@ namespace rmutr_report.Controllers
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.NumberFormat.SetFormat("#,#");
|
||||
|
||||
row++;
|
||||
}
|
||||
|
||||
@@ -686,24 +749,34 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 24).Value = detail.female6;
|
||||
ws.Cell(row, 25).Value = sums6;
|
||||
ws.Cell(row, 26).Value = detail.room6;
|
||||
ws.Cell(row, 27).Value = detail.male7;
|
||||
ws.Cell(row, 28).Value = detail.female7;
|
||||
ws.Cell(row, 29).Value = sums1+sums2+sums3+sums4+sums5+sums6;
|
||||
ws.Cell(row, 27).Value = detail.male1 + detail.male2 + detail.male3 + detail.male4 +
|
||||
detail.male5 + detail.male6;
|
||||
|
||||
ws.Cell(row, 28).Value = detail.female1 + detail.female2 + detail.female3 + detail.female4 +
|
||||
detail.female5 + detail.female6;
|
||||
ws.Cell(row, 29).Value = sums1 + sums2 + sums3 + sums4 + sums5 + sums6;
|
||||
ws.Cell(row, 30).Value = sumsroom;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Horizontal =
|
||||
XLAlignmentHorizontalValues.Left;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Horizontal =
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.NumberFormat.SetFormat("#,#");
|
||||
|
||||
//rowno++;
|
||||
row++;
|
||||
}
|
||||
}
|
||||
|
||||
if (header.filter == 8)
|
||||
{
|
||||
ws.Cell(row, 1).Value = header.header_name;
|
||||
@@ -732,9 +805,12 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 24).Value = header.female6;
|
||||
ws.Cell(row, 25).Value = sum6;
|
||||
ws.Cell(row, 26).Value = header.room6;
|
||||
ws.Cell(row, 27).Value = header.male7;
|
||||
ws.Cell(row, 28).Value = header.female7;
|
||||
ws.Cell(row, 29).Value = sum1+sum2+sum3+sum4+sum5+sum6;
|
||||
ws.Cell(row, 27).Value = header.male1 + header.male2 + header.male3 + header.male4 +
|
||||
header.male5 + header.male6;
|
||||
ws.Cell(row, 28).Value = header.female1 + header.female2 + header.female3 + header.female4 +
|
||||
header.female5 + header.female6;
|
||||
|
||||
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
|
||||
ws.Cell(row, 30).Value = sumroom;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
|
||||
@@ -747,10 +823,14 @@ namespace rmutr_report.Controllers
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.NumberFormat.SetFormat("#,#");
|
||||
|
||||
row++;
|
||||
}
|
||||
|
||||
if (header.filter == (decimal?) 8.1)
|
||||
{
|
||||
foreach (var detail in header.data)
|
||||
@@ -789,14 +869,19 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 24).Value = detail.female6;
|
||||
ws.Cell(row, 25).Value = sums6;
|
||||
ws.Cell(row, 26).Value = detail.room6;
|
||||
ws.Cell(row, 27).Value = detail.male7;
|
||||
ws.Cell(row, 28).Value = detail.female7;
|
||||
ws.Cell(row, 29).Value = sums1+sums2+sums3+sums4+sums5+sums6;
|
||||
ws.Cell(row, 27).Value = detail.male1 + detail.male2 + detail.male3 + detail.male4 +
|
||||
detail.male5 + detail.male6;
|
||||
|
||||
ws.Cell(row, 28).Value = detail.female1 + detail.female2 + detail.female3 + detail.female4 +
|
||||
detail.female5 + detail.female6;
|
||||
ws.Cell(row, 29).Value = sums1 + sums2 + sums3 + sums4 + sums5 + sums6;
|
||||
ws.Cell(row, 30).Value = sumsroom;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Horizontal =
|
||||
XLAlignmentHorizontalValues.Left;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
// ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
// ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
// ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
@@ -805,11 +890,16 @@ namespace rmutr_report.Controllers
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.NumberFormat.SetFormat("#,#");
|
||||
|
||||
row++;
|
||||
}
|
||||
}
|
||||
|
||||
if (header.filter == 0)
|
||||
{
|
||||
ws.Cell(row, 1).Value = null;
|
||||
@@ -853,11 +943,11 @@ namespace rmutr_report.Controllers
|
||||
XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
row++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,32 +21,32 @@ namespace rmutr_report.Models
|
||||
public string header_name { get; set; }
|
||||
public decimal? male1 { get; set; }
|
||||
public decimal? female1 { get; set; }
|
||||
public decimal? total1 { get; set; }
|
||||
//public decimal? total1 { get; set; }
|
||||
public decimal? room1 { get; set; }
|
||||
public decimal? male2 { get; set; }
|
||||
public decimal? female2 { get; set; }
|
||||
public decimal? total2 { get; set; }
|
||||
//public decimal? total2 { get; set; }
|
||||
public decimal? room2 { get; set; }
|
||||
public decimal? male3 { get; set; }
|
||||
public decimal? female3 { get; set; }
|
||||
public decimal? total3{ get; set; }
|
||||
//public decimal? total3{ get; set; }
|
||||
public decimal? room3 { get; set; }
|
||||
public decimal? male4 { get; set; }
|
||||
public decimal? female4 { get; set; }
|
||||
public decimal? total4 { get; set; }
|
||||
// public decimal? total4 { get; set; }
|
||||
public decimal? room4 { get; set; }
|
||||
public decimal? male5 { get; set; }
|
||||
public decimal? female5 { get; set; }
|
||||
public decimal? total5 { get; set; }
|
||||
//public decimal? total5 { get; set; }
|
||||
public decimal? room5 { get; set; }
|
||||
public decimal? male6 { get; set; }
|
||||
public decimal? female6 { get; set; }
|
||||
public decimal? total6 { get; set; }
|
||||
//public decimal? total6 { get; set; }
|
||||
public decimal? room6 { get; set; }
|
||||
public decimal? male7 { get; set; }
|
||||
public decimal? female7 { get; set; }
|
||||
public decimal? total7 { get; set; }
|
||||
public decimal? room7 { get; set; }
|
||||
//public decimal? male7 { get; set; }
|
||||
//public decimal? female7 { get; set; }
|
||||
//public decimal? total7 { get; set; }
|
||||
//public decimal? room7 { get; set; }
|
||||
public List<detail> data { get; set; }
|
||||
}
|
||||
|
||||
@@ -77,8 +77,8 @@ namespace rmutr_report.Models
|
||||
public decimal? female6 { get; set; }
|
||||
//public decimal? total6 { get; set; }
|
||||
public decimal? room6 { get; set; }
|
||||
public decimal? male7 { get; set; }
|
||||
public decimal? female7 { get; set; }
|
||||
//public decimal? male7 { get; set; }
|
||||
//public decimal? female7 { get; set; }
|
||||
// public decimal? total7 { get; set; }
|
||||
//public decimal? room7 { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user