From 641e86dfaeb2eed992a717beb297c0ba84869f6b Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期二, 15 四月 2025 18:08:38 +0800
Subject: [PATCH] checkbox

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

diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
index 44b6ce0..580873b 100644
--- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
+++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -1,4 +1,18 @@
-锘縰sing System;
+锘縰sing DevExpress.Utils;
+using DevExpress.XtraEditors;
+using DevExpress.XtraEditors.Controls;
+using DevExpress.XtraGrid;
+using DevExpress.XtraGrid.Columns;
+using DevExpress.XtraGrid.Menu;
+using DevExpress.XtraGrid.Views.Grid;
+using DevExpress.XtraGrid.Views.Grid.ViewInfo;
+using DevExpress.XtraTab;
+using DevExpress.XtraTreeList;
+using Gs.DevApp.Entity;
+using Gs.DevApp.UserControl;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
 using System.Collections.Generic;
 using System.Configuration;
 using System.Data;
@@ -14,20 +28,6 @@
 using System.Text.RegularExpressions;
 using System.Threading.Tasks;
 using System.Windows.Forms;
-using DevExpress.Utils;
-using DevExpress.XtraEditors;
-using DevExpress.XtraEditors.Controls;
-using DevExpress.XtraGrid;
-using DevExpress.XtraGrid.Columns;
-using DevExpress.XtraGrid.Menu;
-using DevExpress.XtraGrid.Views.Grid;
-using DevExpress.XtraGrid.Views.Grid.ViewInfo;
-using DevExpress.XtraTab;
-using DevExpress.XtraTreeList;
-using Gs.DevApp.Entity;
-using Gs.DevApp.UserControl;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
 using UserControls.Data;
 using static System.Windows.Forms.Control;
 
@@ -41,7 +41,6 @@
     {
         private static readonly string WebApiUrl =
             ConfigurationManager.AppSettings["WebApiUrl"];
-
 
         public static async Task<string> UploadFileAsync(string filePath)
         {
@@ -726,6 +725,7 @@
                     var txt = ctrl as ButtonEdit;
                     txt.Text = "";
                     txt.Enabled = !isEdt;
+                    txt.ReadOnly = isEdt;
                     continue;
                 }
                 //鏂囨湰
@@ -1351,6 +1351,14 @@
             return false;
         }
 
+        public static bool ToCheck(string str)
+        {
+            if (str.ToUpper() == "true".ToUpper())
+                return true;
+            if (str.ToUpper() == "1".ToUpper())
+                return true;
+            return false;
+        }
 
         /// <summary>
         /// 璇诲彇grid鐨勫綋鍓嶈
@@ -1745,8 +1753,10 @@
                 if (column.Tag == null || column.Tag.ToString().EndsWith("edit"))
                     column.OptionsColumn.ReadOnly = false;
                 else
-                    //column.OptionsColumn.ReadOnly = true;
-                column.OptionsColumn.ReadOnly = !isPostSearch;
+                    column.OptionsColumn.ReadOnly = true;
+
+                //if(isPostSearch==false)
+                //    column.OptionsColumn.ReadOnly = true;
 
                 if (isPostSearch == true)
                 {
@@ -2065,7 +2075,8 @@
             }
 
         }
-        public static void PrintAuto(DevExpress.XtraEditors.TextEdit txt_psnQty_1, DevExpress.XtraEditors.TextEdit txt_iCount_1, DevExpress.XtraEditors.RadioGroup radOut) {
+        public static void PrintAuto(DevExpress.XtraEditors.TextEdit txt_psnQty_1, DevExpress.XtraEditors.TextEdit txt_iCount_1, DevExpress.XtraEditors.RadioGroup radOut)
+        {
             txt_psnQty_1.Text = "";
             txt_iCount_1.Text = "";
             radOut.Properties.Items[0].Description = "鍏ㄨ嚜鍔�";
@@ -2086,6 +2097,7 @@
                 return 0;
             return decimal.Parse(txt);
         }
+      
     }
 
     /// <summary>

--
Gitblit v1.9.3