update
This commit is contained in:
@@ -115,55 +115,51 @@ namespace rmutr_report.Controllers
|
|||||||
|
|
||||||
foreach (var boqPrice in building_fours.basic_information)
|
foreach (var boqPrice in building_fours.basic_information)
|
||||||
{
|
{
|
||||||
// string str = boqPrice.list;
|
|
||||||
if (boqPrice.list != null)
|
if (boqPrice.list != null)
|
||||||
{
|
{
|
||||||
boqPrice.list.Split(".");
|
string str = boqPrice.list;
|
||||||
|
string num = String.Concat(str.Where(c => c >= '0' && c <= '9'));
|
||||||
|
|
||||||
|
if (num.Length == 4)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= num.Length - 1; i += 4)
|
||||||
|
{
|
||||||
|
boqPrice.list = num.Insert(i, ",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (num.Length == 5)
|
||||||
|
{
|
||||||
|
for (int i = 2; i <= num.Length - 1; i += 5)
|
||||||
|
{
|
||||||
|
boqPrice.list = num.Insert(i, ",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (num.Length == 6)
|
||||||
|
{
|
||||||
|
for (int i = 3; i <= num.Length - 1; i += 6)
|
||||||
|
{
|
||||||
|
boqPrice.list = num.Insert(i, ",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (num.Length == 7)
|
||||||
|
{
|
||||||
|
for (int i = 1,j=5; i <= num.Length -1 ;i +=7,j+=7)
|
||||||
|
{
|
||||||
|
boqPrice.list = num.Insert(i, ",").Insert(j,",");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (boqPrice.list == "20000000.0000")
|
}
|
||||||
|
else if (num.Length == 8)
|
||||||
|
{ for (int i = 2,j=6; i <= num.Length -1 ;i +=8,j+=8)
|
||||||
|
{
|
||||||
|
boqPrice.list = num.Insert(i, ",").Insert(j,",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (boqPrice.list=="20000000.0000")
|
||||||
{
|
{
|
||||||
boqPrice.list = "20,000,000";
|
boqPrice.list = "20,000,000";
|
||||||
}
|
}
|
||||||
// if (str.Length == 4)
|
|
||||||
// {
|
|
||||||
// for (int i = 1; i <= str.Length - 1; i += 4)
|
|
||||||
// {
|
|
||||||
// boqPrice.list = str.Insert(i, ",");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (str.Length == 5)
|
|
||||||
// {
|
|
||||||
// for (int i = 2; i <= str.Length - 1; i += 5)
|
|
||||||
// {
|
|
||||||
// boqPrice.list = str.Insert(i, ",");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// else if (str.Length == 6)
|
|
||||||
// {
|
|
||||||
// for (int i = 3; i <= str.Length - 1; i += 6)
|
|
||||||
// {
|
|
||||||
// boqPrice.list = str.Insert(i, ",");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// else if (str.Length == 7)
|
|
||||||
// {
|
|
||||||
// for (int i = 1,j=5; i <= str.Length -1 ;i +=7,j+=7)
|
|
||||||
// {
|
|
||||||
// boqPrice.list = str.Insert(i, ",").Insert(j,",");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// if (str.Length == 8)
|
|
||||||
// { for (int i = 2,j=6; i <= str.Length -1 ;i +=8,j+=8)
|
|
||||||
// {
|
|
||||||
// boqPrice.list = str.Insert(i, ",").Insert(j,",");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (boqPrice.list == "10000000")
|
|
||||||
{
|
|
||||||
boqPrice.list = "10,000,000";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using FastReport;
|
using FastReport;
|
||||||
using FastReport.Export.Csv;
|
using FastReport.Export.Csv;
|
||||||
using FastReport.Export.Mht;
|
using FastReport.Export.Mht;
|
||||||
@@ -116,51 +117,52 @@ namespace rmutr_report.Controllers
|
|||||||
|
|
||||||
foreach (var boqPrice in building_fours.basic_information)
|
foreach (var boqPrice in building_fours.basic_information)
|
||||||
{
|
{
|
||||||
if (boqPrice.list == "20000000.0000")
|
if (boqPrice.list != null)
|
||||||
|
{
|
||||||
|
string str = boqPrice.list;
|
||||||
|
string num = String.Concat(str.Where(c => c >= '0' && c <= '9'));
|
||||||
|
|
||||||
|
if (num.Length == 4)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= num.Length - 1; i += 4)
|
||||||
|
{
|
||||||
|
boqPrice.list = num.Insert(i, ",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (num.Length == 5)
|
||||||
|
{
|
||||||
|
for (int i = 2; i <= num.Length - 1; i += 5)
|
||||||
|
{
|
||||||
|
boqPrice.list = num.Insert(i, ",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (num.Length == 6)
|
||||||
|
{
|
||||||
|
for (int i = 3; i <= num.Length - 1; i += 6)
|
||||||
|
{
|
||||||
|
boqPrice.list = num.Insert(i, ",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (num.Length == 7)
|
||||||
|
{
|
||||||
|
for (int i = 1,j=5; i <= num.Length -1 ;i +=7,j+=7)
|
||||||
|
{
|
||||||
|
boqPrice.list = num.Insert(i, ",").Insert(j,",");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (num.Length == 8)
|
||||||
|
{ for (int i = 2,j=6; i <= num.Length -1 ;i +=8,j+=8)
|
||||||
|
{
|
||||||
|
boqPrice.list = num.Insert(i, ",").Insert(j,",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (boqPrice.list=="20000000.0000")
|
||||||
{
|
{
|
||||||
boqPrice.list = "20,000,000";
|
boqPrice.list = "20,000,000";
|
||||||
}
|
}
|
||||||
//string str = boqPrice.list.Split(".").ToString();
|
}
|
||||||
// if (str.Length == 4)
|
|
||||||
// {
|
|
||||||
// for (int i = 1; i <= str.Length - 1; i += 4)
|
|
||||||
// {
|
|
||||||
// boqPrice.list = str.Insert(i, ",");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// else if (str.Length == 5)
|
|
||||||
// {
|
|
||||||
// for (int i = 2; i <= str.Length - 1; i += 5)
|
|
||||||
// {
|
|
||||||
// boqPrice.list = str.Insert(i, ",");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// else if (str.Length == 6)
|
|
||||||
// {
|
|
||||||
// for (int i = 3; i <= str.Length - 1; i += 6)
|
|
||||||
// {
|
|
||||||
// boqPrice.list = str.Insert(i, ",");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// else if (str.Length == 7)
|
|
||||||
// {
|
|
||||||
// for (int i = 1,j=5; i <= str.Length -1 ;i +=7,j+=7)
|
|
||||||
// {
|
|
||||||
// boqPrice.list = str.Insert(i, ",").Insert(j,",");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// else if (str.Length == 8)
|
|
||||||
// { for (int i = 2,j=6; i <= str.Length -1 ;i +=8,j+=8)
|
|
||||||
// {
|
|
||||||
// boqPrice.list = str.Insert(i, ",").Insert(j,",");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (boqPrice.list == "10000000")
|
|
||||||
// {
|
|
||||||
// boqPrice.list = "10,000,000";
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var boqPrice in building_fours.boq)
|
foreach (var boqPrice in building_fours.boq)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="03/01/2023 13:13:10" ReportInfo.Modified="05/17/2023 11:53:02" ReportInfo.CreatorVersion="2021.1.0.0">
|
<Report ScriptLanguage="CSharp" ReportInfo.Created="03/01/2023 13:13:10" ReportInfo.Modified="05/17/2023 12:15:15" ReportInfo.CreatorVersion="2021.1.0.0">
|
||||||
<Dictionary>
|
<Dictionary>
|
||||||
<BusinessObjectDataSource Name="budget_summary_report" ReferenceName="budget_summary_report" DataType="null" Enabled="true">
|
<BusinessObjectDataSource Name="budget_summary_report" ReferenceName="budget_summary_report" DataType="null" Enabled="true">
|
||||||
<Column Name="budget_year" DataType="System.String"/>
|
<Column Name="budget_year" DataType="System.String"/>
|
||||||
@@ -1204,13 +1204,13 @@
|
|||||||
</Formats>
|
</Formats>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell Name="Cell453" Border.Lines="All" Text="[budget_summary_report.durable_articles_1.durable_articles_2.durable_articles_3.durable_articles_4.durable_articles_detail.budget]" Format="Number" Format.UseLocale="true" Format.DecimalDigits="0" HorzAlign="Right" VertAlign="Center" Font="TH Sarabun New, 12pt"/>
|
<TableCell Name="Cell453" Border.Lines="All" Text="[budget_summary_report.durable_articles_1.durable_articles_2.durable_articles_3.durable_articles_4.durable_articles_detail.budget]" Format="Number" Format.UseLocale="true" Format.DecimalDigits="0" HorzAlign="Right" VertAlign="Center" Font="TH Sarabun New, 12pt"/>
|
||||||
<TableCell Name="Cell454" Border.Lines="All" Text="[budget_summary_report.durable_articles_1.durable_articles_2.durable_articles_3.durable_articles_4.durable_articles_detail.company]" AutoShrink="FontSize" AutoShrinkMinSize="7" VertAlign="Center" Font="TH Sarabun New, 12pt"/>
|
<TableCell Name="Cell454" Border.Lines="All" Text="[budget_summary_report.durable_articles_1.durable_articles_2.durable_articles_3.durable_articles_4.durable_articles_detail.company]" AutoShrink="FontSize" AutoShrinkMinSize="6" VertAlign="Center" Font="TH Sarabun New, 12pt"/>
|
||||||
<TableCell Name="Cell455" Border.Lines="All" Text="[budget_summary_report.durable_articles_1.durable_articles_2.durable_articles_3.durable_articles_4.durable_articles_detail.in_country]" AutoShrink="FontSize" AutoShrinkMinSize="10" VertAlign="Center" Font="TH Sarabun New, 12pt"/>
|
<TableCell Name="Cell455" Border.Lines="All" Text="[budget_summary_report.durable_articles_1.durable_articles_2.durable_articles_3.durable_articles_4.durable_articles_detail.in_country]" AutoShrink="FontSize" AutoShrinkMinSize="10" VertAlign="Center" Font="TH Sarabun New, 12pt"/>
|
||||||
<TableCell Name="Cell456" Border.Lines="All" Text="[budget_summary_report.durable_articles_1.durable_articles_2.durable_articles_3.durable_articles_4.durable_articles_detail.out_country]" AutoShrink="FontSize" AutoShrinkMinSize="10" VertAlign="Center" Font="TH Sarabun New, 12pt"/>
|
<TableCell Name="Cell456" Border.Lines="All" Text="[budget_summary_report.durable_articles_1.durable_articles_2.durable_articles_3.durable_articles_4.durable_articles_detail.out_country]" AutoShrink="FontSize" AutoShrinkMinSize="10" VertAlign="Center" Font="TH Sarabun New, 12pt"/>
|
||||||
<TableCell Name="Cell457" Border.Lines="All" Text="[budget_summary_report.durable_articles_1.durable_articles_2.durable_articles_3.durable_articles_4.durable_articles_detail.type_1]" VertAlign="Center" Font="TH Sarabun New, 12pt"/>
|
<TableCell Name="Cell457" Border.Lines="All" Text="[budget_summary_report.durable_articles_1.durable_articles_2.durable_articles_3.durable_articles_4.durable_articles_detail.type_1]" VertAlign="Center" Font="TH Sarabun New, 12pt"/>
|
||||||
<TableCell Name="Cell458" Border.Lines="All" Text="[budget_summary_report.durable_articles_1.durable_articles_2.durable_articles_3.durable_articles_4.durable_articles_detail.type_2]" VertAlign="Center" Font="TH Sarabun New, 12pt"/>
|
<TableCell Name="Cell458" Border.Lines="All" Text="[budget_summary_report.durable_articles_1.durable_articles_2.durable_articles_3.durable_articles_4.durable_articles_detail.type_2]" VertAlign="Center" Font="TH Sarabun New, 12pt"/>
|
||||||
<TableCell Name="Cell459" Border.Lines="All" Text="[budget_summary_report.durable_articles_1.durable_articles_2.durable_articles_3.durable_articles_4.durable_articles_detail.type_3]" VertAlign="Center" Font="TH Sarabun New, 12pt"/>
|
<TableCell Name="Cell459" Border.Lines="All" Text="[budget_summary_report.durable_articles_1.durable_articles_2.durable_articles_3.durable_articles_4.durable_articles_detail.type_3]" VertAlign="Center" Font="TH Sarabun New, 12pt"/>
|
||||||
<TableCell Name="Cell460" Border.Lines="All" Text="[budget_summary_report.durable_articles_1.durable_articles_2.durable_articles_3.durable_articles_4.durable_articles_detail.remark]" AutoShrink="FontSize" AutoShrinkMinSize="7" VertAlign="Center" Font="TH Sarabun New, 12pt"/>
|
<TableCell Name="Cell460" Border.Lines="All" Text="[budget_summary_report.durable_articles_1.durable_articles_2.durable_articles_3.durable_articles_4.durable_articles_detail.remark]" AutoShrink="FontSize" AutoShrinkMinSize="6" VertAlign="Center" Font="TH Sarabun New, 12pt"/>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableObject>
|
</TableObject>
|
||||||
</DataBand>
|
</DataBand>
|
||||||
@@ -1761,7 +1761,7 @@
|
|||||||
<Condition Expression="[budget_summary_report.building_1.building_2.building_3.data_3.data_3_detail.color]== 1" Fill.Color="192, 255, 192" Font="Arial, 10pt" ApplyFill="true" ApplyTextFill="false"/>
|
<Condition Expression="[budget_summary_report.building_1.building_2.building_3.data_3.data_3_detail.color]== 1" Fill.Color="192, 255, 192" Font="Arial, 10pt" ApplyFill="true" ApplyTextFill="false"/>
|
||||||
</Highlight>
|
</Highlight>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell Name="Cell570" Border.Lines="All" Text="[budget_summary_report.building_1.building_2.building_3.data_3.data_3_detail.remark]" AutoShrink="FontSize" AutoShrinkMinSize="7" VertAlign="Center" Font="TH Sarabun New, 12pt">
|
<TableCell Name="Cell570" Border.Lines="All" Text="[budget_summary_report.building_1.building_2.building_3.data_3.data_3_detail.remark]" AutoShrink="FontSize" AutoShrinkMinSize="6" VertAlign="Center" Font="TH Sarabun New, 12pt">
|
||||||
<Highlight>
|
<Highlight>
|
||||||
<Condition Expression="[budget_summary_report.building_1.building_2.building_3.data_3.data_3_detail.color]== 1" Fill.Color="192, 255, 192" Font="Arial, 10pt" ApplyFill="true" ApplyTextFill="false"/>
|
<Condition Expression="[budget_summary_report.building_1.building_2.building_3.data_3.data_3_detail.color]== 1" Fill.Color="192, 255, 192" Font="Arial, 10pt" ApplyFill="true" ApplyTextFill="false"/>
|
||||||
</Highlight>
|
</Highlight>
|
||||||
|
|||||||
Reference in New Issue
Block a user