duheng
2024-12-10 26917739c47252ecdc3b8f43eca6ebaf9cba6ac4
WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/ExchangerProductListBox.cs
@@ -17,25 +17,27 @@
        public async void SetBindingData(Vmo.AssetsExchangerMainVmo AssetsExchangerMain)
        {
            /*_allBindingList = new List<CurrentPartMainViewModel>();
            _allBindingList = new List<ExchangerPartViewModel>();
            _Bll = new BLL.AssetsExchangerPartMain();
            var allpartlist = await _Bll.GetByExchangerMainID(AssetsExchangerMain.ID);   //获取所有产品
            var series = await new BLL.AssetsExchangerSeries().GetByID(AssetsExchangerMain.ExchangerSeriesID);  //获取系列
            var series = await new BLL.AssetsExchangerSeries().GetByID(AssetsExchangerMain.SeriesID);  //获取系列
            if (allpartlist != null)
            {
                foreach (var item in allpartlist)
                {
                    var model = new CurrentPartMainViewModel(item);
                    var model = new ExchangerPartViewModel(item);
                    _allBindingList.Add(model);
                }
            }
            this.listBoxControl1.DataSource = _allBindingList;
            this.listBoxControl1.Refresh();*/
            this.listBoxControl1.Refresh();
        }
        public event Action AddReloadEvent = null;
        public event Action SelectReloadEvent = null;
        public event Action DeleteReloadEvent = null;
        private void BtnAddProductProp_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
@@ -60,7 +62,8 @@
        //删除属性
        private async void barBtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var vm = this.listBoxControl1.GetCurrentViewModel(_allBindingList);
            DeleteReloadEvent.Invoke();
            /*var vm = this.listBoxControl1.GetCurrentViewModel(_allBindingList);
            if (vm == null)
            {
                TipFormHelper.ShowWarn("请选择数据行!");
@@ -77,7 +80,7 @@
            else
            {
                TipFormHelper.ShowError("删除失败!");
            }
            }*/
        }
    }
}