From 3cf7cd4d37f38a60a65f2a066f6403db9d24e6e0 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期二, 24 十二月 2024 08:50:41 +0800
Subject: [PATCH] 细节

---
 DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs |   92 +++++++++++++++++++++++++++++++++++++--------
 1 files changed, 75 insertions(+), 17 deletions(-)

diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
index bd91ba9..2657a09 100644
--- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
+++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -269,21 +269,30 @@
         {
             isEdt = !isEdt;
             if (gridViews != null)
+            {
                 foreach (var gv in gridViews)
                 {
                     foreach (GridColumn colmn in gv.Columns)
                     {
+                        colmn.OptionsColumn.AllowEdit = true;
                         if (colmn.Name.ToString().Contains("gvMxDel") || colmn.Name.ToString().Contains("gvMxTui"))
                         {
-                            //  colmn.Visible = !isEdt;
-                            //  break;
-                            colmn.OptionsColumn.AllowEdit = true;
+                            colmn.Visible = !isEdt;
                         }
                         else
-                            colmn.OptionsColumn.AllowEdit = !isEdt;
+                        {
+                            if (isEdt == false) {
+                                if (colmn.Tag != null && colmn.Tag.ToString().EndsWith("edit"))
+                                    colmn.OptionsColumn.ReadOnly = isEdt;
+                                else
+                                    colmn.OptionsColumn.ReadOnly = !isEdt;
+                            }
+                            else
+                                colmn.OptionsColumn.ReadOnly = isEdt;
+                        }
                     }
-                    //gv.OptionsBehavior.Editable = !isEdt;
                 }
+            }
             var _btnAry = controls.Find("btnSelect", false);
             if (_btnAry.Length > 0)
             {
@@ -603,6 +612,17 @@
                                 txt.Enabled = false;
                             continue;
                         }
+                        //鑷畾daa
+                        if (colType is UcLookDaa)
+                        {
+                            var txt = colType as UcLookDaa;
+                            txt.SetIdOrCode(strVal);
+                            if (txt.IsReadly == false)
+                                txt.Enabled = !isEdt;
+                            else
+                                txt.Enabled = false;
+                            continue;
+                        }
                         if (colType is SimpleButton)
                         {
                             var txt = colType as SimpleButton;
@@ -629,21 +649,31 @@
         {
             isEdt = !isEdt;
             if (gridViews != null)
+            {
                 foreach (var gv in gridViews)
                 {
                     foreach (GridColumn colmn in gv.Columns)
                     {
+                        colmn.OptionsColumn.AllowEdit = true;
                         if (colmn.Name.ToString().Contains("gvMxDel") || colmn.Name.ToString().Contains("gvMxTui"))
                         {
-                            //  colmn.Visible = !isEdt;
-                            //  break;
-                            colmn.OptionsColumn.AllowEdit = true;
+                            colmn.Visible = !isEdt;
                         }
                         else
-                            colmn.OptionsColumn.AllowEdit = !isEdt;
+                        {
+                            if (isEdt == false)
+                            {
+                                if (colmn.Tag != null && colmn.Tag.ToString().EndsWith("edit"))
+                                    colmn.OptionsColumn.ReadOnly = isEdt;
+                                else
+                                    colmn.OptionsColumn.ReadOnly = !isEdt;
+                            }
+                            else
+                                colmn.OptionsColumn.ReadOnly = isEdt;
+                        }
                     }
-                    //gv.OptionsBehavior.Editable = !isEdt;
                 }
+            }
             foreach (Control ctrl in controls)
             {
                 //澶氳鏂囨湰
@@ -823,6 +853,14 @@
                     txt.Enabled = !isEdt;
                     continue;
                 }
+                //鑷畾daa
+                if (ctrl is UcLookDaa)
+                {
+                    var txt = ctrl as UcLookDaa;
+                    txt.SetIdOrCode("-1");
+                    txt.Enabled = !isEdt;
+                    continue;
+                }
                 if (ctrl is SimpleButton)
                 {
                     var txt = ctrl as SimpleButton;
@@ -844,21 +882,26 @@
         {
             isEdt = !isEdt;
             if (gridViews != null)
+            {
                 foreach (var gv in gridViews)
                 {
                     foreach (GridColumn colmn in gv.Columns)
                     {
+                        colmn.OptionsColumn.AllowEdit = true;
                         if (colmn.Name.ToString().Contains("gvMxDel") || colmn.Name.ToString().Contains("gvMxTui"))
                         {
-                            //  colmn.Visible = !isEdt;
-                            //  break;
-                            colmn.OptionsColumn.AllowEdit = true;
+                            colmn.Visible = !isEdt;
                         }
                         else
-                            colmn.OptionsColumn.AllowEdit = !isEdt;
+                        {
+                            if (colmn.Tag!=null && colmn.Tag.ToString().EndsWith("edit"))
+                                colmn.OptionsColumn.ReadOnly = isEdt;
+                            else
+                                colmn.OptionsColumn.ReadOnly = !isEdt;
+                        }
                     }
-                    //gv.OptionsBehavior.Editable = !isEdt;
                 }
+            }
             foreach (Control ctrl in controls)
             {
                 //鏂囨湰
@@ -1038,6 +1081,23 @@
                         txt.Enabled = !isEdt;
                     else
                         txt.Enabled = false;
+                    continue;
+                }
+                //鑷畾daa
+                if (ctrl is UcLookDaa)
+                {
+                    var txt = ctrl as UcLookDaa;
+                    if (txt.IsReadly == false)
+                        txt.Enabled = !isEdt;
+                    else
+                        txt.Enabled = false;
+                    continue;
+                }
+
+                if (ctrl is SimpleButton)
+                {
+                    var txt = ctrl as SimpleButton;
+                    txt.Enabled = !isEdt;
                     continue;
                 }
             }
@@ -1652,8 +1712,6 @@
             Regex regex = new Regex("^[0-9]+$");
             return regex.IsMatch(str);
         }
-
-
 
     }
 

--
Gitblit v1.9.3