lixiaojun
2024-07-31 44d9b3ffe4a3b743dbc9c6023e80f77e2975283e
WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/AddSysPropDlg.cs
@@ -1,5 +1,4 @@
using Mapster;
using Yw.Basic;
using Yw.Basic;
using Yw.Dto;
namespace HStation.WinFrmUI.Basic
@@ -33,6 +32,16 @@
                this.dxErrorProvider1.SetError(this.TextEditName, "必填项");
                return false;
            }
            if (string.IsNullOrEmpty(TextEditCode.Text.Trim()))
            {
                this.dxErrorProvider1.SetError(this.TextEditCode, "必填项");
                return false;
            }
            if (string.IsNullOrEmpty(TextEditFormat.Text.Trim()))
            {
                this.dxErrorProvider1.SetError(this.TextEditCode, "必填项");
                return false;
            }
            return true;
        }
@@ -45,7 +54,35 @@
            _AddPropDto.DefaultValue = TextEditDefaultValue.Text.Trim();
            _AddPropDto.UnitName = TextEditUnitName.Text.Trim();
            _AddPropDto.IsNull = CheckEditIsNull.Checked;
            //_AddPropDto.Format = TextEditFormat.Text.Trim();
            // _AddPropDto.Format = TextEditFormat.Text.Trim();
            if (TextEditFormat.SelectedIndex == 0)
            {
                _AddPropDto.Format = ePropFormat.Integer;
            }
            else if (TextEditFormat.SelectedIndex == 1)
            {
                _AddPropDto.Format = ePropFormat.Bigint;
            }
            else if (TextEditFormat.SelectedIndex == 2)
            {
                _AddPropDto.Format = ePropFormat.Numeric;
            }
            else if (TextEditFormat.SelectedIndex == 3)
            {
                _AddPropDto.Format = ePropFormat.Text;
            }
            else if (TextEditFormat.SelectedIndex == 4)
            {
                _AddPropDto.Format = ePropFormat.MultiText;
            }
            else if (TextEditFormat.SelectedIndex == 5)
            {
                _AddPropDto.Format = ePropFormat.Time;
            }
            else
            {
                _AddPropDto.Format = ePropFormat.Boolen;
            }
            _AddPropDto.TypeID = _TypeID;
            if (await this.ReloadDataEvent.Invoke(_AddPropDto))
            {