From 70a7a9e5907c81b6378809d94e8e26eb87e67538 Mon Sep 17 00:00:00 2001 From: kamonwan taengsuk Date: Tue, 28 Mar 2023 13:13:13 +0700 Subject: [PATCH] fixed --- Controllers/building_four.Controller.cs | 68 +++++++++++++------------ 1 file changed, 36 insertions(+), 32 deletions(-) diff --git a/Controllers/building_four.Controller.cs b/Controllers/building_four.Controller.cs index 0c385a3..fc38847 100644 --- a/Controllers/building_four.Controller.cs +++ b/Controllers/building_four.Controller.cs @@ -146,21 +146,23 @@ namespace rmutr_report.Controllers boqPrice.list = str.Insert(i, ","); } } - else if (str.Length == 8) - { - for (int i = 3; i <= str.Length - 1; i += 8) - { - boqPrice.list = str.Insert(i, ","); - //boqPrice.list = str.Insert(i, ","); - } - for (int i = 5; i <= str.Length - 1; i += 8) - { - boqPrice.list = str.Insert(i, ","); - //boqPrice.list = str.Insert(i, ","); - } - boqPrice.list.Replace("10000000", "10,000,000"); - boqPrice.list.Replace("10000000.0000", "10,000,000"); - } + // else if (str.Length == 8) + // { + // for (int i = 3; i <= str.Length - 1; i += 8) + // { + // boqPrice.list = str.Insert(i, ","); + // //boqPrice.list = str.Insert(i, ","); + // } + // for (int i = 5; i <= str.Length - 1; i += 8) + // { + // boqPrice.list = str.Insert(i, ","); + // //boqPrice.list = str.Insert(i, ","); + // } + // boqPrice.list.Replace("10000000", "10,000,000"); + // boqPrice.list.Replace("10000000.0000", "10,000,000"); + // } + boqPrice.list.Replace("10000000", "10,000,000"); + boqPrice.list.Replace("10000000.0000", "10,000,000"); } foreach (var boqPrice in building_fours.boq) @@ -196,23 +198,25 @@ namespace rmutr_report.Controllers boqPrice.have = str.Insert(i, ","); } } - else if (str.Length == 8) - { - for (int i = 3; i <= str.Length - 1; i += 8) - { - boqPrice.have = str.Insert(i, ","); - //boqPrice.have = str.Insert(i, ","); - } - for (int i = 5; i <= str.Length - 1; i += 8) - { - boqPrice.have = str.Insert(i, ","); - //boqPrice.list = str.Insert(i, ","); - } - - boqPrice.have.Replace("10000000", "10,000,000"); - boqPrice.have.Replace("10000000.0000", "10,000,000"); - - } + // else if (str.Length == 8) + // { + // for (int i = 3; i <= str.Length - 1; i += 8) + // { + // boqPrice.have = str.Insert(i, ","); + // //boqPrice.have = str.Insert(i, ","); + // } + // for (int i = 5; i <= str.Length - 1; i += 8) + // { + // boqPrice.have = str.Insert(i, ","); + // //boqPrice.list = str.Insert(i, ","); + // } + // + // boqPrice.have.Replace("10000000", "10,000,000"); + // boqPrice.have.Replace("10000000.0000", "10,000,000"); + // + // } + boqPrice.have.Replace("10000000", "10,000,000"); + boqPrice.have.Replace("10000000.0000", "10,000,000"); boqPrice.text1 = "- มี วงเงิน "+ boqPrice.have + " บาท"; boqPrice.text2 = "- ดำเนินการจัดทำ BOQ เดือน "+ boqPrice.pending_boq_month; boqPrice.text3 = "- BOQ แล้วเสร็จเดือน "+ boqPrice.done_boq_month;