| | |
| | | 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) |
| | | { |
| | |
| | | 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; |
| | | } |
| | |
| | | _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)) |