From bc3adbd73a55d8382fbd02b2fd090a05ec13a7d5 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期四, 13 三月 2025 10:07:17 +0800
Subject: [PATCH] 提交OA

---
 DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
index 2ccb088..9eea9e9 100644
--- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
+++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -10,7 +10,6 @@
 using System.Net.Http;
 using System.Reflection;
 using System.Resources;
-using System.Runtime.CompilerServices;
 using System.Text;
 using System.Text.RegularExpressions;
 using System.Threading.Tasks;
@@ -791,14 +790,14 @@
                 if (ctrl is CheckEdit)
                 {
                     var txt = ctrl as CheckEdit;
-                    txt.ReadOnly = isEdt;
-                    if (txt.Tag != null && txt.Tag.ToString().Length > 0 && txt.Tag.ToString().StartsWith("moren"))
+                    if (_isRead(txt.Tag))
                     {
-                        txt.Checked = bool.Parse(txt.Tag.ToString().Replace("moren.", ""));
+                        txt.ReadOnly = true;
                     }
                     else
-                        txt.Checked = false;
+                        txt.ReadOnly = isEdt;
                     continue;
+
                 }
                 //鑷畾涔変粨搴�
                 if (ctrl is UcLookCk)
@@ -1375,6 +1374,11 @@
                 return 0;
             }
         }
+        public static decimal? GetDecimal(string s)
+        {
+            if (string.IsNullOrEmpty(s)) return null;
+            return decimal.Parse(s);
+        }
         public static int ToInt(string str)
         {
             try
@@ -1596,7 +1600,7 @@
             GridView dgv = s as GridView;
             if (dgv != null)
             {
-                if (dgv.GetSelectedRows() != null)
+                if (dgv.GetSelectedRows() != null && dgv.GetSelectedRows().Count()>0)
                 {
                     var selectedRow = dgv.GetSelectedRows()[0]; // 鑾峰彇绗竴涓�変腑琛岀殑绱㈠紩
                     if (selectedRow >= 0)

--
Gitblit v1.9.3