From c733a40f757501b3b1c95fec58e009e9703786ec Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期六, 07 十二月 2024 15:41:47 +0800
Subject: [PATCH] 细节

---
 DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs |   42 +++++++++++++++++++-----------------------
 1 files changed, 19 insertions(+), 23 deletions(-)

diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
index e88ab78..f2a6900 100644
--- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
+++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -1430,6 +1430,24 @@
                     e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5);
                 e.Graphics.DrawString(str, f, Brushes.Gray, r);
             };
+            gridView1.ValidatingEditor += (sender, e) =>
+            {
+                //yz_quantity_0
+                GridView view = sender as GridView;
+                if (view.FocusedColumn.Tag != null && view.FocusedColumn.Tag.ToString().StartsWith("yz_"))
+                {
+                    string[] _ary = view.FocusedColumn.Tag.ToString().Split('_');
+                    if (_ary.Length > 2)
+                    {
+                        if (_ary[2] == "0")
+                        {
+                            double price = 0; if (!Double.TryParse(e.Value as String, out price))
+                            { e.Valid = false; e.ErrorText = "璇疯緭鍏ユ纭殑鏁板瓧."; }
+                            return;
+                        }
+                    }
+                }
+            };
         }
 
         #endregion
@@ -1440,29 +1458,7 @@
             return regex.IsMatch(str);
         }
 
-        /// <summary>
-        /// yz_quantity_0锛寉z_瀛楁_绫诲瀷
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        public static void SetValidatingEditor(object sender, BaseContainerValidateEditorEventArgs e)
-        {
-            //yz_quantity_0
-            GridView view = sender as GridView;
-            if (view.FocusedColumn.Tag != null && view.FocusedColumn.Tag.ToString().StartsWith("yz_"))
-            {
-                string[] _ary = view.FocusedColumn.Tag.ToString().Split('_');
-                if (_ary.Length > 2)
-                {
-                    if (_ary[2] == "0")
-                    {
-                        double price = 0; if (!Double.TryParse(e.Value as String, out price))
-                        { e.Valid = false; e.ErrorText = "璇疯緭鍏ユ纭殑鏁板瓧."; }
-                        return;
-                    }
-                }
-            }
-        }
+      
 
     }
 

--
Gitblit v1.9.3