Shuxia Ning
2024-10-23 5dd7ab9852c9a5659cc916e9ed986b5099efeaf8
WinFrmUI/HStation.WinFrmUI.Assets.Core/01-pump/01-EditPumpPartProp/AddPumpPropDlg.cs
@@ -12,15 +12,19 @@
            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;
@@ -41,12 +45,12 @@
            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;
@@ -90,7 +94,8 @@
            {
                _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("添加成功!");
            }