Browse Source

Merge branch 'master' of ssh://10.10.100.21/source/mes-client

章政 8 năm trước cách đây
mục cha
commit
48c932d0e2
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      UAS-MES/PublicMethod/BaseUtil.cs

+ 1 - 1
UAS-MES/PublicMethod/BaseUtil.cs

@@ -1308,7 +1308,7 @@ namespace UAS_MES.PublicMethod
         //将DataRow[] 转换成DataTable
         public static DataTable ToDataTable(DataRow[] rows)
         {
-            if (rows == null || rows.Length == 0) return null;
+            if (rows == null || rows.Length == 0) return new DataTable();
             DataTable tmp = rows[0].Table.Clone();  // 复制DataRow的表结构  
             foreach (DataRow row in rows)
                 tmp.Rows.Add(row.ItemArray);  // 将DataRow添加到DataTable中