From 3d086a3c77ca5ce0eef314e0f8b465ca22c2f195 Mon Sep 17 00:00:00 2001 From: cdk <2441919651@qq.com> Date: 星期六, 30 八月 2025 17:07:08 +0800 Subject: [PATCH] 加组织id字段 --- DevApp/Gs.DevApp/DevFrm/QC/DefectCode.cs | 65 +++++++++++++++++--------------- 1 files changed, 35 insertions(+), 30 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/QC/DefectCode.cs b/DevApp/Gs.DevApp/DevFrm/QC/DefectCode.cs index 729a205..f629eae 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/DefectCode.cs +++ b/DevApp/Gs.DevApp/DevFrm/QC/DefectCode.cs @@ -20,10 +20,9 @@ public DefectCode(string _strType) { InitializeComponent(); - strType = _strType; toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; - + strType = _strType; tlMenu.IndicatorWidth = 50; tlMenu.CustomDrawNodeIndicator += (s, ee) => { @@ -88,11 +87,11 @@ tlMenu.DeleteNode(tlMenu.FocusedNode); } else - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); } catch (Exception ex) { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } }; @@ -109,11 +108,36 @@ frm.UpdateParent += (s2, ee2) => { getPageList(1); + // 渚嬪锛岄�氳繃ID鏌ユ壘鑺傜偣锛� + TreeListNode node = tlMenu.FindNodeByKeyID(strGuid); + if (node !=null) + { + node.Expanded = true; // 灞曞紑鑺傜偣 + tlMenu.MakeNodeVisible(node); // 纭繚鍙 + } }; frm.ShowDialog(); }; } - + /// <summary> + /// 鏌ヨ浜嬩欢 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) + { + Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇ョ獥浣撲笉鏀寔鏌ヨ锛岃嫢鎯虫洿鏂伴〉闈紝璇风偣鍑� 鍒锋柊"); + } + /// <summary> + /// 鍒锋柊浜嬩欢 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) + { + _filterList.Clear(); + getPageList(1); + } /// <summary> /// 鍙抽敭寮瑰嚭鑿滃崟,濡傛灉鏄锛屽鍔犲瓙椤圭洰锛屽惁鍒欏鍔犱富椤� /// </summary> @@ -146,32 +170,10 @@ toolStripMenuItemAdd.Visible = false; toolStripMenuItemEdt.Visible = false; toolStripMenuItemDel.Visible = false; - toolStripMenuItemRoot.Visible = true; + toolStripMenuItemRoot.Visible = false;//2025/07//11鏀逛负涓嶅鍔犱富椤圭洰浜� cms1.Show(tlMenu, e.Location); } } - } - - - /// <summary> - /// 鏌ヨ浜嬩欢 - /// </summary> - /// <param name="sender"></param> - /// <param name="e"></param> - private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) - { - Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇ョ獥浣撲笉鏀寔鏌ヨ锛岃嫢鎯虫洿鏂伴〉闈紝璇风偣鍑� 鍒锋柊"); - } - - /// <summary> - /// 鍒锋柊浜嬩欢 - /// </summary> - /// <param name="sender"></param> - /// <param name="e"></param> - private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) - { - _filterList.Clear(); - getPageList(1); } /// <summary> /// @@ -194,13 +196,16 @@ tlMenu.KeyFieldName = "guid"; tlMenu.ParentFieldName = "pid"; tlMenu.EndUpdate(); - //this.tlMenu.CollapseAll(); - this.tlMenu.ExpandAll(); + this.tlMenu.CollapseAll(); + // this.tlMenu.ExpandAll(); + // this.tlMenu.ExpandToLevel(0); } catch (Exception ex) { MsgHelper.Warning("鎻愮ず锛�" + ex.Message); } } + + } } -- Gitblit v1.9.3