schangxiang@126.com
2025-08-27 f0e8a2a8bb05e1cd234856853f3ba755acb3ba18
//不能赋值为null,否则会导致UI崩溃 【Editby shaocx,2025-08-27】
已修改3个文件
42 ■■■■ 文件已修改
WMS/WMS/UI/Basic/FrmPermissionManage.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WMS/WMS/UI/SynthesizeQuery/FrmAlert.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WMS/WMS/UI/SynthesizeQuery/FrmPVC.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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";
            //}
        }
      
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)
        {
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崩溃 【Editby 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());