duheng
2024-07-12 09f8dfa6d6b382ed21e262e0a34704f61dab5e82
WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductMainDlg.cs
@@ -1,4 +1,4 @@
using DevExpress.CodeParser.VB.Preprocessor;
using DevExpress.XtraEditors.Controls;
using HStation.Dto;
namespace HStation.WinFrmUI.Xhs.PumpProduct
@@ -10,12 +10,21 @@
            InitializeComponent();
        }
        private Yw.BLL.SysCatalog _bll = null;
        private AddPumpMainDto model = null;
        public void SetBindingData(long ID)
        public async void SetBindingData(long ID)
        {
            model = new AddPumpMainDto();
            model.PumpSeriesID = ID;
            _bll = new Yw.BLL.SysCatalog();
            var alllist = await _bll.GetAll();
            foreach (var item in alllist)
            {
                var imageItem = new ImageComboBoxItem(item.Name, item.ID);
                TextEditCatalogChoice.Properties.Items.Add(imageItem);
            }
        }
        public event Func<AddPumpMainDto, Task<bool>> ReloadDataEvent = null;
@@ -87,5 +96,16 @@
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
        //分类选择变换
        private async void TextEditCatalogChoice_SelectedValueChanged(object sender, EventArgs e)
        {
            var bll = new Yw.BLL.SysPropStruct();
            var catlogID = this.TextEditCatalogChoice.EditValue;
            if (catlogID == null)
                return;
            var id = Convert.ToInt64(catlogID);
            var catlog = await bll.GetByCatalogID(id);
        }
    }
}