From 604d18edb170bfedaf1a92dd9f076451af0380a0 Mon Sep 17 00:00:00 2001 From: kamonwan taengsuk Date: Mon, 15 May 2023 13:51:53 +0700 Subject: [PATCH] fixed --- Controllers/building_four.Controller.cs | 73 +++++++++++++------------ 1 file changed, 38 insertions(+), 35 deletions(-) diff --git a/Controllers/building_four.Controller.cs b/Controllers/building_four.Controller.cs index 924bf2a..08d357d 100644 --- a/Controllers/building_four.Controller.cs +++ b/Controllers/building_four.Controller.cs @@ -116,43 +116,46 @@ namespace rmutr_report.Controllers foreach (var boqPrice in building_fours.basic_information) { - - string str = boqPrice.list.Split(".").ToString(); - if (str.Length == 4) + if (boqPrice.list == "20000000.0000") { - 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,","); - } + 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") // {