| | |
| | | public EditSysTypeDlg() |
| | | { |
| | | InitializeComponent(); |
| | | this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; |
| | | } |
| | | |
| | | public event Func<Yw.Vmo.SysType, Task<bool>> ReloadDataEvent = null; |
| | | public event Func<Yw.Vmo.SysTypeVmo, Task<bool>> ReloadDataEvent = null; |
| | | |
| | | private Yw.Vmo.SysType _UpdateSysTypeDto { get; set; } |
| | | private Yw.Vmo.SysTypeVmo _UpdateSysTypeDto { get; set; } |
| | | |
| | | public async void SetBindingData(long ID) |
| | | { |
| | | var dto = await new Yw.BLL.SysType().GetByID(ID); |
| | | _UpdateSysTypeDto = dto; |
| | | if (_UpdateSysTypeDto.ExtendType == (Yw.Vmo.eExtendType)eExtendType.None) |
| | | if (_UpdateSysTypeDto.ExtendType == eExtendType.None) |
| | | { |
| | | this.TextEditExType.SelectedIndex = 0; |
| | | } |
| | | else if (_UpdateSysTypeDto.ExtendType == (Yw.Vmo.eExtendType)eExtendType.Config) |
| | | else if (_UpdateSysTypeDto.ExtendType == eExtendType.Config) |
| | | { |
| | | this.TextEditExType.SelectedIndex = 1; |
| | | } |
| | |
| | | _UpdateSysTypeDto.Description = TextEditDescription.Text.Trim(); |
| | | if (this.TextEditExType.SelectedIndex == 0) |
| | | { |
| | | _UpdateSysTypeDto.ExtendType = (Yw.Vmo.eExtendType)eExtendType.None; |
| | | _UpdateSysTypeDto.ExtendType = eExtendType.None; |
| | | } |
| | | else if (this.TextEditExType.SelectedIndex == 1) |
| | | { |
| | | _UpdateSysTypeDto.ExtendType = (Yw.Vmo.eExtendType)eExtendType.Config; |
| | | _UpdateSysTypeDto.ExtendType = eExtendType.Config; |
| | | } |
| | | else |
| | | { |
| | | _UpdateSysTypeDto.ExtendType = (Yw.Vmo.eExtendType)eExtendType.Catalog; |
| | | _UpdateSysTypeDto.ExtendType = eExtendType.Catalog; |
| | | } |
| | | _UpdateSysTypeDto.Code = TextEditCode.Text.Trim(); |
| | | if (await this.ReloadDataEvent.Invoke(_UpdateSysTypeDto)) |