duheng
2025-03-14 a906f71640d9ba5cd9f8d689a51de3a557d8bbff
WinFrmUI/PBS.WinFrmUI.WE/WaterWE/WaterEquivalentMgr.cs
@@ -100,16 +100,18 @@
            PBS.Vmo.WE.ItemVmo itemVmo = null;
            if (model != null)
            {
                // itemVmo = await new PBS.BLL.WE.Item().GetByID(model.ItemID);
                //itemVmo = await new PBS.BLL.WE.Item().GetByID(model);
            }
            dlg.SetBindingData(itemVmo, catalogueID);
            dlg.ReloadDataEvent += async (item, catalogue, mappingList) =>
            {
                //现在默认只能增加,不能编辑
                if (itemVmo == null)
                {
                    var id = await _bll.Insert(item);
                    if (id > 0)
                    {
                        item.ID = id;
                        catalogue.ItemID = id;
                        var cataID = await new PBS.BLL.WE.CatalogueMapping().Insert(catalogue);
                        if (cataID > 0)
@@ -182,5 +184,20 @@
            }
            else MessageBoxHelper.ShowError($"删除失败!");
        }
        //详细信息
        private void BtnInfo_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var vm = this.gridView1.GetCurrentViewModel(_allBindingList);
            if (vm == null)
            {
                TipFormHelper.ShowWarn("请输入数据行!");
                return;
            }
            var dlg = new EditWaterWEDlg();
            dlg.SetInfoDisplay(vm);
            dlg.ShowDialog();
        }
    }
}