duheng
2024-09-26 f04e6ed843d66c22e08132ca23d2193d6800905c
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;
            }
        }