From 09f8dfa6d6b382ed21e262e0a34704f61dab5e82 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期五, 12 七月 2024 13:34:50 +0800 Subject: [PATCH] 添加数据库初始化 --- WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductMainDlg.cs | 24 ++++++++++++++++++++++-- 1 files changed, 22 insertions(+), 2 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductMainDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductMainDlg.cs index cf26f7e..8c6850d 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductMainDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductMainDlg.cs @@ -1,4 +1,4 @@ -锘縰sing DevExpress.CodeParser.VB.Preprocessor; +锘縰sing 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); + } } } \ No newline at end of file -- Gitblit v1.9.3