Explorar o código

修改溯源bugs

gaoshipeng %!s(int64=2) %!d(string=hai) anos
pai
achega
fb73263359
Modificáronse 1 ficheiros con 8 adicións e 5 borrados
  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
         }