From f0e8a2a8bb05e1cd234856853f3ba755acb3ba18 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周三, 27 8月 2025 14:40:35 +0800
Subject: [PATCH] //不能赋值为null,否则会导致UI崩溃 【Editby shaocx,2025-08-27】

---
 WMS/WMS/UI/SynthesizeQuery/FrmPVC.cs |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/WMS/WMS/UI/SynthesizeQuery/FrmPVC.cs b/WMS/WMS/UI/SynthesizeQuery/FrmPVC.cs
index 455dee4..fffdfef 100644
--- a/WMS/WMS/UI/SynthesizeQuery/FrmPVC.cs
+++ b/WMS/WMS/UI/SynthesizeQuery/FrmPVC.cs
@@ -67,7 +67,7 @@
                     if (res.dateAll == null)
                     {
                         ShowWarningTip(res.msg);
-                        dataGridView1.DataSource = null;
+                        dataGridView1.DataSource = new List<yunneiWCS.VproductStock>();//涓嶈兘璧嬪�间负null锛屽惁鍒欎細瀵艰嚧UI宕╂簝 銆怑ditby shaocx,2025-08-27銆�
                         return;
                     }
                     allData = res.dateAll.ToList();
@@ -98,13 +98,13 @@
                     toolStripLabel_dateTotal.Text = "鎬昏鏁�:0鏉�  ";
                     toolStripLabel_quantity.Text = "鐗╂枡鎬绘暟:0浠�";
 
-                    dataGridView1.DataSource = null;
+                    dataGridView1.DataSource = new List<yunneiWCS.VproductStock>();
                     ShowWarningTip("鑾峰彇鏁版嵁涓虹┖ - 璀﹀憡");
                 }
             }
             catch (Exception ex)
             {
-                dataGridView1.DataSource = null;
+                dataGridView1.DataSource = new List<yunneiWCS.VproductStock>();
                 ShowWarningTip("鏌ヨ鍑洪敊浜� - 璀﹀憡");
                 WZ.Useful.Commons.LogTextHelper.WriteLine("FrmPVC", "btnFind_Click", ex.ToString());
 

--
Gitblit v1.9.3