From d1fde218cd82d4e64f8e15accbafa11ed1efd780 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期三, 21 五月 2025 20:09:21 +0800
Subject: [PATCH] 称重
---
DevApp/Gs.DevApp/DevFrm/Sys/SysMenu.cs | 84 +++++++++++++++++++++++++++--------------
1 files changed, 55 insertions(+), 29 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Sys/SysMenu.cs b/DevApp/Gs.DevApp/DevFrm/Sys/SysMenu.cs
index abdeef7..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>
@@ -113,7 +113,6 @@
MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
-
if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鍒犻櫎鍚楋紵")) return;
var lst = new List<string>();
lst.Add(rowGuid);
@@ -126,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();
}
@@ -145,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>
@@ -156,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>
@@ -185,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>
@@ -221,7 +245,6 @@
txt_upGuid.Focus();
return;
}
-
var _obj = new
{
guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
@@ -244,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)
@@ -280,15 +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