Browse Source

Merge branch 'Release2.3' of http://36.129.163.148:10080/gaoshipeng/OTS2_0 into Release2.3

gaoshipeng 2 years ago
parent
commit
035642f520

+ 1 - 1
OTSIncAReportApp/1-UI/Control_ECharts/EChart_ParticlesComposition.cs

@@ -333,7 +333,7 @@ namespace OTSIncAReportApp.Control_ECharts
 
                 Item item = new Item()
                 {
-                    value = decimal.Round(decimal.Parse(dt.Rows[k]["ar"].ToString()), 2).ToString(),
+                    value =Convert.ToInt32(dt.Rows[k]["ar"]).ToString(),
                     name = name
                 };
                 listData.Add(item);

+ 10 - 2
OTSIncAReportApp/1-UI/OTSTemplateDesigner/Export_ReportTemplate.cs

@@ -1941,14 +1941,22 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             //{
             //    totalInclusionArea = totalInclusionArea + Convert.ToDouble(ls_gv.Rows[i].Cells[2].Value.ToString());
             //}
-            totalInclusionArea= Convert.ToDouble(decimal.Parse(AllAnalysisDetails.Compute("sum(Area)", "").ToString())); 
+            //Convert.ToInt32
+            int sumArea = 0;
+      for(int i=0;i< AllAnalysisDetails.Rows.Count;i++)
+            {
+                sumArea = sumArea + Convert.ToInt32(AllAnalysisDetails.Rows[i]["Area"]);
+            }
+
+                //totalInclusionArea = Convert.ToInt32(AllAnalysisDetails.Compute("sum(Area)", "").ToString());
+            //totalInclusionArea = Convert.ToDouble(decimal.Parse(AllAnalysisDetails.Compute("sum(Area)", "").ToString())); 
             for (int i=0;i< AllAnalysisDetails.Rows.Count;i++)
             {
                 DataRow dr = AreaRatio.NewRow();
                 dr["e1"] = AllAnalysisDetails.Rows[i]["Class"].ToString();
                 dr["e2"] = AllAnalysisDetails.Rows[i]["Name"].ToString();
                 dr["e3"] =  Convert.ToDouble(AllAnalysisDetails.Rows[i]["Area"]);
-                dr["e4"]= Math.Round((Convert.ToDouble(AllAnalysisDetails.Rows[i]["Area"]) / totalInclusionArea) * 100, 2);
+                dr["e4"]= Math.Round((Convert.ToDouble(AllAnalysisDetails.Rows[i]["Area"]) / sumArea) * 100, 2);
                 dr["e5"] = Math.Round((Convert.ToDouble(AllAnalysisDetails.Rows[i]["Area"]) / Convert.ToDouble(m_list_dt.Where(aa => aa.TableName.Contains("ResultGrid")).ToList()[0].Rows[0][5])) * 100, 4);
                 AreaRatio.Rows.Add(dr);
             }