lixiaojun
2024-11-06 a5f3c47ee959183e3059fc6672b4b07f99eb9c1a
WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/EditSysPropDlg.cs
@@ -9,11 +9,12 @@
        public EditSysPropDlg()
        {
            InitializeComponent();
            this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon;
        }
        public event Func<Yw.Vmo.SysProp, Task<bool>> ReloadDataEvent = null;
        public event Func<Yw.Vmo.SysPropVmo, Task<bool>> ReloadDataEvent = null;
        private Yw.Vmo.SysProp _UpdatePropDto { get; set; }
        private Yw.Vmo.SysPropVmo _UpdatePropDto { get; set; }
        public async void SetBindingData(long PropID)
        {
@@ -25,27 +26,27 @@
            this.TextEditUnitName.Text = _UpdatePropDto.UnitName;
            this.TextEditCode.Text = _UpdatePropDto.Code;
            this.CheckEditIsNull.Checked = _UpdatePropDto.IsNull;
            if (_UpdatePropDto.Format == Yw.Vmo.Core.ePropFormat.Bigint)
            if (_UpdatePropDto.Format == Yw.Basic.ePropFormat.Bigint)
            {
                this.TextComoBoxFormat.SelectedIndex = 1;
            }
            else if (_UpdatePropDto.Format == Yw.Vmo.Core.ePropFormat.Integer)
            else if (_UpdatePropDto.Format == Yw.Basic.ePropFormat.Integer)
            {
                this.TextComoBoxFormat.SelectedIndex = 0;
            }
            else if (_UpdatePropDto.Format == Yw.Vmo.Core.ePropFormat.MultiText)
            else if (_UpdatePropDto.Format == Yw.Basic.ePropFormat.MultiText)
            {
                this.TextComoBoxFormat.SelectedIndex = 4;
            }
            else if (_UpdatePropDto.Format == Yw.Vmo.Core.ePropFormat.Time)
            else if (_UpdatePropDto.Format == Yw.Basic.ePropFormat.Time)
            {
                this.TextComoBoxFormat.SelectedIndex = 5;
            }
            else if (_UpdatePropDto.Format == Yw.Vmo.Core.ePropFormat.Numeric)
            else if (_UpdatePropDto.Format == Yw.Basic.ePropFormat.Numeric)
            {
                this.TextComoBoxFormat.SelectedIndex = 2;
            }
            else if (_UpdatePropDto.Format == Yw.Vmo.Core.ePropFormat.Text)
            else if (_UpdatePropDto.Format == Yw.Basic.ePropFormat.Text)
            {
                this.TextComoBoxFormat.SelectedIndex = 3;
            }
@@ -87,31 +88,31 @@
            _UpdatePropDto.UnitName = TextEditUnitName.Text.Trim();
            if (TextComoBoxFormat.SelectedIndex == 0)
            {
                _UpdatePropDto.Format = (Yw.Vmo.Core.ePropFormat)ePropFormat.Integer;
                _UpdatePropDto.Format = (Yw.Basic.ePropFormat)ePropFormat.Integer;
            }
            else if (TextComoBoxFormat.SelectedIndex == 1)
            {
                _UpdatePropDto.Format = (Yw.Vmo.Core.ePropFormat)ePropFormat.Bigint;
                _UpdatePropDto.Format = (Yw.Basic.ePropFormat)ePropFormat.Bigint;
            }
            else if (TextComoBoxFormat.SelectedIndex == 2)
            {
                _UpdatePropDto.Format = (Yw.Vmo.Core.ePropFormat)ePropFormat.Numeric;
                _UpdatePropDto.Format = (Yw.Basic.ePropFormat)ePropFormat.Numeric;
            }
            else if (TextComoBoxFormat.SelectedIndex == 3)
            {
                _UpdatePropDto.Format = (Yw.Vmo.Core.ePropFormat)ePropFormat.Text;
                _UpdatePropDto.Format = (Yw.Basic.ePropFormat)ePropFormat.Text;
            }
            else if (TextComoBoxFormat.SelectedIndex == 4)
            {
                _UpdatePropDto.Format = (Yw.Vmo.Core.ePropFormat)ePropFormat.MultiText;
                _UpdatePropDto.Format = (Yw.Basic.ePropFormat)ePropFormat.MultiText;
            }
            else if (TextComoBoxFormat.SelectedIndex == 5)
            {
                _UpdatePropDto.Format = (Yw.Vmo.Core.ePropFormat)ePropFormat.Time;
                _UpdatePropDto.Format = (Yw.Basic.ePropFormat)ePropFormat.Time;
            }
            else
            {
                _UpdatePropDto.Format = (Yw.Vmo.Core.ePropFormat)ePropFormat.Boolen;
                _UpdatePropDto.Format = (Yw.Basic.ePropFormat)ePropFormat.Boolen;
            }
            _UpdatePropDto.IsNull = CheckEditIsNull.Checked;
            if (await this.ReloadDataEvent.Invoke(_UpdatePropDto))