From 98e49c0dd42840a094837f7acae532bc237a719a Mon Sep 17 00:00:00 2001 From: yangyin <1850366751@qq.com> Date: 星期二, 20 八月 2024 15:42:37 +0800 Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0 --- WinFrmUI/HStation.WinFrmUI.Basic/00-SysTypeManage/SysTypeManageMainPanel.cs | 22 +++++++++++++++------- 1 files changed, 15 insertions(+), 7 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/00-SysTypeManage/SysTypeManageMainPanel.cs b/WinFrmUI/HStation.WinFrmUI.Basic/00-SysTypeManage/SysTypeManageMainPanel.cs index c540c33..653720f 100644 --- a/WinFrmUI/HStation.WinFrmUI.Basic/00-SysTypeManage/SysTypeManageMainPanel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Basic/00-SysTypeManage/SysTypeManageMainPanel.cs @@ -100,16 +100,24 @@ } if (MessageBoxHelper.IsClickOk($"纭鍒犻櫎鏁版嵁琛�?", "鎻愮ず")) return; - var result = await _bll.DeleteByID(currentVm.ID); - if (result) + try { - _allBindingList.Remove(currentVm); - this.typeViewModelBindingSource.ResetBindings(false); - MessageBoxHelper.ShowSuccess($"鍒犻櫎鎴愬姛!"); + var result = await _bll.DeleteByID(currentVm.ID); + if (result) + { + _allBindingList.Remove(currentVm); + this.typeViewModelBindingSource.ResetBindings(false); + MessageBoxHelper.ShowSuccess($"鍒犻櫎鎴愬姛!"); + } + else + { + MessageBoxHelper.ShowError($"鍒犻櫎澶辫触!"); + return; + } } - else + catch (Yw.Dto.InternalException ex) { - MessageBoxHelper.ShowError($"鍒犻櫎澶辫触!"); + MessageBoxHelper.ShowError(ex.ErrorMsg); return; } } -- Gitblit v1.9.3