| | |
| | | InitializeComponent(); |
| | | } |
| | | |
| | | public event Func<Yw.Vmo.SysPropVmo, Task<bool>> ReloadDataEvent; |
| | | public event Func<Yw.Vmo.SysPropVmo, string, string, Task<bool>> ReloadDataEvent; //属性类, 组名,属性值 |
| | | |
| | | private Yw.Vmo.SysPropVmo _AddPropDto { get; set; } |
| | | private Yw.BLL.SysPropMapping _bll = null; |
| | | |
| | | private long _catalogId; |
| | | |
| | | /// <summary> |
| | | /// 初始化数据 |
| | | /// </summary> |
| | | public async void SetBindingData(long CatalogID) |
| | | { |
| | | _catalogId = CatalogID; |
| | | var catalogVmo = await new Yw.BLL.SysCatalog().GetByID(CatalogID); |
| | | if (catalogVmo == null) |
| | | return; |
| | |
| | | this.dxErrorProvider1.ClearErrors(); |
| | | if (imageComboBoxEditPropGroup.EditValue == null) |
| | | { |
| | | this.dxErrorProvider1.SetError(imageComboBoxEditPropGroup, "不能为空!"); |
| | | this.dxErrorProvider1.SetError(imageComboBoxEditPropGroup, "必填项!"); |
| | | isContinue = false; |
| | | } |
| | | if (textEditName.Text == null) |
| | | if (textEditName.EditValue == null) |
| | | { |
| | | this.dxErrorProvider1.SetError(textEditName, "不能为空!"); |
| | | this.dxErrorProvider1.SetError(textEditName, "必填项!"); |
| | | isContinue = false; |
| | | } |
| | | return isContinue; |
| | |
| | | { |
| | | _AddPropDto.Format = (Yw.Basic.ePropFormat)ePropFormat.Boolen; |
| | | } |
| | | if (await this.ReloadDataEvent.Invoke(_AddPropDto)) |
| | | var selected = (ImageComboBoxItem)this.imageComboBoxEditPropGroup.SelectedItem; |
| | | if (await this.ReloadDataEvent.Invoke(_AddPropDto, selected.Description, TextEditValue.Text)) |
| | | { |
| | | MessageBoxHelper.ShowSuccess("添加成功!"); |
| | | } |