lixiaojun
2025-01-20 6e1306ab578ed1ad79fc33b0bb7e496b897bf4a4
WinFrmUI/HStation.WinFrmUI.Dict.Core/DictManageMainPanel.cs
@@ -1,4 +1,5 @@
using HStation.WinFrmUI.Dict.Core;
using DevExpress.XtraDiagram.Bars;
using HStation.WinFrmUI.Dict.Core;
using Yw;
namespace HStation.WinFrmUI.Dict
@@ -13,15 +14,17 @@
            this.gridView1.RegistCustomDrawRowIndicator();
            this.PageTitle.HeaderSvgImage = this.svgImageCollection1[0];
            this.PageTitle.SvgImageSize = new Size(24, 24);
            this.dictGroupTreeListCtrl1.RloadEvent += ValveTypeTreeListCtrl1_RloadEvent;
            this.dictGroupTreeListCtrl1.RloadEvent += DictTreeListCtrl1_RloadEvent;
        }
        private List<DictTypeViewModel> _allBindingList = null;
        private Yw.BLL.SysDictType _bll = null;
        private long _groupId;
        //初始化数据
        public override async void InitialDataSource()
        public override void InitialDataSource()
        {
            _bll = new Yw.BLL.SysDictType();
            _allBindingList = new List<DictTypeViewModel>();
@@ -30,8 +33,9 @@
            this.dictGroupTreeListCtrl1.SetBindingData();
        }
        private async void ValveTypeTreeListCtrl1_RloadEvent(long groupId)
        private async void DictTreeListCtrl1_RloadEvent(long groupId)
        {
            _groupId = groupId;
            var alllist = await _bll.GetByGroupID(groupId);
            _allBindingList.Clear();
            if (alllist != null)
@@ -70,7 +74,7 @@
            dlg.ShowDialog();
        }
        //编辑阀门
        //编辑
        private async void BtnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var vm = this.gridView1.GetCurrentViewModel(_allBindingList);
@@ -98,7 +102,7 @@
            dlg.ShowDialog();
        }
        //删除阀门
        //删除
        private async void BtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var currentVm = this.gridView1.GetCurrentViewModel(_allBindingList);
@@ -138,5 +142,10 @@
                dlg.ShowDialog();
            }
        }
        private void btnRefresh_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            DictTreeListCtrl1_RloadEvent(_groupId);
        }
    }
}