Browse Source

修改溯源bugs

gaoshipeng 2 years ago
parent
commit
fb73263359
1 changed files with 8 additions and 5 deletions
  1. 8 5
      OTSInclusionsTraceability/OTSInclusionsTraceability.cs

+ 8 - 5
OTSInclusionsTraceability/OTSInclusionsTraceability.cs

@@ -177,13 +177,9 @@ namespace OTSInclusionsTraceability
             {
                 return;
             }
-
+            dgV_Traceablilty.Rows.Clear();
             //获取需要显示的元素名
             List<string> ElementTypeSort = new List<string>(sElementsColName.Split(',').ToList());//去重
-            for (int i = 0; i < ElementTypeSort.Count; i++)
-            {
-                dgV_Traceablilty.Columns.Add(ElementTypeSort[i], ElementTypeSort[i]);
-            }
             //double jd = 95f / (double)particles.Rows.Count;//计算进度刻度
             string filePath = "";
             if (RetDBAddress.Contains("db"))
@@ -433,6 +429,13 @@ namespace OTSInclusionsTraceability
 
                 }
             }
+
+            //获取需要显示的元素名
+            List<string> ElementTypeSort = new List<string>(sElementsColName.Split(',').ToList());//去重
+            for (int i = 0; i < ElementTypeSort.Count; i++)
+            {
+                dgV_Traceablilty.Columns.Add(ElementTypeSort[i], ElementTypeSort[i]);
+            }
             #endregion
         }