duheng
2024-08-19 eaff2518ab6159c360ec2a865b45002b26fdc4cd
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;
            }
        }