From 28e0b0a36d0b1a842d8a140c75533c25485b8c70 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期四, 02 一月 2025 08:20:43 +0800
Subject: [PATCH] 采购

---
 DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs |   35 ++++++++++++++++++++---------------
 1 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
index 37332df..f5afa9d 100644
--- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
+++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -275,13 +275,21 @@
                     foreach (GridColumn colmn in gv.Columns)
                     {
                         colmn.OptionsColumn.AllowEdit = true;
+
+                        if (colmn.Name.ToString().Contains("gvBtnAlawys") )
+                        {
+                            colmn.Visible = true;
+                            colmn.OptionsColumn.ReadOnly = false;
+                        };
+
                         if (colmn.Name.ToString().Contains("gvMxDel") || colmn.Name.ToString().Contains("gvMxTui"))
                         {
                             colmn.Visible = !isEdt;
                         }
                         else
                         {
-                            if (isEdt == false) {
+                            if (isEdt == false)
+                            {
                                 if (colmn.Tag != null && colmn.Tag.ToString().EndsWith("edit"))
                                     colmn.OptionsColumn.ReadOnly = isEdt;
                                 else
@@ -344,25 +352,22 @@
                             var txt = colType as ComboBoxEdit;
                             if (txt.Properties.TextEditStyle ==
                                 TextEditStyles.DisableTextEditor)
-                                txt.SelectedIndex = int.Parse(strVal);
+                                try
+                                {
+                                    txt.SelectedIndex = int.Parse(strVal);
+                                }
+                                catch (Exception)
+                                {
+
+                                    txt.Text = strVal;
+                                }
+
                             else
                                 txt.Text = strVal;
                             txt.ReadOnly = isEdt;
                             continue;
                         }
 
-                        //涓嬫媺
-                        if (colType is ComboBoxEdit)
-                        {
-                            var txt = colType as ComboBoxEdit;
-                            if (txt.Properties.TextEditStyle ==
-                                TextEditStyles.DisableTextEditor)
-                                txt.SelectedIndex = int.Parse(strVal);
-                            else
-                                txt.Text = strVal;
-                            txt.ReadOnly = isEdt;
-                            continue;
-                        }
 
                         //鑷畾涔変笅鎷�
                         if (colType is UcComBox)
@@ -912,7 +917,7 @@
                         }
                         else
                         {
-                            if (colmn.Tag!=null && colmn.Tag.ToString().EndsWith("edit"))
+                            if (colmn.Tag != null && colmn.Tag.ToString().EndsWith("edit"))
                                 colmn.OptionsColumn.ReadOnly = isEdt;
                             else
                                 colmn.OptionsColumn.ReadOnly = isEdt;

--
Gitblit v1.9.3