From 9bf39e90b0872ac434048c782b6934cdc4538254 Mon Sep 17 00:00:00 2001 From: liqionghai <1> Date: Tue, 29 Jul 2025 19:11:31 +0800 Subject: [PATCH] 1 --- Pilot_KD_Parino/QPHY_AutoWrire/Bill5.cs | 36 +++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/Pilot_KD_Parino/QPHY_AutoWrire/Bill5.cs b/Pilot_KD_Parino/QPHY_AutoWrire/Bill5.cs index bd411dd..cca1190 100644 --- a/Pilot_KD_Parino/QPHY_AutoWrire/Bill5.cs +++ b/Pilot_KD_Parino/QPHY_AutoWrire/Bill5.cs @@ -1284,6 +1284,42 @@ namespace Pilot_KD_Parino.QPHY_AutoWrire } }); } + + //全部展开 + if (e.BarItemKey.ToString().Equals("VRYF_tbButton")) + { + //处理树形表单的样式 + TreeEntryGrid entryGrid = this.View.GetControl("FEntity2") as TreeEntryGrid; + DynamicObjectCollection entryGrid2 = this.View.Model.DataObject["FEntity2"] as DynamicObjectCollection; + if (entryGrid != null) + { + var entityKey = "FEntity2"; + var grid = this.View.GetControl(entityKey); + + for (int i = 0; i < entryGrid2.Count; i++) + { + entryGrid.ExpandedRow(i); + } + } + } + + //全部折叠 + if (e.BarItemKey.ToString().Equals("VRYF_tbButton_1")) + { + //处理树形表单的样式 + TreeEntryGrid entryGrid = this.View.GetControl("FEntity2") as TreeEntryGrid; + DynamicObjectCollection entryGrid2 = this.View.Model.DataObject["FEntity2"] as DynamicObjectCollection; + if (entryGrid != null) + { + var entityKey = "FEntity2"; + var grid = this.View.GetControl(entityKey); + + for (int i = 0; i < entryGrid2.Count; i++) + { + entryGrid.CollapsedRow(i); + } + } + } }