From ee854797c9ca5adbba0f356f5b0484c2f7e59dc9 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期一, 14 十月 2024 17:50:21 +0800 Subject: [PATCH] 分类管理增加设置父级功能 --- WinFrmUI/HStation.WinFrmUI.Basic/00-SysTypeManage/SysTypeManageMainPanel.cs | 26 ++++++++++++++++++-------- 1 files changed, 18 insertions(+), 8 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/00-SysTypeManage/SysTypeManageMainPanel.cs b/WinFrmUI/HStation.WinFrmUI.Basic/00-SysTypeManage/SysTypeManageMainPanel.cs index c540c33..d1d4ec7 100644 --- a/WinFrmUI/HStation.WinFrmUI.Basic/00-SysTypeManage/SysTypeManageMainPanel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Basic/00-SysTypeManage/SysTypeManageMainPanel.cs @@ -8,7 +8,7 @@ this.gridView1.SetNormalView(); this.gridView1.RegistCustomDrawRowIndicator(); this.PageTitle.Caption = "绫诲瀷绠$悊"; - this.PageTitle.HeaderSvgImage = this.svgImage32[1]; + this.PageTitle.HeaderSvgImage = this.svgImage32[0]; this.PageTitle.SvgImageSize = new Size(24, 24); this.moduleTreeListCtrl1.FocusedChangedEvent += ModuleTreeListCtrl1_FocusedChangedEvent; } @@ -60,8 +60,10 @@ this.typeViewModelBindingSource.ResetBindings(false); return true; } + return false; }; + dlg.ShowDialog(); } @@ -100,16 +102,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