| | |
| | | { |
| | | this.TextEditExType.SelectedIndex = 2; |
| | | } |
| | | this.NameTextEdit.Text = _UpdateSysTypeDto.Name; |
| | | this.DescriptionTextEdit.Text = _UpdateSysTypeDto.Description; |
| | | this.TextEditName.Text = _UpdateSysTypeDto.Name; |
| | | this.TextEditDescription.Text = _UpdateSysTypeDto.Description; |
| | | } |
| | | |
| | | //数据验证 |
| | | private bool Valid() |
| | | { |
| | | this.dxErrorProvider1.ClearErrors(); |
| | | if (string.IsNullOrEmpty(NameTextEdit.Text.Trim())) |
| | | if (string.IsNullOrEmpty(TextEditName.Text.Trim())) |
| | | { |
| | | this.dxErrorProvider1.SetError(this.NameTextEdit, "必填项"); |
| | | this.dxErrorProvider1.SetError(this.TextEditName, "必填项"); |
| | | return false; |
| | | } |
| | | return true; |
| | |
| | | //完成 |
| | | private async void BtnOk_ClickAsync(object sender, EventArgs e) |
| | | { |
| | | _UpdateSysTypeDto.Name = NameTextEdit.Text.Trim(); |
| | | _UpdateSysTypeDto.Description = DescriptionTextEdit.Text.Trim(); |
| | | _UpdateSysTypeDto.Name = TextEditName.Text.Trim(); |
| | | _UpdateSysTypeDto.Description = TextEditDescription.Text.Trim(); |
| | | if (this.TextEditExType.SelectedIndex == 0) |
| | | { |
| | | _UpdateSysTypeDto.ExtendType = eExtendType.None; |
| | |
| | | } |
| | | else |
| | | { |
| | | _UpdateSysTypeDto.ExtendType = eExtendType.Fix; |
| | | _UpdateSysTypeDto.ExtendType = eExtendType.None; |
| | | } |
| | | if (await this.ReloadDataEvent.Invoke(_UpdateSysTypeDto)) |
| | | { |