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/FrmAlert.cs | 21 +--------------------
WMS/WMS/UI/SynthesizeQuery/FrmPVC.cs | 6 +++---
WMS/WMS/UI/Basic/FrmPermissionManage.cs | 15 +--------------
3 files changed, 5 insertions(+), 37 deletions(-)
diff --git a/WMS/WMS/UI/Basic/FrmPermissionManage.cs b/WMS/WMS/UI/Basic/FrmPermissionManage.cs
index 1eda844..a1d0ea5 100644
--- a/WMS/WMS/UI/Basic/FrmPermissionManage.cs
+++ b/WMS/WMS/UI/Basic/FrmPermissionManage.cs
@@ -151,20 +151,7 @@
/// </summary>
private void InialGroupVsFunction()
{
- //List<RVPVSrv.Role_VS_Permission_View> lst = new List<RVPVSrv.Role_VS_Permission_View>();
- //lst = WMSFrmMain.rvpvSrv.GetRVPByRoleName(oneRole.ROLENAME).ToList();
- //lsB_r_PW.DataSource = null;
- //if (lst == null || lst.Count == 0)//濡傛灉鑾峰彇涓嶅埌鏁版嵁灏辩洿鎺ラ��鍑鸿鍑芥暟
- // return;
- //lsB_r_PW.DataSource = lst;
- //if (WMSFrmMain.LanguageFlg == 0)
- //{
- // lsB_r_PW.DisplayMember = "PERMISSIONNAME";
- //}
- //else if (WMSFrmMain.LanguageFlg == 1)
- //{
- // lsB_r_PW.DisplayMember = "PERMISSIONNAMEENG";
- //}
+
}
diff --git a/WMS/WMS/UI/SynthesizeQuery/FrmAlert.cs b/WMS/WMS/UI/SynthesizeQuery/FrmAlert.cs
index bd1be07..6ffc12e 100644
--- a/WMS/WMS/UI/SynthesizeQuery/FrmAlert.cs
+++ b/WMS/WMS/UI/SynthesizeQuery/FrmAlert.cs
@@ -64,26 +64,7 @@
}
- /// <summary>
- /// 鏍规嵁璧峰鏃堕棿鏌ヨ鏁呴殰璁板綍
- /// </summary>
- /// <param name="startTime">寮�濮嬫椂闂�</param>
- /// <param name="endTime">缁撴潫鏃堕棿</param>
- /// <param name="keyword">鏌ヨ鍏抽敭瀛�</param>
- private void SelectRecorderByTime(DateTime startTime, DateTime endTime, string keyword)
- {
- //if (pageNow <= maxPage && pageNow >= 1)
- //{
- // //鑾峰彇璇ユ椂闂存鍐呮墍鏈変换鍔″垪琛�
- // var alertList = WMSFrmMain.alertSrv.GetAlarmMessagesBydateByPage(cmBWareHouse.SelectedIndex + 1,startTime, endTime, keyword, WMSFrmMain.count, pageNow).ToList();
- // //
- // dGVAlertQuery.DataSource = alertList;
- //}
- //else
- //{
- // dGVAlertQuery.DataSource = null;
- //}
- }
+
private void btn_Export_Click(object sender, EventArgs e)
{
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