From b084bd77d01a94c8f0a2d20c86a1f45ba7c8a23c Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期六, 19 四月 2025 14:08:05 +0800 Subject: [PATCH] 页面跳转 --- DevApp/Gs.DevApp/DevFrm/Sys/SysMenu.cs | 81 +++++++++++++++++++++++++++------------- 1 files changed, 55 insertions(+), 26 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/Sys/SysMenu.cs b/DevApp/Gs.DevApp/DevFrm/Sys/SysMenu.cs index ce873c3..f34a688 100644 --- a/DevApp/Gs.DevApp/DevFrm/Sys/SysMenu.cs +++ b/DevApp/Gs.DevApp/DevFrm/Sys/SysMenu.cs @@ -1,10 +1,4 @@ -锘縰sing System; -using System.Collections.Generic; -using System.Drawing; -using System.Reflection; -using System.Resources; -using System.Windows.Forms; -using DevExpress.Utils; +锘縰sing DevExpress.Utils; using DevExpress.XtraEditors; using DevExpress.XtraEditors.Controls; using DevExpress.XtraTreeList; @@ -12,6 +6,12 @@ using Gs.DevApp.Properties; using Gs.DevApp.ToolBox; using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Reflection; +using System.Resources; +using System.Windows.Forms; namespace Gs.DevApp.DevFrm.User { @@ -85,7 +85,7 @@ { var rowGuid = UtilityHelper.GetCurrentDoubleRow(tlMenu, e, "guid"); if (!string.IsNullOrEmpty(rowGuid)) - getModel(rowGuid, false, 999); + getModel(rowGuid); } /// <summary> @@ -95,7 +95,7 @@ /// <param name="e"></param> private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) { - UtilityHelper.JumpToTab(xtraTabControl1, 0); + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1); } /// <summary> @@ -125,7 +125,10 @@ var _rtn = UtilityHelper.ReturnToDynamic(strJson); if (_rtn.rtnCode > 0) { - UtilityHelper.JumpToTab(xtraTabControl1, 0); + if (xtraTabControl1.SelectedTabPageIndex == 0) + { } + else + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2); getTree(); } @@ -144,8 +147,21 @@ /// <param name="e"></param> private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) { - UtilityHelper.JumpToTab(xtraTabControl1, 0); - getTree(); + if (xtraTabControl1.SelectedTabPageIndex == 1) + getModel(lbGuid.Text.Trim()); + else + { + //_filterList.Clear(); + //if (gridView1.ActiveFilter.Count > 0) + //{ + // gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; + // gridView1.ActiveFilter.Clear(); + // gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; + //} + //getPageList(1); + getTree(); + } + } /// <summary> @@ -155,26 +171,34 @@ /// <param name="e"></param> private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e) { - string rowGuid, rowName; - (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, - lbGuid, txt_name, tlMenu); + string rowGuid = "", rowName = ""; + (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_name, tlMenu); if (string.IsNullOrEmpty(rowGuid)) { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } - - getModel(rowGuid, true, 1); - if (txt_category.SelectedIndex == 1) + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); + if (xtraTabControl1.SelectedTabPageIndex == 1) { - txt_formPath.Enabled = true; - txt_icon.Enabled = true; + getModel(rowGuid); + if (txt_category.SelectedIndex == 1) + { + txt_formPath.Enabled = true; + txt_icon.Enabled = true; + } + else + { + txt_formPath.Enabled = false; + txt_icon.Enabled = false; + } } else { - txt_formPath.Enabled = false; - txt_icon.Enabled = false; + UtilityHelper.ChangeEnableByControl(this.panel1.Controls, true); } + + } /// <summary> @@ -184,9 +208,10 @@ /// <param name="e"></param> private void ToolBarMenu1_btnAddClick(object sender, EventArgs e) { - UtilityHelper.JumpToTab(xtraTabControl1, 1); lbGuid.Text = ""; + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4); UtilityHelper.CleanValueByControl(panel1.Controls, true); + } /// <summary> @@ -242,6 +267,8 @@ lbGuid.Text = _rtn.rtnData; toolBarMenu1.isSetBtn = true; UtilityHelper.ChangeEnableByControl(panel1.Controls, false); + toolBarMenu1.currentAction = ""; + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); } } catch (Exception ex) @@ -278,14 +305,16 @@ } } - private void getModel(string strGuid, bool isEdit, int tabIdx) + private void getModel(string strGuid) { + bool isEdit = false; + if (toolBarMenu1.currentAction == "add") return; + if (toolBarMenu1.currentAction == "edit") isEdit = true; if (string.IsNullOrEmpty(strGuid)) { MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } - UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); var _obj = new { guid = strGuid //涓诲缓 -- Gitblit v1.9.3