Shuxia Ning
2024-10-09 eccc597eb5b29ce1a9982ebf31f0e1272d3db14f
WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/ValveManageMainPanel.cs
@@ -112,5 +112,41 @@
                return;
            }
        }
        private async void barBtnValveLine_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var currentVm = this.gridView1.GetCurrentViewModel(_allBindingList);
            if (currentVm == null)
            {
                MessageBoxHelper.ShowWarning("请选择数据行!");
                return;
            }
            var guid = new PageGuid()
            {
                Function = "阀门型号曲线",
                TagName = currentVm.ID.ToString(),
                Modular = ""
            };
            if (!IsExistPage(guid, true))
            {
                var model = await _bll.GetByID(currentVm.ID);
                if (model == null)
                {
                    MessageBoxHelper.ShowWarning($"{currentVm.Name}:ValveMainDto is null!");
                    return;
                }
                var page = new HStation.WinFrmUI.PhartRelation.XhsValveMainPhartPanel();
                page.InitialDataSource(currentVm.ID);
                page.PageTitle.Caption = guid.Function;
                page.PageGuid = guid;
                CreatePage(page, guid);
            }
        }
    }
}